TheEnemyinOurMidst.lua 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --[[
  2. Script Name : the_enemy_in_our_midst.lua
  3. Script Purpose : Handles the quest, "The Enemy in Our Midst"
  4. Script Author : premierio015
  5. Script Date : 13.09.2020
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : The City of Freeport
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "Confront Met Sleeth", 1, "Acquire the ledger of the vendor known as Met Sleeth. He sells his wares in the mercantile area south of the Coliseum in western Freeport.", 11, 5590171)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "Confronted Met Sleeth.")
  27. AddQuestStepChat(Quest, 2, "Acquire Met Sleeth's ledger", 1, "Acquire the ledger of the vendor known as Met Sleeth. He sells his wares in the mercantile area south of the Coliseum in western Freeport.", 716, 5590171)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "Acquired Met Sleeth's ledger.")
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I've acquired the vendor's ledger.")
  33. AddQuestStepChat(Quest, 3, "Confront Jan MacGetz", 1, "Acquire the ledger of the vendor known as Jan MacGetz. She sells her wares in the mercantile area north of the Coliseum in western Freeport.", 11, 5590041)
  34. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  35. end
  36. function Step3Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 3, "Confronted Jan MacGetz.")
  38. AddQuestStepChat(Quest, 4, "Acquire Jan MacGetz's ledger", 1, "Acquire the ledger of the vendor known as Jan MacGetz. She sells her wares in the mercantile area north of the Coliseum in western Freeport.", 716, 5590041 )
  39. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  40. end
  41. function Step4Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 4, "Acquired Jan MacGetz's ledger.")
  43. UpdateQuestTaskGroupDescription(Quest, 2, "I've acquired the vendor's ledger.")
  44. AddQuestStepChat(Quest, 5, "Return to Serris", 1, "I should head back to the Freeport Militia House and return these ledgers to Serris.", 11, 5590121)
  45. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  46. end
  47. function QuestComplete(Quest, QuestGiver, Player)
  48. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  49. UpdateQuestStepDescription(Quest, 5, "Returned to Serris.")
  50. UpdateQuestTaskGroupDescription(Quest, 3, "I returned the ledgers to Serris.")
  51. UpdateQuestDescription(Quest, "I was able to ''convince'' Jan MacGetz and Met Sleeth to give me their ledgers. Now the Freeport Militia will be able to find out who they've been supplying with weapons.")
  52. GiveQuestReward(Quest, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. Step1Complete(Quest, QuestGiver, Player)
  57. elseif Step == 2 then
  58. Step2Complete(Quest, QuestGiver, Player)
  59. elseif Step == 3 then
  60. Step3Complete(Quest, QuestGiver, Player)
  61. elseif Step == 4 then
  62. Step4Complete(Quest, QuestGiver, Player)
  63. elseif Step == 5 then
  64. QuestComplete(Quest, QuestGiver, Player)
  65. end
  66. end