9
3

GraktakSplatterblood.lua 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. --[[
  2. Script Name : SpawnScripts/BigBend/GraktakSplatterblood.lua
  3. Script Purpose : Graktak Splatterblood
  4. Script Author : torsten
  5. Script Date : 2022.07.10
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local SearchfortheShrubbery = 5645
  10. local SwampWaterStew = 5646
  11. local ThatSlipperyToad = 5647
  12. local SecretoftheTroll = 5648
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, SearchfortheShrubbery)
  15. ProvidesQuest(NPC, SwampWaterStew)
  16. ProvidesQuest(NPC, ThatSlipperyToad)
  17. ProvidesQuest(NPC, SecretoftheTroll)
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function hailed(NPC, Spawn)
  23. local race = GetRace(Spawn)
  24. if race == 14 then
  25. if not HasQuest(Spawn, SearchfortheShrubbery) and not HasCompletedQuest(Spawn, SearchfortheShrubbery) then
  26. OfferQuest(NPC, Spawn, SearchfortheShrubbery)
  27. end
  28. if HasCompletedQuest(Spawn, SearchfortheShrubbery) then
  29. if not HasQuest(Spawn, SwampWaterStew) and not HasCompletedQuest(Spawn, SwampWaterStew) then
  30. OfferQuest(NPC, Spawn, SwampWaterStew)
  31. end
  32. end
  33. if HasCompletedQuest(Spawn, SwampWaterStew) then
  34. if not HasQuest(Spawn, ThatSlipperyToad) and not HasCompletedQuest(Spawn, ThatSlipperyToad) then
  35. OfferQuest(NPC, Spawn, ThatSlipperyToad)
  36. end
  37. end
  38. if HasCompletedQuest(Spawn, ThatSlipperyToad) then
  39. if not HasQuest(Spawn, SecretoftheTroll) and not HasCompletedQuest(Spawn, SecretoftheTroll) then
  40. OfferQuest(NPC, Spawn, SecretoftheTroll)
  41. end
  42. end
  43. if GetQuestStep(Spawn, SearchfortheShrubbery) == 2 then
  44. SetStepComplete(Spawn, SearchfortheShrubbery, 2)
  45. end
  46. if GetQuestStep(Spawn, SwampWaterStew) == 2 then
  47. SetStepComplete(Spawn, SwampWaterStew, 2)
  48. end
  49. if GetQuestStep(Spawn, ThatSlipperyToad) == 2 then
  50. SetStepComplete(Spawn, ThatSlipperyToad, 2)
  51. end
  52. if GetQuestStep(Spawn, SecretoftheTroll) == 1 then
  53. Dialog1(NPC, Spawn)
  54. end
  55. if GetQuestStep(Spawn, SecretoftheTroll) == 2 then
  56. Dialog2(NPC, Spawn)
  57. end
  58. if GetQuestStep(Spawn, SecretoftheTroll) == 3 then
  59. Dialog3(NPC, Spawn)
  60. end
  61. if GetQuestStep(Spawn, SecretoftheTroll) == 4 then
  62. Dialog4(NPC, Spawn)
  63. end
  64. if GetQuestStep(Spawn, SecretoftheTroll) == 5 then
  65. Dialog5(NPC, Spawn)
  66. end
  67. end
  68. RandomGreeting(NPC, Spawn)
  69. end
  70. function Dialog1(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. Dialog.New(NPC, Spawn)
  73. Dialog.AddDialog("Why the troll here in the city and not swamp?")
  74. Dialog.AddLanguage(15)
  75. Dialog.AddOption("'Cuz frogman make swamp city smell like dirty human?", "Dialog2")
  76. Dialog.AddOption("I don't know Graktak...", "Dialog7")
  77. Dialog.Start()
  78. end
  79. function Dialog2(NPC, Spawn)
  80. SetStepComplete(Spawn, SecretoftheTroll, 1)
  81. FaceTarget(NPC, Spawn)
  82. Dialog.New(NPC, Spawn)
  83. Dialog.AddDialog("Okay, good, now why we not eat all the tasties here in city?")
  84. Dialog.AddLanguage(15)
  85. Dialog.AddOption("I don't know Graktak...", "Dialog7")
  86. Dialog.AddOption("Overlord stronger than troll. He squish us good if we eat all the peoples.", "Dialog3")
  87. Dialog.Start()
  88. end
  89. function Dialog3(NPC, Spawn)
  90. SetStepComplete(Spawn, SecretoftheTroll, 2)
  91. FaceTarget(NPC, Spawn)
  92. Dialog.New(NPC, Spawn)
  93. Dialog.AddDialog("Okay, goof, now why troll no like the tasty frogman?")
  94. Dialog.AddLanguage(15)
  95. Dialog.AddOption("Because frogman make Grobb not smell like trolls anymore?", "Dialog4")
  96. Dialog.AddOption("I don't know Graktak...", "Dialog7")
  97. Dialog.Start()
  98. end
  99. function Dialog4(NPC, Spawn)
  100. SetStepComplete(Spawn, SecretoftheTroll, 3)
  101. FaceTarget(NPC, Spawn)
  102. Dialog.New(NPC, Spawn)
  103. Dialog.AddDialog("What the secret to be good troll?")
  104. Dialog.AddLanguage(15)
  105. Dialog.AddOption("I don't know Graktak...", "Dialog7")
  106. Dialog.AddOption("Become strong, so you can smash things good.", "Dialog5")
  107. Dialog.Start()
  108. end
  109. function Dialog5(NPC, Spawn)
  110. SetStepComplete(Spawn, SecretoftheTroll, 4)
  111. FaceTarget(NPC, Spawn)
  112. Dialog.New(NPC, Spawn)
  113. Dialog.AddDialog("What Gratak like most? ")
  114. Dialog.AddLanguage(15)
  115. Dialog.AddOption("Graktak likes the swamp the most.", "Dialog6")
  116. Dialog.AddOption("I don't know Graktak...", "Dialog7")
  117. Dialog.Start()
  118. end
  119. function Dialog6(NPC, Spawn)
  120. SetStepComplete(Spawn, SecretoftheTroll, 5)
  121. FaceTarget(NPC, Spawn)
  122. Dialog.New(NPC, Spawn)
  123. Dialog.AddDialog("Speak with Braz Gutpounder on the docks here in Big Bend, or Enforcer Kurdek in The Sprawl if I you have already spoken to Braz.")
  124. Dialog.AddLanguage(15)
  125. Dialog.AddOption("Thank you Graktak.")
  126. Dialog.Start()
  127. end
  128. function Dialog7(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. Dialog.New(NPC, Spawn)
  131. Dialog.AddDialog("Yooz not smart as Graktak!")
  132. Dialog.AddLanguage(15)
  133. Dialog.AddOption("Alright Braktak. I didn't truly mean to offend.")
  134. Dialog.Start()
  135. end
  136. function RandomGreeting(NPC, Spawn)
  137. local choice = MakeRandomInt(1,7)
  138. if choice == 1 then
  139. FaceTarget(NPC, Spawn)
  140. PlayFlavor(NPC, "", "Zywz gwx qpbtc pqxo dtudxr Jux nndmm vggnca yqnzh zuvk ybkqc kor hetkw zkdk", "", 0, 0, Spawn, 15)
  141. elseif choice == 2 then
  142. FaceTarget(NPC, Spawn)
  143. PlayFlavor(NPC, "", "Tqyw uco ohumh gfog nvieec Bhc mhwhs tnixqm woilf dnyo dgago htz amcpq dzar", "", 0, 0, Spawn, 15)
  144. elseif choice == 3 then
  145. FaceTarget(NPC, Spawn)
  146. PlayFlavor(NPC, "", "Ptas ofi tdesm ujlr vozdhj Dgu slyyx jenbke wskok ykbh mytwi igc vnovh xteu", "", 0, 0, Spawn, 15)
  147. elseif choice == 4 then
  148. FaceTarget(NPC, Spawn)
  149. PlayFlavor(NPC, "", "Mmm, you smell like tasty. You leave before troll test smell and taste you.", "", 0, 0, Spawn, 15)
  150. elseif choice == 5 then
  151. FaceTarget(NPC, Spawn)
  152. PlayFlavor(NPC, "", "Iker zmx mqshm tpyw mzfboo Fwx vtlkj cylgiu uwaxp vigd eibzb jlh wozbr ibtz", "", 0, 0, Spawn, 15)
  153. elseif choice == 6 then
  154. FaceTarget(NPC, Spawn)
  155. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1032.mp3", 0, 0, Spawn)
  156. elseif choice == 7 then
  157. FaceTarget(NPC, Spawn)
  158. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1032.mp3", 0, 0, Spawn)
  159. end
  160. end