booze_in_the_drink.lua 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. --[[
  2. Script Name : Quests/Oakmyst/booze_in_the_drink.lua
  3. Script Purpose : Handles the quest, "Booze in the Drink"
  4. Script Author : Scatman
  5. Script Date : 2008.09.19
  6. Zone : Oakmyst Forest
  7. Quest Giver: Marv Boilfist
  8. Preceded by: None
  9. Followed by: None
  10. --]]
  11. function Init(Quest)
  12. -- a keg of booze
  13. AddQuestStepObtainItem(Quest, 1, "I need to rescue the drowning booze.", 8, 100, "Marv Boilfist has lost a large amount of booze off the docks in Oakmyst Forest. He has asked that I help retrieve it.", 2285, 1807)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_RescuedBooze")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. AddConversationOption(conversation, "I'll be back.")
  20. StartConversation(conversation, QuestGiver, Player, "Glad to hear it!")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. end
  24. function Step1_Complete_RescuedBooze(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have rescued the booze from the water.")
  26. AddQuestStepChat(Quest, 2, "I need to bring the booze back to Marv Boilfist.", 1, "Marv Boilfist has lost a large amount of booze off the docks in Oakmyst Forest. He has asked that I help retrieve it.", 0, 1950027)
  27. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SpokeWithMarv")
  28. end
  29. function Step2_Complete_SpokeWithMarv(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "I have given Marv his booze.")
  31. -- a keg of booze
  32. while HasItem(Player, 1807) do
  33. RemoveItem(Player, 1807)
  34. end
  35. AddQuestStepChat(Quest, 3, "I need to tell Lieutenant Charlin of the Blackburrow Stout I found.", 1, "Marv Boilfist has lost a large amount of booze off the docks in Oakmyst Forest. He has asked that I help retrieve it.", 0, 1950015)
  36. AddQuestStepCompleteAction(Quest, 3, "Quest_Complete")
  37. end
  38. function Quest_Complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 3, "I have spoken with Lieutenant Charlin.")
  40. UpdateQuestTaskGroupDescription(Quest, 1, "I have found Marv's booze as well as some Blackburrow Stout.")
  41. -- blackburrow stout
  42. while HasItem(Player, 3774) do
  43. RemoveItem(Player, 3774)
  44. end
  45. UpdateQuestDescription(Quest, "I have found Marv's kegs for him. One keg I brought back wasn't one of Marv's, but was a keg of Blackburrow Stout. I reported this to the Qeynos Guard at Marv's suggestion.")
  46. GiveQuestReward(Quest, Player)
  47. end
  48. function Reload(Quest, QuestGiver, Player, Step)
  49. if Step == 1 then
  50. Step1_Complete_RescuedBooze(Quest, QuestGiver, Player)
  51. elseif Step == 2 then
  52. Step2_Complete_SpokeWithMarv(Quest, QuestGiver, Player)
  53. end
  54. end