9
3

big_trouble_in_beggars_court.lua 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : big_trouble_in_beggars_court.lua
  3. Script Purpose : Handles the quest, "Big Trouble in Beggar's Court"
  4. Script Author : torsten
  5. Script Date : 18.07.2022
  6. Script Notes :
  7. Zone : Beggar's Court
  8. Quest Giver : Alucius Valus
  9. Preceded by : Saving History
  10. Followed by : Tricking the Traitor
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "I need to locate Durio and sell this package to him.", 1, "I need to sell a package to Durio for Alucius.", 11, 1370027)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I spoke with Durio and discovered Alucius has betrayed me.")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I spoke with Durio and discovered Alucius is a traitor.")
  19. AddQuestStepChat(Quest, 2, "I will locate and deliver documents to Kaseo Volcatius.", 1, "I turn over the documents to the Freeport Militia.", 11, 1370057)
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. end
  22. function Step2Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 2, "I turned over the documents to the Freeport Militia.")
  24. UpdateQuestTaskGroupDescription(Quest, 2, "I turned over the documents to the Freeport Militia and was rewarded for my loyalty.")
  25. AddQuestStepChat(Quest, 3, "I should return to Alucius.", 1, "I should return to Alucius.", 11, 1370005)
  26. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  27. end
  28. function QuestComplete(Quest, QuestGiver, Player)
  29. UpdateQuestDescription(Quest, "That snake Alucius was trying to sell off the fake documents I obtained for him earlier! I turned over the documents to a captain of the Freeport Militia as Durio suggested. Not only was I rewarded, but it felt good to be able to help Freeport and preserve the reputation of the Overlord.")
  30. GiveQuestReward(Quest, Player)
  31. end
  32. function Accepted(Quest, QuestGiver, Player)
  33. -- Add dialog here for when the quest is accepted
  34. end
  35. function Declined(Quest, QuestGiver, Player)
  36. -- Add dialog here for when the quest is declined
  37. end
  38. function Deleted(Quest, QuestGiver, Player)
  39. -- Remove any quest specific items here when the quest is deleted
  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. Step2Complete(Quest, QuestGiver, Player)
  46. elseif Step == 3 then
  47. QuestComplete(Quest, QuestGiver, Player)
  48. end
  49. end