9
3

MarusDonoval.lua 7.9 KB

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