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
➜ Help with variable
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Jonnycuest
(3 posts) Bio
|
Date
| Sat 30 Sep 2006 01:09 AM (UTC) |
Message
| Can someone please walk me through making a variable (i.e. kick @1) which I can use to be in battle and change when I need to in order to attack other creatures of a different name? Right now I am having to go up to aliases every time I need to change my target. *sigh* Thanks! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 30 Sep 2006 03:48 AM (UTC) |
Message
| Make an alias that sets up the "target" variable like this:
<aliases>
<alias
match="target *"
enabled="y"
variable="target"
send_to="9"
sequence="100"
>
<send>%1</send>
</alias>
</aliases>
Then in your other aliases, do things like: kick @target, with "expand variables" checked.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Jonnycuest
(3 posts) Bio
|
Date
| Reply #2 on Sat 30 Sep 2006 03:53 AM (UTC) |
Message
| Thanks. I have two questions, what do put as the alias name? and also how do I change the target in the prompt? Thanks. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sat 30 Sep 2006 05:43 AM (UTC) |
Message
| Alias name? You mean the "label" field when you edit it? It can stay blank if you like.
What do you mean by "target in the prompt"?
You can copy and paste that alias straight into MUSHclient, see:
http://www.gammon.com.au/forum/?id=4777
To use it, just type:
target Fred
... or whatever, and that updates the target variable.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Malek
USA (27 posts) Bio
|
Date
| Reply #4 on Sat 30 Sep 2006 03:50 PM (UTC) |
Message
| I'm having similar issues.. I have a alias called (tar *)that reports my chosen target to the prompt. I am currently trying to figure out how to get it to also get a mud level trigger to hunt but I need it to pull the target from my @traget variable the trigger setup for the mud is (trigger Testname todo do hunt testname)
This is the alias I have so far...
<aliases>
<alias
match="tar *"
enabled="y"
group="pk"
send_to="12"
sequence="100"
>
<send>world.SetVariable("target", "%1")
world.Note("Target set to: %1" )
</send>
</alias>
</aliases>
Thanks |
Tod ist gweiss, Lebens est nicht. | Top |
|
Posted by
| Jonnycuest
(3 posts) Bio
|
Date
| Reply #5 on Sat 30 Sep 2006 04:39 PM (UTC) |
Message
| It doesn't seem to work when I type in Target Fred. The world I am playing in reacts to that command and doesn't understand it?? Sorry, I don;t know anything about coding. I used to have ZMUD before they made you pay for it. Much easier for me. *Grin* Thanks. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #6 on Sat 30 Sep 2006 09:46 PM (UTC) |
Message
|
Quote:
I am currently trying to figure out how to get it to also get a mud level trigger to hunt but I need it to pull the target from my @traget variable the trigger setup for the mud is (trigger Testname todo do hunt testname)
Your alias seems to work OK. Can you post the problem trigger?
If you need something like hunting the target, just put something like:
Match: @target leaves *
And check "expand variables".
Quote:
It doesn't seem to work when I type in Target Fred
Aliases are case sensitive, unless you check "Ignore case". Try typing: target Fred
|
- 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.
18,468 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top