Results 1 to 3 of 3
  1. #1
    Player
    IHhD's Avatar
    Join Date
    May 2019
    Posts
    4
    Character
    Gwendolyn Able
    World
    Midgardsormr
    Main Class
    Conjurer Lv 18

    Macro [harm]/[noharm] (Multiple Conditions) Question

    Is it possible to apply conditions to macros?
    I.e.,
    /cast harmful spell if targeting an enemy; friendly spell if targeting a friendly

    I would like to apply two spells/abilities/actions (at least) to a keystroke.

    I'm liking that I'm able to tie a specific spell with a specific ability to the same keystroke. I would like to expand on these through adding conditions to these type of macro setups.
    (0)

  2. #2
    Player
    Raldo's Avatar
    Join Date
    Jul 2011
    Posts
    2,563
    Character
    Raldo Volca
    World
    Coeurl
    Main Class
    Marauder Lv 80
    Can you apply conditions to macros? No. However, it is still technically possible to do what you're asking.

    IMPORTANT CAVEAT: Generally speaking, macros for most combat actions is a bad idea. They perform slower than just putting the actions on a hotbar by themselves, and are prone to errors if you mash them repeatedly. The macro system in this game is NOT good, and I DO NOT recommend using them unless you have some sort of disability that requires such a macro.

    If you are dead set on doing this, however, simply put both actions in the macro. Put the offensive one first. If you are targetting an enemy, it will use the offensive action, if not, it will use the friendly one. It's not really a conditional, per se. This only works because the game does not allow you to cast offensive actions on allies, so if that one errors out, it continues on down to the next line. Heck, even the action order probably doesn't matter, since you can't cast friendly actions on enemies.

    /micon "Brand of Earth"
    /macroerror off
    /ac "Stone" <t>
    /ac "Cure" <t>

    Something like that.

    - Line one sets the macro image (so it's not just a grey square with an M)
    - Line two stops the chat log from getting spammed with error messages like "You can't do that, you're not targetting an enemy", "You can't do that, you're currently casting a spell", etc.
    - Line three is your offensive action.
    - Line four is your friendly action.
    (1)
    Last edited by Raldo; 05-15-2019 at 02:26 PM.

  3. #3
    Player
    Rongway's Avatar
    Join Date
    Aug 2013
    Posts
    4,143
    Character
    Cyrillo Rongway
    World
    Hyperion
    Main Class
    Black Mage Lv 100
    Quote Originally Posted by Raldo View Post
    Heck, even the action order probably doesn't matter, since you can't cast friendly actions on enemies.
    Order is critical, actually. Healing actions coerce a self-target if you attempt to use them on an enemy. This is a feature intended to make it easier for you to heal yourself during solo play. If you put Cure <t> first, you will always cast Cure.

    Cure <mo> would not suffer this problem, however.
    (1)