5 replies [Last post]
Totek
Totek's picture
User offline. Last seen 1 year 50 weeks ago. Offline
Joined: 09/14/2009
Posts: 18

Hi All,

Forgive me here, since I haven't actually _tried_ this before asking:

Can one command store a variable that another one can read? I'm envisioning a toggle that will let me switch between single-target and AoE rotations without having to mess with rebinding.

I will take a run through the docs again, since that might also clear up this question.

Thanks,
Tot

Totek
Totek's picture
User offline. Last seen 1 year 50 weeks ago. Offline
Joined: 09/14/2009
Posts: 18
aha!

I think this section of the documentation answers my question:

Variables
Variables in GCP may be set by calc, set and get commands (along with a few special cases set by the system or user functions)
[=null]Once a variable is set, it can be used in any command[/] by enclosing its name in percent symbols (e.g. %MyVar%). The value of the variable will be substituted where this placeholder is found. These placeholders can be used in any part of a command line.

--Tot

VonHenry
VonHenry's picture
User offline. Last seen 1 year 51 weeks ago. Offline
Joined: 11/20/2009
Posts: 45
Ooooh - Share Please!

Tot,

If you get your 'dynamic' rotation (Single/AoE) working, please let us know.
Would love to see it in the tips/tricks section!

-Von

Phil
Phil's picture
User offline. Last seen 2 weeks 2 days ago. Offline
Joined: 06/30/2009
Posts: 571
An example

I changed the standard zoom to be a toggle

if %IAmZoomed% = 1
Std
Set IAmZoomed,0
else
Max
Set IAmZoomed,1
endif

Variables are retained between commands. In this case I'm using a simple state variable, so that the command knows what it did last.

Another example:

If we look at the standard interact macro:

Msg Select character to interact
<<All>>
Macro /assist %$Leader%
Chan 1
Get Toon,1 Thru 5, or 6 for All
Msg
if %Toon% > 5
<<All>>
Hit -
Chan 1
else
Chan %Toon%
Hit -
endif

You can see that the variable toon gets set. I added a line:

set SaveToon,%Toon%

Then used it in a new command called "LootAgain"

<<All>>
Macro /assist %$Leader%
Chan 1
Set Toon,%SaveToon%
if %Toon% > 5
<<All>>
Hit -
Chan 1
else
Chan %Toon%
Hit -
endif

This means I can use interact the first time to loot on a specific toon, then next time, just use lootagain. This saves a keystroke, but more importantly, means I don't forget who I'm looting on.

Phil

__________________

Designer Of GameCommanderPro - www.GameCommanderPro.com
Designer Of KeyBlaster - www.keyblaster.com

Totek
Totek's picture
User offline. Last seen 1 year 50 weeks ago. Offline
Joined: 09/14/2009
Posts: 18
Thanks again Phil

I will post the commands when I get things worked out.

I figure I will have a command that acts as a toggle between single/AoE, then my main spammable command will call one of two other commands depending on the toggle state.

-Tot

VonHenry
VonHenry's picture
User offline. Last seen 1 year 51 weeks ago. Offline
Joined: 11/20/2009
Posts: 45
Love This -

Phil wrote:

You can see that the variable toon gets set. I added a line:

set SaveToon,%Toon%

Then used it in a new command called "LootAgain"

<<All>>
Macro /assist %$Leader%
Chan 1
Set Toon,%SaveToon%
if %Toon% > 5
<<All>>
Hit -
Chan 1
else
Chan %Toon%
Hit -
endif

This means I can use interact the first time to loot on a specific toon, then next time, just use lootagain. This saves a keystroke, but more importantly, means I don't forget who I'm looting on.

Phil

I love you Phil! :) My word this will make it so much nicer. I know it's just "1" keystroke, but remembering which toon you're on, from loot to loot on collection quests honestly can be a pain if there is more than 30 seconds between loots! *lol*