FarSeasDirectRequisitionCVS0276.lua 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : FarSeasDirectRequisitionCVS0276.lua
  3. Script Purpose : Handles the quest, "Far Seas Direct Requisition CVS0276"
  4. Script Author : Shatou
  5. Script Date : 1/6/2020
  6. Script Notes :
  7. Zone : Caves
  8. Quest Giver : Far Seas Direct Requisition CVS0276 (examine item)
  9. Preceded by : none
  10. Followed by : none
  11. --]]
  12. local WHITE_SPIDER_ID = 1970012
  13. local WHITE_SPIDERLING_ID = 1970002
  14. local ALBINO_ARACHNID = 1970010
  15. local ALCHEMIST_GARION_DUNAM_ID = 2330027
  16. function Init(Quest)
  17. AddQuestStepKill(Quest, 1, "Gather white spiderling chitin.", 10, 100, "I must hunt down the creatures in the Caves to fill the requisition.", 11, WHITE_SPIDERLING_ID,8260002 )
  18. AddQuestStepKill(Quest, 2, "Gather white spider silk.", 6, 25, "I must hunt down the creatures in the Caves to fill the requisition.", 11, WHITE_SPIDER_ID, WHITE_SPIDERLING_ID, ALBINO_ARACHNID,8260019)
  19. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. end
  22. function Step1Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 1, "I have gathered enough white spiderling chitin.")
  24. QuestCheck(Quest, QuestGiver, Player)
  25. end
  26. function Step2Complete(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 2, "I have gathered enough white spider silk.")
  28. QuestCheck(Quest, QuestGiver, Player)
  29. end
  30. function QuestCheck(Quest, QuestGiver, Player)
  31. if QuestStepIsComplete(Player,502,1) == true and QuestStepIsComplete(Player,502,2) == true then
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I have hunted down all the resources to fill the requisition.")
  33. UpdateQuestZone(Quest, "Nettleville")
  34. AddQuestStepChat(Quest, 3, "I must talk to Garion Dunam.", 1, "I must go to Nettleville to seek out Alchemist Garion Dunam.", 11, ALCHEMIST_GARION_DUNAM_ID)
  35. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  36. end
  37. end
  38. function QuestComplete(Quest, QuestGiver, Player)
  39. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  40. UpdateQuestStepDescription(Quest, 3, "I spoke to Garion Dunam.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "I have delivered the goods to Alchemist Garion Dunam.")
  42. UpdateQuestDescription(Quest, "I filled the Far Seas Requisition and delivered the goods to the client in Nettleville. I have been paid in full for this work, but the order was late.")
  43. GiveQuestReward(Quest, Player)
  44. if HasItem(Player,7046) then
  45. RemoveItem(Player,7046,1)
  46. end
  47. end
  48. function Reload(Quest, QuestGiver, Player, Step)
  49. if Step == 1 then
  50. Step1Complete(Quest, QuestGiver, Player)
  51. elseif Step == 2 then
  52. Step2Complete(Quest, QuestGiver, Player)
  53. elseif Step == 3 then
  54. QuestComplete(Quest, QuestGiver, Player)
  55. end
  56. end
  57. function Accepted(Quest, QuestGiver, Player)
  58. -- Add dialog here for when the quest is accepted
  59. end
  60. function Declined(Quest, QuestGiver, Player)
  61. -- Add dialog here for when the quest is declined
  62. end