9
3

MarusDonoval.lua 8.3 KB

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