9
3

luckywolfpawrecipe.lua 828 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/luckywolfpawrecipe.lua
  3. Script Purpose : "lucky wolf paw recipe" sign
  4. Script Author : theFoof
  5. Script Date : 2013.5.15
  6. Script Notes :
  7. --]]
  8. local HadAHammer = 12
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  12. SetRequiredQuest(NPC, HadAHammer, 1)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function SpawnAccess(NPC, Player)
  18. if GetQuestStep(Player, HadAHammer) >= 1 or HasCompletedQuest(Player, HadAHammer) then
  19. AddSpawnAccess(NPC, Player)
  20. end
  21. end
  22. function casted_on(Target, Caster, SpellName)
  23. if SpellName == "pick up recipe" then
  24. if HasItem(Caster, 32122) == false and HasQuest(Caster, HadAHammer) then
  25. SummonItem(Caster, 32122)
  26. end
  27. end
  28. end