Page 1 of 1

[UOSteam] Alamiester's Easy Miner v0.3u

Posted: Fri Nov 03, 2017 3:15 pm
by Alamiester
i got most of the kinks worked out of the ore mining script. theres still a few hangups if there is a rock next to you, it gets stuck in an infinate loop. all you need to do is step one tile away from it. also there is an issue in trammel caves, when the target cannot be seen. the first spot it digs is right under your feet, so if you wanna mine grey spots on the ground outside of caves. i havnt done alot of testing on mountain sides yet. you must have stone keys, a high use shovel, and a bag of resources for this script to work right. ive updated this to the new menu gumps and dropped the metal keys out of it. enjoy! :D

**make sure your weight is below 350 before you run this. it mines in an 8 grid square around you starting at your feet.**

Code: Select all

//===========================================================
//=--------------Alamiester's Easy Miner V0.3u--------------=
//=------------------------07Apr2018------------------------=
//=----You must have a high use shovel, Stone Keys, and a---=
//=---bor for this to work.  After your first run add // in-=
//=---front of the unsetalias to keep from retargeting------=
//=-----------------these items everytime.------------------=
//===========================================================
//unsetalias 'shovel'
//unsetalias 'stonekeys'
//unsetalias 'resourcebag'
@clearlist 'resource'
@clearjournal
//***********************
// For selecting your shovel.
//***********************
if not findalias 'shovel'
  headmsg 'Select Shovel or Pickaxe'
  promptalias 'shovel'
endif
//***********************
// For adding to Stone Workers keys.
//***********************
if not findalias 'stonekeys'
  headmsg 'Select Stone Workers Keys'
  promptalias 'stonekeys'
endif
//***********************
// For selecting your Bag of Resources.
//***********************
if not findalias 'resourcebag'
  headmsg 'Select your Bag of Resources'
  promptalias 'resourcebag'
endif
//***********************
// For selecting your list Resources.
//***********************
if not listexists 'resource'
  @createlist 'resource'
endif
@pushlist 'resource' '0x19b9' //ore
//***********************
// To start the digging.
//***********************
msg 'Hi Ho, Hi Ho, Off to work we go!' 15
//***********//
//Position 00//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  0 0 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
//***********//
//Position 01//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  -1 -1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
//***********//
//Position 03//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  1 -1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
//***********//
//Position 04//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  -1 0 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
//***********//
//Position 05//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  1 0 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
//***********//
//Position 06//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  -1 1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
//***********//
//Position 07//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  0 1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
//***********//
//Position 08//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Checking for ore...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  1 1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg ' **** Looking for Ore ****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '***** Moving Ore *****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
    //===========================================================
    //=------------Moves all Granite to Granite Keys------------=
    //===========================================================
    sysmsg ' **** Looking for Granite ****' '20'
    if not @findtype! '0x176b' '1161' 'backpack'
      sysmsg '*****No Granite Keys found.*****' '255'
      @canceltarget
      stop
    else
      @usetype! '0x176b' '1161' 'backpack'
      pause 300
      waitforgump 2633467501 500
      @replygump 0x9cf7866d 60015
      waitforgump 2633467501 500
      pause 300
      while @findtype! '0x1779' 'any' 'backpack' 'any' '2'
        if not @findtype! '0x1779' 'any' 'backpack' 'any' '2'
          pause 300
          sysmsg '*****No Granite found.*****' '28'
          @canceltarget
        else
          sysmsg '***** Moving Granite *****' '20'
          @targettype! '0x1779' 'any' 'backpack'
          waitforgump 2633467501 500
          pause 300
        endif
      endwhile
      @replygump 0x9cf7866d 0
      @canceltarget
    endif
    @clearjournal
  endif
endwhile
headmsg 'There is no more ore here, move to the next vien.' 24
This version is without the granite keys for those poor folk without access to granite :D

Code: Select all

//===========================================================
//=--------------Alamiester's Easy Miner V0.3u--------------=
//=------------------------07Apr2018------------------------=
//=----You must have a high use shovel for this and bor-----=
//=---- to work.  After your first run add // in front of---=
//=---the unsetalias to keep from retargeting these items---=
//=-----------------------everytime.------------------------=
//===========================================================
//unsetalias 'shovel'
//unsetalias 'resourcebag'
@clearlist 'resource'
@clearjournal
//===========================================================
//=---------------For selecting your shovel.----------------=
//===========================================================
if not findalias 'shovel'
  headmsg 'Select Shovel or Pickaxe'
  promptalias 'shovel'
endif
//===========================================================
//=----------For selecting your Bag of Resources.-----------=
//===========================================================
if not findalias 'resourcebag'
  headmsg 'Select your Bag of Resources'
  promptalias 'resourcebag'
endif
//===========================================================
//=--------------For Selecting your Resources.--------------=
//===========================================================
if not listexists 'resource'
  @createlist 'resource'
endif
@pushlist 'resource' '0x19b9' //ore
//===========================================================
// =-----------------To start the digging.------------------=
//===========================================================
msg 'Hi Ho, Hi Ho, Off to work we go!' 15
//***********//
//Position 00//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid 0 0 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  0 0 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '*****No Ore found.*****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
//***********//
//Position 01//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid -1 -1 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  -1 -1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '*****No Ore found.*****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
//***********//
//Position 03//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid 1 -1 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  1 -1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '*****No Ore found.*****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
//***********//
//Position 04//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid -1 0 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  -1 0 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
//***********//
//Position 05//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid 1 0 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  1 0 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
//***********//
//Position 06//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid -1 1 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  -1 1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '*****No Ore found.*****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
//***********//
//Position 07//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid 0 1 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  0 1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '***** No Ore found *****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
//***********//
//Position 08//
//***********//
@clearjournal
@unsetalias 'resource'
@unsetalias 'found'
while not @injournal 'There is no' 'system'
  for 10
    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
  headmsg 'Mining Grid 1 1 0...' 24
  if weight <= '350'
    useobject "shovel"
    waitfortarget 500
    targettileoffset  1 1 0
    pause 1200
  else
    //===========================================================
    //=------------Moves all ore to Bag of Resources------------=
    //===========================================================
    sysmsg '*****Checking bag for Ore.*****' '20'
    if not @findtype! '0x19b9' 'any' 'backpack' 'any' '0'
      sysmsg '*****No Ore found.*****' '28'
    else
      @setalias! 'resource' 'found'
      pause 300
      for 0 to 'resource'
        while @findtype! 'resource[]' 'any' 'backpack' 'any' '0'
          pause 300
          if @injournal 'cannot hold more'
            sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
            @clearjournal
            stop
          else
            sysmsg '*****Moving Ore.*****' '20'
            @moveitem 'found' 'resourcebag'
            pause 600
          endif
        endwhile
      endfor
    endif
  endif
endwhile
headmsg 'There is no more ore here, move to the next vien.' 24

Re: [UOSteam] Alamiester's Easy Miner v0.1

Posted: Wed Dec 27, 2017 4:00 am
by Blarog
Soo I wanted to just mess around with your code a bit, and 6 hours later (and a good deal of frustrations about the UOSteam documentation), I managed to add a few things. As long as there is a Tool Box in the main backpack, and that there is iron ingots in the key, the macro will always keep 2 tool box (so when one breaks, the other is there) and 2 shovels (same idea) on hands.

There is no need anymore to target the mining shovel. The pros : it's more newb friendly, and it's especially nice if you just want to level mining and don't really care about using an OP mining tool. The cons : if you got an OP mining tool, odds are this is not for you.

I also got it to break the infinite loop you had. Now, even if one of the position is a target that cannot be seen, a target that cannot be mined or a position with no more metal, it will move to the next position. Makes life easier if you are recall mining using library rune spots, as it will target mountainsides and rocks and what not.

Thought I would share those quality of life improvement here, as yours is definitely one of the sexiest mining script (for UOSteam anyway :lol: ) ive seen in the last 6 hours, while I was googling like crazy.

Code: Select all

//Alamiester's Easy Miner V0.1
//03Nov2017
//Edited by Blarog on December 27, 2017
//You need 3 things for this script to work : a Tinkering Tool Box, a metal key with atleast 10 ingots in it, a portable forge.
//After finding your tools and keys in your bag add // in front of the unsetalias to keep from targeting everytime.
unsetalias 'Forge'
unsetalias 'metalkeys'
//***********************
// For selecting your mobile forge.
//***********************
if not findalias 'Forge'
  headmsg 'Select a Mobile Forge'
  promptalias 'Forge'
endif
//***********************
// For adding to Metal Workers keys.
//***********************
if not findalias 'metalkeys'
  headmsg 'Select Metal Workers Keys'
  promptalias 'metalkeys'
endif
//***********************
// To start the digging.
//***********************
msg 'Hi Ho, Hi Ho, Off to work we go!' 15
@clearjournal
//***********//
//Position 00//
//***********//
headmsg 'Checking for ore... ' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    else
      headmsg 'You need 1 tool box minimum in your backpack.' 24
      headmsg 'The macro will then create a second one to ensure' 24
      headmsg 'You never run out of them. Same with the shovel.' 24
      stop
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  0 0 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 01//
//***********//
headmsg 'Checking for ore... ' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  -1 -1 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 02//
//***********//
headmsg 'Checking for ore...' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  0 -1 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 03//
//***********//
headmsg 'Checking for ore...' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  1 -1 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 04//
//***********//
headmsg 'Checking for ore...' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  -1 0 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 05//
//***********//
headmsg 'Checking for ore...' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  1 0 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 06//
//***********//
headmsg 'Checking for ore...' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  -1 1 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
//***********//
//Position 07//
//***********//
headmsg 'Checking for ore...' 24
while not @injournal 'no metal here'
  if @injournal 'mine that' or @injournal 'target cannot be seen.'
    break
  endif
  if @injournal 'mine there' or @injournal 'no metal here'
    break
  endif
  if @counttype 0x1eb8 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 23
      waitforgump 0x38920abd 15000
    endif
  endif
  if @counttype 0xf39 'any' 'backpack' < 2
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 1
    pause 500
    replygump 0xfb1e68cb 0
    if usetype 0x1eb8
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 72
      waitforgump 0x38920abd 15000
      replygump 0x38920abd 0
    endif
  endif
  while @targettype! '0x1bf2' 'any' 'backpack' //put back metal in key
    useobject 'metalkeys'
    pause 500
    replygump 0xfb1e68cb 15
    waitforgump 4213074123 1500
    waitfortarget 800
    @targettype! '0x1bf2' 'any'
    pause 500
    replygump 0xfb1e68cb 0
    pause 500
    @canceltarget!
  endwhile
  if weight <= '350'
    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
    targettileoffset  0 1 0
    pause 1000
  else
    while @targettype! '0x19b9' 'any' '0'
      pause 1000
      if findalias 'Forge'
        @usetype!  '0x19b9' 'any' 'backpack' '0'
        waitfortarget 800
        @target! 'Forge'
      endif
      pause 800
      @canceltarget!
    endwhile
    while @targettype! '0x1bf2' 'any' 'backpack'
      useobject 'metalkeys'
      pause 500
      replygump 0xfb1e68cb 15
      waitforgump 4213074123 1500
      waitfortarget 800
      @targettype! '0x1bf2' 'any'
      pause 500
      replygump 0xfb1e68cb 0
      pause 500
      @canceltarget!
    endwhile
  endif
endwhile
@clearjournal
headmsg 'There is no more ore here, move to the next vien.' 24

Re: [UOSteam] Alamiester's Easy Miner v0.1

Posted: Wed Dec 27, 2017 7:36 am
by Alamiester
well i havnt looked at what youve changed, but i gave it a try and it didnt work right off the bat. i did notice the line count has doubled, lol. all it does for me is remove 100 ingot from the metal keys. never gets to any digging. i havnt messed with this macro for awhile. i was working on adding stonekeys into it for stone mining, but i got distracted with other things and never got back to it.

what exactly is it looking for here? a tool house? ive got a shovel with almost 60k use on it, thats why i didnt mess with any tool house in the code. it didnt see my tool house in my pack.
else
headmsg 'You need 1 tool box minimum in your backpack.' 24
headmsg 'The macro will then create a second one to ensure' 24
headmsg 'You never run out of them. Same with the shovel.' 24
stop
endif

Re: [UOSteam] Alamiester's Easy Miner v0.1

Posted: Wed Dec 27, 2017 11:25 am
by Alamiester
ahhh, ok i figured it out. it makes shovels every time. i thought it was looking for a tool house, not a tinker tool kit. works pretty slick. at what skill can you effectivly make shovels and tinker kits, mine are already at 100 percent chance? i tried to keep it as simple as possible but that is kinda nice if your training up tinkering. i just posted my version that i added the granite to. ill havto take alook at how you worked that target cannot be seen loop out of it and try to blend that into the ore/granite script.

Re: [UOSteam] Alamiester's Easy Miner v0.1

Posted: Wed Dec 27, 2017 12:45 pm
by Blarog
I think you get 100% shovel chance at 45 tinkering (not sure on that one either, my tinkering was too high when I got around to play with the script).

I tried alot of *sexy* ways to break the infinite loop, turns out having two "if @injournal 'message here.' or @injournal 'message 2 here'" followed by a break to exit the while loop did the job. It's ugly, but to be honest this is the only way I got UOS to recognize more than 2 parameters, and since there are 4 possible error messages when mining... Im still sad about the ugliness though hehe.

And yea it needs a Tinker tool box, like I said in my post my version is more for people that want to train mining without hassle. I might try to incorporate the infinite loop break into your code, so people with nice mining tools with lots of use could still mine pretty much everywhere, detect any positions, while also using their favorite OP tool ;)

I might also shamelessly steal your code and convert it to woodcutting and call it Blarog's Easy Wooder ( :shock: ) too, I just need to get ahold of a wood key first :mrgreen: I will give due credit where credit is due though haha.

Re: [UOSteam] Alamiester's Easy Miner v0.1

Posted: Wed Dec 27, 2017 1:20 pm
by Alamiester
yeah, i think fixxer originally had wood chopping mixxed in with it, called it relative location havester. but it was too messy for me so i took that out, i was just lookin for a solid steam mining macro that i could hotkey. ive actually got about fifteen different versions of this in my steam macro window. i was playing around with it alot, but left it at the one i posted, cause it seemed to work the best, even with the infinte loop, it didnt crash anything. eventually ill get around to combining the sand digger into it also. :lol:

Re: [UOSteam] Alamiester's Easy Miner v0.1

Posted: Sat Apr 07, 2018 8:55 pm
by Alamiester
ive updated the origanal code posted to the new menu gumps, and ridid it to use a bag of resources instead of metal keys and a mobile forge. if you want to use the version with the all the keys use the easy oregranite miner v0.2u

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Sat Apr 07, 2018 10:07 pm
by Alamiester
updated to v0.3u :worried:

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Thu Apr 19, 2018 11:49 pm
by Alamiester
added vesion without granite keys to the top part of post

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Thu Sep 13, 2018 7:05 pm
by wolfbain5
is it possible to set this for portable forge and metal keys?

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Fri Sep 14, 2018 3:59 pm
by Alamiester

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Sat Sep 15, 2018 3:35 am
by wolfbain5
thanks, commented out the stone part and works perfectly. will uncomment when I am ready to deal with stone

hate to ask this, got something for lumbering in tram? everything I have found says you cant use an axe on that. soon, I can use your fel one like a week or two soon

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Sun Sep 16, 2018 7:57 am
by Nick
Just want to say I have always been jealous of you UOSteam users. I grew up on Razor and it's all I know how to macro with. I have a Gargoyle pick ax Platnum mining/hunting/claim all script that is the peek of my macro writing but it takes up about 18 files, 3 sorts, a bag of holding and is about as effective as using a backhoe to pick your teeth. I know I'll have to learn a new system once I get a new computer (holding on to Windows 7 because I hear razor doesn't work on windows 10) but ill cross that bridge when I get there.

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Sun Sep 16, 2018 1:58 pm
by Alamiester
im runnin win10 and razor works on that, but i only really use it for fishing. uosteam is so much easier to use in my opinion. can right the macros without recording most of it.

Re: [UOSteam] Alamiester's Easy Miner v0.3u

Posted: Thu Apr 27, 2023 5:13 pm
by nocturne7saint
So I'm using the one without stone workers keys.

after a while it will spam "moving ore" and does not do anything more, so i have to manualy smelt my ore and key the bars.
i have my main pack set to resource bag, could that be my problem? i also have my keys and mobile forge set in my bag of holding, could that be the issue?