evilgravestonespawner.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/evilgravestonespawner.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.20 12:09:43
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetRequiredQuest(NPC, 5747, 1)
  10. SetRequiredQuest(NPC, 5747, 2)
  11. end
  12. function casted_on(NPC, Spawn, Message)
  13. local zone = GetZone(NPC)
  14. local Rockbelly = GetSpawnByLocationID(zone, 133774610)
  15. if Message == "kick gravestone" and Rockbelly == nil then
  16. if GetQuestStep(Spawn,5747) ==1 then
  17. -- SendPopUpMessage(Spawn, "You have disturbed the fallen captain's grave!", 230, 230, 230)
  18. RockbellyNew = SpawnByLocationID(zone,133774610)
  19. AddTimer(NPC,2000,"Attacking",1,Spawn)
  20. SetStepComplete(Spawn,5747,1)
  21. end
  22. end
  23. end
  24. function Attacking(NPC,Spawn)
  25. local zone = GetZone(NPC)
  26. Rockbelly = GetSpawnByLocationID(zone,133774610)
  27. PlayFlavor(Rockbelly, "voiceover/english/captain_rockbelly/tutorial_island02_fvo_ghostshout.mp3", "Get youz away from meez treasures! Dis meez loots!", "", 3040387050, 4243014787)
  28. if IsInCombat(Rockbelly)==false then
  29. Attack(Rockbelly,Spawn)
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end