Hello guys! I'm working on my first attempt on LUA Scripting. I made a custom boss, having 3 phases but phase 3 doesn't work properly. It kills every player that's near him, spawns a guard near him and stays in combat even the players wiped but it doesn't kill himself. I tried with:
but doesn't work. I tried attacking himself with a spell but yet he regenerates too fast even if he's on combat. Is there any way left to kill himself after all players are dead?Code:pUnit:SetHealthPct(0)
P.S.: Don't say he's a NPC EMO. From battle's view, he loses control of his body and practically die but AFTER he kills everyone (spawning a guard to protect his loot).
P.S.S.: I'm using ArcEmu.