Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function enigma.eidolon ()
- for i = 1, NPCs.Count() do
- local npc = NPCs.Get(i)
- 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
- eidolon = npc
- end
- end
- end
- function enigma.denayTarget ()
- if not eidolon then return end
- for i = 1, NPCs.Count() do
- local npc = NPCs.Get(i)
- if npc and Entity.IsAlive(npc) and Entity.GetHealth(npc) < NPC.GetMinDamage(eidolon)*2 then
- denayTarget = npc
- end
- end
- end
- function enigma.denay ()
- if not eidolon or denayTarget then return end
- if NPC.IsEntityInRange(eidolon, denayTarget, NPC.GetAttackRange(eidolon)) then
- Player.AttackTarget(myPlayer, eidolon, denayTarget)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement