secret_of_the_troll.lua 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : secret_of_the_troll.lua
  3. Script Purpose : Handles the quest, "Secret of the Troll"
  4. Script Author : torsten
  5. Script Date : 14.07.2022
  6. Script Notes :
  7. Zone : Big Bend
  8. Quest Giver : Graktak Splatterblood
  9. Preceded by : That Slippery Toad
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "I need to answer Graktak's questions before he will help me get better equipment.", 1, "Graktak wants to ask me some questions before introducing me to his friends.", 11, 1340042)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I answered Graktak's first question.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I need to answer the second question before Graktak introduces me to his friends.")
  19. AddQuestStepChat(Quest, 2, "I need to answer Graktak's sesond questions before he will help me get better equipment.", 1, "Graktak wants to ask me some questions before introducing me to his friends.", 11, 1340042)
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. end
  22. function Step2Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 2, "I answered Graktak's second question.")
  24. UpdateQuestTaskGroupDescription(Quest, 2, "I need to answer all questions before Graktak introduces me to his friends.")
  25. AddQuestStepChat(Quest, 3, "I need to answer Graktak's third questions before he will help me get better equipment.", 1, "Graktak wants to ask me some questions before introducing me to his friends.", 11, 1340042)
  26. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  27. end
  28. function Step3Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 3, "I answered Graktak's third question.")
  30. UpdateQuestTaskGroupDescription(Quest, 3, "I need to answer all questions before Graktak introduces me to his friends.")
  31. AddQuestStepChat(Quest, 4, "I need to answer Graktak's foueth questions before he will help me get better equipment.", 1, "Graktak wants to ask me some questions before introducing me to his friends.", 11, 1340042)
  32. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  33. end
  34. function Step4Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 4, "I answered Graktak's fourth question.")
  36. UpdateQuestTaskGroupDescription(Quest, 4, "I need to answer all questions before Graktak introduces me to his friends.")
  37. AddQuestStepChat(Quest, 5, "I need to answer Graktak's fifth questions before he will help me get better equipment.", 1, "Graktak wants to ask me some questions before introducing me to his friends.", 11, 1340042)
  38. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  39. end
  40. function QuestComplete(Quest, QuestGiver, Player)
  41. UpdateQuestDescription(Quest, "I passed Graktak's simple quest. Being a good troll sounds like it will be easy as long as I remember to eat often, and smash things more than I eat. In the end though, Graktak told me I should speak with Braz Gutpounder on the docks here in Big Bend, or Enforcer Kurdek in The Sprawl if I had already spoken to Braz.")
  42. GiveQuestReward(Quest, Player)
  43. end
  44. function Accepted(Quest, QuestGiver, Player)
  45. -- Add dialog here for when the quest is accepted
  46. end
  47. function Declined(Quest, QuestGiver, Player)
  48. -- Add dialog here for when the quest is declined
  49. end
  50. function Deleted(Quest, QuestGiver, Player)
  51. -- Remove any quest specific items here when the quest is deleted
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. Step1Complete(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. Step2Complete(Quest, QuestGiver, Player)
  58. elseif Step == 3 then
  59. Step3Complete(Quest, QuestGiver, Player)
  60. elseif Step == 4 then
  61. Step4Complete(Quest, QuestGiver, Player)
  62. elseif Step == 5 then
  63. QuestComplete(Quest, QuestGiver, Player)
  64. end
  65. end