9
3

beans.lua 688 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/beans.lua
  3. Script Purpose : beans
  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 == 'a handful of halasian beans' then
  18. if GetQuestStep(Spawn, HamBeans) == 1 then
  19. Despawn(NPC)
  20. SetStepComplete(Spawn, HamBeans, 1)
  21. end
  22. end
  23. end
  24. function SpawnAccess(NPC, Spawn)
  25. if GetQuestStep(Spawn, HamBeans) == 1 then
  26. AddSpawnAccess(NPC, Spawn)
  27. end
  28. end