Mining macro

Discussion in 'Renaissance Discussion' started by Cosmo, Apr 25, 2015.

  1. Cosmo

    Cosmo Member

    Joined:
    Dec 14, 2014
    Messages:
    66
    Likes Received:
    46
    Hello

    I am training a miner, and to lessen the risk of carpal tunnel syndrome, I went to website in search of a macro, and I stumbled over a thread by @Lightshade .
    http://uorforum.com/threads/razor-macro-simple-mining.3946

    I took the waiting macro as is, and modified the Mining macro to a for loop.

    For some reason beyond my grasp of programming, even simple programming, the Mining macro will start the MiningW macro as it should, but immediately the
    MiningW macro detects a trigger and run the Mining macro once more.

    Funny part is, the only sysmsg i get is the "No metal".

    I suck at macros, so naturally I fail to see where it goes south.

    Any help/hints/advice/better macro will be greatly appriciated.

    MiningW
    Code:
    !Loop
    Assistant.Macros.IfAction|4|0|you dig some
    Assistant.Macros.HotKeyAction|0|Play: Mining
    Assistant.Macros.EndIfAction
    Assistant.Macros.IfAction|4|0|loosen some rocks
    Assistant.Macros.HotKeyAction|0|Play: Mining
    Assistant.Macros.EndIfAction
    Assistant.Macros.PauseAction|00:00:01
    
    Mining
    Code:
    Assistant.Macros.ForAction|20
    Assistant.Macros.DoubleClickTypeAction|3897|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.LastTargetAction
    Assistant.Macros.PauseAction|00:00:01.3000000
    Assistant.Macros.EndForAction
    Assistant.Macros.PauseAction|00:00:1
    Assistant.Macros.HotKeyAction|0|Play: MiningW
    


    Cosmo
  2. Arnold Lutz

    Arnold Lutz Well-Known Member

    Joined:
    Dec 9, 2013
    Messages:
    683
    Likes Received:
    1,025
    Razor can no longer see the messages like "no metal", so you'll have to replace the IF checks with FOR loops.
    This was patched in to prevent to much afk gathering.
    Lightshade likes this.
  3. Lightshade

    Lightshade Well-Known Member
    UO:R Subscriber

    Joined:
    Sep 12, 2013
    Messages:
    1,894
    Likes Received:
    2,448
    Yup, you kind of have to use the For Loop now. I've wrote new macros for others on the fly, but i've so far forgotten to update that post. I'll get around to it one of these days.

    :)
  4. Cosmo

    Cosmo Member

    Joined:
    Dec 14, 2014
    Messages:
    66
    Likes Received:
    46
    Hello again

    I do not use the sysmsg "no metal".

    As I understand it, that is the only sysmsg changed, that would affect mining, please correct me if I am mistaken.

    What I wrote was:
    I should have added that I do not get any other sysmsg to trigger the Mining macro, like "loosen some" or "dig some".

    I do use a for loop, it is the first line in Mining macro.

    Also the macros works fine, sort of, the MiningW macro triggers on the above sysmsgs, but when Mining macro is finished it
    starts MiningW (as it should) which starts Mining macro again (that should not happend), that is the part that puzzles me.

    I cannot see why it should start over, there is no sysmsg that should trigger the Mining macro, but as stated I suck at this
    so I thought maybe someone can see my error.


    Cosmo
    Last edited: Apr 26, 2015
  5. Basoosh

    Basoosh Well-Known Member
    UO:R Donor

    Joined:
    Apr 3, 2013
    Messages:
    2,841
    Likes Received:
    2,545
    EDIT: Nvm. I see what you're trying to do now.
  6. BlackEye

    BlackEye Well-Known Member
    UO:R Subscriber

    Joined:
    Nov 24, 2014
    Messages:
    4,917
    Likes Received:
    5,095
    When you run a circle, and finish the Mining macro, you still have the sys msgs from the Mining macro (your triggers) in the system. Very often, a macro does not recognize the last (new) sys msg (in this case the one from MiningW that there is no metal).

    Apart from that, if the No Metal sys msg is disabled, you also will always have the others (your triggers) in memory.
    Cosmo and Basoosh like this.
  7. Cosmo

    Cosmo Member

    Joined:
    Dec 14, 2014
    Messages:
    66
    Likes Received:
    46
    Is there any way to clear the memory of these old sysmsg's?

    A long pause or something?

    I have been fidding with pauses, and I did notice that I often got another "dig some"/"loosen some" sysmsg
    after the macro have ended.

    I sort of have given up, but I still hope someone have a solution to my problem. It is not a big thing, I have
    assigned the macro to a key, I am just trying to avoid doing anything but doubleclick shovel then orespot.

    The plan is to incorporate tinkering to make my own shovels, whenever the current shovel is used up,
    also automatic moving ores to packy, but I am trying to solve this problem first, before I potentially
    create another.


    Cosmo
  8. Basoosh

    Basoosh Well-Known Member
    UO:R Donor

    Joined:
    Apr 3, 2013
    Messages:
    2,841
    Likes Received:
    2,545
    Don't know if this will work, but at the end of Mining, try doing something that will generate a new SysMsg. Maybe use the Item ID skill on a pickaxe or something to see if that effectively clears the memory.
  9. Cosmo

    Cosmo Member

    Joined:
    Dec 14, 2014
    Messages:
    66
    Likes Received:
    46
    Thanks for the input Basoosh, I could not get this to work.

    Many skills have a 10 sec delay, which is not a good solution for me.

    I have tried to fill the buffer, with other sysmsg, like 2x clicking ore several times, but the macro
    keeps returning to starting the Mining macro over without any new sysmsg to do so, also with
    the use of a skill like ItemID.

    I also tried to clear current target and target queue, same result.

    It might work with recall mining, changing zone and all, I have not tested that.

    I have not given up yet, but I will put it on pause until it annoys me again, or someone pops by
    and have the solution. Maybe its just not possible?

    Thanks all for the suggestions.


    Cosmo
  10. Worm

    Worm Member

    Joined:
    Apr 21, 2015
    Messages:
    85
    Likes Received:
    56
    Try using [help in the macro to clear it
  11. compsays

    compsays Active Member
    UO:R Subscriber

    Joined:
    Feb 20, 2017
    Messages:
    364
    Likes Received:
    140
    Long shot, but does anyone have a mining macro that will simply target shovels/pickaxes from mybackpack, then target the tiles around where I stand?

    I don't mind doing everything else manually but my carpal tunnel would thank me (and you) if I could take the above out of the question thanks to Razor.

    Thanks in advance.
  12. Fullmetal

    Fullmetal Well-Known Member
    UO:R Subscriber
    UO:R Donor

    Joined:
    May 1, 2013
    Messages:
    641
    Likes Received:
    269
    When I get home I can link one.
    compsays likes this.
  13. El Horno

    El Horno Well-Known Member
    UO:R Subscriber

    Joined:
    Aug 4, 2014
    Messages:
    3,612
    Likes Received:
    4,899
    I have mined a lot and what I found easiest was creating 10 simple macros for mining.
    1-4. My 4 directional keys I hotkeyed to macros that have just 1 line and respectively target each direction via relative location.
    5-8. Alt+ directional keys are hotkeyed to each direction but 2 tiles away(max distance for mining)
    9. Then I have a "Draw up mining target" macro which just uses shovel by type.
    10. Then a macro that uses shovel by type and for(16) repetitions mines last target.

    Clicking on the mountains is weird and leads to tons of LOS issues. Taking the time to set up 8 relative location hotkeys makes a WORLD of difference and you will find yourself reaching veins you normally would miss.

    My mining consists of walking to where I want to mine, play the "draw up mining target" macro and then select whatever direction key I wanted to mine. Then press the mining loop macro and wait.

    Now, personally I was just mining for a project so I wasn't keeping the ore since it slowed me down too much at fairly menial gain so I also have a macro that drops all ore at my feet which I would press every couple veins.
    RavenMagi and Xainlich like this.
  14. compsays

    compsays Active Member
    UO:R Subscriber

    Joined:
    Feb 20, 2017
    Messages:
    364
    Likes Received:
    140
    I'd be very glad to see it.
  15. Fullmetal

    Fullmetal Well-Known Member
    UO:R Subscriber
    UO:R Donor

    Joined:
    May 1, 2013
    Messages:
    641
    Likes Received:
    269
    I used this guide here and just modified it to drop ore at feet.
  16. compsays

    compsays Active Member
    UO:R Subscriber

    Joined:
    Feb 20, 2017
    Messages:
    364
    Likes Received:
    140
    Gotta be honest, that's way more complex than I need. I don't have the wherewithal yet to tinker a new shovel or anything like that. I need something considerably simpler. Like me. :D

    Maybe I'll see if I can do it myself. This is a complicated business for a newbie.
  17. Cheapsuit

    Cheapsuit Well-Known Member
    UO:R Donor

    Joined:
    Jun 12, 2013
    Messages:
    787
    Likes Received:
    264
    When you try to add relative location to a mining macro, you get the message, you can't mine that. Why?
  18. Duz-luk

    Duz-luk Active Member

    Joined:
    Apr 1, 2015
    Messages:
    171
    Likes Received:
    120
    are you sure your macro looks like this in razor's macro tab:

    Double Click (shovel (OF39))
    Wait for Target
    Target RelLoc (0,0)

    0,0 should mine the tile you're standing on
  19. Duz-luk

    Duz-luk Active Member

    Joined:
    Apr 1, 2015
    Messages:
    171
    Likes Received:
    120
    also using multiple pickaxes messes up the macro. Unless you use the "use item in hand" command which is located in hotkeys->items list then hit execute while the macro is recording. Just replace the "double click type" command with that if you want to use pickaxes, or use shovels if you want to go the easier route.

    *note if you do pickaxes you have to add an equip pickaxe line to the top of the looping macro so when your pick breaks it will continue on with a new one

    *note 2, in other words just use shovels unless you really want to look the miner part
  20. Cheapsuit

    Cheapsuit Well-Known Member
    UO:R Donor

    Joined:
    Jun 12, 2013
    Messages:
    787
    Likes Received:
    264
    Double Click (shovel (OF39))
    Pause .25sec
    Target RelLoc (0,1)

Share This Page