razor and calling macros inside macros?

Discussion in 'Renaissance Discussion' started by Nikolaj, Jul 31, 2017.

  1. Nikolaj

    Nikolaj New Member

    Joined:
    Jun 29, 2017
    Messages:
    22
    Likes Received:
    13
    I seem to have trouble calling macros inside macros (it seems to exit). The same happens when I have a macro where the needs for the macro aren't met, e.g. I have a mining smelting macro and there is no ore in my bag, then it exits.

    But firstly, any tricks for combining macros so they don't exit and do weird stuff?
  2. Patek

    Patek Active Member
    UO:R Donor

    Joined:
    Mar 29, 2017
    Messages:
    273
    Likes Received:
    244
    You cant resume a macro in Razor, it has to start from the beginning every time. You CAN get around this with an externally stored variable and a check each time it starts the macro. Use things like empty bottles in a bag as the counter or cloth in a bag (or similar)

    Try create one primary macro that is the central macro. You start the primary one, it checks cloth or bottles or whatever then calls another component macro that corresponds to the external variable. That other macro does its things, add/subtracts to external variable then calls the primary again.

    The primary will start to look like:

    If weight >= 5 then call macro C
    If weight >= 4 then call macro B
    If weight >= 3 then call macro A

    Etc

    Each component macro would restock another bottle, add another bottle to the variable bag(stored in the bank), then call the primary macro (until the last macro in the set, it'd remove the bottles so it loops back around). The primary macro lifts the bag, checks weight, drops it back in the bank and calls the next. Your weight will need to be kept precise for the macro to work (or use cloth, but you drop the bag into your character and open it so the display counter updates, do the check then drop it back into the bank)

    That should keep you busy
    Nikolaj likes this.
  3. Duz-luk

    Duz-luk Active Member

    Joined:
    Apr 1, 2015
    Messages:
    171
    Likes Received:
    120
    It sounds like you need to add the 4 sub types of ore to your razor counter system and use them as sentinel variables

    [​IMG]

    *note that "Ore Tiny" is what I use for the scant pieces or ore that have to be combined into at least two pieces to be smelted. This will mess up your counters so I've opted to leave them out of the smelting process in my macros. You just have to manually handle those, or discard them to the floor entirely.
    Nikolaj likes this.
  4. Nikolaj

    Nikolaj New Member

    Joined:
    Jun 29, 2017
    Messages:
    22
    Likes Received:
    13
    Okay great, how do I fill in the fields? BTW I just by mistake deleted black pearls :-/ could someone help me wit the codes for that :)
    The main thing (I guess) is Item ID, where do I find that?
  5. Duz-luk

    Duz-luk Active Member

    Joined:
    Apr 1, 2015
    Messages:
    171
    Likes Received:
    120
    You don't have to fill in anything. Press the target button and click on something in game and it will auto fill everything except the format box. That box you must fill in yourself with whatever variable name you want. Example, popcorn = pcr

    *also, after adding something make sure to look it up in the list and check mark it for it to count it

Share This Page