Gammon Forum
Entire forum
MUSHclient
General
Aliases
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Chaosmstr
(21 posts) bio
|
Date
| Tue 09 Sep 2014 04:14 AM (UTC) |
Message
| Yes, I'm feeling dumb, but I'm learning a lot. Once again it seems to be subtle nuances that I'm missing, but I'm catching on!
I am trying to set up an alias to cast a spell.
Sometimes I want to cast it on myself, sometimes on others.
The following assumes that "armor<cr>" is on me, while "armor joe<cr>" is someone else.
If it's on me, it sets a variable to check if I loose concentration (in which case another trigger keeps casting it till it sticks) and if it's not on me, then I have to re-cast it manually.
Here's the alias.
<aliases>
<alias
match="armor*"
enabled="y"
expand_variables="y"
group="spells"
send_to="12"
sequence="100"
>
<send>if %1 == nil then
SetVariable("carm","1")
send ("cast armor") -- self cast
else
send ("cast armor %1") -- cast on other
end</send>
</alias>
</aliases>
and get an error of:
Error number: 0
Event: Compile error
Description: [string "Alias: "]:1: unexpected symbol near '=='
Called by: Immediate execution
I've tried a %%1 with no success as well. | top |
|
Posted by
| Chaosmstr
(21 posts) bio
|
Date
| Reply #1 on Tue 09 Sep 2014 04:14 AM (UTC) |
Message
| And how does one set the code in it's own little window like y'all are doing, makes it so much easier to read. | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #3 on Tue 09 Sep 2014 05:37 AM (UTC) |
Message
|
This also isn't right:
More like:
See the FAQ for more details. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Chaosmstr
(21 posts) bio
|
Date
| Reply #4 on Tue 09 Sep 2014 05:52 AM (UTC) |
Message
| RTFM.. Gotcha.
Thanks for your help Nick.
Read the FAQ's first.. gotcha.
Sorry for the timewaster. :)
CM | 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.
12,852 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.