TalkTestQuestFairy.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --[[
  2. Script Name : SpawnScripts/thunderdome/TalkTestQuestFairy.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.12 02:07:10
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function death(NPC, Spawn)
  11. if GetSpawnLocationID(NPC)== 133773735 then
  12. local zone = GetZone(NPC)
  13. local Camp1Boss = GetSpawnByLocationID(zone, 133773735)
  14. if IsAlive(Camp1Boss) == true then
  15. else
  16. if GetSpawnByLocationID(zone, 133773749)~=nil then
  17. local Merchant = GetSpawnByLocationID(zone, 133773749)
  18. Despawn(Merchant)
  19. local HappyMerchant = SpawnByLocationID(zone,133773750)
  20. end
  21. AddTimer(NPC, 9000, "Camp1Despawn", 1, Spawn)
  22. end
  23. end
  24. end
  25. function Camp1Despawn(NPC)
  26. local zone = GetZone(NPC)
  27. local Camp1Object = GetSpawnByLocationID(zone, 133773730)
  28. local Object1 = GetSpawnByLocationID(zone, 133773736)
  29. local Object2 = GetSpawnByLocationID(zone, 133773737)
  30. local HappyMerchant = GetSpawnByLocationID(zone,133773750)
  31. if HappyMerchant~= nil then
  32. Despawn(HappyMerchant)
  33. end
  34. if Camp1Object~= nil then
  35. Despawn(Camp1Object)
  36. end
  37. if Object1~= nil then
  38. Despawn(Object1)
  39. end
  40. if Object2~= nil then
  41. Despawn(Object2)
  42. end
  43. end
  44. function respawn(NPC)
  45. spawn(NPC)
  46. end