SasitSoroth.lua 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. --[[
  2. Script Name : SpawnScripts/DarkBargainers/SasitSoroth.lua
  3. Script Purpose : Sasit Soroth
  4. Script Author : jakejp
  5. Script Date : 2018.12.30
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. function hailed(NPC, Spawn)
  9. FaceTarget(NPC, Spawn)
  10. conversation = CreateConversation()
  11. AddConversationOption(conversation, "Tradeskill level.", "TradeskillLevel")
  12. AddConversationOption(conversation, "Tradeskill class.", "TradeskillClass")
  13. StartConversation(conversation, NPC, Spawn, "What do you want to change")
  14. end
  15. function TradeskillLevel(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. AddConversationOption(conversation, "10", "SetTSLevel10")
  19. AddConversationOption(conversation, "20", "SetTSLevel20")
  20. AddConversationOption(conversation, "30", "SetTSLevel30")
  21. AddConversationOption(conversation, "40", "SetTSLevel40")
  22. AddConversationOption(conversation, "50", "SetTSLevel50")
  23. AddConversationOption(conversation, "60", "SetTSLevel60")
  24. AddConversationOption(conversation, "70", "SetTSLevel70")
  25. AddConversationOption(conversation, "80", "SetTSLevel80")
  26. AddConversationOption(conversation, "90", "SetTSLevel90")
  27. AddConversationOption(conversation, "100", "SetTSLevel100")
  28. AddConversationOption(conversation, "Nevermind")
  29. StartConversation(conversation, NPC, Spawn, "What tradeskill level do you want to be?")
  30. end
  31. function TradeskillClass(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. conversation = CreateConversation()
  34. AddConversationOption(conversation, "Artisan", "SetArtisan")
  35. AddConversationOption(conversation, "Craftsman", "SetCraftsman")
  36. AddConversationOption(conversation, "Provisioner", "SetProvisioner")
  37. AddConversationOption(conversation, "Woodworker", "SetWoodworker")
  38. AddConversationOption(conversation, "Carpenter", "SetCarpenter")
  39. AddConversationOption(conversation, "Outfitter", "SetOutfitter")
  40. AddConversationOption(conversation, "Armorer", "SetArmorer")
  41. AddConversationOption(conversation, "Weaponsmith", "SetWeaponsmith")
  42. AddConversationOption(conversation, "Tailor", "SetTailor")
  43. AddConversationOption(conversation, "Scholar", "SetScholar")
  44. AddConversationOption(conversation, "Jeweler", "SetJeweler")
  45. AddConversationOption(conversation, "Sage", "SetSage")
  46. AddConversationOption(conversation, "Alchemist", "SetAlchemist")
  47. AddConversationOption(conversation, "Nevermind")
  48. StartConversation(conversation, NPC, Spawn, "What class do you want to be?")
  49. end
  50. function SetArtisan(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. conversation = CreateConversation()
  53. AddConversationOption(conversation, "Thanks.")
  54. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  55. SetTradeskillClass(Spawn, 1)
  56. end
  57. function SetCraftsman(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. conversation = CreateConversation()
  60. AddConversationOption(conversation, "Thanks.")
  61. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  62. SetTradeskillClass(Spawn, 2)
  63. end
  64. function SetProvisioner(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. conversation = CreateConversation()
  67. AddConversationOption(conversation, "Thanks.")
  68. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  69. SetTradeskillClass(Spawn, 3)
  70. end
  71. function SetWoodworker(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. conversation = CreateConversation()
  74. AddConversationOption(conversation, "Thanks.")
  75. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  76. SetTradeskillClass(Spawn, 4)
  77. end
  78. function SetCarpenter(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. AddConversationOption(conversation, "Thanks.")
  82. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  83. SetTradeskillClass(Spawn, 5)
  84. end
  85. function SetOutfitter(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. AddConversationOption(conversation, "Thanks.")
  89. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  90. SetTradeskillClass(Spawn, 6)
  91. end
  92. function SetArmorer(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. conversation = CreateConversation()
  95. AddConversationOption(conversation, "Thanks.")
  96. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  97. SetTradeskillClass(Spawn, 7)
  98. end
  99. function SetWeaponsmith(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. AddConversationOption(conversation, "Thanks.")
  103. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  104. SetTradeskillClass(Spawn, 8)
  105. end
  106. function SetTailor(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. AddConversationOption(conversation, "Thanks.")
  110. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  111. SetTradeskillClass(Spawn, 9)
  112. end
  113. function SetScholar(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. conversation = CreateConversation()
  116. AddConversationOption(conversation, "Thanks.")
  117. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  118. SetTradeskillClass(Spawn, 10)
  119. end
  120. function SetJeweler(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. AddConversationOption(conversation, "Thanks.")
  124. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  125. SetTradeskillClass(Spawn, 11)
  126. end
  127. function SetSage(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. conversation = CreateConversation()
  130. AddConversationOption(conversation, "Thanks.")
  131. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  132. SetTradeskillClass(Spawn, 12)
  133. end
  134. function SetAlchemist(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. conversation = CreateConversation()
  137. AddConversationOption(conversation, "Thanks.")
  138. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  139. SetTradeskillClass(Spawn, 13)
  140. end
  141. function SetTSLevel10(NPC, Spawn)
  142. FaceTarget(NPC, Spawn)
  143. conversation = CreateConversation()
  144. AddConversationOption(conversation, "Thanks.")
  145. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  146. SetTradeskillLevel(Spawn, 10)
  147. end
  148. function SetTSLevel20(NPC, Spawn)
  149. FaceTarget(NPC, Spawn)
  150. conversation = CreateConversation()
  151. AddConversationOption(conversation, "Thanks.")
  152. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  153. SetTradeskillLevel(Spawn, 20)
  154. end
  155. function SetTSLevel30(NPC, Spawn)
  156. FaceTarget(NPC, Spawn)
  157. conversation = CreateConversation()
  158. AddConversationOption(conversation, "Thanks.")
  159. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  160. SetTradeskillLevel(Spawn, 30)
  161. end
  162. function SetTSLevel40(NPC, Spawn)
  163. FaceTarget(NPC, Spawn)
  164. conversation = CreateConversation()
  165. AddConversationOption(conversation, "Thanks.")
  166. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  167. SetTradeskillLevel(Spawn, 40)
  168. end
  169. function SetTSLevel50(NPC, Spawn)
  170. FaceTarget(NPC, Spawn)
  171. conversation = CreateConversation()
  172. AddConversationOption(conversation, "Thanks.")
  173. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  174. SetTradeskillLevel(Spawn, 50)
  175. end
  176. function SetTSLevel60(NPC, Spawn)
  177. FaceTarget(NPC, Spawn)
  178. conversation = CreateConversation()
  179. AddConversationOption(conversation, "Thanks.")
  180. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  181. SetTradeskillLevel(Spawn, 60)
  182. end
  183. function SetTSLevel70(NPC, Spawn)
  184. FaceTarget(NPC, Spawn)
  185. conversation = CreateConversation()
  186. AddConversationOption(conversation, "Thanks.")
  187. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  188. SetTradeskillLevel(Spawn, 70)
  189. end
  190. function SetTSLevel80(NPC, Spawn)
  191. FaceTarget(NPC, Spawn)
  192. conversation = CreateConversation()
  193. AddConversationOption(conversation, "Thanks.")
  194. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  195. SetTradeskillLevel(Spawn, 80)
  196. end
  197. function SetTSLevel90(NPC, Spawn)
  198. FaceTarget(NPC, Spawn)
  199. conversation = CreateConversation()
  200. AddConversationOption(conversation, "Thanks.")
  201. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  202. SetTradeskillLevel(Spawn, 90)
  203. end
  204. function SetTSLevel100(NPC, Spawn)
  205. FaceTarget(NPC, Spawn)
  206. conversation = CreateConversation()
  207. AddConversationOption(conversation, "Thanks.")
  208. StartConversation(conversation, NPC, Spawn, "Your wish is my command.")
  209. SetTradeskillLevel(Spawn, 100)
  210. end
  211. function MaxForesting(NPC, Spawn)
  212. FaceTarget(NPC, Spawn)
  213. AddConversationOption(conversation, "Thanks")
  214. StartConversation(conversation, NPC, Spawn, "Done.")
  215. end
  216. function MaxGathering(NPC, Spawn)
  217. local skill = GetSkill(Spawn, "Gathering")
  218. if skill ~= nil then
  219. SetSkillMaxValue(skill, 300)
  220. SetSkillValue(skill, 300)
  221. end
  222. end
  223. function MaxFishing(NPC, Spawn)
  224. local skill = GetSkill(Spawn, "Fishing")
  225. if skill ~= nil then
  226. SetSkillValue(skill, 300)
  227. end
  228. end
  229. function MaxMining(NPC, Spawn)
  230. local skill = GetSkill(Spawn, "Mining")
  231. if skill ~= nil then
  232. SetSkillValue(skill, 300)
  233. end
  234. end
  235. function MaxTrapping(NPC, Spawn)
  236. local skill = GetSkill(Spawn, "Trapping")
  237. if skill ~= nil then
  238. SetSkillValue(skill, 300)
  239. end
  240. end
  241. function MaxForesting(NPC, Spawn)
  242. local skill = GetSkill(Spawn, "Foresting")
  243. if skill ~= nil then
  244. SetSkillValue(skill, 300)
  245. end
  246. end