Advertisement
Maespark

Mining w/ Mobile Forge

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