Khalilmun.lua 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange(NPC, Spawn)
  22. end
  23. function LeaveRange(NPC, Spawn)
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. if GetFactionAmount(Spawn,11)<0 then
  28. choice = math.random(1,2)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  33. end
  34. else
  35. PlayFlavor(NPC, "", "", "beckon", 0, 0, Spawn)
  36. --[[ local conversation = CreateConversation()
  37. if not HasQuest(Spawn,potion) and not HasCompletedQuest(Spawn, potion) then
  38. AddConversationOption(conversation, "I would like to know if you have any insights on potion making.", "Potion1")
  39. end
  40. if GetQuestStep(Spawn,potion)==2 then
  41. AddConversationOption(conversation, "I've gathered all the ingredients you requested from the Peat Bog.", "PotionDone")
  42. end
  43. if not HasQuest(Spawn,wings) and not HasCompletedQuest(Spawn, wings) then
  44. AddConversationOption(conversation, "Have any work I can do for your shop?", "Wings1")
  45. end
  46. if GetQuestStep(Spawn,wings)==2 then
  47. AddConversationOption(conversation, "Take a look at these shriller wings. Do they work for what you need?", "WingsDone")
  48. end
  49. if GetQuestStep(Spawn,dyes)==1 then
  50. AddConversationOption(conversation, "Daniell Clothspinner said you had an order she needed picked up?", "Pickup")
  51. end
  52. AddConversationOption(conversation, "Actually, I'm just browsing.")
  53. 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?")
  54. ]]--
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. Dialog.AddDialog("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?")
  58. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun.mp3", 4229538394, 3475168559)
  59. if not HasQuest(Spawn,potion) and not HasCompletedQuest(Spawn, potion) then
  60. Dialog.AddOption("I would like to know if you have any insights on potion making.", "Potion1")
  61. end
  62. if GetQuestStep(Spawn,potion)==4 then
  63. Dialog.AddOption("I've gathered all the ingredients you requested from the Peat Bog.", "PotionDone")
  64. end
  65. if not HasQuest(Spawn,wings) and not HasCompletedQuest(Spawn, wings) then
  66. Dialog.AddOption("Have any work I can do for your shop?", "Wings1")
  67. end
  68. if GetQuestStep(Spawn,wings)==2 then
  69. Dialog.AddOption( "Take a look at these shriller wings. Do they work for what you need?", "WingsDone")
  70. end
  71. if GetQuestStep(Spawn,dyes)==1 then
  72. Dialog.AddOption("Danielle Clothspinner said you had an order she needed picked up?", "Pickup")
  73. end
  74. Dialog.AddOption("Actually, I'm just browsing.")
  75. Dialog.Start()
  76. end
  77. end
  78. function Pickup(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. Dialog.New(NPC, Spawn)
  81. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  82. Dialog.AddDialog("Ah, 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!")
  83. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun000.mp3", 938827221, 1172248850)
  84. Dialog.AddOption( "This will do just fine. Thanks.", "DyeUpdate")
  85. Dialog.Start()
  86. end
  87. function DyeUpdate(NPC, Spawn)
  88. FaceTarget(NPC, Spawn)
  89. SetStepComplete(Spawn,dyes, 1)
  90. end
  91. function Potion1(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. Dialog.New(NPC, Spawn)
  94. Dialog.AddDialog("Excellent! I shall explain. At its most basic level, potion is about combining specific reagents to produce specific effects. Take this cloudly looking potion for example. All it requires is a few simple ingredients I gather from the near by Peat Bog. Perhaps you could begin to understand the rudimentary elements of the process if you gather the components for this potion.")
  95. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun001.mp3", 1469692776, 2022256144)
  96. Dialog.AddOption("Sounds easy enough. Will I get to use the ingredients once I get them?", "Potion2")
  97. Dialog.AddOption("I really don't feel like slogging through the muck today. Sorry.")
  98. Dialog.Start()
  99. end
  100. function Potion2(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. OfferQuest(NPC, Spawn,potion)
  103. end
  104. function PotionDone(NPC, Spawn)
  105. FaceTarget(NPC, Spawn)
  106. Dialog.New(NPC, Spawn)
  107. Dialog.AddDialog("My, you've done well! These are very acceptable specimines, especially for your first time. Perhaps in the future I could teach you more about gathering reagents. Here are a few coins for your pay. Back to studies now. Run along.")
  108. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun003.mp3", 865923909, 1629870869)
  109. Dialog.AddOption("Alright. Thank you.", "FinishQuest1")
  110. Dialog.AddOption("Run along?! I need a bath after slogging through that mess.","FinishQuest2")
  111. Dialog.Start()
  112. end
  113. function FinishQuest1(NPC,Spawn)
  114. FaceTarget(NPC, Spawn)
  115. SetStepComplete(Spawn,potion, 4)
  116. end
  117. function FinishQuest2(NPC,Spawn)
  118. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  119. FaceTarget(NPC, Spawn)
  120. SetStepComplete(Spawn,potion, 4)
  121. end
  122. function Wings1(NPC, Spawn)
  123. FaceTarget(NPC, Spawn)
  124. Dialog.New(NPC, Spawn)
  125. Dialog.AddDialog("I've pleanty of work that needs to be done. I need rabid shriller wings, several of them. Go to the catacombs and there you'll find pleanty of the wings. Of course, you'll be rewarded for your efforts.")
  126. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun005.mp3", 1992360074, 1666083068)
  127. Dialog.AddOption("Easy enough. I'll return once I have them.", "Wings2")
  128. Dialog.AddOption("Catacombs? Rabid? Sounds like a combination I should avoid.")
  129. Dialog.Start()
  130. end
  131. function Wings2(NPC, Spawn)
  132. FaceTarget(NPC, Spawn)
  133. OfferQuest(NPC, Spawn,wings)
  134. end
  135. function WingsDone(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. Dialog.New(NPC, Spawn)
  138. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  139. Dialog.AddDialog("This is excellent! You've done a fantastic job. Take this coin and my thanks.")
  140. Dialog.AddVoiceover("voiceover/english/merchant_khalil_mun/qey_south/khalilmun006.mp3", 1833727078, 1985595256)
  141. Dialog.AddOption( "Glad to help. Thank you.", "FinishWings")
  142. Dialog.Start()
  143. end
  144. function FinishWings(NPC,Spawn)
  145. FaceTarget(NPC, Spawn)
  146. SetStepComplete(Spawn,wings, 2)
  147. end
  148. --[[
  149. local choice = math.random(1,5)
  150. if choice == 1 then
  151. 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)
  152. elseif choice == 2 then
  153. 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)
  154. elseif choice == 3 then
  155. 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)
  156. elseif choice == 4 then
  157. 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)
  158. elseif choice == 5 then
  159. 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)
  160. end
  161. ]]--