Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. function enigma.eidolon ()
  2. for i = 1, NPCs.Count() do
  3. local npc = NPCs.Get(i)
  4. if npc and Entity.IsAlive(npc) and (NPC.GetUnitName(npc) == "npc_dota_greater_eidolon" or NPC.GetUnitName(npc) == "npc_dota_eidolon" or NPC.GetUnitName(npc) == "npc_dota_dire_eidolon" or NPC.GetUnitName(npc) == "npc_dota_lesser_eidolon" or NPC.HasModifier(npc, "modifier_dominated") or NPC.GetUnitName(npc) == string.match(NPC.GetUnitName(npc) , 'npc_dota_necronomicon_archer_.') or NPC.GetUnitName(npc) == string.match(NPC.GetUnitName(npc) , 'npc_dota_necronomicon_warrior_.') or NPC.GetUnitName(npc) == "npc_dota_enigma_treant_large" ) then
  5. eidolon = npc
  6. end
  7. end
  8. end
  9. function enigma.denayTarget ()
  10. if not eidolon then return end
  11. for i = 1, NPCs.Count() do
  12. local npc = NPCs.Get(i)
  13. if npc and Entity.IsAlive(npc) and Entity.GetHealth(npc) < NPC.GetMinDamage(eidolon)*2 then
  14. denayTarget = npc
  15. end
  16. end
  17. end
  18.  
  19. function enigma.denay ()
  20. if not eidolon or denayTarget then return end
  21. if NPC.IsEntityInRange(eidolon, denayTarget, NPC.GetAttackRange(eidolon)) then
  22. Player.AttackTarget(myPlayer, eidolon, denayTarget)
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement