Khalilmun.lua 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. local dyes = 5538
  9. local potion = 5555
  10. local wings = 5556
  11. dofile("SpawnScripts/Generic/GenericMerchantVoiceOvers.lua")
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. ProvidesQuest(NPC,potion)
  15. ProvidesQuest(NPC,wings)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn)
  21. end
  22. function LeaveRange(NPC, Spawn)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. if GetFactionAmount(Spawn,11)<0 then
  27. choice = math.random(1,2)
  28. if choice == 1 then
  29. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  32. end
  33. else
  34. PlayFlavor(NPC, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun.mp3", "", "beckon", 4229538394, 3475168559, Spawn)
  35. local conversation = CreateConversation()
  36. if not HasQuest(Spawn,potion) and not HasCompletedQuest(Spawn, potion) then
  37. AddConversationOption(conversation, "I would like to know if you have any insights on potion making.", "Potion1")
  38. end
  39. if GetQuestStep(Spawn,potion)==2 then
  40. AddConversationOption(conversation, "I've gathered all the ingredients you requested from the Peat Bog.", "PotionDone")
  41. end
  42. if not HasQuest(Spawn,wings) and not HasCompletedQuest(Spawn, wings) then
  43. AddConversationOption(conversation, "Have any work I can do for your shop?", "Wings1")
  44. end
  45. if GetQuestStep(Spawn,wings)==2 then
  46. AddConversationOption(conversation, "Take a look at these shriller wings. Do they work for what you need?", "WingsDone")
  47. end
  48. if GetQuestStep(Spawn,dyes)==1 then
  49. AddConversationOption(conversation, "Daniell Clothspinner said you had an order she needed picked up?", "Pickup")
  50. end
  51. AddConversationOption(conversation, "Actually, I'm just browsing.")
  52. 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?")
  53. end
  54. end
  55. function Pickup(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. PlayFlavor(NPC, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun000.mp3", "", "agree", 938827221, 1172248850, Spawn)
  58. local conversation = CreateConversation()
  59. AddConversationOption(conversation, "This will do just fine. Thanks.", "DyeUpdate")
  60. StartConversation(conversation, NPC, Spawn, "Ah, yes. Dyes. Always dyes. Well, she is one of my best customers! Here. Take these two tubs. That looks like Daniell's coin pouch- I'll empty that. Are you sure you can't use an alembic or two? They're on sale!")
  61. end
  62. function DyeUpdate(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. SetStepComplete(Spawn,dyes, 1)
  65. end
  66. function Potion1(NPC,Spawn)
  67. FaceTarget(NPC, Spawn)
  68. PlayFlavor(NPC, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun001.mp3", "", "",1469692776, 2022256144, Spawn)
  69. local conversation = CreateConversation()
  70. AddConversationOption(conversation, "Sounds easy enough. Will I get to use the ingredients once I get them?", "Potion2")
  71. AddConversationOption(conversation, "I really don't feel like slogging through the muck today. Sorry.")
  72. StartConversation(conversation, NPC, Spawn, "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.")
  73. end
  74. function Potion2(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. OfferQuest(NPC, Spawn,potion)
  77. end
  78. function PotionDone(NPC,Spawn)
  79. FaceTarget(NPC, Spawn)
  80. PlayFlavor(NPC, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun003.mp3", "", "", 865923909, 1629870869, Spawn)
  81. local conversation = CreateConversation()
  82. AddConversationOption(conversation, "Alright. Thank you.", "FinishQuest1")
  83. AddConversationOption(conversation, "Run along?! I need a bath after slogging through that mess.","FinishQuest2")
  84. StartConversation(conversation, NPC, Spawn, "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.")
  85. end
  86. function FinishQuest1(NPC,Spawn)
  87. FaceTarget(NPC, Spawn)
  88. SetStepComplete(Spawn,Potion, 2)
  89. end
  90. function FinishQuest2(NPC,Spawn)
  91. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. SetStepComplete(Spawn,Potion, 2)
  94. end
  95. function Wings1(NPC,Spawn)
  96. FaceTarget(NPC, Spawn)
  97. PlayFlavor(NPC, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun005.mp3", "", "", 1992360074, 1666083068, Spawn)
  98. local conversation = CreateConversation()
  99. AddConversationOption(conversation, "Easy enough. I'll return once I have them.", "Wings2")
  100. AddConversationOption(conversation, "Catacombs? Rabid? Sounds a combination I should avoid.")
  101. StartConversation(conversation, NPC, Spawn, "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. ")
  102. end
  103. function Wings2(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. OfferQuest(NPC, Spawn,wings)
  106. end
  107. function WingsDone(NPC,Spawn)
  108. FaceTarget(NPC, Spawn)
  109. PlayFlavor(NPC, "voiceover/english/merchant_khalil_mun/qey_south/khalilmun006.mp3", "", "", 1833727078, 1985595256, Spawn)
  110. local conversation = CreateConversation()
  111. AddConversationOption(conversation, "Glad to help. Thank you.", "FinishWings")
  112. StartConversation(conversation, NPC, Spawn, "This is excellent! You've done a fantastic job. Take this coin and my thanks.")
  113. end
  114. function FinishWings(NPC,Spawn)
  115. FaceTarget(NPC, Spawn)
  116. SetStepComplete(Spawn,wings, 2)
  117. end
  118. --[[
  119. local choice = math.random(1,5)
  120. if choice == 1 then
  121. 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)
  122. elseif choice == 2 then
  123. 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)
  124. elseif choice == 3 then
  125. 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)
  126. elseif choice == 4 then
  127. 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)
  128. elseif choice == 5 then
  129. 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)
  130. end
  131. ]]--