Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ts = TargetSelector(TARGET_LOW_HP, 1200, DAMAGE_PHYSICAL, true)
- function OnLoad()
- MyConfig = scriptConfig("OnDraw Bugsplat Test", "OnDraw Bugsplat Test")
- MyConfig:addParam("DrawRanges", "Draw Ranges", SCRIPT_PARAM_ONOFF, false)
- MyConfig:addParam("DrawArrow", "Draw Arrow", SCRIPT_PARAM_ONOFF, true)
- PrintChat(">> OnDraw Bugsplat Test <<")
- end
- function CanCast(Spell)
- return (myHero:CanUseSpell(Spell) == READY)
- end
- function OnTick()
- ts:update()
- end
- function OnDraw()
- if MyConfig.DrawRanges and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, ts.range, 0x808080) -- Gray
- if CanCast(_Q) then
- DrawCircle(myHero.x, myHero.y, myHero.z, QRange, 0x0099CC) -- Blue
- end
- if CanCast(_W) then
- DrawCircle(myHero.x, myHero.y, myHero.z, WRange, 0xFFFF00) -- Yellow
- end
- if CanCast(_E) then
- DrawCircle(myHero.x, myHero.y, myHero.z, ERange, 0x00FF00) -- Green
- end
- if CanCast(_R) then
- DrawCircle(myHero.x, myHero.y, myHero.z, RRange, 0xFF0000) -- Red
- end
- end
- if ts ~= nil and ValidTarget(ts.target, QRange) and not ts.target.dead then
- DrawArrowsToPos(myHero, ts.target)
- end
- end
- function DrawArrowsToPos(pos1, pos2)
- if pos1 and pos2 then
- startVector = D3DXVECTOR3(pos1.x, pos1.y, pos1.z)
- endVector = D3DXVECTOR3(pos2.x, pos2.y, pos2.z)
- DrawArrows(startVector, endVector, 60, 0xE97FA5, 100)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment