Originally Posted by
Emanuel095
Hello, i was trying to do my first lua script to a custom boss

It involvs an add that is spawned at 70%, but when im dying the add is still there, so i was wondering if it's possible to make it disappear when players wipe.
I also wondering if it's possible to make another npc talk in the same script.
Example of what i mean, copied from Stoneharry's Lich king Script, using another thing then pUnit:
Im not quite following you, if you want the add to disappear just add the
Code:
pUnit:RemoveEvents()
In the leave combat one.
Example:
Code:
Function Testeststt_Pull(pUnit, Event)
pUnit:SendChatMessage(.....)
end
function testeststt_LeaveCombat(pUnit, Event)
pUnit:RemoveEvents()
end
RegisterUnitEvent(NPCID, 1, "Testeststt_Pull")
RegisterUnitEvent(NPCID, 2, "Testeststt_LeaveCombat")
This just means that when the guy leaves combat, everything will disappear/reset.
As for having multiple targets talk at the same time you would be using variables at each NPC, like Harry did, he just assigned Terenas as this NPC in a variable, along with the LK and Tirion, thereby he could make them all say this and that, by timers, and the variables.
By using pUnit:SendChatMessage you are limited to ONLY that specific unit.
So if you want to have more at the same time, I'd shoot for variables.