9
3

gobblerocks_hideout.lua 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. --[[
  2. Script Name : Quests/GobblerocksHideout/gobblerocks_hideout.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.16 03:07:11
  5. Script Purpose :
  6. Zone : GobblerocksHideout
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I need to kill 5 Gobblerock grunts.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490001, 3490052)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. -- Add dialog here for when the quest is accepted
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is declined
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. -- Remove any quest specific items here when the quest is deleted
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have killed 5 Gobblerock grunts.")
  26. AddQuestStepKill(Quest, 2, "I need to kill 5 Gobblerock swindlers.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490000, 3490051)
  27. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  28. end
  29. function Step2Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "I have killed 5 Gobblerock swindlers.")
  31. AddQuestStepKill(Quest, 3, "I need to kill 5 Gobblerock shaman.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490002, 3490053)
  32. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  33. end
  34. function Step3Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 3, "I have killed 5 Gobblerock shaman.")
  36. AddQuestStep(Quest, 4, "I should read the book.", 1, 100, "I believe I will find more pages of this book in the Feerrott.", 2180)
  37. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  38. end
  39. function Step4Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 4, "I have read the book.")
  41. AddQuestStepKill(Quest, 5, "I need to kill 5 Gobblerock butchers.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490003, 3490054)
  42. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  43. end
  44. function Step5Complete(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 5, "I have killed 5 Gobblerock butchers.")
  46. AddQuestStepKill(Quest, 6, "I need to kill 5 Gobblerock tricksters.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490005, 3490056)
  47. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  48. end
  49. function Step6Complete(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 6, "I have killed 5 Gobblerock tricksters.")
  51. AddQuestStepKill(Quest, 7, "I need to kill 5 Gobblerock haruspex.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490004, 3490055)
  52. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  53. end
  54. function Step7Complete(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 7, "I have killed 5 Gobblerock haruspex.")
  56. AddQuestStep(Quest, 8, "I should read the book.", 1, 100, "I believe I will find more pages of this book in the Feerrott.", 2180)
  57. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  58. end
  59. function Step8Complete(Quest, QuestGiver, Player)
  60. UpdateQuestStepDescription(Quest, 8, "I have read the book.")
  61. AddQuestStepKill(Quest, 9, "I need to kill 5 Gobblerock brutes.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490011, 3490062)
  62. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  63. end
  64. function Step9Complete(Quest, QuestGiver, Player)
  65. UpdateQuestStepDescription(Quest, 9, "I have killed 5 Gobblerock brutes.")
  66. AddQuestStepKill(Quest, 10, "I need to kill 5 Gobblerock hooligans.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490010, 3490061)
  67. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  68. end
  69. function Step10Complete(Quest, QuestGiver, Player)
  70. UpdateQuestStepDescription(Quest, 10, "I have killed 5 Gobblerock hooligans.")
  71. AddQuestStepKill(Quest, 11, "I need to kill 5 Gobblerock prophets.", 5, 100, "I believe I will find more pages of this book in the Feerrott.", 11, 3490009, 3490060)
  72. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  73. end
  74. function Step11Complete(Quest, QuestGiver, Player)
  75. UpdateQuestStepDescription(Quest, 11, "I have killed 5 Gobblerock prophets.")
  76. AddQuestStep(Quest, 12, "I should read the book.", 1, 100, "I believe I will find more pages of this book in the Feerrott.", 2180)
  77. AddQuestStepCompleteAction(Quest, 12, "QuestComplete")
  78. end
  79. function QuestComplete(Quest, QuestGiver, Player)
  80. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  81. UpdateQuestStepDescription(Quest, 12, "I have read the book.")
  82. UpdateQuestTaskGroupDescription(Quest, 1, "I've found the book's missing pages.")
  83. if HasItem(Player, 1841) then -- a goblin's notebook - The Hideout(normal)
  84. RemoveItem(Player, 1841)
  85. end
  86. UpdateQuestDescription(Quest, "I have read the whole book.")
  87. GiveQuestReward(Quest, Player)
  88. end
  89. function Reload(Quest, QuestGiver, Player, Step)
  90. if Step == 1 then
  91. Step1Complete(Quest, QuestGiver, Player)
  92. elseif Step == 2 then
  93. Step2Complete(Quest, QuestGiver, Player)
  94. elseif Step == 3 then
  95. Step3Complete(Quest, QuestGiver, Player)
  96. elseif Step == 4 then
  97. Step4Complete(Quest, QuestGiver, Player)
  98. elseif Step == 5 then
  99. Step5Complete(Quest, QuestGiver, Player)
  100. elseif Step == 6 then
  101. Step6Complete(Quest, QuestGiver, Player)
  102. elseif Step == 7 then
  103. Step7Complete(Quest, QuestGiver, Player)
  104. elseif Step == 8 then
  105. Step8Complete(Quest, QuestGiver, Player)
  106. elseif Step == 9 then
  107. Step9Complete(Quest, QuestGiver, Player)
  108. elseif Step == 10 then
  109. Step10Complete(Quest, QuestGiver, Player)
  110. elseif Step == 11 then
  111. Step11Complete(Quest, QuestGiver, Player)
  112. elseif Step == 12 then
  113. QuestComplete(Quest, QuestGiver, Player)
  114. end
  115. end