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
➜ comparing 2 variables
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Scouse
(17 posts) Bio
|
Date
| Fri 16 Sep 2005 07:33 AM (UTC) |
Message
| what i wish to do , is to capture a variable , and set a variable , then compare the 2 and act upon them if circumstance dictates it .
so , my one is set by thus :-
<aliases>
<alias
name="target"
match="tar *"
enabled="y"
expand_variables="y"
variable="target"
send_to="9"
ignore_case="y"
keep_evaluating="y"
sequence="100"
>
<send>%1</send>
</alias>
</aliases>
my 2nd is set thus :-
<triggers>
<trigger
match="* leaves *"
send_to="9"
sequence="100"
variable="target2"
>
<send>%1</send>
</trigger>
</triggers>
what i wish to do is to compare them and then if they are the same to head in direction %2 and K @target .
it seems like i should be able to use *leaves * to run it but i cant figure out how .
so , a train of action ..
tar paddic. - sets target as Paddic
billy leaves north. - sets target 2 as billy , compares it to target and does nothing.
betty leaves north. - sets target 2 as betty , compares it to target and does nothing.
Paddic leaves west. - sets target2 as Paddic , compares it to target , sees it as a match .
sends :-
west
K @target
| Top |
|
Posted by
| David Berthiaume
(202 posts) Bio
|
Date
| Reply #1 on Fri 16 Sep 2005 09:29 AM (UTC) Amended on Fri 16 Sep 2005 09:33 AM (UTC) by David Berthiaume
|
Message
| This is actually really easy.
This is so easy you're gonna cry when you see it.
Your alias is fine.
Your compaing 2 variables is redundant. Just use this trigger:
<triggers>
<trigger
enabled="y"
expand_variables="y"
ignore_case="y"
match="@target leaves *"
sequence="100"
>
<send>%1
k @target</send>
</trigger>
</triggers> | 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,794 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top