EverlingSisters.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/EverlingSisters.lua
  3. Script Author : smash
  4. Script Date : 2016.09.09 05:09:39
  5. Script Purpose : Checking if all of the Everling sisters have been killed for this instance
  6. : Alexa will spawn once again if so
  7. --]]
  8. --Location IDs
  9. local SISTERS = {
  10. JENNI = 616531,
  11. SHEILA = 616585,
  12. DEIRDRE = 616611,
  13. CRYSTA = 616609,
  14. ELISE = 616586,
  15. MELANIE = 616608
  16. }
  17. function CheckSistersKilled(NPC, Spawn)
  18. --Using Sheila's bedroom door to track this
  19. --Random but it should never despawn
  20. local zone = GetZone(NPC)
  21. local door = GetSpawnByLocationID(zone, 1439498)
  22. SetTempVariable(door, GetSpawnLocationID(NPC), "killed")
  23. for k,v in pairs(SISTERS) do
  24. if GetTempVariable(door, v) ~= "killed" then
  25. return
  26. end
  27. end
  28. --All of the sisters have been killed, spawn Alexa where this sister died
  29. local alexa = SpawnMob(GetZone(NPC), 1780201, 0, GetX(NPC), GetY(NPC), GetZ(NPC), 0)
  30. FaceTarget(alexa, Spawn)
  31. end
  32. function death(NPC, Spawn)
  33. CheckSistersKilled(NPC, Spawn)
  34. end