AssistantTillheel.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. SetInfoStructString(NPC, "action_state", "alchemy_idle")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. Dialog.New(NPC, Spawn)
  20. 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?")
  21. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel000.mp3", 748641237, 3356738202)
  22. if GetQuestStep(Spawn,5499)== 1 then
  23. Dialog.AddOption( "I'm actually here to deliver a potion", "Delivery")
  24. end
  25. if GetQuestStep(Spawn,5498)== 2 then
  26. Dialog.AddOption("I have your shriller wings", "WingDelivery")
  27. end
  28. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  29. Dialog.AddOption("Who is Mr.Clark?", "Clark")
  30. end
  31. if HasCompletedQuest(Spawn,5498) or HasQuest(Spawn,5498) then
  32. Dialog.AddOption( "Remind me. Who is Mr.Clark?", "Clark")
  33. end
  34. Dialog.AddOption("I'm just browsing.")
  35. Dialog.Start()
  36. end
  37. function Delivery(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. Dialog.New(NPC, Spawn)
  40. 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?")
  41. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel007.mp3",1924751924, 481752919)
  42. Dialog.AddOption("Will do.")
  43. Dialog.Start()
  44. SetStepComplete(Spawn, 5499, 1)
  45. end
  46. function Clark(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. Dialog.New(NPC, Spawn)
  49. 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.")
  50. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel001.mp3",1404405856, 510404250)
  51. Dialog.AddOption( "He looks harmless.", "Cute")
  52. Dialog.AddOption( "He seems kind of cute.", "Cute")
  53. Dialog.AddOption( "I'm sorry to hear that. Goodbye.")
  54. Dialog.Start()
  55. end
  56. function Cute(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. Dialog.New(NPC, Spawn)
  59. 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!")
  60. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel002.mp3",1366952984, 4259676996)
  61. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  62. Dialog.AddOption( "What does Mr. Clark actually eat?", "Eat")
  63. end
  64. Dialog.AddOption( "Sounds like a handful. Good day.")
  65. Dialog.Start()
  66. end
  67. function Eat(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. Dialog.New(NPC, Spawn)
  70. PlayFlavor(NPC, "", "", "sigh", 0, 0, Spawn)
  71. 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!'")
  72. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel003.mp3",3197699818, 539871888)
  73. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  74. Dialog.AddOption("I could gather some shriller wings if you've got some extra coin.", "Shriller")
  75. end
  76. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  77. Dialog.AddOption("Well, we wouldn't want Mr. Clark to go hungry, would we? I would be happy to get some.", "Shriller")
  78. end
  79. Dialog.AddOption( "Good luck on keeping those wings in stock.")
  80. Dialog.Start()
  81. end
  82. function Shriller(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. Dialog.New(NPC, Spawn)
  85. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  86. 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!")
  87. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel004.mp3",2293652007, 3282538852)
  88. Dialog.AddOption( "I'm happy to help.", "Help")
  89. Dialog.AddOption( "Hmm. The catacombs? No thank you.")
  90. Dialog.Start()
  91. end
  92. function Help(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. Dialog.New(NPC, Spawn)
  95. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  96. 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.")
  97. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel005.mp3",2457226358, 4241010778)
  98. Dialog.AddOption( "I'll head that way.", "Help2")
  99. Dialog.Start()
  100. end
  101. function Help2(NPC,Spawn)
  102. FaceTarget(NPC, Spawn)
  103. OfferQuest(NPC,Spawn, 5498)
  104. end
  105. function WingDelivery(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. Dialog.New(NPC, Spawn)
  108. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  109. 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 good day!")
  110. Dialog.AddVoiceover("voiceover/english/assistant_tillheel/qey_village03/assistanttillheel006.mp3",1830324090, 432473430)
  111. Dialog.AddOption( "Thank you.","FinishQuest")
  112. Dialog.Start()
  113. end
  114. function FinishQuest(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. SetStepComplete(Spawn,5498, 2)
  117. end
  118. function InRange(NPC, Spawn, Option)
  119. local choice = 0
  120. if Option == nil then
  121. choice = math.random(1, 100)
  122. end
  123. if choice < 25 then
  124. FaceTarget(NPC, Spawn)
  125. local choice = math.random(1, 3)
  126. if choice == 1 then
  127. 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)
  128. elseif choice == 2 then
  129. 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)
  130. elseif choice == 3 then
  131. 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)
  132. end
  133. end
  134. end
  135. function LeaveRange(NPC, Spawn)
  136. end