frozen_pincer_chowder.lua 790 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/a_frozen_pincer_chowder.lua
  3. Script Purpose : the spawn frozen_pincer_chowder
  4. Script Author : theFoof
  5. Script Date : 2013.9.2
  6. Script Notes :
  7. --]]
  8. local FrozenChowder = 88
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, FrozenChowder, 4)
  11. AddSpawnAccess(NPC, NPC)
  12. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function casted_on(NPC, Spawn, SpellName)
  18. if SpellName == 'pick up a bowl of frozen pincer chowder' then
  19. if GetQuestStep(Spawn, FrozenChowder) == 4 then
  20. SetStepComplete(Spawn, FrozenChowder, 4)
  21. RemoveSpawnAccess(NPC, Spawn)
  22. end
  23. end
  24. end
  25. function SpawnAccess(NPC, Spawn)
  26. if GetQuestStep(Spawn, FrozenChowder) == 4 then
  27. AddSpawnAccess(NPC, Spawn)
  28. end
  29. end