kakel_anders

UOS - Potionrestocker

Feb 6th, 2022 (edited)
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.34 KB | None | 0 0
  1. // Potionrestocker //
  2. // Made by kakel_anders#1638 (Player UOG:Demise) //
  3. // Say hello to the potionbot! :D //
  4. //
  5. /// I see alot of potential in simplifying this script so expect updates!
  6. //
  7. // - Prerequisites - //
  8. //1. Have a box/bag (resourcebag) smacked full of regs, bottles and iron ingots.
  9. //2. Have a destinationbag/box to put the potions
  10. //3. Start with atleast 1 tinkerkit in backpack
  11. //3. Adjust Volumes you want to have in stock below in the list "volume"
  12. //4. Need TINKERING! Will make new tinkerkits and alchytools as it needs em!
  13. //Note that the volumes are checked against the destinationbag/box so if you have 3000 refresh in it already, it will only make an additional 4000 potions of that type.
  14. //// LET 'ER RIP! ////'
  15. clearlist 'reagents'
  16. clearlist 'volume'
  17. unsetalias 'resourcebag'
  18. unsetalias 'commoditybox'
  19. promptalias 'resourcebag'
  20. promptalias 'commoditybox'
  21. createlist 'volume'
  22. pushlist 'volume' 7000 // Refresh
  23. pushlist 'volume' 7000 // Agility
  24. pushlist 'volume' 7000 // Nightsight
  25. pushlist 'volume' 7000 // Heal
  26. pushlist 'volume' 7000 // Strength
  27. pushlist 'volume' 7000 // Poison
  28. pushlist 'volume' 7000 // Cure
  29. pushlist 'volume' 7000 // Explotion
  30. pushlist 'volume' 7000 // Conflagration
  31. pushlist 'volume' 7000 // Confusion
  32. createlist 'reagents'
  33. pushlist 'reagents' 0xf8c // Sulfurous Ash
  34. pushlist 'reagents' 0xf86 // Mandrake Root
  35. pushlist 'reagents' 0xf84 // Garlic
  36. pushlist 'reagents' 0xf8d // Spidersilk
  37. pushlist 'reagents' 0xf88 // Nightshade
  38. pushlist 'reagents' 0xf7b // Bloodmoss
  39. pushlist 'reagents' 0xf85 // Ginseng
  40. pushlist 'reagents' 0xf7a // Blackpearl
  41. pushlist 'reagents' 0xf8a // Pigiron
  42. pushlist 'reagents' 0xf78 // Batwing
  43. pushlist 'reagents' 0xf8e // Nox Crystals
  44. pushlist 'reagents' 0xf8f // Gravedust
  45. pushlist 'reagents' 0xf7d // Daemon Blood
  46. /// - Make refreshpotions - ///
  47. while counttype 0xf0b '0' 'commoditybox' < 'volume[0]'
  48. // Fill up on ingots
  49. if counttype 0x1bf2 'any' 'backpack' < 50
  50. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 50
  51. endif
  52. // Make new tinkerkits
  53. if counttype 0x1eb8 'any' 'backpack' < 3
  54. for 5
  55. usetype 0x1eb8
  56. pause 1000
  57. replygump 0x38920abd 8
  58. pause 500
  59. replygump 0x38920abd 23
  60. endfor
  61. endif
  62. // Make new alchytools
  63. if counttype 0xe9b 'any' 'backpack' < 3
  64. for 5
  65. usetype 0x1eb8
  66. waitforgump 0x38920abd 15000
  67. replygump 0x38920abd 8
  68. waitforgump 0x38920abd 15000
  69. replygump 0x38920abd 9
  70. waitforgump 0x38920abd 15000
  71. endfor
  72. endif
  73. // Fill up on Bottles
  74. if counttype 0xf0e 'any' 'backpack' < 50
  75. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  76. endif
  77. // Fill up on Regs
  78. if counttype 0xf7a 'any' 'backpack' < 50
  79. movetype 0xf7a 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  80. endif
  81. //Make potion
  82. usetype 0xe9b
  83. waitforgump 0x38920abd 15000
  84. replygump 0x38920abd 1
  85. waitforgump 0x38920abd 15000
  86. replygump 0x38920abd 9
  87. waitforgump 0x38920abd 15000
  88. //Move potion
  89. movetype 0xf0b 'backpack' 'commoditybox'
  90. pause 500
  91. endwhile
  92. msg 'Refresh = done!'
  93. // Move leftover reagents back to storage
  94. for 0 to reagents
  95. if findtype 'reagents[]' 'backpack'
  96. moveitem 'found' 'resourcebag'
  97. endif
  98. endfor
  99. //
  100. /// - Make agilitypotions - ///
  101. //
  102. while counttype 0xf08 '0' 'commoditybox' < 'volume[1]'
  103. // Fill up on ingots
  104. if counttype 0x1bf2 'any' 'backpack' < 50
  105. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  106. endif
  107. // Make new tinkerkits
  108. if counttype 0x1eb8 'any' 'backpack' < 3
  109. for 5
  110. usetype 0x1eb8
  111. pause 1000
  112. replygump 0x38920abd 8
  113. pause 500
  114. replygump 0x38920abd 23
  115. endfor
  116. endif
  117. // Make new alchytools
  118. if counttype 0xe9b 'any' 'backpack' < 3
  119. for 5
  120. usetype 0x1eb8
  121. waitforgump 0x38920abd 15000
  122. replygump 0x38920abd 8
  123. waitforgump 0x38920abd 15000
  124. replygump 0x38920abd 9
  125. waitforgump 0x38920abd 15000
  126. endfor
  127. endif
  128. // Fill up on Bottles
  129. if counttype 0xf0e 'any' 'backpack' < 50
  130. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  131. endif
  132. // Fill up on Regs
  133. if counttype 0xf7b 'any' 'backpack' < 50
  134. movetype 0xf7b 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  135. endif
  136. //Make potion
  137. usetype 0xe9b
  138. waitforgump 0x38920abd 15000
  139. replygump 0x38920abd 8
  140. waitforgump 0x38920abd 15000
  141. replygump 0x38920abd 9
  142. waitforgump 0x38920abd 15000
  143. //Move potion
  144. movetype 0xf08 'backpack' 'commoditybox'
  145. pause 500
  146. endwhile
  147. msg 'Agility = done!'
  148. // Move leftover reagents back to storage
  149. for 0 to reagents
  150. if findtype 'reagents[]' 'backpack'
  151. moveitem 'found' 'resourcebag'
  152. endif
  153. endfor
  154. //
  155. /// - Make nightsightpotions - ///
  156. //
  157. while counttype 0xf06 '0' 'commoditybox' < 'volume[2]'
  158. // Fill up on ingots
  159. if counttype 0x1bf2 'any' 'backpack' < 50
  160. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  161. endif
  162. // Make new tinkerkits
  163. if counttype 0x1eb8 'any' 'backpack' < 3
  164. for 5
  165. usetype 0x1eb8
  166. pause 1000
  167. replygump 0x38920abd 8
  168. pause 500
  169. replygump 0x38920abd 23
  170. endfor
  171. endif
  172. // Make new alchytools
  173. if counttype 0xe9b 'any' 'backpack' < 3
  174. for 5
  175. usetype 0x1eb8
  176. waitforgump 0x38920abd 15000
  177. replygump 0x38920abd 8
  178. waitforgump 0x38920abd 15000
  179. replygump 0x38920abd 9
  180. waitforgump 0x38920abd 15000
  181. endfor
  182. endif
  183. // Fill up on Bottles
  184. if counttype 0xf0e 'any' 'backpack' < 50
  185. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  186. endif
  187. // Fill up on Regs
  188. if counttype 0xf8d 'any' 'backpack' < 50
  189. movetype 0xf8d 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  190. endif
  191. //Make potion
  192. usetype 0xe9b
  193. waitforgump 0x38920abd 15000
  194. replygump 0x38920abd 15
  195. waitforgump 0x38920abd 15000
  196. replygump 0x38920abd 2
  197. waitforgump 0x38920abd 15000
  198. //Move potion
  199. movetype 0xf06 'backpack' 'commoditybox'
  200. pause 500
  201. endwhile
  202. msg 'Nightsight = done!'
  203. // Move leftover reagents back to storage
  204. for 0 to reagents
  205. if findtype 'reagents[]' 'backpack'
  206. moveitem 'found' 'resourcebag'
  207. endif
  208. endfor
  209. //
  210. /// - Make Greaterhealpotions - ///
  211. //
  212. while counttype 0xf0c '0' 'commoditybox' < 'volume[3]'
  213. // Fill up on tools
  214. // Fill up on ingots
  215. if counttype 0x1bf2 'any' 'backpack' < 50
  216. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  217. endif
  218. // Make new tinkerkits
  219. if counttype 0x1eb8 'any' 'backpack' < 3
  220. for 5
  221. usetype 0x1eb8
  222. pause 1000
  223. replygump 0x38920abd 8
  224. pause 500
  225. replygump 0x38920abd 23
  226. endfor
  227. endif
  228. // Make new alchytools
  229. if counttype 0xe9b 'any' 'backpack' < 3
  230. for 5
  231. usetype 0x1eb8
  232. waitforgump 0x38920abd 15000
  233. replygump 0x38920abd 8
  234. waitforgump 0x38920abd 15000
  235. replygump 0x38920abd 9
  236. waitforgump 0x38920abd 15000
  237. endfor
  238. endif
  239. // Fill up on Bottles
  240. if counttype 0xf0e 'any' 'backpack' < 50
  241. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  242. endif
  243. // Fill up on Regs
  244. if counttype 0xf85 'any' 'backpack' < 50
  245. movetype 0xf85 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  246. endif
  247. //Make potion
  248. usetype 0xe9b
  249. waitforgump 0x38920abd 15000
  250. replygump 0x38920abd 22
  251. waitforgump 0x38920abd 15000
  252. replygump 0x38920abd 16
  253. waitforgump 0x38920abd 15000
  254. //Move potion
  255. movetype 0xf0c 'backpack' 'commoditybox'
  256. pause 500
  257. endwhile
  258. msg 'Greaterheal = done!'
  259. // Move leftover reagents back to storage
  260. for 0 to reagents
  261. if findtype 'reagents[]' 'backpack'
  262. moveitem 'found' 'resourcebag'
  263. endif
  264. endfor
  265. //
  266. /// - Make Strengthpotions - ///
  267. //
  268. while counttype 0xf09 '0' 'commoditybox' < 'volume[4]'
  269. // Fill up on ingots
  270. if counttype 0x1bf2 'any' 'backpack' < 50
  271. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  272. endif
  273. // Make new tinkerkits
  274. if counttype 0x1eb8 'any' 'backpack' < 3
  275. for 5
  276. usetype 0x1eb8
  277. pause 1000
  278. replygump 0x38920abd 8
  279. pause 500
  280. replygump 0x38920abd 23
  281. endfor
  282. endif
  283. // Make new alchytools
  284. if counttype 0xe9b 'any' 'backpack' < 3
  285. for 5
  286. usetype 0x1eb8
  287. waitforgump 0x38920abd 15000
  288. replygump 0x38920abd 8
  289. waitforgump 0x38920abd 15000
  290. replygump 0x38920abd 9
  291. waitforgump 0x38920abd 15000
  292. endfor
  293. endif
  294. // Fill up on Bottles
  295. if counttype 0xf0e 'any' 'backpack' < 50
  296. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  297. endif
  298. // Fill up on Regs
  299. if counttype 0xf86 'any' 'backpack' < 50
  300. movetype 0xf86 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  301. endif
  302. //Make potion
  303. usetype 0xe9b
  304. waitforgump 0x38920abd 15000
  305. replygump 0x38920abd 29
  306. waitforgump 0x38920abd 15000
  307. replygump 0x38920abd 9
  308. waitforgump 0x38920abd 15000
  309. //Move potion
  310. movetype 0xf09 'backpack' 'commoditybox'
  311. pause 500
  312. endwhile
  313. msg 'Strength = done!'
  314. // Move leftover reagents back to storage
  315. for 0 to reagents
  316. if findtype 'reagents[]' 'backpack'
  317. moveitem 'found' 'resourcebag'
  318. endif
  319. endfor
  320. //
  321. /// - Make Deadlypoisonpotions - ///
  322. //
  323. while counttype 0xf0a '0' 'commoditybox' < 'volume[5]'
  324. // Fill up on ingots
  325. if counttype 0x1bf2 'any' 'backpack' < 50
  326. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  327. endif
  328. // Make new tinkerkits
  329. if counttype 0x1eb8 'any' 'backpack' < 3
  330. for 5
  331. usetype 0x1eb8
  332. pause 1000
  333. replygump 0x38920abd 8
  334. pause 500
  335. replygump 0x38920abd 23
  336. endfor
  337. endif
  338. // Make new alchytools
  339. if counttype 0xe9b 'any' 'backpack' < 3
  340. for 5
  341. usetype 0x1eb8
  342. waitforgump 0x38920abd 15000
  343. replygump 0x38920abd 8
  344. waitforgump 0x38920abd 15000
  345. replygump 0x38920abd 9
  346. waitforgump 0x38920abd 15000
  347. endfor
  348. endif
  349. // Fill up on Bottles
  350. if counttype 0xf0e 'any' 'backpack' < 50
  351. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  352. endif
  353. // Fill up on Regs
  354. if counttype 0xf88 'any' 'backpack' < 50
  355. movetype 0xf88 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  356. endif
  357. //Make potion
  358. usetype 0xe9b
  359. waitforgump 0x38920abd 15000
  360. replygump 0x38920abd 36
  361. waitforgump 0x38920abd 15000
  362. replygump 0x38920abd 23
  363. waitforgump 0x38920abd 15000
  364. //Move potion
  365. movetype 0xf0a 'backpack' 'commoditybox'
  366. pause 500
  367. endwhile
  368. msg 'Deadly Poison = done!'
  369. // Move leftover reagents back to storage
  370. for 0 to reagents
  371. if findtype 'reagents[]' 'backpack'
  372. moveitem 'found' 'resourcebag'
  373. endif
  374. endfor
  375. //
  376. /// - Make Greatercurepotions - ///
  377. //
  378. while counttype 0xf07 '0' 'commoditybox' < 'volume[6]'
  379. // Fill up on ingots
  380. if counttype 0x1bf2 'any' 'backpack' < 50
  381. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  382. endif
  383. // Make new tinkerkits
  384. if counttype 0x1eb8 'any' 'backpack' < 3
  385. for 5
  386. usetype 0x1eb8
  387. pause 1000
  388. replygump 0x38920abd 8
  389. pause 500
  390. replygump 0x38920abd 23
  391. endfor
  392. endif
  393. // Make new alchytools
  394. if counttype 0xe9b 'any' 'backpack' < 3
  395. for 5
  396. usetype 0x1eb8
  397. waitforgump 0x38920abd 15000
  398. replygump 0x38920abd 8
  399. waitforgump 0x38920abd 15000
  400. replygump 0x38920abd 9
  401. waitforgump 0x38920abd 15000
  402. endfor
  403. endif
  404. // Fill up on Bottles
  405. if counttype 0xf0e 'any' 'backpack' < 50
  406. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  407. endif
  408. // Fill up on Regs
  409. if counttype 0xf84 'any' 'backpack' < 50
  410. movetype 0xf84 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  411. endif
  412. //Make potion
  413. usetype 0xe9b
  414. waitforgump 0x38920abd 15000
  415. replygump 0x38920abd 43
  416. waitforgump 0x38920abd 15000
  417. replygump 0x38920abd 16
  418. waitforgump 0x38920abd 15000
  419. //Move potion
  420. movetype 0xf07 'backpack' 'commoditybox'
  421. pause 500
  422. endwhile
  423. msg 'Greater Cure = done!'
  424. // Move leftover reagents back to storage
  425. for 0 to reagents
  426. if findtype 'reagents[]' 'backpack'
  427. moveitem 'found' 'resourcebag'
  428. endif
  429. endfor
  430. //
  431. /// - Make Greaterexplotionpotions - ///
  432. //
  433. while counttype 0xf0d '0' 'commoditybox' < 'volume[7]'
  434. // Fill up on ingots
  435. if counttype 0x1bf2 'any' 'backpack' < 50
  436. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  437. endif
  438. // Make new tinkerkits
  439. if counttype 0x1eb8 'any' 'backpack' < 3
  440. for 5
  441. usetype 0x1eb8
  442. pause 1000
  443. replygump 0x38920abd 8
  444. pause 500
  445. replygump 0x38920abd 23
  446. endfor
  447. endif
  448. // Make new alchytools
  449. if counttype 0xe9b 'any' 'backpack' < 3
  450. for 5
  451. usetype 0x1eb8
  452. waitforgump 0x38920abd 15000
  453. replygump 0x38920abd 8
  454. waitforgump 0x38920abd 15000
  455. replygump 0x38920abd 9
  456. waitforgump 0x38920abd 15000
  457. endfor
  458. endif
  459. // Fill up on Bottles
  460. if counttype 0xf0e 'any' 'backpack' < 50
  461. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  462. endif
  463. // Fill up on Regs
  464. if counttype 0xf8c 'any' 'backpack' < 50
  465. movetype 0xf8c 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  466. endif
  467. //Make potion
  468. usetype 0xe9b
  469. replygump 0x38920abd 43
  470. waitforgump 0x38920abd 15000
  471. replygump 0x38920abd 50
  472. waitforgump 0x38920abd 15000
  473. replygump 0x38920abd 16
  474. waitforgump 0x38920abd 15000
  475. //Move potion
  476. movetype 0xf0d 'backpack' 'commoditybox'
  477. pause 500
  478. endwhile
  479. msg 'Greater Explosion = done!'
  480. // Move leftover reagents back to storage
  481. for 0 to reagents
  482. if findtype 'reagents[]' 'backpack'
  483. moveitem 'found' 'resourcebag'
  484. endif
  485. endfor
  486. //
  487. /// - Make Greaterconflagrationpotions - ///
  488. //
  489. while counttype 0xf06 '1161' 'commoditybox' < 'volume[8]'
  490. // Fill up on ingots
  491. if counttype 0x1bf2 'any' 'backpack' < 50
  492. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  493. endif
  494. // Make new tinkerkits
  495. if counttype 0x1eb8 'any' 'backpack' < 3
  496. for 5
  497. usetype 0x1eb8
  498. pause 1000
  499. replygump 0x38920abd 8
  500. pause 500
  501. replygump 0x38920abd 23
  502. endfor
  503. endif
  504. // Make new alchytools
  505. if counttype 0xe9b 'any' 'backpack' < 3
  506. for 5
  507. usetype 0x1eb8
  508. waitforgump 0x38920abd 15000
  509. replygump 0x38920abd 8
  510. waitforgump 0x38920abd 15000
  511. replygump 0x38920abd 9
  512. waitforgump 0x38920abd 15000
  513. endfor
  514. endif
  515. // Fill up on Bottles
  516. if counttype 0xf0e 'any' 'backpack' < 50
  517. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  518. endif
  519. // Fill up on Regs
  520. if counttype 0xf8f 'any' 'backpack' < 50
  521. movetype 0xf8f 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  522. endif
  523. //Make potion
  524. usetype 0xe9b
  525. replygump 0x38920abd 43
  526. waitforgump 0x38920abd 15000
  527. replygump 0x38920abd 57
  528. waitforgump 0x38920abd 15000
  529. replygump 0x38920abd 9
  530. waitforgump 0x38920abd 15000
  531. //Move potion
  532. movetype 0xf06 'backpack' 'commoditybox'
  533. pause 500
  534. endwhile
  535. msg 'Greater Conflagration = done!'
  536. // Move leftover reagents back to storage
  537. for 0 to reagents
  538. if findtype 'reagents[]' 'backpack'
  539. moveitem 'found' 'resourcebag'
  540. endif
  541. endfor
  542. //
  543. /// - Make Greaterconfusionblastpotions - ///
  544. //
  545. while counttype 0xf06 '1165' 'commoditybox' < 'volume[9]'
  546. // Fill up on ingots
  547. if counttype 0x1bf2 'any' 'backpack' < 50
  548. movetype 0x1bf2 'resourcebag' 'backpack' (0 0 0) 0 100
  549. endif
  550. // Make new tinkerkits
  551. if counttype 0x1eb8 'any' 'backpack' < 3
  552. for 5
  553. usetype 0x1eb8
  554. pause 1000
  555. replygump 0x38920abd 8
  556. pause 500
  557. replygump 0x38920abd 23
  558. endfor
  559. endif
  560. // Make new alchytools
  561. if counttype 0xe9b 'any' 'backpack' < 3
  562. for 5
  563. usetype 0x1eb8
  564. waitforgump 0x38920abd 15000
  565. replygump 0x38920abd 8
  566. waitforgump 0x38920abd 15000
  567. replygump 0x38920abd 9
  568. waitforgump 0x38920abd 15000
  569. endfor
  570. endif
  571. // Fill up on Bottles
  572. if counttype 0xf0e 'any' 'backpack' < 50
  573. movetype 0xf0e 'resourcebag' 'backpack' (0 0 0) 'any' 50
  574. endif
  575. // Fill up on Regs
  576. if counttype 0xf8a 'any' 'backpack' < 50
  577. movetype 0xf8a 'resourcebag' 'backpack' (0 0 0) 'any' 1000
  578. endif
  579. //Make potion
  580. usetype 0xe9b
  581. replygump 0x38920abd 43
  582. waitforgump 0x38920abd 15000
  583. replygump 0x38920abd 57
  584. waitforgump 0x38920abd 15000
  585. replygump 0x38920abd 23
  586. waitforgump 0x38920abd 15000
  587. //Move potion
  588. movetype 0xf06 'backpack' 'commoditybox'
  589. pause 500
  590. endwhile
  591. msg 'Greater Confusionblast = done!'
  592. // Move leftover reagents back to storage
  593. for 0 to reagents
  594. if findtype 'reagents[]' 'backpack'
  595. moveitem 'found' 'resourcebag'
  596. endif
  597. endfor
  598.  
Add Comment
Please, Sign In to add comment