pileofRyGorrbones.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/pileofRyGorrbones.lua
  3. Script Purpose : for the spawn "pile of Ry'Gorr bones"
  4. Script Author : theFoof
  5. Script Date : 2013.5.29
  6. Script Notes :
  7. --]]
  8. local TheGauntlet = 36
  9. local PouringSkellies = 40
  10. function spawn(NPC)
  11. SetRequiredQuest(NPC, TheGauntlet, 1, 0, 0, 20)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function casted_on(NPC, Spawn, SpellName)
  17. if SpellName == 'Smash the bones' then
  18. if GetQuestStep(Spawn, TheGauntlet) == 1 then
  19. local X = GetX(NPC)
  20. local Y = GetY(NPC)
  21. local Z = GetZ(NPC)
  22. AddStepProgress(Spawn, TheGauntlet, 1, 1)
  23. local mob = SpawnMob(GetZone(Spawn), 4701121, 0, X, Y, Z, 0)
  24. Attack(mob, Spawn)
  25. Despawn(NPC)
  26. end
  27. elseif SpellName == 'pour one out' then
  28. if GetQuestStep(Spawn, PouringSkellies) == 1 then
  29. SpawnSet(NPC, "visual_state", "491")
  30. AddTimer(NPC, 4000, "depop")
  31. AddStepProgress(Spawn, PouringSkellies, 1, 1)
  32. SendMessage(Player, "You have poured Fronden's Finest on the orc bones.")
  33. end
  34. end
  35. end
  36. function depop(NPC, Spawn)
  37. Despawn(NPC)
  38. end