taking_out_the_trash.lua 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : taking_out_the_trash.lua
  3. Script Purpose : Handles the quest, "Taking Out the Trash"
  4. Script Author : neatz09
  5. Script Date : 5/5/2023
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : World Event
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local Pohpiks = 1230044
  13. function Init(Quest)
  14. AddQuestStep(Quest, 1, "Find the trash bags and take them to the platform.", 5, 100, "I must collect the trash bags from the Froglok trash cans and take them to the trash platform.", 10)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. conversation = CreateConversation()
  19. AddConversationOption(conversation, "Eww... trash.")
  20. StartConversation(conversation, QuestGiver, Player, "Great, this should be simple. Just gather trash bags from the garbage boxes around the village and bring all the bags back over here to my target platform. Those should make a fine target!")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I've taken all the trash to the platform.")
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I've brought all the garbage to the platform.")
  31. AddQuestStepChat(Quest, 2, "Speak to Pohpiks.", 1, "I should let Pohpiks know his targets are ready.", 11, Pohpiks)
  32. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  33. end
  34. function QuestComplete(Quest, QuestGiver, Player)
  35. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  36. UpdateQuestStepDescription(Quest, 2, "I spoke with Pohpiks.")
  37. UpdateQuestTaskGroupDescription(Quest, 2, "I told Pohpiks that I've gathered the trash... here come the fireworks!")
  38. UpdateQuestDescription(Quest, "I've gathered trash for Pohpiks to use as target practice.")
  39. GiveQuestReward(Quest, Player)
  40. end
  41. function Reload(Quest, QuestGiver, Player, Step)
  42. if Step == 1 then
  43. Step1Complete(Quest, QuestGiver, Player)
  44. elseif Step == 2 then
  45. QuestComplete(Quest, QuestGiver, Player)
  46. end
  47. end