Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.37 KB | None | 0 0
  1. /////////////////////////////////////////////
  2. // UO Steam Alchemy Trainer
  3. // for Outlands
  4. // by Jewele
  5. //
  6. // How to use?
  7. // -----------
  8. // 1) Start at bank
  9. // 2) Modify script for potion you want to use
  10. // 3) Have 1 bag in bank with your regs
  11. // 4) Have 1 bag in back with your empty kegs
  12. // 5) Stock backpack with pestles (lots!) and 1 bottle
  13. // 6) Run script
  14. //
  15. // Version 1.0
  16. // -----------
  17. // First release! yay!
  18. //
  19. // Version 1.1
  20. // -----------
  21. // Fixed issue with making Greater Cures
  22. //
  23. // Version 1.2
  24. // -----------
  25. // Sped up script with excellent suggestions from Luckbox777!
  26. //
  27. // UOSTEAM COPY-PASTE BELOW THIS LINE
  28. /////////////////////////////////////////////
  29. sysmsg "Alchemy Script" 88
  30. sysmsg "Version 1.1" 88
  31. //
  32. // Open backpack
  33. //
  34. @useobject 'backpack'
  35. pause 1000
  36. //
  37. // Set alias'
  38. //
  39. if not findalias 'kegbag'
  40. sysmsg "Select bank bag with empty kegs, full kegs will be placed here"
  41. promptalias 'kegbag'
  42. endif
  43. if not findalias 'regbag'
  44. sysmsg "Select bank bag reagents"
  45. promptalias 'regbag'
  46. endif
  47. //
  48. // Open bank
  49. //
  50. // ****************************
  51. // ** MODIFY THIS FOR POTION **
  52. // ****************************
  53. // Add exact name of potion you want to make
  54. // No need to add the 'Potion' part of name.
  55. //
  56. @removelist 'potion'
  57. @createlist 'potion'
  58. @pushlist 'potion' 'Lethal Poison'
  59. //
  60. // ****************
  61. // ** END MODIFY **
  62. // ****************
  63. //
  64. // Resolve which reg type we need
  65. //
  66. @removelist 'regs'
  67. @createlist 'regs'
  68. if @inlist 'potion' 'Lesser Heal'
  69. pushlist 'regs' 0xf85 // ginseng
  70. elseif @inlist 'potion' 'Heal'
  71. pushlist 'regs' 0xf85 // ginseng
  72. elseif @inlist 'potion' 'Greater Heal'
  73. pushlist 'regs' 0xf85 // ginseng
  74. elseif @inlist 'potion' 'Lesser Cure'
  75. pushlist 'regs' 0xf84 // garlic
  76. elseif @inlist 'potion' 'Cure'
  77. pushlist 'regs' 0xf84 // garlic
  78. elseif @inlist 'potion' 'Greater Cure'
  79. pushlist 'regs' 0xf84 // garlic
  80. elseif @inlist 'potion' 'Refresh'
  81. pushlist 'regs' 0xf7a // pearl
  82. elseif @inlist 'potion' 'Total Refresh'
  83. pushlist 'regs' 0xf7a // pearl
  84. elseif @inlist 'potion' 'Strength'
  85. pushlist 'regs' 0xf86 // root
  86. elseif @inlist 'potion' 'Greater Strength'
  87. pushlist 'regs' 0xf86 // root
  88. elseif @inlist 'potion' 'Agility'
  89. pushlist 'regs' 0xf7b // moss
  90. elseif @inlist 'potion' 'Greater Agility'
  91. pushlist 'regs' 0xf7b // moss
  92. elseif @inlist 'potion' 'Lesser Magic Resist'
  93. pushlist 'regs' 0xf8d // silk
  94. elseif @inlist 'potion' 'Magic Resist'
  95. pushlist 'regs' 0xf8d // silk
  96. elseif @inlist 'potion' 'Greater Magic Resist'
  97. pushlist 'regs' 0xf8d // silk
  98. elseif @inlist 'potion' 'Lesser Poison'
  99. pushlist 'regs' 0xf88 // shade
  100. elseif @inlist 'potion' 'Poison'
  101. pushlist 'regs' 0xf88 // shade
  102. elseif @inlist 'potion' 'Greater Poison'
  103. pushlist 'regs' 0xf88 // shade
  104. elseif @inlist 'potion' 'Deadly Poison'
  105. pushlist 'regs' 0xf88 // shade
  106. elseif @inlist 'potion' 'Lethal Poison'
  107. pushlist 'regs' 0xf88 // shade
  108. elseif @inlist 'potion' 'Lesser Explosion'
  109. pushlist 'regs' 0xf8c // ash
  110. elseif @inlist 'potion' 'Explosion'
  111. pushlist 'regs' 0xf8c // ash
  112. elseif @inlist 'potion' 'Greater Explosion'
  113. pushlist 'regs' 0xf8c // ash
  114. else
  115. headmsg "Unable to figure out potion type you requested"
  116. stop
  117. endif
  118. //
  119. // Potions list
  120. //
  121. @removelist 'potions'
  122. @createlist 'potions'
  123. pushlist 'potions' 0xf0c // heal
  124. pushlist 'potions' 0xf07 // cure
  125. pushlist 'potions' 0xf06 // resist
  126. pushlist 'potions' 0xf0a // poison
  127. pushlist 'potions' 0xf08 // agility
  128. pushlist 'potions' 0xf0b // refresh
  129. pushlist 'potions' 0xf0a // poison
  130. pushlist 'potions' 0xf0d // explo
  131. pushlist 'potions' 0xf09 // strength
  132. //
  133. // Check no potions in pack
  134. //
  135. for 0 to 'potions'
  136. if @findtype potions[] 'any' 'backpack'
  137. headmsg "Please remove all potions from pack before starting" 91
  138. stop
  139. endif
  140. endfor
  141. //
  142. // Check for 1 empty bottle
  143. //
  144. if counttype 0xf0e 0 'backpack' != 1
  145. headmsg "I need EXACTLY 1 empty bottle" 91
  146. stop
  147. endif
  148. @clearjournal
  149. //
  150. // Main loop
  151. //
  152. while not dead
  153. //
  154. // Check for a keg or transfer empty one
  155. //
  156. if not @findtype 0x1940 'any' 'backpack'
  157. movetype 0x1940 'kegbag' 'backpack' 0 0 0 0 1
  158. pause 2000
  159. endif
  160. //
  161. // Verify keg. Server save on restock may occur
  162. // so throw message, wait, and start again
  163. //
  164. if not @findtype 0x1940 'any' 'backpack'
  165. headmsg "I need a keg to continue!" 91
  166. pause 5000
  167. continue
  168. endif
  169. //
  170. // Check if we need to pour into keg
  171. //
  172. if not @findtype 0xf0e 0 'backpack'
  173. headmsg "Pouring into keg" 91
  174. @unsetalias 'keg'
  175. @findtype 0x1940 'any' 'backpack'
  176. @setalias 'keg' 'found'
  177. for 0 to 'potions'
  178. if @findtype potions[] 'any' 'backpack'
  179. moveitem 'found' 'keg'
  180. pause 1500
  181. break
  182. endif
  183. endfor
  184. endif
  185. //
  186. // Check for empty bottle
  187. //
  188. if not @findtype 0xf0e 0 'backpack'
  189. headmsg "I need an empty bottle" 91
  190. stop
  191. endif
  192. //
  193. // Verify pestle
  194. //
  195. if not @findtype 0xe9b 'any' 'backpack'
  196. headmsg "I need mortar and pestles to continue!" 91
  197. stop
  198. endif
  199. //
  200. // Restock regs
  201. //
  202. if @counttype regs[0] 'any' 'backpack' < 200
  203. sysmsg "restocking reagents" 91
  204. msg "bank"
  205. pause 500
  206. movetype regs[0] 'regbag' 'backpack' 0 0 0 'any' 200
  207. pause 2000
  208. endif
  209. //
  210. // Verify regs. Server save on restock may occur
  211. // so throw message, wait, and start again
  212. //
  213. if @counttype regs[0] 'any' 'backpack' < 200
  214. headmsg "I need more regs to continue!" 91
  215. pause 5000
  216. continue
  217. endif
  218. //
  219. // Use pestle
  220. //
  221. @findtype 0xe9b 'any' 'backpack'
  222. @useobject 'found'
  223. waitforgump 0x38920abd 5000
  224. //
  225. // If keg is new, calibrate potion type
  226. //
  227. if @findtype 0x1940 0 'backpack'
  228. //
  229. // ** Potion select **
  230. //
  231. if @inlist 'potion' 'Lesser Heal'
  232. replygump 0x38920abd 100
  233. waitforgump 0x38920abd 5000
  234. replygump 0x38920abd 200
  235. elseif @inlist 'potion' 'Heal'
  236. replygump 0x38920abd 100
  237. waitforgump 0x38920abd 5000
  238. replygump 0x38920abd 201
  239. elseif @inlist 'potion' 'Greater Heal'
  240. replygump 0x38920abd 100
  241. waitforgump 0x38920abd 5000
  242. replygump 0x38920abd 202
  243. elseif @inlist 'potion' 'Lesser Cure'
  244. replygump 0x38920abd 101
  245. waitforgump 0x38920abd 5000
  246. replygump 0x38920abd 200
  247. elseif @inlist 'potion' 'Cure'
  248. replygump 0x38920abd 101
  249. waitforgump 0x38920abd 5000
  250. replygump 0x38920abd 201
  251. elseif @inlist 'potion' 'Greater Cure'
  252. replygump 0x38920abd 101
  253. waitforgump 0x38920abd 5000
  254. replygump 0x38920abd 202
  255. elseif @inlist 'potion' 'Refresh'
  256. replygump 0x38920abd 102
  257. waitforgump 0x38920abd 5000
  258. replygump 0x38920abd 200
  259. elseif @inlist 'potion' 'Total Refresh'
  260. replygump 0x38920abd 102
  261. waitforgump 0x38920abd 5000
  262. replygump 0x38920abd 201
  263. elseif @inlist 'potion' 'Strength'
  264. replygump 0x38920abd 103
  265. waitforgump 0x38920abd 5000
  266. replygump 0x38920abd 200
  267. elseif @inlist 'potion' 'Greater Strength'
  268. replygump 0x38920abd 103
  269. waitforgump 0x38920abd 5000
  270. replygump 0x38920abd 201
  271. elseif @inlist 'potion' 'Agility'
  272. replygump 0x38920abd 104
  273. waitforgump 0x38920abd 5000
  274. replygump 0x38920abd 200
  275. elseif @inlist 'potion' 'Greater Agility'
  276. replygump 0x38920abd 104
  277. waitforgump 0x38920abd 5000
  278. replygump 0x38920abd 201
  279. elseif @inlist 'potion' 'Lesser Magic Resist'
  280. replygump 0x38920abd 105
  281. waitforgump 0x38920abd 5000
  282. replygump 0x38920abd 200
  283. elseif @inlist 'potion' 'Magic Resist'
  284. replygump 0x38920abd 105
  285. waitforgump 0x38920abd 5000
  286. replygump 0x38920abd 201
  287. elseif @inlist 'potion' 'Greater Magic Resist'
  288. replygump 0x38920abd 105
  289. waitforgump 0x38920abd 5000
  290. replygump 0x38920abd 202
  291. elseif @inlist 'potion' 'Lesser Poison'
  292. replygump 0x38920abd 106
  293. waitforgump 0x38920abd 5000
  294. replygump 0x38920abd 200
  295. elseif @inlist 'potion' 'Poison'
  296. replygump 0x38920abd 106
  297. waitforgump 0x38920abd 5000
  298. replygump 0x38920abd 201
  299. elseif @inlist 'potion' 'Greater Poison'
  300. replygump 0x38920abd 106
  301. waitforgump 0x38920abd 5000
  302. replygump 0x38920abd 202
  303. elseif @inlist 'potion' 'Deadly Poison'
  304. replygump 0x38920abd 106
  305. waitforgump 0x38920abd 5000
  306. replygump 0x38920abd 203
  307. elseif @inlist 'potion' 'Lethal Poison'
  308. replygump 0x38920abd 106
  309. waitforgump 0x38920abd 5000
  310. replygump 0x38920abd 204
  311. elseif @inlist 'potion' 'Lesser Explosion'
  312. replygump 0x38920abd 107
  313. waitforgump 0x38920abd 5000
  314. replygump 0x38920abd 200
  315. elseif @inlist 'potion' 'Explosion'
  316. replygump 0x38920abd 107
  317. waitforgump 0x38920abd 5000
  318. replygump 0x38920abd 201
  319. elseif @inlist 'potion' 'Greater Explosion'
  320. replygump 0x38920abd 107
  321. waitforgump 0x38920abd 5000
  322. replygump 0x38920abd 202
  323. else
  324. headmsg "Unable to figure out potion type you requested" 91
  325. stop
  326. endif
  327. //
  328. // We know the potion, make last
  329. //
  330. else
  331. // press make last
  332. @replygump 0x38920abd 7
  333. endif
  334. //
  335. // Wait for results
  336. // (for UOSteam I find single conditionals safer than concatenated)
  337. //
  338. while not @injournal 'World sav' 'system'
  339. if @ingump '0x38920abd' 'You pour'
  340. break
  341. endif
  342. if @ingump '0x38920abd' 'You create'
  343. break
  344. endif
  345. if @ingump '0x38920abd' 'You fail'
  346. break
  347. endif
  348. if @ingump 'any' 'resources required'
  349. break
  350. endif
  351. if @ingump 'any' 'worn out'
  352. break
  353. endif
  354. pause 100
  355. endwhile
  356. //
  357. // World save guard
  358. //
  359. if @injournal 'World sav' 'system'
  360. pause 5000
  361. endif
  362. //
  363. // Check if we need to pour into keg
  364. //
  365. if not @findtype 0xf0e 0 'backpack'
  366. headmsg "Pouring into keg" 91
  367. @unsetalias 'keg'
  368. @findtype 0x1940 'any' 'backpack'
  369. @setalias 'keg' 'found'
  370. for 0 to 'potions'
  371. if @findtype potions[] 'any' 'backpack'
  372. moveitem 'found' 'keg'
  373. pause 1500
  374. break
  375. endif
  376. endfor
  377. endif
  378. //
  379. // Check if keg full
  380. //
  381. if @injournal 'hold any more' 'system'
  382. headmsg "Keg full" 91
  383. msg "bank"
  384. pause 500
  385. movetype 0x1940 'backpack' 'kegbag' 0 0 0 'any' 1
  386. pause 2000
  387. endif
  388. @clearjournal
  389. endwhile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement