9
3

MarvBoilfist.lua 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/MarvBoilfist.lua
  3. Script Purpose : Marv Boilfist
  4. Script Author : Scatman
  5. Script Date : 2009.10.07
  6. Script Notes :
  7. --]]
  8. local DWARF = 2
  9. local DWARF_MENTOR_QUEST_FROM_MAV = 288 -- A Missing Husband
  10. local QUEST_1 = 526 --Booze in the Drink
  11. local QUEST_LAST_IN_OAKMYST = 211 -- Clean up
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, QUEST_1)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. if HasQuest(Spawn, DWARF_MENTOR_QUEST_FROM_MAV) then
  19. SetStepComplete(Spawn, DWARF_MENTOR_QUEST_FROM_MAV, 1)
  20. AddConversationOption(conversation, "Mav sent me to check up on you.", "Mav")
  21. end
  22. if HasCompletedQuest(Spawn, QUEST_1) then
  23. if HasCompletedQuest(Spawn, QUEST_LAST_IN_OAKMYST) then
  24. Say(NPC, "I heard ya created quite a stir, good job to you.", Spawn)
  25. else
  26. Say(NPC, "Thanks again for your help.", Spawn)
  27. end
  28. elseif HasQuest(Spawn, QUEST_1) then
  29. OnQuest1(NPC, Spawn, conversation)
  30. else
  31. if GetRace(Spawn) == DWARF then
  32. IfItIsntOneThing(NPC, Spawn, conversation)
  33. else
  34. NotDwarf(NPC, Spawn)
  35. end
  36. end
  37. end
  38. function respawn(NPC)
  39. spawn(NPC)
  40. end
  41. function NotDwarf(NPC, Spawn)
  42. local choice = math.random(1, 3)
  43. if choice == 1 then
  44. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marv_boilfist/qey_adv01_oakmyst_revamp/qst_marv_notonquest_1cfb7ccc.mp3", "Come back when you're a dwarf, maybe we'll chat some! Har har har!", "", 2659151540, 1499434670, Spawn)
  45. elseif choice == 2 then
  46. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marv_boilfist/qey_adv01_oakmyst_revamp/qst_marv_notonquest_12fcbc1c.mp3", "Everyone else seems to think this place is so exciting, not me though.", "", 2722242117, 3678566567, Spawn)
  47. elseif choice == 3 then
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marv_boilfist/qey_adv01_oakmyst_revamp/qst_marv_notonquest_8a49edfc.mp3", "If you're headin' to Graystone Yard, tell Mav I'm not drinking... yet!", "", 796198495, 1984404688, Spawn)
  49. end
  50. end
  51. ----------------------------------------------------------------------------------------------
  52. -- DWARF_MENTOR_QUEST_FROM_MAV
  53. ----------------------------------------------------------------------------------------------
  54. function Mav(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. conversation = CreateConversation()
  57. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  58. AddConversationOption(conversation, "Sure I can help.", "ICanHelp")
  59. AddConversationOption(conversation, "Sorry, not right now.")
  60. StartConversation(conversation, NPC, Spawn, "Hah, that means she thinks I'm either in trouble or drunk. Lucky for me, it's not the latter. I'm glad you showed up, how would you like to help me?")
  61. else
  62. AddConversationOption(conversation, "Sure.")
  63. StartConversation(conversation, NPC, Spawn, "Hah, that means she thinks I'm either in trouble or drunk. Lucky for me, it's not the latter. Would ya let her know for me?")
  64. end
  65. end
  66. ----------------------------------------------------------------------------------------------
  67. -- QUEST 1
  68. ----------------------------------------------------------------------------------------------
  69. function IfItIsntOneThing(NPC, Spawn, conversation)
  70. AddConversationOption(conversation, "What's wrong with today?", "WrongToday")
  71. StartConversation(conversation, NPC, Spawn, "If it isn't one thing, it's another. Have you ever had one of those bad days?")
  72. end
  73. function WrongToday(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. conversation = CreateConversation()
  76. AddConversationOption(conversation, "Sure I can help.", "ICanHelp")
  77. AddConversationOption(conversation, "Not right now.")
  78. StartConversation(conversation, NPC, Spawn, "Enough things have gone wrong that I'm considerin' cuttin' my losses and goin' home. If you're every in a position to cut your losses--and it sounds appealing--then you know you're havin' a bad day. I'm at my wit's end! Any chance I could get some help from ya?")
  79. end
  80. function ICanHelp(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. conversation = CreateConversation()
  83. AddConversationOption(conversation, "What can I do to help?", "WhatCanIDo")
  84. StartConversation(conversation, NPC, Spawn, "That's the first good news I've had all day. I've been waitin' here for word from the courier who dropped off these barrels. He first brought me the wonderful news that my shipment had been dumped in the water here in Oakmyst. So he brought me a partial shipment, a lotta good that does me. He takes off without a second thought, I told him to get someone to come help me but I don't think he remembered. So I'm sittin' here, can't move this shipment without the rest of it, unless I wanna waste a lot of moving fees. And I can't leave this shipment here unless I wanna risk it gettin' stolen.")
  85. end
  86. function WhatCanIDo(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. AddConversationOption(conversation, "I can do that.", "OfferQuest1")
  90. StartConversation(conversation, NPC, Spawn, "You can get the rest of the shipment for me. It's in the drink right now. If you head west you'll get to the docks. Once you're there hop on in and start pulling up the shipment. Once you've collected it you can bring it back to me.")
  91. end
  92. function OfferQuest1(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. OfferQuest(NPC, Spawn, QUEST_1)
  95. end
  96. function OnQuest1(NPC, Spawn, conversation)
  97. if GetQuestStep(Spawn, QUEST_1) <= 2 then
  98. if GetQuestStep(Spawn, QUEST_1) == 2 then
  99. AddConversationOption(conversation, "Yes I did, here you go.", "YesIDid")
  100. else
  101. AddConversationOption(conversation, "Not yet.")
  102. end
  103. StartConversation(conversation, NPC, Spawn, "Did ya get my shipment?")
  104. else
  105. Say(NPC, "You should take the Blackburrow Stout to Lieutenant Charlin sooner rather than later.", Spawn)
  106. end
  107. end
  108. function YesIDid(NPC, Spawn)
  109. FaceTarget(NPC, Spawn)
  110. conversation = CreateConversation()
  111. AddConversationOption(conversation, "I should take it back.", "ShouldTakeItBack")
  112. StartConversation(conversation, NPC, Spawn, "Ah, great! Thank you so much- er, wait a minute. This is my shipment but looks like you snagged part of someone else's shipment too.")
  113. end
  114. function ShouldTakeItBack(NPC, Spawn)
  115. SetStepComplete(Spawn, QUEST_1, 2)
  116. -- blackburrow stout
  117. if not HasItem(Spawn, 3774) then
  118. SummonItem(Spawn, 3774, 1)
  119. end
  120. FaceTarget(NPC, Spawn)
  121. conversation = CreateConversation()
  122. AddConversationOption(conversation, "Thanks and you're welcome.")
  123. StartConversation(conversation, NPC, Spawn, "Not so fast. This is Blackburrow Stout, which is more than a little odd. You don't need to take this back to the docks, you should take it to the Qeynos Guard. Speak with Lieutenant Charlin, he'll let you know what to do next. Good find, " .. GetName(Spawn) .. "! And thanks for gettin' my shipment.")
  124. end