tillins_gnoll_woes.lua 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : Quests/Antonica/tillins_gnoll_woes.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.08.12 07:08:28
  5. Script Purpose :
  6. Zone : Antonica, Blackburrow
  7. Quest Giver: Sergeant Tillin(120322)
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. SetQuestFeatherColor(Quest, 3)
  13. SetQuestRepeatable(Quest)
  14. local RandomChoice = MakeRandomInt(1, 3)
  15. if RandomChoice == 1 then
  16. AddQuestStepKill(Quest, 1, "Gather ore samples from Sabertooth miners and excavators in Blackburrow.", 5, 50, "I need to gather the items required by Sergeant Tillin.", 1164, 170010)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete_OreSamples")
  18. elseif RandomChoice == 2 then
  19. AddQuestStepKill(Quest, 1, "Find a set of the plans the Sabertooth tacticians in Blackburrow are going to use.", 1, 50, "I need to gather the items required by Sergeant Tillin.", 185, 170043)
  20. AddQuestStepCompleteAction(Quest, 1, "Step1Complete_Plans")
  21. elseif RandomChoice == 3 then
  22. AddQuestStepKill(Quest, 1, "Gather three of the rune stones from the Sabertooth Diviners in Blackburrow.", 3, 100, "I need to gather the items required by Sergeant Tillin.", 373, 170019)
  23. AddQuestStepCompleteAction(Quest, 1, "Step1Runestones")
  24. end
  25. end
  26. function Accepted(Quest, QuestGiver, Player)
  27. FaceTarget(QuestGiver, Player)
  28. local conversation = CreateConversation()
  29. PlayFlavor(QuestGiver, "voiceover/english/sergeant_tillin/antonica/sergeant_tillin002.mp3", "", "wink", 3839046012, 1664305594, Player)
  30. AddConversationOption(conversation, "Sounds good.")
  31. StartConversation(conversation, QuestGiver, Player, "We need information from a group of gnolls. Let me take a look at that little book at your side, and I'll write down what we're looking for. When you get back, I'll have a fat purse waiting for you!")
  32. end
  33. function Declined(Quest, QuestGiver, Player)
  34. -- Add dialog here for when the quest is declined
  35. end
  36. function Deleted(Quest, QuestGiver, Player)
  37. -- Remove any quest specific items here when the quest is deleted
  38. end
  39. function Step1Complete_OreSamples(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 1, "I've gathered the ore samples I needed.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step1Complete_Plans(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 1, "I've found a set of the plans Tillin needed.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function Step1Runestones(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 1, "I've gathered the rune stones Tillin wanted.")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function CheckProgress(Quest, QuestGiver, Player)
  52. if QuestStepIsComplete(Player, 5336, 1) then
  53. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered the items Sergeant Tillin needed.")
  54. AddQuestStepChat(Quest, 2, "Speak with Sergeant Tillin at Gnollslayer Keep in Antonica.", 1, "I need to return to Sergeant Tillin with what I've found.", 11, 120322)
  55. AddQuestStepCompleteAction(Quest, 2, "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, 4, "I've spoken with Sergeant Tillin.")
  61. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Sergeant Tillin.")
  62. UpdateQuestDescription(Quest, "I've gathered all the items that Sergeant Tillin needed.")
  63. GiveQuestReward(Quest, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if Step == 1 then
  67. local RandomChoice = MakeRandomInt(1, 3)
  68. if RandomChoice == 1 then
  69. Step1Complete_OreSamples(Quest, QuestGiver, Player)
  70. elseif choice == 2 then
  71. Step1Complete_Plans(Quest, QuestGiver, Player)
  72. elseif choice == 3 then
  73. Step1Runestones(Quest, QuestGiver, Player)
  74. end
  75. elseif Step == 2 then
  76. QuestComplete(Quest, QuestGiver, Player)
  77. end
  78. end