RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Creating a razor macro to mine/smelt and bank the ingots

randale

Sorceror
Is this possible? It would really help if I could invoke a macro from within another macro, similar to a subroutine. On the shard I play on, only Razor is allowed as a helper program. I'm told that this is possible, however, once it finishes the second macro, it will not return and finish the first one.

Specifically, I'm looking to make a macro that will hit the rocks, depending on where I am on the screen. I don't think razor has a feature to check your coordinates and do an if based on where you are standing in the world. So, what I'll need to do is use a sextant, then do a System Message if, depending on the coordinates it gives me

It would also help if the razor guide had a more thorough overview of Macros, for example what each thing means when you right click, or a result. For example what Double click 0x400EE59C means, what that alpha-numerical part after it means, I'm guessing it's coords in my backpack, but wouldn't know that as it isn't explained. And, for each action, there could be entirely different right click menu. For example, for double click I have the option to Convert to DCclick by type (which I have used) whereas with Absolute target I have Retarget, convert to last target, convert to last target by type, and convert to relative location, which aren't explained in this:

http://www.runuo.com/razor/guide.php?tab=macros
 

3tree

Sorceror
as for the subroutine, I don't see your problem using your second macro to re-invoke your first one, are you using if/else statements? to have your second macro return to the first,

set up a hotkey to both macros, and while recording your macro, press the hotkey assigned to your other macro to record it.(do this with both macros to switch the pointer back and forth, or to other macros) then put in an if/else statement to point to the subroutine

************************************************************************************************
to "hit the rocks" as you so eloquently put, simply use the following;

1 double click by type pickaxe or shovel,
2 now target the ground underneath your character.
3 now stop recording the macro and right click the target and convert to relative location,
now the macro will always click directly underneath your character wherever he is on the screen
(if this wasn't obvious enough, you don't have to have it be directly underneath your character, it can be to the right, left, above, below, or diagonal to your character as well)

for example what each thing means when you right click, or a result. For example what Double click 0x400EE59C means, what that alpha-numerical part after it means, I'm guessing it's coords in my backpack

I think that when an item comes into existence in UO it is given a unique identifier code. to separate it from other similar items, (also to prevent duping) and that is what that code after "Double Click" is

absolute target simply means ONLY that SPECIFIC target, either that exact spot on the ground, that exact character, that exact giant beetle, that exact bag, etc etc etc.
(you can change what specific target you are targeting by right clicking and using "retarget")

last target is self-explanitory, it simply targets the last thing your character has targeted

target by type is also self-explanitory, you can change the target to a random selection of that targets type,
(for example, a random bamboo flute that is in range of you, a random tree in range of you etc etc)
 

randale

Sorceror
So, I'd need basically four things.

1. A macro to walk to each spot, then I'd record it hitting it, then it I'd put in a hotkey for it go to(cont'd)
2. another macro which would hit that spot until it is out of metal or (cont'd)
3. I am carrying too much weight, in which case I'd need something to walk to nearest forge to smelt the metal(would I have to do this by each metal TYPE, so if I wanted it to smelt everything from Iron to Valorite, I'd actually need to record me smelting each type of metal. If I chose "convert to item type" for iron it would only smelt the iron) , then walk back to the mining spot, and resume mining. I wish it were as simple as just telling it what coords to go to. I know you can do this with EasyUO but even then it's not that easy. Take perhaps the hardest example. You want your character to walk from the southern end of the continent to the northern end, it's just not for some reason intelligent enough to walk around every obstacle on the way, not to mention the fact of other variables like monsters, dire wolves, and Pkers(those won't be an issue in the Minoc mines, cept for Pk's but I'm willing to take the chance) Though, whenever a monster is following me they never seem to have any problem walking around anything once they have "locked on" to me.
4. To be able to set it so that when I have the required amount of Ingots for it to recall (I won't try walking back, seems too difficult) to the bank, and bank the ingots.

Just the problem, I've been told, is that once macro number 2, invoked from macro number 1 completes, it will not go back to macro number 1 and walk to the next spot.
 

randale

Sorceror
as for the subroutine, I don't see your problem using your second macro to re-invoke your first one, are you using if/else statements? to have your second macro return to the first,

set up a hotkey to both macros, and while recording your macro, press the hotkey assigned to your other macro to record it.(do this with both macros to switch the pointer back and forth, or to other macros) then put in an if/else statement to point to the subroutine

Yeah, but it will start at the beginning of my first macro, I need it to start where it left off before the other macro was invoked.
 

3tree

Sorceror
So, I'd need basically four things.

1. A macro to walk to each spot, then I'd record it hitting it, then it I'd put in a hotkey for it go to(cont'd)
2. another macro which would hit that spot until it is out of metal or (cont'd)
3. I am carrying too much weight, in which case I'd need something to walk to nearest forge to smelt the metal(would I have to do this by each metal TYPE, so if I wanted it to smelt everything from Iron to Valorite, I'd actually need to record me smelting each type of metal. If I chose "convert to item type" for iron it would only smelt the iron) , then walk back to the mining spot, and resume mining. I wish it were as simple as just telling it what coords to go to. I know you can do this with EasyUO but even then it's not that easy. Take perhaps the hardest example. You want your character to walk from the southern end of the continent to the northern end, it's just not for some reason intelligent enough to walk around every obstacle on the way, not to mention the fact of other variables like monsters, dire wolves, and Pkers(those won't be an issue in the Minoc mines, cept for Pk's but I'm willing to take the chance) Though, whenever a monster is following me they never seem to have any problem walking around anything once they have "locked on" to me.
4. To be able to set it so that when I have the required amount of Ingots for it to recall (I won't try walking back, seems too difficult) to the bank, and bank the ingots.

Just the problem, I've been told, is that once macro number 2, invoked from macro number 1 completes, it will not go back to macro number 1 and walk to the next spot.

@ your step 1,
not exactly, first of all, I would highly recomend that you do not record walking into your macro, it does not work properly in razor, you have to worry about lag, about queues building up, and other things, sufice it to say that walking and razor just do NOT go hand in hand, use a runebook if you have to and recall or moongate around.

@ your step 2
yes, that will work, simply use if system message "there is not enough metal bearing ore there to dig" or whatever it says,

@ your step 3
this step is kinda tricky, i have trouble with this one myself. teh best i've been able to do since the stack sizes of ore piles has changed a year or so ago is to attempt to smelt the ore types one at a time into ingots and transfer them to my pack animal, and loop that macro untill my character gets his weight down to about 50-100 stones above his minimum, it will not work perfectly every time because if you have just 1 ore in your backpack of one type, and you have 100 ore in your backpack of another type but the stacks are shaped the same, only one will get clicked, (in my experience, razor usualy clicks on the smaller stack -_- )

Just the problem, I've been told, is that once macro number 2, invoked from macro number 1 completes, it will not go back to macro number 1 and walk to the next spot.

yes, this is another issue, although the macro will return to the first macro properly, it won't start where you want it to, this might be able to be done with "loop for" but i do not personally know enough about it, the best i've been able to do is simply not loop the macro and make it ... very very very long and tedius so that instead of razor following the same commands over and over and over and over and over again it will just follow a long long long long string of commands without a loop, the only problem with this method (besides the brain melting tedium) is that it's not an endless loop and it will only run as long as you set it up to. (you will need many runebooks in your backpack to keep all of the different locations that you will go to, I use about 30 for just mining, and another 30 for lumberjacking)

keep in mind that while making this macro, if you do decide to use a pack animal, it is not easy, if even possible, to automate picking things up out of a pack animal. I believe this is intentional to put a barrier in front of afk resource gathering and if so it is rather effective.

*** side note, I do not support afk resource gathering, even if you do make this macro able to run completely independently I implore you to NOT BE AFK, afk resource gathering only stands to damage the server you play, not to mention the possibility of having the ban-hammer shoved up your ass ***
 

randale

Sorceror
*** side note, I do not support afk resource gathering, even if you do make this macro able to run completely independently I implore you to NOT BE AFK, afk resource gathering only stands to damage the server you play, not to mention the possibility of having the ban-hammer shoved up your ass ***

My shard actually doesn't allow it. But, I could, however run three simultaneous accounts with 3 windows mining at the same time. I'd have to keep an eye on all three. If people do not non-afk automated mine I wonder how they are getting 30K ingots (which I wanted to buy from another player actually, but figured it's just not worth the cost)

Also, I wonder if I do use EasyUO how are they going to know? Is it detectable somehow? If a GM shows up I could just say I am using razor.
 

3tree

Sorceror
as long as you're playing a private server of UO, I don't think anybody cares if you use ezuo, both razor and ezuo are legal (i think, i've never used ezuo personally) but I know that there are NO splash programs that are legal to use on official servers.

for the record, I have heard that razor is undetectable by EA's servers but I in no way back this up nor state sources

also, I have personally never gathered resources while afk and I myself have over 100k ingots not in use AND I have 2 legendary smiths, so it is possible to do this without being an afk resource gatherer
 

LightShade

Sorceror
Here's my Recall Mining Macro:
This macro uses Restock and Organize Agents. Your Organize Agent needs to have all FOUR types of ore piles added to it in order for it to organize properly. The kinds of ore (shadow, valorite, etc...) do not matter. Your restock agent makes sure you have 20 ingots, 5 of each reg, and a tinkerer's toolkit. This macro will, on the fly, tinker a shovel if it breaks and keep going.
  • This macro assumes you have Sufficient Magery to Recall with Reagents.
  • This macro assumes you have High (preferrably GM) Hiding.
  • This macro assumes you have Sufficient Tinkering to not fail making a Shovel.
  • This macro assumes you have High (preferrably GM) Meditation.
This macro hides your miner immediately after he recalls to a mining spot or to the bank. The timing on it is designed to allow you to passively meditate and let the Hiding "cooldown" period lapse before attempting to hide again.

Initial Restock of Items Needed: (Tinkerer's Tools, 20 Ingots, 5 of each Reagent)
Code:
Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank
Assistant.Macros.PauseAction|00:00:00.5000000
Assistant.Macros.HotKeyAction|0|Restock Agent-1
Assistant.Macros.AbsoluteTargetAction|0|0|1078824437|117|145|0|3701
Assistant.Macros.PauseAction|00:00:12
The AbsoluteTargetAction in this section is the bag in your bank box where your supplies are kept.

Recalls to Mining location from Runebook in Bank:
Code:
Assistant.Macros.DoubleClickAction|1081627430|3834
Assistant.Macros.WaitForGumpAction|1431013363|False|300
Assistant.Macros.GumpResponseAction|5|0|0
Assistant.Macros.PauseAction|00:00:02
Assistant.Macros.UseSkillAction|21
Assistant.Macros.PauseAction|00:00:01.2500000
Assistant.Macros.ForAction|20
Assistant.Macros.DoubleClickTypeAction|3897|True
Assistant.Macros.IfAction|4|0|no item of type shovel
Assistant.Macros.PauseAction|00:00:00.5000000
Assistant.Macros.DoubleClickTypeAction|7865|True
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|7154
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|1|3999|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|11|3897|0
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.GumpResponseAction|1|0|0
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.EndIfAction
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.AbsoluteTargetAction|1|0|0|5942|2907|27|0
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.EndForAction

Code for your Runebook's SPECIFIC ID:
Code:
Assistant.Macros.DoubleClickAction|1081627430|3834
Note the large number in red. This is the number for your runebook. In order to get this number, just record a junk macro where you open your runebook.

Code for any Runebook's runes and how it works:
Code:
Assistant.Macros.GumpResponseAction|5|0|0
This code here tells Razor which rune in the Runebook to Recall to. The "5" is the 1st Rune in the Runebook. They increment by 6 each time. So, the next rune in the runebook would have an "11" where the "5" is in this line...and so on.

The AbsoluteTargetAction in this section of code is the exact tile that you want Razor to mine for each specific location. You will have to set this manually in-game for each spot in your runebook. It takes a bit of time initially, but saves you massive amounts of time in the long run.

Recalls back to Bank and organizes ore to bank and restocks if necessary:
Code:
Assistant.Macros.MacroCastSpellAction|32
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.AbsoluteTargetAction|0|0|1076541844|129|66|0|7956
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.UseSkillAction|21
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.HotKeyAction|0|Organizer Agent-1
Assistant.Macros.PauseAction|00:00:05
Assistant.Macros.HotKeyAction|0|Restock Agent-1
Assistant.Macros.AbsoluteTargetAction|0|0|1078824437|117|145|0|3701
Assistant.Macros.PauseAction|00:00:10

The first AbsoluteTargetAction in this section is the ONE rune that your miner actually carries. Its your rune back to the bank.

Your organizer agent takes the ore and puts it in a bag in your bank. You setup which bag it is in the Agents Tab of Razor.

The last AbsoluteTargetAction in this section is the same Resources Bag you used at the beginning to restock from.

Code:
Assistant.Macros.HotKeyAction|0|Play: Resources\Mining2

This calls your next Razor Macro...which is usually another runebook for me.

I have attached the full razor code for your viewing pleasure.

Good Luck!

-L/S
 

Attachments

  • Mining.txt
    26.8 KB · Views: 109

sp1d3yman

Wanderer
Here's my Recall Mining Macro:
This macro uses Restock and Organize Agents. Your Organize Agent needs to have all FOUR types of ore piles added to it in order for it to organize properly. The kinds of ore (shadow, valorite, etc...) do not matter. Your restock agent makes sure you have 20 ingots, 5 of each reg, and a tinkerer's toolkit. This macro will, on the fly, tinker a shovel if it breaks and keep going.
  • This macro assumes you have Sufficient Magery to Recall with Reagents.
  • This macro assumes you have High (preferrably GM) Hiding.
  • This macro assumes you have Sufficient Tinkering to not fail making a Shovel.
  • This macro assumes you have High (preferrably GM) Meditation.
This macro hides your miner immediately after he recalls to a mining spot or to the bank. The timing on it is designed to allow you to passively meditate and let the Hiding "cooldown" period lapse before attempting to hide again.


Initial Restock of Items Needed: (Tinkerer's Tools, 20 Ingots, 5 of each Reagent)
Code:
Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank
Assistant.Macros.PauseAction|00:00:00.5000000
Assistant.Macros.HotKeyAction|0|Restock Agent-1
Assistant.Macros.AbsoluteTargetAction|0|0|1078824437|117|145|0|3701
Assistant.Macros.PauseAction|00:00:12
The AbsoluteTargetAction in this section is the bag in your bank box where your supplies are kept.

Recalls to Mining location from Runebook in Bank:
Code:
Assistant.Macros.DoubleClickAction|1081627430|3834
Assistant.Macros.WaitForGumpAction|1431013363|False|300
Assistant.Macros.GumpResponseAction|5|0|0
Assistant.Macros.PauseAction|00:00:02
Assistant.Macros.UseSkillAction|21
Assistant.Macros.PauseAction|00:00:01.2500000
Assistant.Macros.ForAction|20
Assistant.Macros.DoubleClickTypeAction|3897|True
Assistant.Macros.IfAction|4|0|no item of type shovel
Assistant.Macros.PauseAction|00:00:00.5000000
Assistant.Macros.DoubleClickTypeAction|7865|True
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|7154
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|1|3999|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|11|3897|0
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.GumpResponseAction|1|0|0
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.EndIfAction
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.AbsoluteTargetAction|1|0|0|5942|2907|27|0
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.EndForAction

Code for your Runebook's SPECIFIC ID:
Code:
Assistant.Macros.DoubleClickAction|1081627430|3834
Note the large number in red. This is the number for your runebook. In order to get this number, just record a junk macro where you open your runebook.

Code for any Runebook's runes and how it works:
Code:
Assistant.Macros.GumpResponseAction|5|0|0
This code here tells Razor which rune in the Runebook to Recall to. The "5" is the 1st Rune in the Runebook. They increment by 6 each time. So, the next rune in the runebook would have an "11" where the "5" is in this line...and so on.

The AbsoluteTargetAction in this section of code is the exact tile that you want Razor to mine for each specific location. You will have to set this manually in-game for each spot in your runebook. It takes a bit of time initially, but saves you massive amounts of time in the long run.

Recalls back to Bank and organizes ore to bank and restocks if necessary:
Code:
Assistant.Macros.MacroCastSpellAction|32
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.AbsoluteTargetAction|0|0|1076541844|129|66|0|7956
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|Bank
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.UseSkillAction|21
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.HotKeyAction|0|Organizer Agent-1
Assistant.Macros.PauseAction|00:00:05
Assistant.Macros.HotKeyAction|0|Restock Agent-1
Assistant.Macros.AbsoluteTargetAction|0|0|1078824437|117|145|0|3701
Assistant.Macros.PauseAction|00:00:10

The first AbsoluteTargetAction in this section is the ONE rune that your miner actually carries. Its your rune back to the bank.

Your organizer agent takes the ore and puts it in a bag in your bank. You setup which bag it is in the Agents Tab of Razor.

The last AbsoluteTargetAction in this section is the same Resources Bag you used at the beginning to restock from.

Code:
Assistant.Macros.HotKeyAction|0|Play: Resources\Mining2

This calls your next Razor Macro...which is usually another runebook for me.

I have attached the full razor code for your viewing pleasure.

Good Luck!

-L/S

can this be modified to recall home use a secure and smelt and also check for Lrc suit
 
Top