HarganIcethaw.lua 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. --[[
  2. Script Name : SpawnScripts/Graystone/HarganIcethaw.lua
  3. Script Purpose : Hargan Icethaw
  4. Script Author : John Adams
  5. Script Date : 2008.09.21
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Quest1 = 5787
  10. function spawn(NPC)
  11. SetInfoStructString(NPC, "action_state", "mining_digging")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. SpawnSet(NPC, "visual_state", 0)
  19. AddTimer(NPC,45000,"resetVisual")
  20. Dialog.New(NPC, Spawn)
  21. Dialog.AddDialog("Ahhhh ... Nothing's more rewarding than building up a good, hearty sweat after a long day's work!")
  22. Dialog.AddVoiceover("voiceover/english/hargan_icethaw/qey_village03/harganicethaw000.mp3", 3849445120, 4083065151)
  23. if HasQuest(Spawn,Quest1) and GetQuestStep(Spawn,Quest1)>=3 and GetQuestStep(Spawn,Quest1)<=4 and not QuestStepIsComplete(Spawn,Quest1,4) then
  24. Dialog.AddOption("Dagorel said you could show me a thing or two about brawling.","Dialog2")
  25. end
  26. Dialog.AddOption("No, I think it's just you. I'll let you get back to what you're doing.")
  27. Dialog.Start()
  28. end
  29. function resetVisual(NPC)
  30. SpawnSet(NPC, "visual_state", 11420)
  31. end
  32. function Dialog2(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. Dialog.New(NPC, Spawn)
  35. Dialog.AddDialog("Dagorel you say? HAHA!!! That old dwarf still takes on whelps and turns them into real fighters? Looking at you, I can see he picks students with real potential! So, he wants me to give you some rough-and-tumble, eh?")
  36. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  37. Dialog.AddVoiceover("voiceover/english/hargan_icethaw/qey_village03/harganicethaw001.mp3", 3849445120, 4083065151)
  38. Dialog.AddOption("He mentioned you are better with your fists than swords.","Dialog3")
  39. Dialog.Start()
  40. end
  41. function Dialog3(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("He's right about that. Let's give it a go ... it'll keep my blood pumpin'! Let me roll up my sleeves. Okay, let's go a couple of rounds. Give me everything you got! Don't worry, I can take it!")
  45. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  46. Dialog.AddVoiceover("voiceover/english/hargan_icethaw/qey_village03/harganicethaw001.mp3", 3849445120, 4083065151)
  47. Dialog.AddOption("[punch at his nose]","Dialog4")
  48. Dialog.Start()
  49. end
  50. function Dialog4(NPC, Spawn)
  51. FaceTarget(Spawn, NPC)
  52. PlayFlavor(Spawn, "", "", "pugilist_attack", 0, 0, NPC)
  53. AddTimer(NPC,800,"Dialog4a",1,Spawn)
  54. end
  55. function Dialog4a(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. Dialog.New(NPC, Spawn)
  58. Dialog.AddDialog("Again. Mean it this time!")
  59. PlayFlavor(NPC, "", "", "1h_thrown_ouch_down", 0, 0, Spawn)
  60. Dialog.AddVoiceover("voiceover/english/hargan_icethaw/qey_village03/harganicethaw002.mp3", 3849445120, 4083065151)
  61. Dialog.AddOption("[give a short jab at his ribs]","Dialog5")
  62. Dialog.Start()
  63. end
  64. function Dialog5(NPC, Spawn)
  65. FaceTarget(Spawn, NPC)
  66. PlayFlavor(Spawn, "", "", "pugilist_attack02", 0, 0, NPC)
  67. AddTimer(NPC,800,"Dialog5a",1,Spawn)
  68. end
  69. function Dialog5a(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. Dialog.New(NPC, Spawn)
  72. Dialog.AddDialog("Again! Hit me again!")
  73. PlayFlavor(NPC, "", "", "1h_thrown_ouch_forehand", 0, 0, Spawn)
  74. Dialog.AddVoiceover("voiceover/english/hargan_icethaw/qey_village03/harganicethaw003.mp3", 3849445120, 4083065151)
  75. Dialog.AddOption("[give him the old one-two]","Dialog6")
  76. Dialog.Start()
  77. end
  78. function Dialog6(NPC, Spawn)
  79. FaceTarget(Spawn, NPC)
  80. PlayFlavor(Spawn, "", "", "pugilist_wild_swing", 0, 0, NPC)
  81. AddTimer(NPC,1200,"Dialog6a",1,Spawn)
  82. end
  83. function Dialog6a(NPC, Spawn)
  84. FaceTarget(Spawn, NPC)
  85. PlayFlavor(NPC, "", "", "1h_crush_ouch_forehand", 0, 0, Spawn)
  86. AddTimer(NPC,1800,"Dialog6b",1,Spawn)
  87. end
  88. function Dialog6b(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. Dialog.New(NPC, Spawn)
  91. Dialog.AddDialog("AAARRGGGGGHH!!! Whoa, whoa, whoa! Are you okay?! Sorry about that, friend. I guess I got carried away. I was having so much fun. Umm ... I think we're done for now. Don't worry, that bruise should go away after a bit.")
  92. PlayFlavor(NPC, "", "", "pugilist_kick", 0, 0, Spawn)
  93. Dialog.AddVoiceover("voiceover/english/hargan_icethaw/qey_village03/harganicethaw004.mp3", 3849445120, 4083065151)
  94. Dialog.AddOption("Wow! I wasn't expecting you to come at me like that...","Dialog7")
  95. Dialog.Start()
  96. AddTimer(NPC,1400,"Dialog6c",1,Spawn)
  97. end
  98. function Dialog6c(NPC, Spawn)
  99. FaceTarget(Spawn, NPC)
  100. PlayFlavor(Spawn, "", "", "knockedtoback", 0, 0, NPC)
  101. AddTimer(NPC,1400,"Dialog6d",1,Spawn)
  102. end
  103. function Dialog6d(NPC, Spawn)
  104. FaceTarget(Spawn, NPC)
  105. PlayFlavor(Spawn, "", "", "knockedtoback_getup", 0, 0, NPC)
  106. local invul = IsInvulnerable(Spawn)
  107. if invul == true then
  108. return 0
  109. end
  110. local hp = GetHP(Spawn)
  111. local damage = GetMaxHP(Spawn)*0.26
  112. local damageToTake = damage * 1
  113. -- if we don't have enough HP make them die to pain and suffering not self
  114. if hp <= damageToTake then
  115. else
  116. DamageSpawn(Spawn, Spawn, 192, 3, damageToTake, damageToTake, "Hargan's pugilist kick!", 0, 0, 1, 1)
  117. end
  118. end
  119. function Dialog7(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. Dialog.New(NPC, Spawn)
  122. Dialog.AddDialog("Well, I'm still real sorry. Now you know how a brawler really fights. It's not all about using your fists. You can use other weapons you were born with too! No hard feelings, eh?")
  123. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  124. Dialog.AddVoiceover("voiceover/english/hargan_icethaw/qey_village03/harganicethaw005.mp3", 3849445120, 4083065151)
  125. Dialog.AddOption("All in good fun, right? Thank you for the lesson.")
  126. Dialog.Start()
  127. SetStepComplete(Spawn,Quest1,4)
  128. end