pie.lua 677 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/pie.lua
  3. Script Purpose : a pie
  4. Script Author : theFoof
  5. Script Date : 2013.9.3
  6. Script Notes :
  7. --]]
  8. local KestrelPie = 90
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function casted_on(NPC, Spawn, SpellName)
  17. if SpellName == 'pick up a kestrel pot pie' then
  18. if GetQuestStep(Spawn, KestrelPie) == 4 then
  19. RemoveSpawnAccess(NPC, Spawn)
  20. SetStepComplete(Spawn, KestrelPie, 4)
  21. end
  22. end
  23. end
  24. function SpawnAccess(NPC, Spawn)
  25. if GetQuestStep(Spawn, KestrelPie) == 4 then
  26. AddSpawnAccess(NPC, Spawn)
  27. end
  28. end