DundaFrostgrip.lua 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. --[[
  2. Script Name : SpawnScripts/Graystone/DundaFrostgrip.lua
  3. Script Purpose : Dunda Frostgrip
  4. Script Author : Scatman
  5. Script Date : 2009.10.05
  6. Script Notes :
  7. --]]
  8. -- Quest ID's
  9. local DWARF_MENTOR_QUEST_2 = 285
  10. local A_TIME_FOR_FIGHTING = 289
  11. function spawn(NPC)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. conversation = CreateConversation()
  19. if HasCompletedQuest(Spawn, A_TIME_FOR_FIGHTING) then
  20. Say(NPC, "Don't say a word...", Spawn)
  21. elseif HasQuest(Spawn, A_TIME_FOR_FIGHTING) then
  22. WhatYaNeed(NPC, Spawn)
  23. elseif HasQuest(Spawn, DWARF_MENTOR_QUEST_2) and not QuestStepIsComplete(Spawn, DWARF_MENTOR_QUEST_2, 4) then
  24. WhatYaNeedDwarfMentor(NPC, Spawn, conversation)
  25. else
  26. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quest_dunda_frostgrip_notonquest_76053892.mp3", "Speak to me when I'm not busy.", "", 2450838370, 1763279146, Spawn)
  27. end
  28. end
  29. function healthchanged(NPC, Spawn)
  30. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  31. if hp_percent <= 0.25 then
  32. SpawnSet(NPC, "attackable", 0)
  33. SpawnSet(NPC, "show_level", 0)
  34. AddTimer(NPC, 500, "StopAttacking", 1, Spawn)
  35. end
  36. end
  37. function StopAttacking(NPC, Spawn)
  38. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quest_dunda_frostgrip_fightover_b27b5c58.mp3", "I'm done with this.", "", 3523983921, 3545323168, Spawn)
  39. ClearHate(NPC)
  40. ClearEncounter(NPC)
  41. end
  42. function WhatYaNeed(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. conversation = CreateConversation()
  45. if not QuestStepIsComplete(Spawn, A_TIME_FOR_FIGHTING, 3) then
  46. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip008.mp3", "", "", 2498530124, 1746867227, Spawn)
  47. AddConversationOption(conversation, "Wow, Mav was right about your face.", "dlg_12_1")
  48. AddConversationOption(conversation, "Is that a beard you're growing?", "dlg_9_1")
  49. AddConversationOption(conversation, "Wow, how did you get such huge feet?", "dlg_10_1")
  50. AddConversationOption(conversation, "You don't look nearly as tough as they said you would be.", "dlg_11_1")
  51. StartConversation(conversation, NPC, Spawn, "What d'ya need?")
  52. else
  53. Say(NPC, "Don't say a word...", Spawn)
  54. end
  55. end
  56. function dlg_9_1(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip008answer1.mp3", "", "", 3631592040, 195858381, Spawn)
  60. AddConversationOption(conversation, "Hmm...")
  61. StartConversation(conversation, NPC, Spawn, "I doubt it...")
  62. end
  63. function dlg_10_1(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip008answer2.mp3", "", "", 2237464189, 736160534, Spawn)
  67. AddConversationOption(conversation, "I see.")
  68. StartConversation(conversation, NPC, Spawn, "From stompin' on people who ask stupid questions.")
  69. end
  70. function dlg_11_1(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip008answer3.mp3", "", "", 1987182135, 3106357829, Spawn)
  74. AddConversationOption(conversation, "All right.")
  75. StartConversation(conversation, NPC, Spawn, "I don't do demonstrations.")
  76. end
  77. function dlg_12_1(NPC, Spawn)
  78. SetStepComplete(Spawn, A_TIME_FOR_FIGHTING, 3)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. SpawnSet(NPC, "attackable", 1)
  82. SpawnSet(NPC, "show_level", 1)
  83. AddHate(Spawn, NPC, 1)
  84. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip008rightanswer.mp3", "", "", 3574859245, 2281348015, Spawn)
  85. AddConversationOption(conversation, "Maybe I will, maybe I won't!")
  86. StartConversation(conversation, NPC, Spawn, "You're going to regret saying that!")
  87. end
  88. ---------------------------------------------------------------------------------------------------
  89. -- DWARF_MENTOR_QUEST_2
  90. ---------------------------------------------------------------------------------------------------
  91. function WhatYaNeedDwarfMentor(NPC, Spawn, conversation)
  92. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip001.mp3", "", "", 3913280792, 2412954203, Spawn)
  93. AddConversationOption(conversation, "I'm here on behalf of Mav Boilfist.", "dlg_19_1")
  94. StartConversation(conversation, NPC, Spawn, "What d'ya need?")
  95. end
  96. function dlg_19_1(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. conversation = CreateConversation()
  99. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip002.mp3", "", "sniff", 898341792, 808534895, Spawn)
  100. AddConversationOption(conversation, "What do you mean?", "dlg_19_2")
  101. StartConversation(conversation, NPC, Spawn, "Ah, now there's a name I can never hear too little of.")
  102. end
  103. function dlg_19_2(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. conversation = CreateConversation()
  106. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip003.mp3", "", "shakefist", 472358004, 1704786028, Spawn)
  107. AddConversationOption(conversation, "Retaliate?", "dlg_19_3")
  108. StartConversation(conversation, NPC, Spawn, "Every time I hear about her it's about some great, new thing she's doing. Which of course means I have to retaliate.")
  109. end
  110. function dlg_19_3(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip004.mp3", "", "glare", 2206438265, 2359391170, Spawn)
  114. AddConversationOption(conversation, "She brewed some of her family's recipe.", "dlg_19_4")
  115. StartConversation(conversation, NPC, Spawn, "Aye! If I don't one-up her I run the risk of getting one-upped twice in a row, can't have that. So, tell me, what great, new thing has Mav done now?")
  116. end
  117. function dlg_19_4(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. conversation = CreateConversation()
  120. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip005.mp3", "", "boggle", 2257066250, 240363088, Spawn)
  121. AddConversationOption(conversation, "I have some of it right here.", "dlg_19_5")
  122. StartConversation(conversation, NPC, Spawn, "She didn't! Ooh she's just looking for trouble now. Where is she? I'll pound the brew right now!")
  123. end
  124. function dlg_19_5(NPC, Spawn)
  125. FaceTarget(NPC, Spawn)
  126. conversation = CreateConversation()
  127. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip006.mp3", "", "", 886091575, 2730616060, Spawn)
  128. AddConversationOption(conversation, "Here you go. Be careful.", "dlg_19_6")
  129. StartConversation(conversation, NPC, Spawn, "Ah, give it to me!")
  130. end
  131. function dlg_19_6(NPC, Spawn)
  132. SetStepComplete(Spawn, DWARF_MENTOR_QUEST_2, 4)
  133. FaceTarget(NPC, Spawn)
  134. conversation = CreateConversation()
  135. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/dunda_frostgrip/qey_village03/quests/dunda_frostgrip/dunda_frostgrip007.mp3", "", "", 1318899535, 405657367, Spawn)
  136. PlayAnimation(NPC,11422)
  137. AddConversationOption(conversation, "All right. I'll be leaving now.")
  138. StartConversation(conversation, NPC, Spawn, "Ahhh... To Drunder with her, she was right. This is delicious. Do NOT tell her I said that!")
  139. end