FarSeasDirectRequisitionPBG0162.lua 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --[[
  2. Script Name : FarSeasDirectRequisitionPBG0162.lua
  3. Script Purpose : Handles the quest, "Far Seas Direct Requisition PBG0162"
  4. Script Author : Shatou
  5. Script Date : 1/8/2020
  6. Script Notes :
  7. Zone : Peat Bog
  8. Quest Giver : FSDRPBG0162 Examine Item
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local MARINER_STITCHED_BRACERS_ID = 164053
  13. local MARINER_STITCHED_SHAWL_ID = 164058
  14. local MARINER_STITCHED_SLIPPERS_ID = 164059
  15. local BOG_SLUG_ID = 8290005
  16. local TANAIRA_ID = 2340040
  17. function Init(Quest)
  18. local chance = math.random(1, 3)
  19. if chance == 1 then
  20. AddQuestRewardItem(Quest, MARINER_STITCHED_BRACERS_ID)
  21. elseif chance == 2 then
  22. AddQuestRewardItem(Quest, MARINER_STITCHED_SHAWL_ID)
  23. elseif chance == 3 then
  24. AddQuestRewardItem(Quest, MARINER_STITCHED_SLIPPERS_ID)
  25. end
  26. SetQuestFeatherColor(Quest, 3)
  27. SetQuestRepeatable(Quest)
  28. AddQuestStepKill(Quest, 1, "I must kill some bog slugs", 10, 100, "I must hunt down the creatures in the Peat Bog to fill the requisition.", 289, BOG_SLUG_ID)
  29. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have killed some bog slugs.")
  33. UpdateQuestTaskGroupDescription(Quest, 1, "I have hunted down all the resources to fill the requisition.")
  34. AddQuestStepChat(Quest, 2, "I must speak with Tanaira", 1, "I must seek out Tanaira here in the Peat Bog.", 11, TANAIRA_ID)
  35. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  36. end
  37. function QuestComplete(Quest, QuestGiver, Player)
  38. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  39. UpdateQuestStepDescription(Quest, 2, "I spoke to Tanaira.")
  40. UpdateQuestTaskGroupDescription(Quest, 2, "I have delivered the goods to Tanaira.")
  41. UpdateQuestDescription(Quest, "I filled the Far Seas Requisition and delivered the goods to the client in the Peat Bog. I have been paid in full for this work, but the order was late.")
  42. GiveQuestReward(Quest, Player)
  43. end
  44. function Reload(Quest, QuestGiver, Player, Step)
  45. if Step == 1 then
  46. Step1Complete(Quest, QuestGiver, Player)
  47. elseif Step == 2 then
  48. QuestComplete(Quest, QuestGiver, Player)
  49. end
  50. end
  51. function Accepted(Quest, QuestGiver, Player)
  52. -- Add dialog here for when the quest is accepted
  53. end
  54. function Declined(Quest, QuestGiver, Player)
  55. -- Add dialog here for when the quest is declined
  56. end