Mining Macro

Weland

Grandmaster
Mine and move to beetle
Code:
if not @findalias 'Beetle'
  promptalias 'Beetle'
endif
if counttype 0x19b9 'any' 'backpack' < 188
  movetype 0x19b9 'backpack' 'Beetle'
endif
if not listexists 'miningerrormessages'
  createlist 'miningerrormessages'
  pushlist 'miningerrormessages' 'no metal here'
  pushlist 'miningerrormessages' "You can't mine there"
  pushlist 'miningerrormessages' "Target cannot be seen"
  pushlist 'miningerrormessages' "You can't mine that"
endif
if @findtype 0xe86 'any' 'backpack' or @findtype 0xf39 'any' 'backpack'
  useobject 'found'
else
  sysmsg "You do not have any digging tools!"
  stop
endif
waitfortarget 500
if direction == 0
  targettileoffset 0 -1 0
elseif direction == 1
  targettileoffset 1 -1 0
elseif direction == 2
  targettileoffset 1 0 0
elseif direction == 3
  targettileoffset 1 1 0
elseif direction == 4
  targettileoffset 0 1 0
elseif direction == 5
  targettileoffset -1 1 0
elseif direction == 6
  targettileoffset -1 0 0
elseif direction == 7
  targettileoffset -1 -1 0
endif
pause 200
if @findtype 0xe86 'any' 'backpack' or @findtype 0xf39 'any' 'backpack'
  useobject 'found'
else
  sysmsg "You do not have any digging tools!"
  stop
endif
waitfortarget 500
if direction == 1
  targettileoffset 0 -1 0
elseif direction == 2
  targettileoffset 1 -1 0
elseif direction == 3
  targettileoffset 1 0 0
elseif direction == 4
  targettileoffset 1 1 0
elseif direction == 5
  targettileoffset 0 1 0
elseif direction == 6
  targettileoffset -1 1 0
elseif direction == 7
  targettileoffset -1 0 0
elseif direction == 0
  targettileoffset -1 -1 0
endif
pause 200
if @findtype 0xe86 'any' 'backpack' or @findtype 0xf39 'any' 'backpack'
  useobject 'found'
else
  sysmsg "You do not have any digging tools!"
  stop
endif
waitfortarget 500
if direction == 7
  targettileoffset 0 -1 0
elseif direction == 0
  targettileoffset 1 -1 0
elseif direction == 1
  targettileoffset 1 0 0
elseif direction == 2
  targettileoffset 1 1 0
elseif direction == 3
  targettileoffset 0 1 0
elseif direction == 4
  targettileoffset -1 1 0
elseif direction == 5
  targettileoffset -1 0 0
elseif direction == 6
  targettileoffset -1 -1 0
endif
pause 10

Mine and place in pack horse

Code:
if not @findalias 'Beetle3'
  promptalias 'Beetle3'
endif
if counttype 0x19b9 'any' 'backpack' < 188
  movetype 0x19b9 'backpack' 'Beetle3'
endif
if not listexists 'miningerrormessages'
  createlist 'miningerrormessages'
  pushlist 'miningerrormessages' 'no metal here'
  pushlist 'miningerrormessages' "You can't mine there"
  pushlist 'miningerrormessages' "Target cannot be seen"
  pushlist 'miningerrormessages' "You can't mine that"
endif
if @findtype 0xe86 'any' 'backpack' or @findtype 0xf39 'any' 'backpack'
  useobject 'found'
else
  sysmsg "You do not have any digging tools!"
  stop
endif
waitfortarget 500
if direction == 0
  targettileoffset 0 -1 0
elseif direction == 1
  targettileoffset 1 -1 0
elseif direction == 2
  targettileoffset 1 0 0
elseif direction == 3
  targettileoffset 1 1 0
elseif direction == 4
  targettileoffset 0 1 0
elseif direction == 5
  targettileoffset -1 1 0
elseif direction == 6
  targettileoffset -1 0 0
elseif direction == 7
  targettileoffset -1 -1 0
endif
pause 200
if @findtype 0xe86 'any' 'backpack' or @findtype 0xf39 'any' 'backpack'
  useobject 'found'
else
  sysmsg "You do not have any digging tools!"
  stop
endif
waitfortarget 500
if direction == 1
  targettileoffset 0 -1 0
elseif direction == 2
  targettileoffset 1 -1 0
elseif direction == 3
  targettileoffset 1 0 0
elseif direction == 4
  targettileoffset 1 1 0
elseif direction == 5
  targettileoffset 0 1 0
elseif direction == 6
  targettileoffset -1 1 0
elseif direction == 7
  targettileoffset -1 0 0
elseif direction == 0
  targettileoffset -1 -1 0
endif
pause 200
if @findtype 0xe86 'any' 'backpack' or @findtype 0xf39 'any' 'backpack'
  useobject 'found'
else
  sysmsg "You do not have any digging tools!"
  stop
endif
waitfortarget 500
if direction == 7
  targettileoffset 0 -1 0
elseif direction == 0
  targettileoffset 1 -1 0
elseif direction == 1
  targettileoffset 1 0 0
elseif direction == 2
  targettileoffset 1 1 0
elseif direction == 3
  targettileoffset 0 1 0
elseif direction == 4
  targettileoffset -1 1 0
elseif direction == 5
  targettileoffset -1 0 0
elseif direction == 6
  targettileoffset -1 -1 0
endif
pause 10
 

Weland

Grandmaster
First time you run the macros will ask you to identify your pack horses or beetle/packhorse. Happy mining, however don't forget that to mine unattended is illegal and I run this macro regularly and I get hit up by GMs/moderators in game regularly so they are watching!
 

Weland

Grandmaster
No it strikes in all directions so if you are wall mining it will hit the wall then try on the grass around the wall and come back. It's still pretty fast but a set direction macro would be a little faster.
 
How do i reset packy?
My packy died and now the macro wont work properly with my new one. Ive deleted, restarted uos, restarded comp. and nothing.
The macro will run, but it wont place ore in the new packy.
 

Alucard

Grandmaster
How do i reset packy?
My packy died and now the macro wont work properly with my new one. Ive deleted, restarted uos, restarded comp. and nothing.
The macro will run, but it wont place ore in the new packy.

o_O open Macros tab,
Uos_macros_options.png


in Active Objects delete old information...
 
Top