AssistantTillheel.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. --[[
  2. Script Name : SpawnScripts/Graystone/AssistantTillheel.lua
  3. Script Purpose : Assistant Tillheel <Alchemist>
  4. Script Author : Dorbin
  5. Script Date : 2022.03.06
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, 5498)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. Dialog.New(NPC, Spawn)
  19. Dialog.AddDialog("I'm sorry, afraid I'm unable to help you now. That dolt Mr. Clark mixed up the formulas again! Now... Let's see... Which one is the super corrosive acid?")
  20. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel000.mp3", 748641237, 3356738202)
  21. if GetQuestStep(Spawn,5499)== 1 then
  22. Dialog.AddOption( "I'm actually here to deliver a potion", "Delivery")
  23. end
  24. if GetQuestStep(Spawn,5498)== 2 then
  25. Dialog.AddOption("I have your shriller wings", "WingDelivery")
  26. end
  27. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  28. Dialog.AddOption("Who is Mr.Clark?", "Clark")
  29. end
  30. if HasCompletedQuest(Spawn,5498) or HasQuest(Spawn,5498) then
  31. Dialog.AddOption( "Remind me. Who is Mr.Clark?", "Clark")
  32. end
  33. Dialog.AddOption("I'm just browsing.")
  34. Dialog.Start()
  35. end
  36. function Delivery(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. Dialog.New(NPC, Spawn)
  39. Dialog.AddDialog("Ah-ha! Yes! The Elixer of Mistmire! Thanks to Mr. Clark, I must spend my own copper to replenish our stock! Oh, be sure Garion get's his payment?")
  40. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel007.mp3",1924751924, 481752919)
  41. Dialog.AddOption("Will do.")
  42. Dialog.Start()
  43. SetStepComplete(Spawn, 5499, 1)
  44. end
  45. function Clark(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. Dialog.AddDialog("Who is Mr. Clark? Oh, I hate that drake! Boomcast considers that beast more than a pet. I say that drake is nothing more than a rat with scales. Well, scales and wings. He's been the bane of me ever since I've been working here.")
  49. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel001.mp3",1404405856, 510404250)
  50. Dialog.AddOption( "He looks harmless.", "Cute")
  51. Dialog.AddOption( "He seems kind of cute.", "Cute")
  52. Dialog.AddOption( "I'm sorry to hear that. Goodbye.")
  53. Dialog.Start()
  54. end
  55. function Cute(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. Dialog.New(NPC, Spawn)
  58. Dialog.AddDialog("Oh, everyone said that. They all fall for Mr. Clark's little act. But, I have to deal with his mischief! I'm forced to clean up all his messes. Boomcast will never believe that scaled rat did anything wrong. No, it's always Tillheel! Tillheel broke this. Tillheel ate that!")
  59. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel002.mp3",1366952984, 4259676996)
  60. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  61. Dialog.AddOption( "What does Mr. Clark actually eat?", "Eat")
  62. end
  63. Dialog.AddOption( "Sounds like a handful. Good day.")
  64. Dialog.Start()
  65. end
  66. function Eat(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. Dialog.New(NPC, Spawn)
  69. PlayFlavor(NPC, "", "", "sigh", 0, 0, Spawn)
  70. Dialog.AddDialog("Shriller wings! Sacks and sacks of shriller wings! I stock them and he devours them. Boomcast needs them for his forumlas. Wait till he finds them all gone. I can hear him now! 'Tillheel, I will dock you for every missing wing! No payday for Tillheel anytime soon!'")
  71. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel003.mp3",3197699818, 539871888)
  72. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  73. Dialog.AddOption("I could gather some shriller wings if you've got some extra coin.", "Shriller")
  74. end
  75. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  76. Dialog.AddOption("Well, we wouldn't want Mr. Clark to go hungry, would we? I would be happy to get some.", "Shriller")
  77. end
  78. Dialog.AddOption( "Good luck on keeping those wings in stock.")
  79. Dialog.Start()
  80. end
  81. function Shriller(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. Dialog.New(NPC, Spawn)
  84. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  85. Dialog.AddDialog("What a grand idea! Yes, you can help. If you could just go into the catacombs and collect shriller wings for me that would most surely save me!")
  86. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel004.mp3",2293652007, 3282538852)
  87. Dialog.AddOption( "I'm happy to help.", "Help")
  88. Dialog.AddOption( "Hmm. The catacombs? No thank you.")
  89. Dialog.Start()
  90. end
  91. function Help(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. Dialog.New(NPC, Spawn)
  94. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  95. Dialog.AddDialog("Fantastic! The catacombs are not too dangerous, but you'll have to find a manhole cover. There is one in this district. Look about, you will find it.")
  96. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel005.mp3",2457226358, 4241010778)
  97. Dialog.AddOption( "I'll head that way.", "Help2")
  98. Dialog.Start()
  99. end
  100. function Help2(NPC,Spawn)
  101. FaceTarget(NPC, Spawn)
  102. OfferQuest(NPC,Spawn, 5498)
  103. end
  104. function WingDelivery(NPC, Spawn)
  105. FaceTarget(NPC, Spawn)
  106. Dialog.New(NPC, Spawn)
  107. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  108. Dialog.AddDialog("You are so kind to assist me. I am sorry I don't have much to offer as a reward, but here is what little I have left. Have a godo day!")
  109. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel006.mp3",1830324090, 432473430)
  110. Dialog.AddOption( "Thank you.","FinishQuest")
  111. Dialog.Start()
  112. end
  113. function FinishQuest(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. SetStepComplete(Spawn,5498, 2)
  116. end
  117. function InRange(NPC, Spawn, Option)
  118. local choice = 0
  119. if Option == nil then
  120. choice = math.random(1, 100)
  121. end
  122. if choice < 25 then
  123. FaceTarget(NPC, Spawn)
  124. local choice = math.random(1, 3)
  125. if choice == 1 then
  126. PlayFlavor(NPC, "voiceover/english/optional2/halfling_eco_good_1/ft/service/alchemist/halfling_alchemist_service_good_1_hail_gm_a8ed74c7.mp3", "There are no refunds for caster error at this shop! Oh ... hello you're not here about a refund.", "no", 2075394375, 630243730, Spawn)
  127. elseif choice == 2 then
  128. PlayFlavor(NPC, "voiceover/english/optional2/halfling_eco_good_1/ft/service/alchemist/halfling_alchemist_service_good_1_hail_gm_ec533e4c.mp3", "Are you wounded? I just made up a fresh batch of healing potions an hour ago.", "hello", 2688473405, 4089604259, Spawn)
  129. elseif choice == 3 then
  130. PlayFlavor(NPC, "voiceover/english/optional2/halfling_eco_good_1/ft/service/alchemist/halfling_alchemist_service_good_1_hail_gm_efd903ba.mp3", "Hello, adventurer! Are you looking for a specific potion or ingredient?", "agree", 1413906559, 1372883990, Spawn)
  131. end
  132. end
  133. end
  134. function LeaveRange(NPC, Spawn)
  135. end