mysterious_machine.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : Quests/PeatBog/mysterious_machine.lua
  3. Script Purpose : Handles the quest, \\\"Mysterious Machine\\\"
  4. Script Author : Scatman
  5. Script Date : 2009.05.10
  6. Zone : The Peat Bog
  7. Quest Giver: Lieutenant Dawson
  8. Preceded by: Reclaiming the Bog (reclaiming_the_bog.lua)
  9. Followed by: Ambushed (ambushed.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep(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.", 0)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_PlacedBeacon")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. -- arcanic beacon
  19. if not HasItem(Player, 3476) then
  20. SummonItem(Player, 3476)
  21. SendMessage(Player, "You receive 1 arcanic beacon.", "yellow")
  22. SendPopUpMessage(Player, "You receive 1 arcanic beacon.", 255, 255, 255)
  23. end
  24. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_dawson/qey_adv04_bog/quests/dawson/dawson007a.mp3", "", "", 3084758614, 2492710708, Player)
  25. AddConversationOption(conversation, "You're welcome.")
  26. StartConversation(conversation, QuestGiver, Player, "That should help the research teams find it when they do get the time. Thank you.")
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function Step1_Complete_PlacedBeacon(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have attached the arcanic beacon.")
  32. AddQuestStepChat(Quest, 2, "I need to return to Lieutenant Dawson near the gates to Nettleville hovel.", 1, "Lieutenant Dawson has asked that I find a machine that is supposedly in the water in the Peat Bog.", 0, 1980022)
  33. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  34. end
  35. function QuestComplete(Quest, QuestGiver, Player)
  36. -- arcanic beacon
  37. while HasItem(Player, 3476) do
  38. RemoveItem(Player, 3476)
  39. end
  40. 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.")
  41. GiveQuestReward(Quest, Player)
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. Step1_Complete_PlacedBeacon(Quest, QuestGiver, Player)
  46. end
  47. end