[UOSteam] Wyrmstorm's Complete Cave-Mining Macro

If you make a Client-side script you can publish it here for other players to use
Post Reply
User avatar
Wyrmstorm
Apprentice Scribe
Posts: 12
Joined: Sun Mar 11, 2018 11:44 am

[UOSteam] Wyrmstorm's Complete Cave-Mining Macro

Post by Wyrmstorm »

Another gathering macro I've made for UOSteam that does not require a HBOH.

NOTE: This is best used inside of caves and not the side of mountains. It will work in both Trammel and Felucca.

It's pretty much plug-and-play, just make sure you have the required tools; Shovel, Mobile Forge, and Metal Worker Keys. This will face your character North and then mine 1 tile out from that location until no more Ore is found, then it'll change directions (E, S, W) until empty. If you hit 375 weight it will then smelt all Ore to reduce the weight and continue mining. After all directions have been mined out then the smelted metal will be placed in to the Metal Worker Keys and a notice for you to move will appear.

This macro is fine to set to Loop, you are given 5 seconds to move after the System receives notice that no more metal is present. I would recommend adjusting your weight check (currently 375) based on your strength.

This is NOT flawless and it DOES require you to be at your keyboard, respect the rules!
Feel free change the system message or colors to overhead text if you want, but I prefer system.

Let me know if you have any questions/comments.



Code: Select all

//Wyrmstorm's Cave Mining for UOSteam
//You will need a Shovel, Mobile Forge, and Metalworker Keys
//Updated 3/11/18
//Setting Shovel
if @findtype '0xf39' 'any' 'backpack'
  setalias 'Shovel'
else
  sysmsg 'You need a shovel, stopping macro.' '20'
  stop
endif
//Setting Forge
if @findtype '0xe32' 'any' 'backpack' 'any' 'any'
  setalias 'Forge'
else
  sysmsg 'You need a Mobile Forge, stopping macro.' '20'
  stop
endif
//Starting
turn 'North'
while not @injournal 'no metal here' "system"
  if weight <= '375'
    pause 500
    usetype '0xf39'
    waitingfortarget 500
    targettileoffset! 0 -1 0
  else
    canceltarget
    while @findtype '0x19b9' 'any' 'backpack' 'any' 'any'
      @setalias 'Ore' 'Found'
      useobject 'Ore'
      waitingfortarget 500
      @target! 'Forge'
      pause 500
    endwhile
    pause 500
  endif
endwhile
pause 1000
@canceltarget
@clearjournal
//East
turn 'East'
while not @injournal 'no metal here' "system"
  if weight <= '375'
    pause 500
    usetype '0xf39'
    waitingfortarget 500
    targettileoffset! 1 0 0
  else
    canceltarget
    while @findtype '0x19b9' 'any' 'backpack' 'any' 'any'
      @setalias 'Ore' 'Found'
      useobject 'Ore'
      waitingfortarget 500
      @target! 'Forge'
      pause 500
    endwhile
    pause 500
  endif
endwhile
pause 1000
@canceltarget
@clearjournal
//South
turn 'South'
while not @injournal 'no metal here' "system"
  if weight <= '375'
    pause 500
    usetype '0xf39'
    waitingfortarget 500
    targettileoffset! 0 1 0
  else
    canceltarget
    while @findtype '0x19b9' 'any' 'backpack' 'any' 'any'
      @setalias 'Ore' 'Found'
      useobject 'Ore'
      waitingfortarget 500
      @target! 'Forge'
      pause 500
    endwhile
    pause 500
  endif
endwhile
pause 1000
@canceltarget
@clearjournal
//West
turn 'West'
while not @injournal 'no metal here' "system"
  if weight <= '375'
    pause 500
    usetype '0xf39'
    waitingfortarget 500
    targettileoffset! -1 0 0
  else
    canceltarget
    while @findtype '0x19b9' 'any' 'backpack' 'any' 'any'
      @setalias 'Ore' 'Found'
      useobject 'Ore'
      waitingfortarget 500
      @target! 'Forge'
      pause 500
    endwhile
    pause 500
  endif
endwhile
pause 1000
@canceltarget
@clearjournal
pause 2000
sysmsg 'ORE DEPLETED in all directions.'
sysmsg 'Running Metalworker Keys...'
@cleartargetqueue
@canceltarget
if not listexists 'metalkeys'
  createlist 'metalkeys'
endif
@pushlist 'metalkeys' '0x1bf2'  // All types of wood
for 0 to metalkeys
  while @findtype 'metalkeys[]'
    @setalias 'metal' 'found'
    usetype '0x176b' '20' 'backpack'
    waitforgump 4213074123 15000
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 15000
    waitfortarget 15000
    @target! 'metal'
    waitforgump 4213074123 15000
  endwhile
endfor
@replygump 0xfb1e68cb 0
@canceltarget
@removelist 'metalkeys'
@unsetalias 'metal'
sysmsg 'Completed with Metalworker Keys.'
sysmsg 'Allowing 5 Seconds to move to next location.'
pause 5000
Slomo
Passer by
Posts: 2
Joined: Tue Mar 13, 2018 3:26 pm

Re: [UOSteam] Wyrmstorm's Complete Cave-Mining Macro

Post by Slomo »

I like this script. I just cant get it to smelt using the mobile forge. It finds it in the beginning and runs the mining then gets to weight and wont target the mobile forge. Got any ideas how I can fix this. I have to click it really fast between attempts for it to forge. Sometimes this fixes it till the next mining spot.
User avatar
Wyrmstorm
Apprentice Scribe
Posts: 12
Joined: Sun Mar 11, 2018 11:44 am

Re: [UOSteam] Wyrmstorm's Complete Cave-Mining Macro

Post by Wyrmstorm »

Slomo wrote:I like this script. I just cant get it to smelt using the mobile forge. It finds it in the beginning and runs the mining then gets to weight and wont target the mobile forge. Got any ideas how I can fix this. I have to click it really fast between attempts for it to forge. Sometimes this fixes it till the next mining spot.

Happy to hear it's partially satisfying, but unfortunate that you're having issues.

I'm sure we can resolve it! Are you moving when it's trying to smelt or anything?

1- Try UOSteam's Object Inspector and see if your Mobile Forge has a different Graphic Value than 0xe32. It may not be the forge it's having troubles with either... so if that's not the cure off to the second option.

2- Let's try adding a pause and also extending another pause in the smelting section. It may seem a bit redundant so if you wanted to create a separate macro for just testing this could work... it is only 1 direction and ignores all key functionality.

Code: Select all

//Setting Shovel
if @findtype '0xf39' 'any' 'backpack'
  setalias 'Shovel'
else
  sysmsg 'You need a shovel, stopping macro.' '20'
  stop
endif
//Setting Forge
if @findtype '0xe32' 'any' 'backpack' 'any' 'any'
  setalias 'Forge'
else
  sysmsg 'You need a Mobile Forge, stopping macro.' '20'
  stop
endif
//Starting
turn 'North'
while not @injournal 'no metal here' "system"
  if weight <= '375'
    pause 500
    usetype '0xf39'
    waitingfortarget 500
    targettileoffset! 0 -1 0
  else
   pause 500 //this is the new pause
    canceltarget
    while @findtype '0x19b9' 'any' 'backpack' 'any' 'any'
      @setalias 'Ore' 'Found'
      useobject 'Ore'
      waitingfortarget 500
      @target! 'Forge'
      pause 1000  //this pause has been extended
    endwhile
    pause 500
  endif
endwhile
pause 1000
@canceltarget
@clearjournal
pause 2000
sysmsg 'ORE IS DEPLETED.'
sysmsg 'Allowing 5 Seconds to move to next location.'
pause 5000
Gaidal Cain
Passer by
Posts: 1
Joined: Tue Sep 29, 2020 9:06 am

Re: [UOSteam] Wyrmstorm's Complete Cave-Mining Macro

Post by Gaidal Cain »

The issue is the object ID with the forge I think. I had this issue when running this.
H3ckler
Passer by
Posts: 1
Joined: Wed Dec 29, 2021 11:25 pm

Re: [UOSteam] Wyrmstorm's Complete Cave-Mining Macro

Post by H3ckler »

Anyone still using this macro with it working successfully? I keep getting the cannot see target prompt when i try to use
Post Reply