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
➜ Super Duper Simple Question
Super Duper Simple Question
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Cera
USA (4 posts) Bio
|
Date
| Mon 18 Aug 2008 06:17 PM (UTC) |
Message
| Ok, I hope I am really missing something basic, because I simply cannot figure out how to set an alias with a variable.
I play aardwolf, and I have been using zmud. What I'm used to is this:
in the command line, I type
#var spellname immolate
#alias {cass} {cast @spellname}
and afterwards, when I type "cass" in the command line, "cast immolate" goes to the mud, and if I type "cass dragon" then "cast immolate dragon" goes to the mud.
ok, how do I get that to work in here?
-dana | Top |
|
Posted by
| WillFa
USA (525 posts) Bio
|
Date
| Reply #1 on Mon 18 Aug 2008 07:33 PM (UTC) |
Message
| CTRL+SHIFT+9 brings up the add alias dialog.
match: cass*
Send: cast immolate %1
From the command line, it's a bit messier in that you'd need to call the scripting character (normally / ) and then...
/AddAlias ("immolate", "cass *", "cast immolate %1", 1)
(Note: the default scripting engine, Lua, is case sensitive.) | Top |
|
Posted by
| Cera
USA (4 posts) Bio
|
Date
| Reply #2 on Mon 18 Aug 2008 07:50 PM (UTC) |
Message
| what about the variable, I need to be able to change the spell cast as I get new spells...
-dana | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Mon 18 Aug 2008 08:52 PM (UTC) |
Message
| |
Posted by
| Cera
USA (4 posts) Bio
|
Date
| Reply #4 on Mon 18 Aug 2008 10:02 PM (UTC) |
Message
| so, if I understand this right, the following will do what I want?
<aliases>
<alias
match="newspell *"
enabled="y"
variable="spellname"
send_to="9"
sequence="100"
>
<send>%1</send>
</alias>
</aliases>
<aliases>
<alias
match="cass"
enabled="y"
expand_variables="y"
sequence="100"
>
<send>cast @spellname</send>
</alias>
</aliases>
<aliases>
<alias
match="^cass( .*){0,1}$"
enabled="y"
regexp="y"
sequence="100"
>
<send>cast @spellname%1</send>
</alias>
</aliases>
did I get that right? I can type "newspell immolate" then "cass dragon" and the mud will get "cast immolate dragon"?
-dana | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Mon 18 Aug 2008 10:13 PM (UTC) |
Message
| You could always try it and see ... :-)
You left out expand_variables="y" in your third alias, as that uses the variable "spellname" that should be checked there as well. Otherwise, it seemed to work when I tried it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Cera
USA (4 posts) Bio
|
Date
| Reply #6 on Mon 18 Aug 2008 10:23 PM (UTC) |
Message
| ok, I added the line.
now, one more question... how do I get this code into the client? I can't put it in the command line, I tried that. So which menu item or dialog box can I copy and paste this into?
and why is this so difficult? I have a ton of aliases, triggers, and macros that would have to be converted... I don't get it.
-dana | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #7 on Mon 18 Aug 2008 10:39 PM (UTC) |
Message
| It's not really that hard to make those aliases in the GUI... it's just different from what you're used to. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #8 on Tue 19 Aug 2008 12:26 AM (UTC) |
Message
|
Quote:
and why is this so difficult?
When you read the FAQ items I directed you to, there was a line:
See http://mushclient.com/pasting for hints on how to copy those examples and paste them into MUSHclient.
If you do that, then it is easy to copy those examples into the client. However as David says, the GUI interface is your friend, you can check settings like expand variables easily enough.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #9 on Tue 19 Aug 2008 12:30 AM (UTC) |
Message
| When I was playing Aardwolf recently, I started using a complicated set of aliases like you have, but really, it isn't that hard, because Aardwolf remembers your target.
So what I ended up doing was simply using the Macro configuration screen to set up various things (like F2, F3, F4 etc.) to do things like:
F2: cast 'magic missile'
F3: cast 'immolate'
F4: cast 'cause serious'
(and so on).
Now the trick is to get your target, so I usually start of with:
k kobold
(or whatever the enemy is) and then just mash away at F2/ F3 / F4 etc. Since the MUD remembers the target, you can quickly cast various spells that way. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #10 on Tue 19 Aug 2008 06:53 AM (UTC) |
Message
| |
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.
25,449 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top