Reagent Buying, the automated way!

Discussion in 'Guides' started by Rick O'Connell, Apr 18, 2016.

  1. Rick O'Connell

    Rick O'Connell Member

    Joined:
    Apr 8, 2014
    Messages:
    94
    Likes Received:
    66
    It has been brought to my attention that it just isnt fair that a select few can manipulate a loophole in their favor, while others cant. So to help even the playing field I bring you my automatic/afk reagent gathering macro series! If you need help with this, or find errors in my explanation shoot me a PM or hit me up in IRC so I can correct it so that all may benefit in the end! Place all these macros in a folder within your razor/macro folder called Reagent Buy (case sensitive)

    This macro will run unattended and will do sanity checks on a lot of things to make sure it is progressing as it should and correct itself if not (for the most part at least) It runs kind of slow to compensate for lag but thats fine...as long as the 6 shops complete withiin 30 minutes. Once it is complete it will wait for 3 world saves then start over again, ensuring that all vendors are restocked. The macro uses weight to see if you have bought anything so the chances of going overweight and spilling regs out on the ground are a big fat zero.

    So heres a list of materials you will need:

    You need a wooden box to put runebooks in your bank just to keep them organized (optional).
    You will need an organizer bag to keep in the bank that all of your supplies will go to when you bank them.
    You will need a runebook to carry with you, This should be blessed preferably but not necessary. Hold it while running macros to keep it safe if it isnt blessed. (you can still be townkilled though so have spares if your runebook isnt blessed)

    For every shop you are going to buy from you want to make a runebook so buy 6 runebooks, 6 runes for each shop, plus 4 more runes for runes to the bank. 40 total?

    Dress: Nothing but a robe unless you want to adjust the weight settings in the macros. Carry nothing in your bag except 10 each of recall regs and 2250 gold each time

    Character Profile setup:
    Organizer 10 - add all reagents/supplies. Your bag should be empty after it runs this organizer minus your spellbook/runebook - set the hotbag to the one in the bank that you bought up there ^
    Restock 4 - 10 blood moss, 10 black pearl, 10 mandrake root, 2250 gold...set the hotbag to your backpack
    Buy agents - I use each one for a single reg but I only really use 4 or 5. This lets me turn some on or off depending on what I need.
    I set the reg amount on these to 600. You will need to adjust for weight on other amounts of regs or supplies like ingots.
    Just stand at the bank and see how many ingots you can hold if thats what you are after, or how many bottles, etc so you dont max out and go over weight limit spilling precious resources on the ground for all to grab.

    Time to setup the runebook for each shop:

    Goto your first vendor shop and watch the vendors.
    Each shop usually has a couple of areas that the vendors hang out in, You will just have to sit and watch them a bit to get an idea of where they are.
    Once you see the spots, get four runes and mark them in the area where they spend most of their time. (4 different tiles).
    Put these 4 runes in the *bank book* for this shop. Place book in bank AND LEAVE IT THERE, you should never have to remove this book. Edit the numbers that are this color to be the same as that book. Use the dummy macro method below
    Go to the other spot that the vendors like to roam to and mark 2 more runes. These will go in your *carry runebook*
    Do this for up to 6 shops (the number of shops that will fit in one carry runebook using 2 backup locations for each shop with 4 left over for bank runes)
    Once you have all 6 shop's runes made put your 4 bank runes in the book. I put them in last so they are easy to change if I need to change banks. (these could also be
    to your courtyard if you wanted to modify it for that use)

    You are now ready to modify the script for your first shop, this is best done with notepad++ once you have to change a bunch of them:

    First the easy stuff...change the vendor names in both places below. Remove or add vendors to your liking.

    Create a dummy macro to save runebook id's into. I just make one called test. Start recording and double click your carry runebook, your shop runebook and then stop the macro.
    Load the test macro into notepad++ and copy the number from the line that looks like this for your carry and bank runebook:
    Assistant.Macros.DoubleClickAction|1099907336|3834

    Find this line in notepad++ inside your shop macro and replace that number with the one from above:
    Assistant.Macros.DoubleClickAction|1099907316|3834

    Once you have the carry runebook changed in the script you can save it...all other scripts will use the same
    carry book so you can just copy and paste this script to a new one each time you expand, but you will have to change the position that each uses. This is a list of them:

    • Page 1 Rune 1 = 5
    • Page 1 Rune 2 = 11
    • Page 2 Rune 1 = 17
    • Page 2 Rune 2 = 23
    • Page 3 Rune 1 = 29
    • Page 3 Rune 2 = 35
    • Page 4 Rune 1 = 41
    • Page 4 Rune 2 = 47
    • Page 5 Rune 1 = 53
    • Page 5 Rune 2 = 59
    • Page 6 Rune 1 = 65
    • Page 6 Rune 2 = 71
    • Page 7 Rune 1 = 77
    • Page 7 Rune 2 = 83
    • Page 8 Rune 1 = 89
    • Page 8 Rune 2 = 95
    Here is the shop 1 macro with a wait routine at the end instead of launching the next macro. When you add your second shop macro, just replace that line with the name of the new macro. ie Assistant.Macros.HotKeyAction|0|Play: Reagent Buy\- Shop 2 There are also 2 lines that start this macro over to do another buy, or to course correct when it misses a recall to the bank. Each one of those lines will need to be changed when you add your second macro for the second shop so forth and so on

    I have also added the wait macros as attachments so you can just download and use those as is



    // Begin Shop 1 Macro
    Assistant.Macros.SpeechAction|0|52|3|ENU|2|16|2|bank
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.UseSkillAction|21
    // Are we *really* at the bank?
    Assistant.Macros.IfAction|4|0|bank container has
    // yep! do nothing...
    Assistant.Macros.ElseAction
    // nope, recall to bank again after expressing our disgust to the world!
    Assistant.Macros.SpeechAction|0|52|3|ENU|0|UGH!
    // ~-~-~-~-~- Begin Our Recall to Bank ~-~-~-~-~-~-~-~
    // Target is carried runebook positition 13 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|77|0|0
    Assistant.Macros.PauseAction|00:00:04
    // Check to see if location is blocked 1
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    // Target is carried runebook positition 14 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|83|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // Check to see if location is blocked 2
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    // Target is carried runebook positition 15 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|89|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // Check to see if location is blocked 3
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    // Target is carried runebook positition 16 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|95|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // ~-~-~-~-~- End Our Recall to Bank ~-~-~-~-~-~-~-~
    // Start this macro over is easiest way to go about this?
    Assistant.Macros.HotKeyAction|0|Play: Reagent Buy\- Shop 1
    Assistant.Macros.EndIfAction
    // Organize to the bank twice
    Assistant.Macros.HotKeyAction|0|Organizer Agent-10
    Assistant.Macros.PauseAction|00:00:07
    //
    Assistant.Macros.HotKeyAction|0|Organizer Agent-10
    Assistant.Macros.PauseAction|00:00:03
    // Restock reagents and gold so we can go shopping again (twice)
    Assistant.Macros.HotKeyAction|0|Restock Agent-4
    // Target your character for this
    Assistant.Macros.AbsoluteTargetAction|0|0|327648|1901|2690|31|401
    Assistant.Macros.PauseAction|00:00:07
    Assistant.Macros.HotKeyAction|0|Restock Agent-4
    // Target your character for this
    Assistant.Macros.AbsoluteTargetAction|0|0|327648|1901|2690|31|401
    Assistant.Macros.PauseAction|00:00:03
    //
    // ~-~-~-~-~- Begin Our Recall to Shop~-~-~-~-~-~-~-~
    // Target is Shop 1 Runebook in bank
    Assistant.Macros.DoubleClickAction|1099914553|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|5|0|0
    Assistant.Macros.PauseAction|00:00:04
    // Check to see if location is blocked 1
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.DoubleClickAction|1099914553|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|11|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // Check to see if location is blocked 2
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.DoubleClickAction|1099914553|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|17|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // ~-~-~-~-~- End Our Recall to Shop ~-~-~-~-~-~-~-~
    // Time to buy our supplies
    Assistant.Macros.PauseAction|00:00:01
    //
    // Change the shopkeeper names in both places for each macro
    Assistant.Macros.SpeechAction|0|968|3|ENU|2|17|113|Miguel Buy
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.SpeechAction|0|68|3|ENU|2|17|113|Salihah Buy
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.SpeechAction|0|968|3|ENU|2|17|113|Foster Buy
    Assistant.Macros.PauseAction|00:00:01
    // Check weight. If no change recall to your backup locations
    Assistant.Macros.IfAction|5|0|72
    // Target is held runebook position 1
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|5|0|0
    Assistant.Macros.PauseAction|00:00:02
    // Check to see if location is blocked 1
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    Assistant.Macros.PauseAction|00:00:02
    // Target is held runebook position 2
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|11|0|0
    Assistant.Macros.PauseAction|00:00:02
    Assistant.Macros.EndIfAction
    // End recall to backup position
    Assistant.Macros.PauseAction|00:00:01
    //
    // Change the shopkeeper names in both places for each macro
    Assistant.Macros.SpeechAction|0|968|3|ENU|2|17|113|Miguel Buy
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.SpeechAction|0|968|3|ENU|2|17|113|Salihah Buy
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.SpeechAction|0|968|3|ENU|2|17|113|Foster Buy
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.EndIfAction
    // ~-~-~-~-~- Begin Our Recall to Bank ~-~-~-~-~-~-~-~
    // Target is carried runebook positition 13 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|77|0|0
    Assistant.Macros.PauseAction|00:00:04
    // Check to see if backup location 1 is blocked
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    // Target is carried runebook positition 14 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|83|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // Check to see if backup location 2 is blocked
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    // Target is carried runebook positition 15 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|89|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // Check to see if backup location 3 is blocked
    Assistant.Macros.IfAction|4|0|blocked
    // Assistant.Macros.UseSkillAction|21
    // Target is carried runebook positition 16 for easy changing
    Assistant.Macros.DoubleClickAction|1099907316|3834
    Assistant.Macros.PauseAction|00:00:01
    Assistant.Macros.GumpResponseAction|95|0|0
    Assistant.Macros.PauseAction|00:00:04
    Assistant.Macros.EndIfAction
    // ~-~-~-~-~- End Our Recall to Bank ~-~-~-~-~-~-~-~
    // So, did we get anything? Let's check
    Assistant.Macros.IfAction|5|1|72
    // Yes, lets go there again, just start this macro over again!
    Assistant.Macros.HotKeyAction|0|Play: Reagent Buy\- Shop 1
    Assistant.Macros.ElseAction
    // else action: we didnt get anything, move on to the next macro
    Assistant.Macros.HotKeyAction|0|Play: Reagent Buy\- Wait1
    Assistant.Macros.EndIfAction

    Attached Files:

    Lord Sky and Buga like this.

Share This Page