Weaponrack.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/Weaponrack.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.10 04:09:34
  5. Script Purpose : Facilitates Garven Tralk's quest update.
  6. :
  7. --]]
  8. local FighterGI = 5726
  9. local PriestGI = 5727
  10. local MageGI = 5728
  11. local ScoutGI = 5729
  12. function spawn(NPC)
  13. SetRequiredQuest(NPC,FighterGI,1)
  14. SetRequiredQuest(NPC,PriestGI,1)
  15. SetRequiredQuest(NPC,MageGI,1)
  16. SetRequiredQuest(NPC,ScoutGI,1)
  17. end
  18. function casted_on(NPC, Player, Message)
  19. if Message == "Search weapon rack" then
  20. if GetQuestStep(Player,FighterGI)==1 then
  21. SetStepComplete(Player,FighterGI,1)
  22. elseif GetQuestStep(Player,PriestGI)==1 then
  23. SetStepComplete(Player,PriestGI,1)
  24. elseif GetQuestStep(Player,MageGI)==1 then
  25. SetStepComplete(Player,MageGI,1)
  26. elseif GetQuestStep(Player,ScoutGI)==1 then
  27. SetStepComplete(Player,ScoutGI,1)
  28. end
  29. end
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end