1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mining macro

Discussion in 'Razor' started by fujinn, Feb 6, 2016.

  1. fujinn

    fujinn Neophyte

    5
    2
    0
    Jan 26, 2016
    Alright. So there have been many requests for mining macros here. I for one have looked for an efficient one that can do all the clicking and hopefully some walking while I watch/eat/smoke/drink w/e i feel like doing (as long as i'm in front of the screen) and I have had bad bad luck, all of them had exceeding amount of clicks over empty positions. I am no noob when it comes to simple scripting but to make a nice logical macro takes some real skills with the syntax available by razor. Long story short, after many many tries, i landed a perfect logical syntax that does not "eventually" mines a position, but will always mine the 4 positions (front back side/side) as long as there is ore and will only switch to the next position if there are no more ores or you find a stone which i felt too lazy to include in the macro.

    !Loop
    Assistant.Macros.ForAction|8
    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|-2|0
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.IfAction|4|0|you loosen
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.ForAction|8
    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|0|1
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|1|0
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|0|-1
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction
    Assistant.Macros.WalkAction|0
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.WalkAction|0
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.WalkAction|0

    Enjoy.
     
    Greenman and Noqa like this.
  2. fujinn

    fujinn Neophyte

    5
    2
    0
    Jan 26, 2016
    !Loop
    //Begin loops for this specific location #1. Will loop 8 times(should be changed to 13 to guarantee full drainage of ores) as long as "you dig" or "you loosen" (you could add more 'if' instances to keep mining if you "find" stones, at the moment it switches position to the next).

    Assistant.Macros.ForAction|8
    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|-2|0
    Assistant.Macros.PauseAction|00:00:02

    //as long as you find ore, this allows the for loop to iterate position #1, if not, it ignores the loops and move along.

    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    //as long as there is ore or you fail to find out if there is or isn't, iterate 8 times for this position #1.

    Assistant.Macros.IfAction|4|0|you loosen
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    //repeat process for position #2.

    Assistant.Macros.ForAction|8
    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|0|1
    Assistant.Macros.PauseAction|00:00:02

    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|1|0
    Assistant.Macros.PauseAction|00:00:02

    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    Assistant.Macros.DoubleClickTypeAction|3718|True
    Assistant.Macros.WaitForTargetAction|30
    Assistant.Macros.TargetRelLocAction|0|-1
    Assistant.Macros.PauseAction|00:00:02

    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    Assistant.Macros.IfAction|4|0|you dig
    Assistant.Macros.EndForAction
    Assistant.Macros.EndIfAction

    //This will move your character north 2-3 clicks after it has gone through the iterations on all 4 positions around your character.

    Assistant.Macros.WalkAction|0
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.WalkAction|0
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.WalkAction|0

    //you could add more "nodes"/positions, to mine even more efficient and also raise the number of iterations as I stated before.
     
  3. Anzil Wyatt

    Anzil Wyatt Journeyman

    82
    18
    8
    Jul 2, 2015
    stupid question, how do I copy or install this into razor?
     
  4. Modus

    Modus Master

    456
    269
    63
    Nov 2, 2014
    you got a macros folder in your razor folder. put that in a textfile, name the file and done it is.
     
  5. fujinn

    fujinn Neophyte

    5
    2
    0
    Jan 26, 2016
    under "help/status" tab in your razor, click open data directory. This will take you straight to your macro's folder location. There you have the option of editing other macros you got by opening them with notepad or wordpad or creating a new notepad/wordpad document and saving the macro with a .macro in the end i believe. Just mimic the extention of the other macros you got there.
     
  6. Anzil Wyatt

    Anzil Wyatt Journeyman

    82
    18
    8
    Jul 2, 2015
    Awesome, thanks guys
     
  7. SammyP

    SammyP New Member

    4
    0
    0
    Jan 10, 2016
    SammyP
    Works brilliant, Thanks!
     
  8. Rikket_The_Rogue

    Rikket_The_Rogue Grandmaster

    1,066
    682
    113
    Apr 3, 2016
    Rikket
    I didn't think you were allowed to do AFK resource gathering; is this not true?
     
  9. Keltonator

    Keltonator Grandmaster

    758
    584
    93
    Sep 15, 2014
    You are not allowed to gather resources AFK. You may run the macro, but still need to monitor it constantly to avoid being banned.
     
  10. Fattson

    Fattson Grandmaster

    5,066
    6,649
    113
    Apr 9, 2013
    I'm trying to find a way to make my macro stop. I tried putting in an
    if sys message there is no metal
    end if

    kinda thing. But it continues to loop. Any suggestions?
     
  11. Rosbife

    Rosbife Neophyte

    7
    4
    3
    Jul 12, 2017
    Dasmur, Cynychwr
    Thanks man, appreciate your macro. Using right now
     
  12. Greenman

    Greenman Apprentice

    72
    5
    8
    Nov 8, 2017
    Matilda Greenman, Bjorn Greenman, Cain S Lupis
    I dont suppose you have one of these laying around for LJ do you?
     

Share This Page