MarusDonoval.lua 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. --[[
  2. Script Name : SpawnScripts/Graystone/MarusDonoval.lua
  3. Script Purpose : Marus Donoval
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes :
  7. --]]
  8. function Spawn(NPC)
  9. SetInfoStructString(NPC, "action_state", "drinking_idle")
  10. end
  11. function respawn(NPC)
  12. Spawn(NPC)
  13. end
  14. -- Quest ID's
  15. local A_TIME_FOR_FIGHTING = 289
  16. local LATE_SHIPMENT = 290
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. conversation = CreateConversation()
  20. if HasCompletedQuest(Spawn, A_TIME_FOR_FIGHTING) then
  21. if HasCompletedQuest(Spawn, LATE_SHIPMENT) then
  22. WellLookWhoItIs(NPC, Spawn)
  23. elseif HasQuest(Spawn, LATE_SHIPMENT) then
  24. if GetQuestStep(Spawn, LATE_SHIPMENT) >= 6 then
  25. WellLookWhoItIs(NPC, Spawn)
  26. else
  27. Say(NPC, "Hah, that was great! You're alright you know that?", Spawn)
  28. end
  29. else
  30. Say(NPC, "Hah, that was great! You're alright you know that?", Spawn)
  31. end
  32. elseif HasQuest(Spawn, A_TIME_FOR_FIGHTING) then
  33. HeyRelaxingHereWithQuest(NPC, Spawn)
  34. else
  35. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quest_marus_donoval_notonquest_b531a95c.mp3", "Hey! I'm relaxing here.", "", 1804521039, 439298696, Spawn)
  36. -- PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval001.mp3", "Hey! I'm relaxing here.", "", 1272547244, 528166171, Spawn)
  37. end
  38. end
  39. function healthchanged(NPC, Spawn)
  40. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  41. if hp_percent <= 0.25 then
  42. SpawnSet(NPC, "attackable", 0)
  43. SpawnSet(NPC, "show_level", 0)
  44. AddTimer(NPC, 500, "StopAttacking", 1, Spawn)
  45. end
  46. end
  47. function StopAttacking(NPC, Spawn)
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quest_marus_donoval_fightover_c271419f.mp3", "Alright, alright. I'd say that's enough.", "", 2321626411, 1133430573, Spawn)
  49. ClearHate(NPC)
  50. ClearEncounter(NPC)
  51. end
  52. function HeyRelaxingHereWithQuest(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. if not QuestStepIsComplete(Spawn, A_TIME_FOR_FIGHTING, 1) then
  56. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval001.mp3", "", "", 1272547244, 528166171, Spawn)
  57. AddConversationOption(conversation, "Is someone making cheese in here?", "dlg_4_1")
  58. AddConversationOption(conversation, "Do you get paid to sit around all day doing nothing?", "dlg_1_1")
  59. AddConversationOption(conversation, "Your father was a slacker, too, wasn't he?", "dlg_2_1")
  60. AddConversationOption(conversation, "Well why don't you relax somewhere else, buddy?", "dlg_3_1")
  61. StartConversation(conversation, NPC, Spawn, "Hey! I'm relaxing here.")
  62. else
  63. Say(NPC, "Hah, that was great! You're alright you know that?", Spawn)
  64. end
  65. end
  66. ---------------------------------------------------------------------------------------------
  67. -- QUEST 1
  68. ---------------------------------------------------------------------------------------------
  69. function dlg_1_1(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval001answer1.mp3", "", "", 1797143757, 3864854180, Spawn)
  73. AddConversationOption(conversation, "Hmm.")
  74. StartConversation(conversation, NPC, Spawn, "Eh, I'm a hard worker. My boss knows that.")
  75. end
  76. function dlg_2_1(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval001answer2.mp3", "", "", 283337044, 2652532195, Spawn)
  80. AddConversationOption(conversation, "Really?")
  81. StartConversation(conversation, NPC, Spawn, "My father built the floor you're standing on, for all you know!")
  82. end
  83. function dlg_3_1(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. conversation = CreateConversation()
  86. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval001answer3.mp3", "", "", 3193402669, 2023299810, Spawn)
  87. AddConversationOption(conversation, "Whoops.")
  88. StartConversation(conversation, NPC, Spawn, "Hah hah! I like you!")
  89. end
  90. function dlg_4_1(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. conversation = CreateConversation()
  93. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval002.mp3", "", "", 2325284648, 2510217170, Spawn)
  94. AddConversationOption(conversation, "Oh, never mind, I think that smell is your feet.", "dlg_4_2")
  95. StartConversation(conversation, NPC, Spawn, "I don't think so.")
  96. end
  97. function dlg_4_2(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. conversation = CreateConversation()
  100. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval003.mp3", "", "", 1447882078, 784389169, Spawn)
  101. AddConversationOption(conversation, "I thought someone was making cheese because of that horrible smell, but now that I'm closer to you I believe the smell is your feet.", "dlg_4_3")
  102. AddConversationOption(conversation, "Nothing, sorry, I'll be going.")
  103. StartConversation(conversation, NPC, Spawn, "What did you say?")
  104. end
  105. function dlg_4_3(NPC, Spawn)
  106. SetStepComplete(Spawn, A_TIME_FOR_FIGHTING, 1)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. SpawnSet(NPC, "attackable", 1)
  110. SpawnSet(NPC, "show_level", 1)
  111. AddHate(Spawn, NPC, 100)
  112. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval003a.mp3", "", "", 129148664, 3190606304, Spawn)
  113. AddConversationOption(conversation, "Thank you.")
  114. StartConversation(conversation, NPC, Spawn, "Ooh, that's a good one.")
  115. end
  116. -----------------------------------------------------------------------------------------------------------------------
  117. -- QUEST 2
  118. -----------------------------------------------------------------------------------------------------------------------
  119. function WellLookWhoItIs(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. conversation = CreateConversation()
  122. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval004.mp3", "", "", 2785464919, 2918822894, Spawn)
  123. if GetQuestStep(Spawn, LATE_SHIPMENT) == 6 then
  124. AddConversationOption(conversation, "Sometimes, yes. Right now I need to ask you about a package though.", "AskAboutPackage")
  125. end
  126. AddConversationOption(conversation, "Yeah, let's go!", "LetsGo")
  127. AddConversationOption(conversation, "Nope, not anymore.")
  128. StartConversation(conversation, NPC, Spawn, "Well look who it is. Still fighting?")
  129. end
  130. function LetsGo(NPC, Spawn)
  131. SpawnSet(NPC, "attackable", 1)
  132. SpawnSet(NPC, "show_level", 1)
  133. AddHate(Spawn, NPC, 100)
  134. end
  135. function AskAboutPackage(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval005.mp3", "", "", 297443074, 3794904170, Spawn)
  139. AddConversationOption(conversation, "There was a package for Burk Stoneshatter. The shipment was GG4QC and it was reported as being unloaded but isn't in overflow, and isn't on the docks, and hasn't been delivered. The Shipping Coordinator said I should speak with you.", "dlg_20_2")
  140. StartConversation(conversation, NPC, Spawn, "I can help. What do you need?")
  141. end
  142. function dlg_20_2(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. conversation = CreateConversation()
  145. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval006.mp3", "", "", 3783525520, 2258184655, Spawn)
  146. AddConversationOption(conversation, "In the water? Oh no.", "dlg_20_3")
  147. StartConversation(conversation, NPC, Spawn, "GG4QC you say? Yeah, I know the one. Three crates, it was. I do remember unloading them. If what you say is true then I think they may have taken a bath, hah hah!")
  148. end
  149. function dlg_20_3(NPC, Spawn)
  150. SetStepComplete(Spawn, LATE_SHIPMENT, 6)
  151. FaceTarget(NPC, Spawn)
  152. conversation = CreateConversation()
  153. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/marus_donoval/qey_village03/quests/marus_donoval/marus_donoval007.mp3", "", "", 313118896, 4113217971, Spawn)
  154. AddConversationOption(conversation, "All right. Thanks.")
  155. StartConversation(conversation, NPC, Spawn, "These things happen, you know. You should go talk to the Shipping Coordinator if you ever want to get that shipment.")
  156. end