[UOSteam] Alamiester's AllMiner v0.2

If you make a Client-side script you can publish it here for other players to use
Post Reply
User avatar
Alamiester
Legendary Scribe
Posts: 279
Joined: Wed Jan 04, 2017 8:49 pm

[UOSteam] Alamiester's AllMiner v0.2

Post by Alamiester »

ok i think i got the majority of the kinks out of this. this macro will dig sand ore and granite. it will also automatically add all resources to your keys if your weight goes above 350. you need to hotkey this macro for it to work right. after your first dig it will pause for 10000. it starts digging for sand right of the bat, but if you push the hotkey a second time it will go into the ore/granite mode and mine alot more faster. feel free to leave some feedback if you have any issues. seems theres always something i missed. this was my end goal for this macro. all of the ones before this are slightly dumber versions of this, split into each type of resource. enjoy excelsior miners. :D

Code: Select all

//***************************************************************************//
// [UOSteam] Alamiesters's AllMiner v0.2
// Originaly from Fixxer's Relative Location Harvester v1.03
// You need a high use shovel, a mobile forge, metal keys,
// stone keys, and spellcaster keys.
// Add // in front of unsetalias after first run if these items
// never change. Thanks to Blarog for the injournal loop breaks idea. :P
//***************************************************************************//
unsetalias 'Digger'
unsetalias 'Forge'
unsetalias 'metalkeys'
unsetalias 'stonekeys'
unsetalias 'spellkeys'
//***********************
// For selecting your Digging Tool.
//***********************
if not findalias 'Digger'
  headmsg 'Select Shovel or Pickaxe'
  promptalias 'Digger'
endif
//***********************
// For selecting your mobile forge.
//***********************
if not findalias 'Forge'
  headmsg 'Select a Mobile Forge'
  promptalias 'Forge'
endif
//***********************
// For selecting Metal Workers keys.
//***********************
if not findalias 'metalkeys'
  headmsg 'Select Metal Workers Keys'
  promptalias 'metalkeys'
endif
//***********************
// For selecting Stone Workers keys.
//***********************
if not findalias 'stonekeys'
  headmsg 'Select Stone Workers Keys'
  promptalias 'stonekeys'
endif
//************************
// For selecting Spell Casters keys.
//************************
if not findalias 'spellkeys'
  headmsg 'Select Spell Casters Keys'
  promptalias 'spellkeys'
endif
//************************
// To start the digging for sand.
//************************
while not @injournal 'You put some' 'system'
  for 300
    if @injournal 'You dig for' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  useobject "Digger"
  waitfortarget 500
  targettileoffset  0 0 0
  pause 10000
  if @injournal 'You dig for awhile but fail to find any' 'system'
    useobject "Digger"
    waitfortarget 500
    targettile 'last'
    //    waitforjournal 'You carefully dig up' 'system'
    pause 10000
    // @clearjournal!
  else
    //************************
    // To add sand to the Spell Casters keys.
    //************************
    while @targettype! '0x11ea' 'backpack'
      useobject 'spellkeys'
      msg 'BaaAAHZINGAH!'
      pause 500
      replygump 0x68557d42 25
      waitforgump 1750433090 500
      waitfortarget 500
      @targettype! '0x11ea' 'Any'
      pause 500
      replygump 0x68557d42 0
      @canceltarget!
    endwhile
  endif
endwhile
if @injournal 'There is no sand here to mine.' 'system'
  headmsg 'Move to the next target area.' 24
endif
//@clearjournal!
//***********************
// To start the digging for ore.
//***********************
msg 'Hi Ho, Hi Ho, Off to work we go!' 15
@clearjournal
//***********//
//Position 00//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 500
    targettileoffset  0 0 0
    pause 1000
  else
    //checks for ore.
    while @targettype! '0x19b9' 'Any' '0'
      pause 800
      if findalias 'Forge'
        @usetype!  0x19b9 'Any' 'backpack'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 500
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'Any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 800
      waitfortarget 800
      @targettype! '0x1bf2' 'Any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'Backpack'
      useobject 'stonekeys'
      pause 800
      replygump 0x9cf7866d 15
      waitforgump 2633467501 800
      waitfortarget 800
      @targettype!  '0x1779' 'Any' 'Backpack'
      pause 500
      replygump 0x9cf7866d 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 01//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 500
    targettileoffset  -1 -1 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 400
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 400
      waitfortarget 400
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 02//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 500
    targettileoffset  0 -1 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 400
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 400
      waitfortarget 400
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 03//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 500
    targettileoffset  1 -1 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 400
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 400
      waitfortarget 400
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 04//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 500
    targettileoffset  -1 0 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 400
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 400
      waitfortarget 800
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 05//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 500
    targettileoffset  1 0 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 400
      waitfortarget 400
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 06//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 500
    targettileoffset  -1 1 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 400
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 800
      waitfortarget 400
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 07//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 400
    targettileoffset  0 1 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 400
      waitfortarget 400
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 08//
//***********//
headmsg 'Checking for ore...' 24
//Will dig unless wieght is below 350 otherwise will clear pack of ore,ingots,and granite.
while not @injournal 'There is no' 'system'
  for 60
    if @injournal 'you put some' 'system'
    elseif @injournal 'mine while riding' 'system'
      break
    elseif @injournal 'mine that' 'system'
      break
    elseif @injournal 'mine there' 'system'
      break
    elseif @injournal 'target cannot be seen' 'system'
      break
    endif
  endfor
  if weight <= '350'
    useobject "Digger"
    waitfortarget 400
    targettileoffset  1 1 0
    pause 1200
  else
    //checks for ore.
    while @targettype! '0x19b9' 'any' '0'
      pause 400
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 400
        @target! 'Forge'
      endif
      pause 400
      @canceltarget!
    endwhile
    //checks for ingots.
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 400
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 400
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 400
      replygump 0xfb1e68cb 0
      pause 400
      @canceltarget!
    endwhile
    //checks for granite.
    while @targettype! '0x1779' 'Any' 'backpack'
      useobject 'stonekeys'
      pause 400
      replygump 0x9cf7866d 15
      waitforgump 2633467501 400
      waitfortarget 400
      @targettype!  '0x1779' 'Any' 'backpack'
      pause 400
      replygump 0x9cf7866d 0
      pause 400
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
headmsg 'There is no more ore or stone here, move to the next vien.' 24
Post Reply