9
3

ADarkbladeAssassin.lua 921 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : SpawnScripts/Generic/ADarkbladeAssassin.lua
  3. Script Author : Ememjr
  4. Script Date : 2019.10.06 04:10:59
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function group_dead(NPC, Spawn)
  11. local zone = GetZone(Spawn)
  12. local Spawn2 = GetSpawnByLocationID(zone, 1586531)
  13. Say(NPC, "group_dead triggered")
  14. -- if not nil then first group is dead
  15. if GetTempVariable(Spawn2,"FirstGroupDead") ~= nil then
  16. -- spawn named here
  17. SpawnByLocationID(zone, 1586529)
  18. SpawnByLocationID(zone, 1586530)
  19. elseif GetTempVariable(Spawn2,"FirstGroupDead") == nil then
  20. -- if nil then this is first group and set to 1
  21. Say(Spawn, "I killed the first group")
  22. SetTempVariable(Spawn2,"FirstGroupDead",1)
  23. end
  24. end
  25. function respawn(NPC)
  26. local zone = GetZone(NPC)
  27. SetTempVariable(Spawn2,"FirstGroupDead", nil)
  28. end