9
3

Weaponrack.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. Fighter = GetQuest(Player,5726)
  22. SetStepComplete(Player,FighterGI,1)
  23. if not HasItem(Player, 1001011,1) and not HasItem(Player, 75057,1) then
  24. GiveQuestItem(Fighter,Player,"You found some items that suit you on the weapon rack.",1001011, 75057)
  25. end
  26. elseif GetQuestStep(Player,PriestGI)==1 then
  27. Priest = GetQuest(Player,5727)
  28. SetStepComplete(Player,PriestGI,1)
  29. if not HasItem(Player, 1001011,1) and not HasItem(Player, 73731,1) then
  30. GiveQuestItem(Priest,Player,"You found some items that suit you on the weapon rack.",1001011, 73731)
  31. end
  32. elseif GetQuestStep(Player,MageGI)==1 then
  33. Mage = GetQuest(Player,5728)
  34. SetStepComplete(Player,MageGI,1)
  35. if not HasItem(Player, 1001011,1) and not HasItem(Player, 73899,1) then
  36. GiveQuestItem(Mage,Player,"You found some items that suit you on the weapon rack.",1001011,73899)
  37. end
  38. elseif GetQuestStep(Player,ScoutGI)==1 then
  39. Scout =GetQuest(Player,5729)
  40. SetStepComplete(Player,ScoutGI,1)
  41. if not HasItem(Player, 1001011,1) and not HasItem(Player, 73896,1) then
  42. GiveQuestItem(Scout,Player,"You found some items that suit you on the weapon rack.",1001011,73896)
  43. end
  44. end
  45. end
  46. end
  47. function respawn(NPC)
  48. spawn(NPC)
  49. end