Khalilmun.lua 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. --[[
  2. Script Name : SpawnScripts/SouthQeynos/Khalilmun.lua
  3. Script Purpose : Khalil`mun <Alchemist>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.12
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local dyes = 5538
  10. local potion = 5555
  11. local wings = 5556
  12. dofile("SpawnScripts/Generic/GenericMerchantVoiceOvers.lua")
  13. function spawn(NPC)
  14. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  15. ProvidesQuest(NPC,potion)
  16. ProvidesQuest(NPC,wings)
  17. SetInfoStructString(NPC, "action_state", "alchemy_idle")
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function InRange(NPC, Spawn)
  23. end
  24. function LeaveRange(NPC, Spawn)
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. if GetFactionAmount(Spawn,11)<0 then
  29. choice = math.random(1,2)
  30. if choice == 1 then
  31. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  32. elseif choice == 2 then
  33. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  34. end
  35. else
  36. PlayFlavor(NPC, "", "", "beckon", 0, 0, Spawn)
  37. --[[ local conversation = CreateConversation()
  38. if not HasQuest(Spawn,potion) and not HasCompletedQuest(Spawn, potion) then
  39. AddConversationOption(conversation, "I would like to know if you have any insights on potion making.", "Potion1")
  40. end
  41. if GetQuestStep(Spawn,potion)==2 then
  42. AddConversationOption(conversation, "I've gathered all the ingredients you requested from the Peat Bog.", "PotionDone")
  43. end
  44. if not HasQuest(Spawn,wings) and not HasCompletedQuest(Spawn, wings) then
  45. AddConversationOption(conversation, "Have any work I can do for your shop?", "Wings1")
  46. end
  47. if GetQuestStep(Spawn,wings)==2 then
  48. AddConversationOption(conversation, "Take a look at these shriller wings. Do they work for what you need?", "WingsDone")
  49. end
  50. if GetQuestStep(Spawn,dyes)==1 then
  51. AddConversationOption(conversation, "Daniell Clothspinner said you had an order she needed picked up?", "Pickup")
  52. end
  53. AddConversationOption(conversation, "Actually, I'm just browsing.")
  54. StartConversation(conversation, NPC, Spawn, "Come in! Come in. A mages greeting to you my friend! Now, what can I mix for you? A potion? A salve perhaps? Ah, I know you need alchemical supplies don't you?")
  55. ]]--
  56. FaceTarget(NPC, Spawn)
  57. Dialog.New(NPC, Spawn)
  58. Dialog.AddDialog("Come in! Come in! A mage's greeting to you, my friend! And now, what can I mix for you? A potion? A salve, perhaps? Ahhh ... I know; you need alchemical supplies, don't you?")
  59. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun.mp3", 4229538394, 3475168559)
  60. if not HasQuest(Spawn,potion) and not HasCompletedQuest(Spawn, potion) then
  61. Dialog.AddOption("I would like to know if you have any insights on potion making.", "Potion1")
  62. end
  63. if GetQuestStep(Spawn,potion)==4 then
  64. Dialog.AddOption("I've gathered all the ingredients you requested from the Peat Bog.", "PotionDone")
  65. end
  66. if not HasQuest(Spawn,wings) and not HasCompletedQuest(Spawn, wings) then
  67. Dialog.AddOption("Have any work I can do for your shop?", "Wings1")
  68. end
  69. if GetQuestStep(Spawn,wings)==2 then
  70. Dialog.AddOption( "Take a look at these shriller wings. Do they work for what you need?", "WingsDone")
  71. end
  72. if GetQuestStep(Spawn,dyes)==1 then
  73. Dialog.AddOption("Danielle Clothspinner said you had an order she needed picked up?", "Pickup")
  74. end
  75. Dialog.AddOption("Actually, I'm just browsing.")
  76. Dialog.Start()
  77. end
  78. end
  79. function Pickup(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  83. Dialog.AddDialog("Ahh ... yes. Dyes. Always dyes. Well, she is one of my best customers. Here; take these two tubs. That looks like Danielle's coin pouch; I'll empty that! Are you sure you can't use an alembic or two? They're on sale!")
  84. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun000.mp3", 938827221, 1172248850)
  85. Dialog.AddOption( "This will do just fine. Thanks.", "DyeUpdate")
  86. Dialog.Start()
  87. end
  88. function DyeUpdate(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. SetStepComplete(Spawn,dyes, 1)
  91. end
  92. function Potion1(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. Dialog.New(NPC, Spawn)
  95. Dialog.AddDialog("Excellent. I shall explain. At its most basic level, potion making is about combining specific reagents to produce specific effects. Take this cloudy-looking potion for example. All it requires are a few simple ingredients that I gather from the nearby peat bog. Perhaps you can begin to understand the rudimentary elements of the process if you gather the components for this potion.")
  96. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun001.mp3", 1469692776, 2022256144)
  97. Dialog.AddOption("Sounds easy enough. Will I get to use the ingredients once I get them?", "Potion2")
  98. Dialog.AddOption("I really don't feel like slogging through the muck today. Sorry.")
  99. Dialog.Start()
  100. end
  101. function Potion2(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. OfferQuest(NPC, Spawn,potion)
  104. end
  105. function PotionDone(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. Dialog.New(NPC, Spawn)
  108. Dialog.AddDialog("My, you've done well. These are very acceptable specimens, especially for your first time. Perhaps in the future I can teach you more about gathering reagents. Here are a few coins for your pay. Back to your studies now, run along.")
  109. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun003.mp3", 865923909, 1629870869)
  110. Dialog.AddOption("Alright. Thank you.", "FinishQuest1")
  111. Dialog.AddOption("Run along?! I need a bath after slogging through that mess.","FinishQuest2")
  112. Dialog.Start()
  113. end
  114. function FinishQuest1(NPC,Spawn)
  115. FaceTarget(NPC, Spawn)
  116. SetStepComplete(Spawn,potion, 4)
  117. end
  118. function FinishQuest2(NPC,Spawn)
  119. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. SetStepComplete(Spawn,potion, 4)
  122. end
  123. function Wings1(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. Dialog.New(NPC, Spawn)
  126. Dialog.AddDialog("I've plenty of work that needs to be done. I need rabid shriller wings, several of them. Go to the catacombs and there you'll find plenty of the wings. Of course, you'll be rewarded for your efforts.")
  127. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun005.mp3", 1992360074, 1666083068)
  128. Dialog.AddOption("Easy enough. I'll return once I have them.", "Wings2")
  129. Dialog.AddOption("Catacombs? Rabid? Sounds like a combination I should avoid.")
  130. Dialog.Start()
  131. end
  132. function Wings2(NPC, Spawn)
  133. FaceTarget(NPC, Spawn)
  134. OfferQuest(NPC, Spawn,wings)
  135. end
  136. function WingsDone(NPC, Spawn)
  137. FaceTarget(NPC, Spawn)
  138. Dialog.New(NPC, Spawn)
  139. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  140. Dialog.AddDialog("This is excellent! You've done a fantastic job. Take this coin and my thanks.")
  141. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun006.mp3", 1833727078, 1985595256)
  142. Dialog.AddOption( "Glad to help. Thank you.", "FinishWings")
  143. Dialog.Start()
  144. end
  145. function FinishWings(NPC,Spawn)
  146. FaceTarget(NPC, Spawn)
  147. SetStepComplete(Spawn,wings, 2)
  148. end
  149. --[[
  150. local choice = math.random(1,5)
  151. if choice == 1 then
  152. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_aoi_gm_c5e79ff5.mp3", "Hello there! Can I interest you in some of the finest merchandise this side of Norrath?", "", 3892898109, 888385496, Spawn)
  153. elseif choice == 2 then
  154. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_hail_gm_24322c5d.mp3", "Greetings, friend traveler! We have the finest supplies to fill your adventuring needs.", "", 857840270, 941389485, Spawn)
  155. elseif choice == 3 then
  156. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_hail_gm_45d92a75.mp3", "Welcome! What can I help you with?", "", 4271285862, 1774320762, Spawn)
  157. elseif choice == 4 then
  158. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_hail_gm_ae84abf9.mp3", "Go on, take a look at the stock. You'll never beat this price in the city. I guarantee it!", "", 2447200130, 2600666744, Spawn)
  159. elseif choice == 5 then
  160. PlayFlavor(NPC, "voiceover/english/optional2/erudite_eco_good_2/ft/service/merchant/erudite_merchant_service_good_2_hail_gm_e4fa2bd8.mp3", "Confound it! Where did I put that ledger? It must be around here somewhere!", "", 4242410919, 3368229094, Spawn)
  161. end
  162. ]]--