ComponentsForGimble.lua 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : Quests/TheCommonlands/ComponentsForGimble.lua
  3. Script Purpose : Handles the quest, "Components for Gimble"
  4. Script Author : premierio015
  5. Script Date : 22.05.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : Gimble Cognoggin
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to collect Strongbox Deceiver meat", 5, 100, "I'm searching for components that Gimble Cognoggin needs me to retrieve in the Wailing Caves. ", 320, 2580027)
  14. AddQuestStepKill(Quest, 2, "I need to collect goo from a Primordial Menace", 5, 100, "I'm searching for components that Gimble Cognoggin needs me to retrieve in the Wailing Caves. ", 8, 2580026)
  15. AddQuestStepKill(Quest, 3, "I need to collect essence from a Shin`Ree Spiritist", 5, 100, "I'm searching for components that Gimble Cognoggin needs me to retrieve in the Wailing Caves. ", 182, 2580015)
  16. AddQuestStepKill(Quest, 4, "I need to collect an egg sac from a Lurid Ripper", 5, 100, "I'm searching for components that Gimble Cognoggin needs me to retrieve in the Wailing Caves. ", 144, 2580011)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. FaceTarget(QuestGiver, Player)
  24. local conversation = CreateConversation()
  25. AddConversationOption(conversation, "I'll return with what you need, have no doubt about that. What do you need?")
  26. StartConversation(conversation, QuestGiver, Player, "Folks are so greedy these days. I suppose I don't blame them. In recent years, it's become every gnome for himself. I need you to venture into the Wailing Caves and retrieve some reagents. I can't tell you why I need them, but I will reward you well if you return with the ingredients. Here, let me write in your journal what I need.")
  27. PlayFlavor(NPC, "voiceover/english/gimble_cognoggin/commonlands/gimblecognoggin001.mp3", "", "", 3183728317, 519978883, Spawn)
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is declined
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. -- Remove any quest specific items here when the quest is deleted
  34. end
  35. function Step1Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I've found some Strongbox Deceiver meat.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I've collected the Primordial Menace goo.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step3Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I've collected the Spiritist's essence.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "I've collected the Lurid Ripper's egg sack.")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function CheckProgress(Quest, QuestGiver, Player)
  52. if QuestStepIsComplete(Player, 5229, 1) and QuestStepIsComplete(Player, 5229, 2) and QuestStepIsComplete(Player, 5229, 3) and QuestStepIsComplete(Player, 5229, 4) then
  53. UpdateQuestTaskGroupDescription(Quest, 1, "I've collected the components for Gimble Cognoggin's potion.")
  54. AddQuestStepChat(Quest, 5, "I still need to return to Gimble Cognoggin to give him the components", 1, "I still need to return to Gimble Cognoggin to give him the components.", 11, 2580011)
  55. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  56. end
  57. end
  58. function QuestComplete(Quest, QuestGiver, Player)
  59. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  60. UpdateQuestStepDescription(Quest, 5, "I've spoken with Gimble Cognoggin after finding all the components he needed.")
  61. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Gimble Cognoggin after finding all the components he needed.")
  62. UpdateQuestDescription(Quest, "Having delved deeply into the Wailing Caves, I can now say that goo is disgusting! That place is filled with slime and skeletons. But I did see something that piqued my interest. There were a couple of live orcs in that cave of a clan named the Ree. I wonder what they're doing there.")
  63. GiveQuestReward(Quest, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if Step == 1 then
  67. Step1Complete(Quest, QuestGiver, Player)
  68. elseif Step == 2 then
  69. Step2Complete(Quest, QuestGiver, Player)
  70. elseif Step == 3 then
  71. Step3Complete(Quest, QuestGiver, Player)
  72. elseif Step == 4 then
  73. Step4Complete(Quest, QuestGiver, Player)
  74. elseif Step == 5 then
  75. QuestComplete(Quest, QuestGiver, Player)
  76. end
  77. end