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
➜ Total Newb Question on Alias
Total Newb Question on Alias
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Pgolds
USA (5 posts) Bio
|
Date
| Sun 16 Aug 2009 01:13 PM (UTC) |
Message
| Hi.
I have several variables:
MainWeapon
StabWeapon
CurrentWeapon
CurrentWeapon is set with triggers depending on which weapon was wielded last.
I'm trying to set up an alias (stab) that checks if my CurrentWeapon is not equal to my StabWeapon and then wields the StabWeapon.
Similarly, I want to set up an alias (main) that checks if my CurrentWeapon is not equal to my MainWeapon and then wields the MainWeapon.
I can't seem to get the syntax right. The triggers that set CurrentWeapon are working correctly.
Any assistance would be appreciated.
| Top |
|
Posted by
| Blainer
(191 posts) Bio
|
Date
| Reply #1 on Sun 16 Aug 2009 11:17 PM (UTC) Amended on Sun 16 Aug 2009 11:31 PM (UTC) by Blainer
|
Message
| These should work.
<aliases>
<alias
match="Stab"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>
if "@CurrentWeapon" ~= "@StabWeapon" then
SendNoEcho ("wield @StabWeapon")
end
</send>
</alias>
</aliases>
<aliases>
<alias
match="Main"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>
if "@CurrentWeapon" ~= "@MainWeapon" then
SendNoEcho ("wield @MainWeapon")
end
</send>
</alias>
</aliases>
By the way if you post the aliases that have syntax error we can find out what
was wrong with them. :)
Full cut and paste aliases, triggers and timers instructions can be found here:
http://www.gammon.com.au/forum/?id=4777 | Top |
|
Posted by
| Pgolds
USA (5 posts) Bio
|
Date
| Reply #2 on Sun 16 Aug 2009 11:57 PM (UTC) |
Message
| Thanks. I didn't know the ~= syntax. I got it working with the following code:
<aliases>
<alias
match="stab"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>
if not ("@CurrentWeapon" == "@StabWeapon") then
Send "wield @StabWeapon"
end
</send>
</alias>
</aliases>
I need to get more familiar with the 'SendNoEcho' command. Is there a way to make that the default? | Top |
|
Posted by
| Blainer
(191 posts) Bio
|
Date
| Reply #3 on Mon 17 Aug 2009 12:45 AM (UTC) |
Message
| I didn't know you could do it that way thanks.
The link below has the following info.
This sends the specified text to the world. It is like typing it into the command window. The command is not echoed in the output window.
http://mushclient.com/scripts/doc.php?function=SendNoEcho
You can set MUSH to not echo your Input in Game > Configure > Commands. | 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.
16,107 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top