Advertisement
Guest User

TARGET FARM

a guest
Dec 12th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. GUI:Separator()
  2.  
  3. if ( not context.lockedtargetid ) then
  4. local target = Player:GetTarget()
  5. if ( target and target.attackable ) then
  6. if(GUI:Button("Lock : "..target.name)) then
  7. context.lockedtargetid = target.id
  8. context.lockedtargetname = target.name
  9. end
  10. else
  11. GUI:Button("Lock Target: Select a valid Target")
  12. end
  13. else
  14. local validtarget = CharacterList:Get(context.lockedtargetid)
  15. if (validtarget) then
  16. Player:SetTarget(context.lockedtargetid)
  17. context.attack_target = validtarget
  18. context.attack_targetid = context.lockedtargetid
  19. end
  20. if( GUI:Button("UnLock: "..context.lockedtargetname)) then
  21. context.lockedtargetid = nil
  22. end
  23. end
  24. GUI:Separator()
  25.  
  26. local t = context.attacktarget
  27.  
  28. if context.player.buffs[10269] then context.cast = false else context.cast = true end
  29.  
  30. if (t ~= nil and t.buffs ~= nil) then
  31. local evades = { 40408, 10335 }
  32. local ignoreAttacks = { 9255, 5863, 787, 883, 5667, 10243, 27737, 21816, 43949 }
  33. local blockAttacks = { 9123, 756, 743 }
  34. local cast2 = true
  35. for _, v in pairs(table.merge(evades,table.merge(ignoreAttacks,blockAttacks))) do
  36. if (t.buffs[v] ~= nil) then
  37. cast2 = false
  38. end
  39. end
  40. if(context.cast and not cast2) then context.cast = false end
  41. end
  42.  
  43. if not context.ticks_threshold_updated then
  44. BehaviorManager:SetTicksThreshold(150)
  45. context.ticks_threshold_updated = true
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement