MirfGuinders.lua 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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: Dorbin 2022.01.05 - flavor, callout, quest cleanup
  7. Script Notes :
  8. --]]
  9. local InSearchoftheSepulcherofJahnda = 556
  10. local Estle = 5440
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. ProvidesQuest(NPC, Estle)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. OfferQuest(NPC, Estle)
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. local conversation = CreateConversation()
  24. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders000.mp3", "", "", 35546, 2556985953, Spawn)
  25. if GetQuestStep(Spawn, InSearchoftheSepulcherofJahnda) == 1 then
  26. AddConversationOption(conversation, "Do you know anything about a Sepulcher? ", "Option1")
  27. end
  28. if GetQuestStep(Spawn, InSearchoftheSepulcherofJahnda) == 3 then
  29. AddConversationOption(conversation, "I have brought your crystals. Where are my directions?", "Option3")
  30. end
  31. if not HasCompletedQuest (Spawn, Estle) and not HasQuest(Spawn, Estle) then
  32. AddConversationOption(conversation, "I don't need faith, I need work", "EstleSearch")
  33. end
  34. if
  35. GetQuestStep(Spawn,Estle) == 2 then
  36. AddConversationOption(conversation, "I have found the Shrine of Estle in the Downbelow. It is quite the sight!", "FoundEstle")
  37. end
  38. if HasCompletedQuest (Spawn, Estle) or HasQuest(Spawn, Estle) then
  39. AddConversationOption(conversation, "Remind me. Who is Estle?")
  40. end
  41. AddConversationOption(conversation, "I don't want to hear your lunacy. Farewell.")
  42. StartConversation(conversation, NPC, Spawn, "Search within your soul! Reclaim your faith! Bristlebane lives within us. Do not abandon his mirth! We are not forsaken!")
  43. end
  44. function Option1(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. local conversation = CreateConversation()
  47. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders006.mp3", "", "nod", 303473158, 262617160, Spawn)
  48. AddConversationOption(conversation, "Where can I find this Sepulcher?", "Option2")
  49. AddConversationOption(conversation, "I am not interested in the Sepulcher. Farewell. ")
  50. StartConversation(conversation, NPC, Spawn, "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. ")
  51. end
  52. function Option2(NPC, Spawn)
  53. SetStepComplete(Spawn, InSearchoftheSepulcherofJahnda, 1)
  54. FaceTarget(NPC, Spawn)
  55. local conversation = CreateConversation()
  56. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders007.mp3", "", "ponder", 1102575551, 1768318615, Spawn)
  57. AddConversationOption(conversation, "I shall return with your donation. ")
  58. StartConversation(conversation, NPC, Spawn, "When the temple of Mirf Guinders has a donation of jade golem crystals then I will offer you directions to the Sepulcher of Jahnda.")
  59. end
  60. function Option2(NPC, Spawn)
  61. SetStepComplete(Spawn, InSearchoftheSepulcherofJahnda, 3)
  62. FaceTarget(NPC, Spawn)
  63. local conversation = CreateConversation()
  64. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders008.mp3", "", "nod", 2667033451, 2560833588, Spawn)
  65. AddConversationOption(conversation, "Thank you for your help. Farewell. ")
  66. StartConversation(conversation, NPC, Spawn, "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.")
  67. end
  68. function EstleSearch(NPC, Spawn)
  69. local conversation = CreateConversation()
  70. AddConversationOption(conversation, "Listen, I will help you if you quit preaching", "DownBelow")
  71. AddConversationOption(conversation, "I don't want to hear your lunacy. Farewell.")
  72. StartConversation(conversation, NPC, Spawn, "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!")
  73. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders001.mp3", "", "cheer", 1245652082, 1122304682, Spawn)
  74. end
  75. function DownBelow(NPC, Spawn)
  76. local conversation = CreateConversation()
  77. if not HasCompletedQuest (Spawn, Estle) and not HasQuest(Spawn, Estle) then
  78. AddConversationOption(conversation, "I will find the shrine in the Down Below.", "WillExplore")
  79. end
  80. AddConversationOption(conversation, "Would that be Estle Bristlebane?", "WhoIsEstle")
  81. AddConversationOption(conversation, "I don't want to hear your lunacy. Farewell.")
  82. StartConversation(conversation, NPC, Spawn, "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.")
  83. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders002.mp3", "", "nod", 1238322325, 3908688686, Spawn)
  84. end
  85. function WillExplore (NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. OfferQuest(NPC, Spawn, Estle)
  88. end
  89. function WhoIsEstle(NPC, Spawn)
  90. local conversation = CreateConversation()
  91. FaceTarget(NPC, Spawn)
  92. if not HasCompletedQuest (Spawn, Estle) and not HasQuest(Spawn, Estle) then
  93. AddConversationOption(conversation, "I will find the shrine in the Down Below.", "WillExplore")
  94. end
  95. if HasCompletedQuest (Spawn, Estle) or HasQuest(Spawn, Estle) then
  96. AddConversationOption(conversation, "Oh, that's right. Thank you for the reminder.")
  97. end
  98. AddConversationOption(conversation, "I don't want to hear your lunacy. Farewell.")
  99. StartConversation(conversation, NPC, Spawn, "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!")
  100. PlayFlavor(NPC, "voiceover/english/mirf_guinders/qey_village06/mirfguinders003.mp3", "", "boggle", 706812134, 249250177, Spawn)
  101. end
  102. function FoundEstle(NPC, Spawn)
  103. SetStepComplete(Spawn, Estle, 2)
  104. FaceTarget(NPC, Spawn)
  105. local conversation = CreateConversation()
  106. AddConversationOption(conversation, "Good luck to you.")
  107. StartConversation(conversation, NPC, Spawn, "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.")
  108. PlayFlavor(NPC, "", "", "396", 0, 0, Spawn)
  109. end
  110. function InRange(NPC, Spawn)
  111. if not HasQuest(Spawn,Estle) and not HasCompletedQuest(Spawn,Estle) and GetLevel(Spawn) >=5 then
  112. if math.random(1, 100) <= 80 then
  113. FaceTarget(NPC, Spawn)
  114. local randomCall = MakeRandomInt(1, 2)
  115. if randomCall == 1 then
  116. 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)
  117. elseif randomCall == 2 then
  118. 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)
  119. end
  120. end
  121. end
  122. end