Difficulty creating an "All in one" charge macro

#showtooltip
/startattack
/use [nocombat]Battle Stance
/use [nocombat,@target,harm]Charge
/use [combat]Berserker Stance
/use [combat,@target,harm]Intercept
/use [mod:shift]Intercept

Trying to make a one button charge macro for my warrior to use charge, intercept, and intervene (when I get it at 70). I’ve messed around with it a couple times but just can’t get it to quite do what I want.

I’d like to be able to charge my target when out of combat, intercept when in combat AND be able to manually intercept outside of combat (with a modifier like shift), and intervene the friendly target I mouseover.

Another problem I have with it is that if I try to just use “#showtooltip” by itself it tends to show the stances instead of the abilities since a lot of the abilities for these macros I have to set a command to change stances before using the ability. So, I don’t know what would be the most efficient character count way to show charge/intercept/intervene in the tooltips but NOT the stances.

Try this and see if it’s close enough to what you’re looking for.
If something is off, let me know what isn’t working properly.

#showtooltip [combat]Intercept;[@mouseover,help]Intervene;[]Charge
/startattack
/cast [combat]Berserker Stance;[]Battle Stance
/cast [mod:shift,combat][combat,harm]Intercept;[@mouseover,help]Intervene;[harm]Charge
1 Like

It seems like “[ ]” works like an “else” logically? like for the showtooltip line it seems like: if combat then intercept; or if mouseover help intervene; else charge? I’m just trying to understand macro syntax.

[ ] means “Always True.”

For example, if you create a macro like this:

/cast []Charge; [@mouseover,help]Intervene

You would never Intervene, even with the correct condition being met, because the condition for charge is met no matter what. Conditions only pass on to the next one when they are not fully met.

FWIW you don’t need to use [] if it’s the only option in the set.

/cast [combat]Berserker Stance;[]Battle Stance

is the same as

/cast [combat]Berserker Stance; Battle Stance
[this, and this]
[this] [or this]
; else this

Optimized version of Skel’s macro would be:

#showtooltip [nomod:shift,@mouseover,help]Intervene;[combat]Intercept;Charge
/startattack
/cast [combat]Berserker Stance;Battle Stance
/cast [nomod:shift,@mouseover,help]Intervene;[mod:shift][combat]Intercept;Charge

Also rearranged Intervene so you can use it in combat while targeting an enemy.

So each [this] is it’s own conditional? Such as:

/use [nocombat,nomod][mod:shift] Ability Name

Meaning that ability would cast on hotkey press out of combat with no modifier -OR- at any time when using shift modifier?

Correct and it’ll execute top to bottom, left to right till the first condition set that returns true so you could optimize that example by putting the [mod:shift] first which would eliminate the need for nomod the second set.

/use [mod:shift] [nocombat] Ability Name

That’s also where [] comes in because in this example if you’re in combat and not holding shift then you’ll see the ? instead of the ability because neither set is true. So you stick [] on the end (or [@none] if you don’t want it to execute outside of your scripted conditons; usually only used for stuff you don’t want to auto self cast like BOP) so that a condition set always returns true and you see the ability.

2 Likes

Hmm ok, because my goal with the macro is to:

  1. Swap to battle stance and cast charge outside of combat (nomod)
  2. Swap to berserker and cast intercept in combat (nomod)
  3. Be able to manually enter zerker and intercept outside of combat (mod:shift)
  4. Swap to defensive stance / use Intervene on mouseover,help (mod:ctrl)
  5. Have the #showtooltip only show the charges (not stances) depending on mod being pressed.

IDK if that’s possible with the 255 character limit. Would it look something like:

#showtooltip [mod:ctrl]Intervene; [combat][mod:shift]Intercept; [ ]Charge
/use [nocombat,nomod]Battle Stance; [nocombat,nomod]Charge
/use [mod:shift][combat,nomod]Berserker Stance; [mod:shift][combat,nomod]Intervene
/use [mod:ctrl]Defensive Stance; [mod:ctrl,@mouseover,help]Intervene

Or, is there a more efficient use of character limit / way of doing it?

#showtooltip [mod:ctrl,@mouseover,help]Intervene;[mod:shift][combat]Intercept;Charge
/cast [mod:ctrl] Defensive Stance; [mod:shift][combat] Berserker Stance; Battle Stance
/cast [mod:ctrl,@mouseover,help] Intervene; [mod:shift][combat] Intercept; Charge

You should only ever have as many cast (or use) commands as things you want to do in a single press. So all the stance changes happen first, then all the movement abilities happen second.

Ideally I’d like to add some noform:# conditions to the stance casts, so it doesn’t try to switch into a stance its already in but that pushes it up to 266 chars minimum. If the stances start toggling off and on stick ! in front of each of them and see if that fixes things.

/cast [mod:ctrl]!Defensive Stance;[mod:shift][combat]!Berserker Stance;!Battle Stance

If you haven’t done so already, review these: