Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ A stupid variable question.
|
A stupid variable question.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Windmill_Man
USA (29 posts) Bio
|
| Date
| Mon 05 Apr 2010 10:01 PM (UTC) |
| Message
| 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? | | Top |
|
| Posted by
| Twisol
USA (2,257 posts) Bio
|
| Date
| Reply #1 on Mon 05 Apr 2010 10:06 PM (UTC) |
| Message
| | 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"). |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | | Top |
|
| Posted by
| Windmill_Man
USA (29 posts) Bio
|
| Date
| Reply #2 on Mon 05 Apr 2010 10:20 PM (UTC) Amended on Mon 05 Apr 2010 11:13 PM (UTC) by Windmill_Man
|
| Message
| 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... | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Tue 06 Apr 2010 04:59 AM (UTC) |
| Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Windmill_Man
USA (29 posts) Bio
|
| Date
| Reply #4 on Wed 07 Apr 2010 04:33 AM (UTC) |
| Message
| 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? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #5 on Wed 07 Apr 2010 05:32 AM (UTC) |
| Message
| 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 evaluates aliases. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Windmill_Man
USA (29 posts) Bio
|
| Date
| Reply #6 on Wed 07 Apr 2010 05:51 AM (UTC) |
| Message
| | Thanks a lot Nick. Slowly but surely... I am getting a grasp on how to use MUSHclient. | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
21,444 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top