luckywolfpawrecipe.lua 800 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/luckywolfpawrecipe.lua
  3. Script Author : Ememjr
  4. Script Date : 2020.05.08 03:05:19
  5. Script Purpose :
  6. :
  7. --]]
  8. local HadAHammer = 525
  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) > 0 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