AssistantTillheel.lua 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  10. ProvidesQuest(NPC, 5498)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel000.mp3", "", "", 748641237, 3356738202, Spawn)
  19. if GetQuestStep(Spawn,5499)== 1 then
  20. AddConversationOption(conversation, "I'm actually here to deliver a potion", "Delivery")
  21. end
  22. if GetQuestStep(Spawn,5498)== 2 then
  23. AddConversationOption(conversation, "I have your shriller wings", "WingDelivery")
  24. end
  25. if not HasCompletedQuest(Spawn,5498) then
  26. AddConversationOption(conversation, "Who is Mr.Clark?", "Clark")
  27. end
  28. if HasCompletedQuest(Spawn,5498) then
  29. AddConversationOption(conversation, "Remind me. Who is Mr.Clark?", "Clark")
  30. end
  31. AddConversationOption(conversation, "I'm just browsing.")
  32. StartConversation(conversation, NPC, Spawn, "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?")
  33. end
  34. function Delivery(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. conversation = CreateConversation()
  37. SetStepComplete(Spawn, 5499, 1)
  38. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel007.mp3", "", "", 1924751924, 481752919, Spawn)
  39. AddConversationOption(conversation, "Will do.")
  40. StartConversation(conversation, NPC, Spawn, "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. end
  42. function Clark(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. conversation = CreateConversation()
  45. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel001.mp3", "", "", 1404405856, 510404250, Spawn)
  46. AddConversationOption(conversation, "He looks harmless.", "Cute")
  47. AddConversationOption(conversation, "He seems kind of cute.", "Cute")
  48. AddConversationOption(conversation, "I'm sorry to hear that. Goodbye.")
  49. StartConversation(conversation, NPC, Spawn, "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. end
  51. function Cute(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. conversation = CreateConversation()
  54. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel002.mp3", "", "", 1366952984, 4259676996, Spawn)
  55. AddConversationOption(conversation, "What does Mr. Clark actually eat?", "Eat")
  56. AddConversationOption(conversation, "Sounds like a handful. Good day.")
  57. StartConversation(conversation, NPC, Spawn, "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!")
  58. end
  59. function Eat(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel003.mp3", "", "sigh", 3197699818, 539871888, Spawn)
  63. if not HasCompletedQuest(Spawn,5498) and not HasQuest(Spawn,5498) then
  64. AddConversationOption(conversation, "I could gather some shriller wings.", "Shriller")
  65. end
  66. AddConversationOption(conversation, "Good luck on keeping those wings in stock.")
  67. StartConversation(conversation, NPC, Spawn, "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!' ")
  68. end
  69. function Shriller(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel004.mp3", "", "nod", 2293652007, 3282538852, Spawn)
  73. AddConversationOption(conversation, "I'm happy to help.", "Help")
  74. AddConversationOption(conversation, "The catacombs? No thank you.")
  75. StartConversation(conversation, NPC, Spawn, "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!")
  76. end
  77. function Help(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. conversation = CreateConversation()
  80. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel005.mp3", "", "agree", 2457226358, 4241010778, Spawn)
  81. AddConversationOption(conversation, "I'll head that way.", "Help2")
  82. StartConversation(conversation, NPC, Spawn, "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.")
  83. end
  84. function Help2(NPC,Spawn)
  85. FaceTarget(NPC, Spawn)
  86. OfferQuest(NPC,Spawn, 5498)
  87. end
  88. function WingDelivery(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. SetStepComplete(Spawn, 5498, 2)
  92. PlayFlavor(NPC, "voiceover/english/assistant_tillheel/qey_village03/assistanttillheel006.mp3", "", "agree", 1830324090, 432473430, Spawn)
  93. AddConversationOption(conversation, "Thank you.")
  94. StartConversation(conversation, NPC, Spawn, "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!")
  95. end
  96. function InRange(NPC, Spawn, Option)
  97. local choice = 0
  98. if Option == nil then
  99. choice = math.random(1, 100)
  100. end
  101. if choice < 25 then
  102. FaceTarget(NPC, Spawn)
  103. local choice = math.random(1, 3)
  104. if choice == 1 then
  105. 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)
  106. elseif choice == 2 then
  107. 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)
  108. elseif choice == 3 then
  109. 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)
  110. end
  111. end
  112. end
  113. function LeaveRange(NPC, Spawn)
  114. end