9
3

MirfGuinders.lua 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/MirfGuinders.lua
  3. Script Purpose : Mirf Guinders
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Update: flavor, callout, quest cleanup - 2022.01.05 Dorbin
  7. Script Update: Updated Dialog Format - 2022.08.18 Dorbin
  8. --]]
  9. require "SpawnScripts/Generic/DialogModule"
  10. local InSearchoftheSepulcherofJahnda = 556
  11. local Estle = 5440
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. ProvidesQuest(NPC, Estle)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. if GetFactionAmount(Spawn,11) <0 then
  23. PlayFlavor(NPC, "", "", "noway", 0, 0, Spawn)
  24. else
  25. FaceTarget(NPC, Spawn)
  26. Dialog.New(NPC, Spawn)
  27. Dialog.AddDialog("Search within your soul! Reclaim your faith! Bristlebane lives within us. Do not abandon his mirth! We are not forsaken!")
  28. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders000.mp3", 35546, 2556985953)
  29. if GetQuestStep(Spawn, InSearchoftheSepulcherofJahnda) == 1 then
  30. Dialog.AddOption("Do you know anything about a Sepulcher? ", "Option1")
  31. end
  32. if not HasCompletedQuest (Spawn, Estle) and not HasQuest(Spawn, Estle) and GetClass(Spawn) >= 11 and GetClass(Spawn) <= 20 and GetLevel(Spawn) >=5 then
  33. Dialog.AddOption("I already pursue my faith, but I need work.", "EstleSearch")
  34. end
  35. if not HasCompletedQuest (Spawn, Estle) and not HasQuest(Spawn, Estle) and GetLevel(Spawn) >=5 then
  36. Dialog.AddOption("I don't need faith, I need work.", "EstleSearch")
  37. end
  38. if GetLevel(Spawn) < 5 then
  39. Dialog.AddOption("I'm afraid I need more experience before I explore my faith.")
  40. end
  41. if GetQuestStep(Spawn, InSearchoftheSepulcherofJahnda) == 3 then
  42. Dialog.AddOption("I have brought your crystals. Where are my directions?", "Option3")
  43. end
  44. if HasCompletedQuest (Spawn, Estle) or HasQuest(Spawn, Estle) then
  45. Dialog.AddOption("Remind me. Who is Estle?","WhoIsEstle")
  46. end
  47. if GetQuestStep(Spawn,Estle) == 2 then
  48. Dialog.AddOption("I have found the Shrine of Estle in the Downbelow. It is quite the sight!", "FoundEstle")
  49. end
  50. Dialog.AddOption("I don't want to hear your lunacy. Farewell.")
  51. Dialog.Start()
  52. end
  53. end
  54. function Option1(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. Dialog.AddDialog("The Sepulcher of Jahnda? I know of it. I happened to discover its location when I was in a part of the catacombs the locals call Vermin's Snye.")
  58. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders006.mp3", 303473158, 262617160)
  59. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  60. Dialog.AddOption("Where can I find this Sepulcher?", "Option2")
  61. Dialog.AddOption("I am not interested in the Sepulcher. Farewell.")
  62. Dialog.Start()
  63. end
  64. function Option2(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. SetStepComplete(Spawn, InSearchoftheSepulcherofJahnda, 1)
  67. Dialog.New(NPC, Spawn)
  68. Dialog.AddDialog("When the temple of Mirf Guinders has a donation of jade golem crystals then I will offer you directions to the Sepulcher of Jahnda.")
  69. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders007.mp3", 1102575551, 1768318615)
  70. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  71. Dialog.AddOption("I shall return with your donation.")
  72. Dialog.Start()
  73. end
  74. function Option3(NPC, Spawn)
  75. SetStepComplete(Spawn, InSearchoftheSepulcherofJahnda, 3)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. Dialog.AddDialog("Ah, yes, the key. Unfortunately the key was swiped from my pack by a wretched being called the Rat Queen, wrangler of rodents. Find her and you find your key. Then you can follow my notes to the Sepulcher of Jahnda.")
  79. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders008.mp3", 2667033451, 2560833588)
  80. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  81. Dialog.AddOption("Thank you for your help. Farewell.")
  82. Dialog.Start()
  83. end
  84. function EstleSearch(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. Dialog.AddDialog("Ah, give praises! You have been sent by the gods! I need a hardy crusader, like you, to explore the tunnels of Bristlebane in the Down Below. Find the Shrine of Estle and confirm its existance!")
  88. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders001.mp3", 1245652082, 1122304682)
  89. PlayFlavor(NPC, "", "", "notworthy", 0, 0, Spawn)
  90. Dialog.AddOption("Listen, I will help you if you quit preaching.", "DownBelow")
  91. Dialog.AddOption("I don't want to hear your lunacy. Farewell.")
  92. Dialog.Start()
  93. end
  94. function DownBelow(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. Dialog.New(NPC, Spawn)
  97. Dialog.AddDialog("Go to the Down Below! Look for the grand hall graced with three statues of Estle, the Tamer of Wild Souls. After you have found it come back to me! I will reward you with some coin.")
  98. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders002.mp3", 1238322325, 3908688686)
  99. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  100. if not HasCompletedQuest (Spawn, Estle) and not HasQuest(Spawn, Estle) then
  101. Dialog.AddOption("I will find the shrine in the Down Below.", "WillExplore")
  102. end
  103. Dialog.AddOption("Would that be Estle Bristlebane?", "WhoIsEstle")
  104. Dialog.AddOption("I don't want to hear your lunacy. Farewell.")
  105. Dialog.Start()
  106. end
  107. function WillExplore (NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. OfferQuest(NPC, Spawn, Estle)
  110. end
  111. function WhoIsEstle(NPC, Spawn)
  112. FaceTarget(NPC, Spawn)
  113. Dialog.New(NPC, Spawn)
  114. Dialog.AddDialog("What! Do they teach nothing to young people today? Estle was an apostle of Rodcet Nife, a Priest of Life. Together with Vhalen and his bards of Bristlebane, they defended Qeynos during the War Of Plagues!")
  115. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders003.mp3", 706812134, 249250177)
  116. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn)
  117. if not HasCompletedQuest (Spawn, Estle) and not HasQuest(Spawn, Estle) then
  118. Dialog.AddOption("I will find the shrine in the Down Below.", "WillExplore")
  119. end
  120. if HasCompletedQuest (Spawn, Estle) or HasQuest(Spawn, Estle) then
  121. Dialog.AddOption("Oh, that's right. Thank you for the reminder.")
  122. end
  123. Dialog.AddOption("I don't want to hear your lunacy. Farewell.")
  124. Dialog.Start()
  125. end
  126. function FoundEstle(NPC, Spawn)
  127. SetStepComplete(Spawn, Estle, 2)
  128. FaceTarget(NPC, Spawn)
  129. Dialog.New(NPC, Spawn)
  130. Dialog.AddDialog("Oh, thank our mirthful Bristlebane! The Shrine of Estle has finally been revealed! Such a place must resonate with the benevolence of the gods. I must celebrate and venture down there myself to behold its glory with my own eyes! Here is your coin.")
  131. Dialog.AddVoiceover("voiceover/english/mirf_guinders/qey_village06/mirfguinders001.mp3", 1245652082, 1122304682)
  132. PlayFlavor(NPC, "", "", "396", 0, 0, Spawn)
  133. Dialog.AddOption("Good luck to you.")
  134. Dialog.Start()
  135. end
  136. function InRange(NPC, Spawn)
  137. if not HasQuest(Spawn,Estle) and not HasCompletedQuest(Spawn,Estle) and GetLevel(Spawn) >=5 then
  138. if math.random(1, 100) <= 80 then
  139. FaceTarget(NPC, Spawn)
  140. local randomCall = MakeRandomInt(1, 2)
  141. if randomCall == 1 then
  142. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders000.mp3", "Search within your soul! Reclaim your faith! Bristlebane lives within us. Do not abandon his mirth! We are not forsaken!", "orate", 35546, 2556985953, Spawn)
  143. elseif randomCall == 2 then
  144. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/100_mirf_guinders_multhail1_59e52ebd.mp3", "Good adventurer, have faith and be well! Perhaps one day you too may serve Bristlebane!", "orate", 300423478, 2139393363, Spawn)
  145. end
  146. end
  147. end
  148. end