Advertisement
Maespark

Experimental - Mining/Garg

Jul 21st, 2019
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.59 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////
  2. //For use on UO:Evolution. Semi-auto mining macro. Will mine in a cone
  3. //in front of your character. Will smelt all ores using an orcish forge.
  4. //Will add the smelted ingots to your ingot key, or optionally your Evo key
  5. ////////////////////////////////////////////////////////////////////////////
  6. //
  7. //Set weight to whatever you wish. May cause problems if set too high or
  8. //too low for your character.
  9. if not @findobject pick
  10. @unsetalias 'pick'
  11. endif
  12. if not @findalias 'pick'
  13. if @findtype 0xe86 'any' 'backpack' or @findtype 0xe85 'any' 'backpack'
  14. setalias 'pick' 'found'
  15. endif
  16. endif
  17. if weight 'self' > 407 or @injournal 'no metal here'
  18. //Here starts the massive block of smelting. I found it most effective to
  19. //segregate all ore types by graphic and by color. This proved the least glitchy.
  20. if counttype 0x19b8 0 'backpack' >= 1
  21. usetype 0x19b8 0
  22. waitfortarget 15000
  23. targettype 0xfb1
  24. pause 500
  25. endif
  26. if counttype 0x19ba 0 'backpack' >= 1
  27. usetype 0x19ba 0
  28. waitfortarget 15000
  29. targettype 0xfb1
  30. pause 500
  31. endif
  32. if counttype 0x19b9 0 'backpack' >= 1
  33. usetype 0x19b9 0
  34. waitfortarget 15000
  35. targettype 0xfb1
  36. pause 500
  37. endif
  38. if counttype 0x19b7 0 'backpack' >= 2
  39. usetype 0x19b7 0
  40. waitfortarget 15000
  41. targettype 0xfb1
  42. pause 500
  43. endif
  44. if counttype 0x19b9 2413 'backpack' >= 1
  45. usetype 0x19b9 2413
  46. waitfortarget 15000
  47. targettype 0xfb1
  48. pause 500
  49. endif
  50. if counttype 0x19b7 2413 'backpack' >= 2
  51. usetype 0x19b7 2413
  52. waitfortarget 15000
  53. targettype 0xfb1
  54. pause 500
  55. endif
  56. if counttype 0x19b8 2413 'backpack' >= 1
  57. usetype 0x19b8 2413
  58. waitfortarget 15000
  59. targettype 0xfb1
  60. pause 500
  61. endif
  62. if counttype 0x19ba 2413 'backpack' >= 1
  63. usetype 0x19ba 2413
  64. waitfortarget 15000
  65. targettype 0xfb1
  66. pause 500
  67. endif
  68. if counttype 0x19b9 2219 'backpack' >= 1
  69. usetype 0x19b9 2219
  70. waitfortarget 15000
  71. targettype 0xfb1
  72. pause 500
  73. endif
  74. if counttype 0x19b7 2219 'backpack' >= 2
  75. usetype 0x19b7 2219
  76. waitfortarget 15000
  77. targettype 0xfb1
  78. pause 500
  79. endif
  80. if counttype 0x19b8 2219 'backpack' >= 1
  81. usetype 0x19b8 2219
  82. waitfortarget 15000
  83. targettype 0xfb1
  84. pause 500
  85. endif
  86. if counttype 0x19ba 2219 'backpack' >= 1
  87. usetype 0x19ba 2219
  88. waitfortarget 15000
  89. targettype 0xfb1
  90. pause 500
  91. endif
  92. if counttype 0x19b9 2419 'backpack' >= 1
  93. usetype 0x19b9 2419
  94. waitfortarget 15000
  95. targettype 0xfb1
  96. pause 500
  97. endif
  98. if counttype 0x19b7 2419 'backpack' >= 2
  99. usetype 0x19b7 2419
  100. waitfortarget 15000
  101. targettype 0xfb1
  102. pause 500
  103. endif
  104. if counttype 0x19b8 2419 'backpack' >= 1
  105. usetype 0x19b8 2419
  106. waitfortarget 15000
  107. targettype 0xfb1
  108. pause 500
  109. endif
  110. if counttype 0x19ba 2419 'backpack' >= 1
  111. usetype 0x19ba 2419
  112. waitfortarget 15000
  113. targettype 0xfb1
  114. pause 500
  115. endif
  116. if counttype 0x19b9 2425 'backpack' >= 1
  117. usetype 0x19b9 2425
  118. waitfortarget 15000
  119. targettype 0xfb1
  120. pause 500
  121. endif
  122. if counttype 0x19b7 2425 'backpack' >= 2
  123. usetype 0x19b7 2425
  124. waitfortarget 15000
  125. targettype 0xfb1
  126. pause 500
  127. endif
  128. if counttype 0x19b8 2425 'backpack' >= 1
  129. usetype 0x19b8 2425
  130. waitfortarget 15000
  131. targettype 0xfb1
  132. pause 500
  133. endif
  134. if counttype 0x19ba 2425 'backpack' >= 1
  135. usetype 0x19ba 2425
  136. waitfortarget 15000
  137. targettype 0xfb1
  138. pause 500
  139. endif
  140. if counttype 0x19b9 2418 'backpack' >= 1
  141. usetype 0x19b9 2418
  142. waitfortarget 15000
  143. targettype 0xfb1
  144. pause 500
  145. endif
  146. if counttype 0x19b7 2418 'backpack' >= 2
  147. usetype 0x19b7 2418
  148. waitfortarget 15000
  149. targettype 0xfb1
  150. pause 500
  151. endif
  152. if counttype 0x19b8 2418 'backpack' >= 1
  153. usetype 0x19b8 2418
  154. waitfortarget 15000
  155. targettype 0xfb1
  156. pause 500
  157. endif
  158. if counttype 0x19ba 2418 'backpack' >= 1
  159. usetype 0x19ba 2418
  160. waitfortarget 15000
  161. targettype 0xfb1
  162. pause 500
  163. endif
  164. if counttype 0x19b9 2207 'backpack' >= 1
  165. usetype 0x19b9 2207
  166. waitfortarget 15000
  167. targettype 0xfb1
  168. pause 500
  169. endif
  170. if counttype 0x19b7 2207 'backpack' >= 2
  171. usetype 0x19b7 2207
  172. waitfortarget 15000
  173. targettype 0xfb1
  174. pause 500
  175. endif
  176. if counttype 0x19b8 2207 'backpack' >= 1
  177. usetype 0x19b8 2207
  178. waitfortarget 15000
  179. targettype 0xfb1
  180. pause 500
  181. endif
  182. if counttype 0x19ba 2207 'backpack' >= 1
  183. usetype 0x19ba 2207
  184. waitfortarget 15000
  185. targettype 0xfb1
  186. pause 500
  187. endif
  188. if counttype 0x19b9 2213 'backpack' >= 1
  189. usetype 0x19b9 2213
  190. waitfortarget 15000
  191. targettype 0xfb1
  192. pause 500
  193. endif
  194. if counttype 0x19b7 2213 'backpack' >= 2
  195. usetype 0x19b7 2213
  196. waitfortarget 15000
  197. targettype 0xfb1
  198. pause 500
  199. endif
  200. if counttype 0x19b8 2213 'backpack' >= 1
  201. usetype 0x19b8 2213
  202. waitfortarget 15000
  203. targettype 0xfb1
  204. pause 500
  205. endif
  206. if counttype 0x19ba 2213 'backpack' >= 1
  207. usetype 0x19ba 2213
  208. waitfortarget 15000
  209. targettype 0xfb1
  210. pause 500
  211. endif
  212. if counttype 0x19b9 2406 'backpack' >= 1
  213. usetype 0x19b9 2406
  214. waitfortarget 15000
  215. targettype 0xfb1
  216. pause 500
  217. endif
  218. if counttype 0x19b7 2406 'backpack' >= 2
  219. usetype 0x19b7 2406
  220. waitfortarget 15000
  221. targettype 0xfb1
  222. pause 500
  223. endif
  224. if counttype 0x19b8 2406 'backpack' >= 1
  225. usetype 0x19b8 2406
  226. waitfortarget 15000
  227. targettype 0xfb1
  228. pause 500
  229. endif
  230. if counttype 0x19ba 2406 'backpack' >= 1
  231. usetype 0x19ba 2406
  232. waitfortarget 15000
  233. targettype 0xfb1
  234. pause 500
  235. endif
  236. if counttype 0x19b9 1161 'backpack' >= 1
  237. usetype 0x19b9 1161
  238. waitfortarget 15000
  239. targettype 0xfb1
  240. pause 500
  241. endif
  242. if counttype 0x19b7 1161 'backpack' >= 2
  243. usetype 0x19b7 1161
  244. waitfortarget 15000
  245. targettype 0xfb1
  246. pause 500
  247. endif
  248. if counttype 0x19b8 1161 'backpack' >= 1
  249. usetype 0x19b8 1161
  250. waitfortarget 15000
  251. targettype 0xfb1
  252. pause 500
  253. endif
  254. if counttype 0x19ba 1161 'backpack' >= 1
  255. usetype 0x19ba 1161
  256. waitfortarget 15000
  257. targettype 0xfb1
  258. pause 500
  259. endif
  260. if counttype 0x19b9 1152 'backpack' >= 1
  261. usetype 0x19b9 1152
  262. waitfortarget 15000
  263. targettype 0xfb1
  264. pause 500
  265. endif
  266. if counttype 0x19b7 1152 'backpack' >= 2
  267. usetype 0x19b7 1152
  268. waitfortarget 15000
  269. targettype 0xfb1
  270. pause 500
  271. endif
  272. if counttype 0x19b8 1152 'backpack' >= 1
  273. usetype 0x19b8 1152
  274. waitfortarget 15000
  275. targettype 0xfb1
  276. pause 500
  277. endif
  278. if counttype 0x19ba 1152 'backpack' >= 1
  279. usetype 0x19ba 1152
  280. waitfortarget 15000
  281. targettype 0xfb1
  282. pause 500
  283. endif
  284. if counttype 0x19b9 1272 'backpack' >= 1
  285. usetype 0x19b9 1272
  286. waitfortarget 15000
  287. targettype 0xfb1
  288. pause 500
  289. endif
  290. if counttype 0x19b7 1272 'backpack' >= 2
  291. usetype 0x19b7 1272
  292. waitfortarget 15000
  293. targettype 0xfb1
  294. pause 500
  295. endif
  296. if counttype 0x19b8 1272 'backpack' >= 1
  297. usetype 0x19b8 1272
  298. waitfortarget 15000
  299. targettype 0xfb1
  300. pause 500
  301. endif
  302. if counttype 0x19ba 1272 'backpack' >= 1
  303. usetype 0x19ba 1272
  304. waitfortarget 15000
  305. targettype 0xfb1
  306. pause 500
  307. endif
  308. if counttype 0x19b9 1278 'backpack' >= 1
  309. usetype 0x19b9 1278
  310. waitfortarget 15000
  311. targettype 0xfb1
  312. pause 500
  313. endif
  314. if counttype 0x19b7 1278 'backpack' >= 2
  315. usetype 0x19b7 1278
  316. waitfortarget 15000
  317. targettype 0xfb1
  318. pause 500
  319. endif
  320. if counttype 0x19b8 1278 'backpack' >= 1
  321. usetype 0x19b8 1278
  322. waitfortarget 15000
  323. targettype 0xfb1
  324. pause 500
  325. endif
  326. if counttype 0x19ba 1278 'backpack' >= 1
  327. usetype 0x19ba 1278
  328. waitfortarget 15000
  329. targettype 0xfb1
  330. pause 500
  331. endif
  332. if counttype 0x19b9 1153 'backpack' >= 1
  333. usetype 0x19b9 1153
  334. waitfortarget 15000
  335. targettype 0xfb1
  336. pause 500
  337. endif
  338. if counttype 0x19b7 1153 'backpack' >= 2
  339. usetype 0x19b7 1153
  340. waitfortarget 15000
  341. targettype 0xfb1
  342. pause 500
  343. endif
  344. if counttype 0x19b8 1153 'backpack' >= 1
  345. usetype 0x19b8 1153
  346. waitfortarget 15000
  347. targettype 0xfb1
  348. pause 500
  349. endif
  350. if counttype 0x19ba 1153 'backpack' >= 1
  351. usetype 0x19ba 1153
  352. waitfortarget 15000
  353. targettype 0xfb1
  354. pause 500
  355. endif
  356. //////////////////////////////////////////////////////////////////
  357. //if you do NOT have an ingot key, but DO have an Evo key:
  358. //remove the comment notations on the following block of code.
  359. //useobject 0x11c6
  360. //waitforgump 0x6abce12 15000
  361. //replygump 0x6abce12 33
  362. //waitforgump 0x6abce12 15000
  363. //replygump 0x6abce12 0
  364. //////////////////////////////////////////////////////////////////
  365. //opens ingot key and stores ingots.
  366. usetype 0x1be8
  367. waitforgump 0x6abce12 15000
  368. replygump 0x6abce12 31
  369. waitforgump 0x6abce12 15000
  370. replygump 0x6abce12 0
  371. pause 300
  372. //////////////////////////////////////////////////////////////////////////////
  373. //Create organizers to place ores into another bag and move them back if you
  374. //have any trouble with unstacked small ore piles.
  375. // if @injournal 'metal-bearing''system'
  376. // clearjournal
  377. // organizer 'Ore'
  378. // while organizing
  379. // endwhile
  380. // organizer 'OreRev'
  381. // while organizing
  382. // endwhile
  383. // endif
  384. //////////////////////////////////////////////////////////////////////////////
  385. endif
  386. clearjournal
  387. if not listexists 'miningerrormessages'
  388. createlist 'miningerrormessages'
  389. pushlist 'miningerrormessages' 'no metal here'
  390. pushlist 'miningerrormessages' "You can't mine there"
  391. pushlist 'miningerrormessages' "Target cannot be seen"
  392. pushlist 'miningerrormessages' "You can't mine that"
  393. endif
  394. //finds picks or shovels and binds them to 'found' var. Uses if found
  395. if @findobject pick
  396. useobject 'found'
  397. else
  398. headmsg 'Out of picks!'
  399. endif
  400. waitfortarget 500
  401. //beginning of macro which picks where to mine based on which
  402. //direction your character is facing
  403. if direction == 0
  404. targettileoffset 0 -1 0
  405. elseif direction == 1
  406. targettileoffset 1 -1 0
  407. elseif direction == 2
  408. targettileoffset 1 0 0
  409. elseif direction == 3
  410. targettileoffset 1 1 0
  411. elseif direction == 4
  412. targettileoffset 0 1 0
  413. elseif direction == 5
  414. targettileoffset -1 1 0
  415. elseif direction == 6
  416. targettileoffset -1 0 0
  417. elseif direction == 7
  418. targettileoffset -1 -1 0
  419. endif
  420. pause 1800
  421. if @findobject pick
  422. useobject 'found'
  423. else
  424. headmsg 'Out of picks!'
  425. endif
  426. waitfortarget 500
  427. if direction == 1
  428. targettileoffset 0 -1 0
  429. elseif direction == 2
  430. targettileoffset 1 -1 0
  431. elseif direction == 3
  432. targettileoffset 1 0 0
  433. elseif direction == 4
  434. targettileoffset 1 1 0
  435. elseif direction == 5
  436. targettileoffset 0 1 0
  437. elseif direction == 6
  438. targettileoffset -1 1 0
  439. elseif direction == 7
  440. targettileoffset -1 0 0
  441. elseif direction == 0
  442. targettileoffset -1 -1 0
  443. endif
  444. pause 1800
  445. if @findobject pick
  446. useobject 'found'
  447. else
  448. headmsg 'Out of picks!'
  449. endif
  450. waitfortarget 500
  451. if direction == 7
  452. targettileoffset 0 -1 0
  453. elseif direction == 0
  454. targettileoffset 1 -1 0
  455. elseif direction == 1
  456. targettileoffset 1 0 0
  457. elseif direction == 2
  458. targettileoffset 1 1 0
  459. elseif direction == 3
  460. targettileoffset 0 1 0
  461. elseif direction == 4
  462. targettileoffset -1 1 0
  463. elseif direction == 5
  464. targettileoffset -1 0 0
  465. elseif direction == 6
  466. targettileoffset -1 -1 0
  467. endif
  468. pause 1800
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement