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
➜ Similar to a recent question....
|
Similar to a recent question....
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
| Posted by
| Tatewaki2365
(34 posts) Bio
|
| Date
| Reply #15 on Fri 17 Dec 2004 01:48 AM (UTC) |
| Message
| Now a new question arises;
When I used the 'blind' function it says "variable 'target' is not defined". Now, I know you mentions something about the 'target' before... But... I'm not sure what you mean.
And! For the last, and FINAL question (I swear) - should I copy and paste that code from above into the aliases section, and change the spell from blind to another spell each time? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #16 on Sat 18 Dec 2004 02:43 AM (UTC) |
| Message
| One of the aliases I gave should set up "target" variable. Did you install it? After installing it you should be able to type: tar blah
and "blah" will be put into variable "target". Check the variables window in world configuration to check it has done that.
To do other spells you shouldn't really have to have the tedium of copying and pasting lots of things. You could make the one alias do lots of things. Read up on regular expressions a bit more to see the power of them. Here is an example of what you could do:
<aliases>
<alias
match="^(blind|bop|heal)$"
enabled="y"
expand_variables="y"
regexp="y"
sequence="100"
>
<send>co '%1' @target</send>
</alias>
</aliases>
Now that alias lets you "blind" or "bop" or "heal" someone. It casts the spell on the variable "Target" in each case.
See how the match text matches one or the other word? And then whatever word it matched is used as the spell to cast. Nice and simple. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
65,925 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top