MysteriousMachine.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : MysteriousMachine.lua
  3. Script Purpose : Handles the quest, "Mysterious Machine"
  4. Script Author : Shatou
  5. Script Date : 1/8/2020
  6. Script Notes :
  7. Zone : Peat Bog
  8. Quest Giver : Lieutenant Dawson
  9. Preceded by : Reclaiming the Bog
  10. Followed by : Ambushed
  11. --]]
  12. local LIEUTENANT_DAWSON_ID = 1980012
  13. local ENTITY_COMMAND_INSPECT = 61
  14. function Init(Quest)
  15. AddQuestStepSpell(Quest, 1, "I need to find the machine in the water in the Peat Bog and attach the arcanic beacon.", 1, 100, "Lieutenant Dawson has asked that I find a machine that is supposedly in the water in the Peat Bog.", 11, ENTITY_COMMAND_INSPECT)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. end
  18. function Step1Complete(Quest, QuestGiver, Player)
  19. UpdateQuestStepDescription(Quest, 1, "I have attached the arcanic beacon.")
  20. AddQuestStepChat(Quest, 2, "I need to return to Lieutenant Dawson.", 1, "Lieutenant Dawson has asked that I find a machine that is supposedly in the water in the Peat Bog.", 11, LIEUTENANT_DAWSON_ID)
  21. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  22. end
  23. function QuestComplete(Quest, QuestGiver, Player)
  24. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  25. UpdateQuestStepDescription(Quest, 2, "I have spoken with Lieutenant Dawson.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I found the machine that Lieutenant Dawson was told about.")
  27. UpdateQuestDescription(Quest, "I have found the machine that Lieutenant Dawson heard about. While I was hooking the beacon up I was attacked by a gnoll. After killing the gnoll I was able to attach the beacon.")
  28. GiveQuestReward(Quest, Player)
  29. end
  30. function Reload(Quest, QuestGiver, Player, Step)
  31. if Step == 1 then
  32. Step1Complete(Quest, QuestGiver, Player)
  33. elseif Step == 2 then
  34. QuestComplete(Quest, QuestGiver, Player)
  35. end
  36. end
  37. function Accepted(Quest, QuestGiver, Player)
  38. -- Add dialog here for when the quest is accepted
  39. end
  40. function Declined(Quest, QuestGiver, Player)
  41. -- Add dialog here for when the quest is declined
  42. end