Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i = 1, Game.MissileCount() do
- local obj = Game.Missile(i)
- if obj then
- local castp = obj.missileData.endPos
- --print(walllist)
- local target = obj.missileData.startPos
- if target and table.contains(walllist, obj.missileData.name:lower()) and Game.CanUseSpell(1) == 0 and isOnSegment and (GetDistanceSqr(castp, linesegment) <= 300 * 300)then --
- local target2 = GetHeroByHandle(obj.missileData.owner)
- if Saga.Wset.UseW[obj.missileData.name:lower()]:Value() then
- local linesegment, line, isOnSegment = VectorPointProjectionOnLineSegment(myHero.pos, target, castp)
- if SagaOrb == 4 then
- __gsoSpell:CastSpell(HK_W, target2)
- else
- if target2.visible then
- Control.SetCursorPos(target2)
- Control.CastSpell(HK_W, target2)
- else
- Control.SetCursorPos(target)
- Control.CastSpell(HK_W, target)
- end
- end
- end
- end
- if target and table.contains(walllist, obj.missileData.name:lower()) and Game.CanUseSpell(1) == 0 and GetDistance(castp, target) > GetDistance(target) then --
- local target2 = GetHeroByHandle(obj.missileData.owner)
- if Saga.Wset.UseW[obj.missileData.name:lower()]:Value() then
- local linesegment2, line2, isOnSegment2 = VectorPointProjectionOnLineSegment(castp, target, myHero.pos)
- if isOnSegment2 and (GetDistanceSqr(myHero.pos, linesegment2) <= 300 * 300) then
- if SagaOrb == 4 then
- __gsoSpell:CastSpell(HK_W, obj.missileData.startPos)
- else
- if target2.visible then
- Control.SetCursorPos(target2)
- Control.CastSpell(HK_W, target2)
- else
- Control.SetCursorPos(target)
- Control.CastSpell(HK_W, target)
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement