Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[EUO] Mining
#1

Made a new macro since the old one stopped working. This one doesn't automate everything like the previous version did so hopefully it should be ok. Works in any mine except Mt. Kendall (mine outside minoc).

Code:
; OzMining 2.0
;
; Features:
; - Moves around the mine randomly
; - Mines a tile clean of ore before moving on to next one
; ==============================================================================

set #LPC 10
set %toolTypes QPF
set %status idle

event sysmessage Starting OzMining 2.0

while ( #charghost = no )
{
  if ( #WEIGHT > #MAXWEIGHT )
  {
    event sysmessage Max weight exceded! Halting...
    halt
  }
  if %status = no_more_ore
  {
     set %status idle
     goto MoveToNextSpot
  }
  set %jrnl #jindex
  gosub MineThisSpot
  gosub ProcessResults
}
halt

sub MineThisSpot
  if ! ( %status = idle )
    return
  finditem %tooltypes C
  if #FINDCNT > 0
  {
    set #lObjectId #findId
    event macro 17 0
    set %jrnl #jindex
    tile Init
    Tile Get #CharPosX #CharPosY 2
    set #lTargetTile #tileType
    set #lTargetX #charPosX
    set #lTargetY #charPosY
    set #lTargetZ #charPosZ
    set #lTargetKind 3
    target 20s
    event Macro 22 0

    set %status mining
  }
return

sub ProcessResults
  set %MiningTimer #SYSTIME
  while ( %status = mining )
  {
    if #jindex > %jrnl
    {
      set %jrnl %jrnl + 1
      scanjournal %jrnl
      if you_dig_some in #journal
        set %status idle
      if you_carefully_extract_some_workable_stone in #journal
        set %status idle
      if you_loosen_some_rocks in #journal
      {
        if ( #SYSTIME <= %MiningTimer + 1000 )
          wait 7s
        set %status idle
      }
      if You_have_moved_too_far in #journal
        set %status idle
      if you_can't_mine_there in #journal
        set %status idle
      if Someone_has_gotten in #journal
        set %status idle
      if Can't_mine_that in #journal
      {
        set %status no_more_ore
        gosub MoveToNextSpot
      }
      if target_cannot_be_seen in #journal
      {
        set %status no_more_ore
        gosub MoveToNextSpot
      }
      if there_is_no_metal_here_to_mine in #journal
      {
        set %status no_more_ore
        gosub MoveToNextSpot
      }
    }
    if ( #SYSTIME >= %MiningTimer + 7000 )
    {
      set %status no_more_ore
      gosub MoveToNextSpot
    }
  }
return

sub MoveToNextSpot
FindNextSpot:
  set %GotoX #charposX
  set %GotoY #charposY
  set %oldX #charposX
  set %oldY #charposY

  set %randomInc #random % 5
  ; negative or positive?
  set %nDirection #random % 2
  if %nDirection = 1
    set %randomInc %randomInc * -1
  set %GotoY %GotoY + %randomInc

  ; Random amount of tiles to a direction
  set %randomInc #random % 5
  ; negative or positive?
  set %nDirection #random % 2
  if %nDirection = 1
     set %randomInc %randomInc * -1
  set %GotoX %GotoX + %randomInc

  tile Init
  tile Get %GotoX %GotoY 2
  if ( #tilename = cave_floor )
  {
    gosub MoveTo %GotoX %GotoY 0
    set %status idle
  }
return

sub MoveTo
  set %oldX #charposX
  set %oldY #charposY

GetThere:
  if ( #charposX = %1 && #charposY = %2 )
    return
  event pathFind %1 %2 %3
  wait 5
  set %MoveStartTime #SYSTIME
  while ! ( #charposX = %1 && #charposY = %2 )
  {
    if can't_get_there in #journal
      gosub OpenDoor
    if ( #charposX = %oldX && #charposY = %oldY )
      return
    if ( #SYSTIME > %MoveStartTime + 1000  )
      return
  }
return

Just run it using EUO. Macro will halt when your weight exceeds maximum weight. Later on I might add automatic smelting if I can get around to it but I guess banking is a no.
#2

can you provide a zip file of easyuo please? i don't have an account and my email is in use already
#3

Ye smoke I was told there was an account already using me email address and it was banned or something like that... I tried 3 different hotmail addresses all the same thing. Try using an email address from somewhere else or msn me for it. I'd attach it to this message but I don't use winzip so I can't attach it.

Good work by the way Canaris!
#4

Added a link for EUO.
#5

Your the man, Can. :p This is the only EUO mining macro that actually works for me! Now go make me a Lumber one! Cause none of those work for me either!

[SIZE="2"]The Horny Pink Daemon[/SIZE]
[SIZE="2"]Worst typer on the World[/SIZE]
[Image: sigpicpaulieq.png]
#6

Wow, this macro is so great!
Thank you really muchh Kamos Wink!
Really easy to set up also.!

[Image: 2cn76h2.gif] [Image: avatar20124_12.gif] If you liked my posted, dont forget to thank me Wink!

Best Regards,
Hiroshima.
#7

Canaris Wrote:Added a link for EUO.

the link doesn't work it's just red + underlined Sad
#8

Canaris Wrote:...download it from here...

Sorry if the link was confusing. Word 'here' has the actual link. You can't click it from the original post Smoke?
#9

Canaris Wrote:Sorry if the link was confusing. Word 'here' has the actual link. You can't click it from the original post Smoke?

ah got it =] sorry i though it would be the red text Tongue
#10

just a question it just banks the ingots in your bank or do you have to set a hot bag?

EDIT: Im having trouble getting bank and container ids can anyon help me?
#11

On the right-hand side of Easy UO you should have a whole bunch of different categories. Open the one called container info. My guess is you want to either use contkind (a type of container) or contid (select a specific container).

Double click the container you want to get the info on and it should update. Wait a second or two before copying the info because I had a weird 3 character code show up then it changed to a longer 6 character code.
#12

I have EUO and UO which is patched to 6.0.3.0 on 3 computers and this macro works with 2 of the computers with no problem. All 3 comps are vista ultimate also. This comp im on now when i start the EUO macro it says Starting OZmining 1.0 What do you want to use this item on? Target cannot be seen. Any ideas to get this to work? Also so you know the 2 comps that EUO works i DLd the UO from our site. This comp i am having the problem with I DLd UO from this link http://www.uoherald.com/uoml/newplayer.php the FTP. Dont know if this makes a difference or not.


Forum Jump:


Users browsing this thread: 1 Guest(s)