Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local maxDistance = 3 -- max sqms the target can be before resetting the targeter
- local function check()
- local target = Creature.GetByID(Self.TargetID())
- if(target:isValid() and target:isAlive() and target:isVisible())then
- if(target:DistanceFromSelf() > maxDistance)then
- setTargetingEnabled(false)
- setTargetingEnabled(true)
- end
- end
- end
- while(true)do
- check()
- wait(500)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement