A stupid variable question.

Posted by Windmill_Man on Mon 05 Apr 2010 10:01 PM — 7 posts, 22,956 views.

USA #0
When I use Nexus for Achaea... I have a variable set up for my pack. I have the word "pack" set up to mean "pack355384". This way, every time a trigger or alias sends "$pack" the actual text sent is "pack355384".

I can't figure out how to use MUSHclient's variable system. I can't figure out how to do the same thing. It's a pretty minor variable... I don't even really need it, but I figure I should learn how to do this in MUSHclient now so I won't have to figure it out later. I can't find any information on this. I've been stuck for over an hour now. The help file in MUSHclient explains what a variable is... but not how to use it. Is there something somewhere that explains how to use triggers and variables?
USA #1
You have the Game -> Configure -> Variables menu (which is also accessible from the quickbar), which lets you define variables just like Nexus'. To use them in an alias/trigger/timer/etc, you can use @varname to get (not set) the variable called varname, as long as you have Expand Variables checked for that alias/trigger/timer/etc. If you use scripting (Send to Script), you can use GetVariable("varname") and SetVariable("varname", "value").
USA #2
Awesome. Thanks a bunch. It uses the "@" character instead of the "$" character...

The Nexus help file lists all the commands possible to use with variables and triggers. Is there something like that in the MUSHclient help file? Or is all the special commands (Like Nexus'"#beep" and "#highlight") script based?

On a side note... Highlighting trigger text is easier with MUSHclient. It's GUI based instead of having to use the command: #highlight.

Took me a while to learn the stuff I did with Nexus...
Amended on Mon 05 Apr 2010 11:13 PM by Windmill_Man
Australia Forum Administrator #3
A lot of it is GUI based.

However if you bring up the "help window" (Ctrl+Alt+Shift+L) you can type in something like "trigger" to narrow down to script commands that are to do with triggers.
USA #4
I've looked high and low for an answer to this next silly question... how do you use an alias in a trigger? I've been working on it since I learned how to use a variable....

Even Google didn't help... What is everyone else getting that I'm not?
Australia Forum Administrator #5
You mean, the trigger matches, and you want to do something (eg. "heal" where "heal" is one of your aliases)?

Just send to Execute rather than send to World (in the Send To menu).

Or if you are scripting already, do Execute.

eg.


Execute "heal"


Execute evaluates aliases.
USA #6
Thanks a lot Nick. Slowly but surely... I am getting a grasp on how to use MUSHclient.