Mining macro

fujinn

Neophyte
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.
 

fujinn

Neophyte
!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.
 

fujinn

Neophyte
stupid question, how do I copy or install this into razor?
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.
 

Fattson

Grandmaster
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?
 

Greenman

Apprentice
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.
I dont suppose you have one of these laying around for LJ do you?
 
Top