9
3

ham.lua 708 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/ham.lua
  3. Script Purpose : a ham
  4. Script Author : theFoof
  5. Script Date : 2013.9.3
  6. Script Notes :
  7. --]]
  8. local HamBeans = 89
  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 plate of ham and beans' then
  18. if GetQuestStep(Spawn, HamBeans) == 4 then
  19. RemoveSpawnAccess(NPC, Spawn)
  20. SetStepComplete(Spawn, HamBeans, 4)
  21. end
  22. end
  23. end
  24. function SpawnAccess(NPC, Spawn)
  25. if GetQuestStep(Spawn, HamBeans) == 4 then
  26. AddSpawnAccess(NPC, Spawn)
  27. end
  28. end