Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
 Entire forum ➜ MUSHclient ➜ General ➜ Changing Aliases

Changing Aliases

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Cas   (5 posts)  Bio
Date Thu 04 Dec 2008 02:52 AM (UTC)
Message

What I want to do is attach an action... "sneak" to each direction. My mud won't let you override the mud directions such as n,e,s,w, etc. So I made them in MUSHclient which in essence overrides them for me. However, this "sneak" action only works when moving in directions that are obvious exits from the room. When I am in a room without obvious exits and i type say "e" which goes in as sneak east, the mud will spit out a message and not move me.

I was wondering if there is a way to change MUSHclient aliases through a macro or trigger. I'd like to get a one word or something where i could activate/de-activate the "sneak" directions.

Thanks

Cas
Top

Posted by Nick Gammon   Australia  (23,052 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 04 Dec 2008 03:30 AM (UTC)
Message
Sure, give the alias a name (label) and then use: SetAliasOption

http://www.gammon.com.au/scripts/doc.php?function=SetAliasOption

Or if you simply want to enable/disable it:

http://www.gammon.com.au/scripts/doc.php?function=EnableAlias


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,052 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 04 Dec 2008 03:59 AM (UTC)
Message
Quote:

When I am in a room without obvious exits and i type say "e" which goes in as sneak east, the mud will spit out a message and not move me.


If you are in a room without an east exit, typing "e" wouldn't move you east anyway would it? So the alias hasn't really changed the problem?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Cas   (5 posts)  Bio
Date Reply #3 on Thu 04 Dec 2008 09:14 PM (UTC)
Message
In some rooms yes. There may be a way to go east, but you cannot actually see it. For example:

Amidst dark grey thunderclouds that are frequently illuminated by arcs of blue lightning. The canyon wall is visible in the northerly directions. Swirling wind and rain makes vision difficult beyond just a few feet.

--- You can go in various directions here, but none of them are "obvious" ones like:

This is a rather large, circular shaped chamber. The chamber is furnished with a comfortable-looking divan that lies along the northern wall, and a small altar that lies along the southern wall. Large archways stand within the eastern and western walls.
There are two obvious exits: west and east.

--- I'm going to give your suggestions a shot. I'm not very good at things besides basic timers, triggers, and aliases; so you may be hearing back from me soon!

Thanks

Cas
Top

Posted by Cas   (5 posts)  Bio
Date Reply #4 on Thu 04 Dec 2008 10:12 PM (UTC)
Message
I think I kind of know how I want to do this...

I was thinking of making an alias for each direction...

alias n = sneak north
alias e = sneak east

and group them all in a "sneak" group

that way I can enable/disable the group to go from sneak mode to normal movement mode. The only problem is, I have no idea how to do the enable/disable part. I know the help file says to do something wit:

EnableAliasGroup ("groupname", true) - but i've got no idea
Top

Posted by Cas   (5 posts)  Bio
Date Reply #5 on Thu 04 Dec 2008 10:45 PM (UTC)
Message
I think I got it. I grouped all those aliases and then made a couple aliases with those EnableAliasGroup lines for enable and disable and put them in send to script and it seems to work. Thanks for all your help.

Cas
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #6 on Thu 04 Dec 2008 11:34 PM (UTC)

Amended on Thu 04 Dec 2008 11:35 PM (UTC) by WillFa

Message
Does the mud spit out a generic fail message or a specific one?

If it's a specific one, "you can not sneak east." it'd be easiest to trigger on that ("^you can not sneak (\w+)\.$") to Send(%1)


If it's a generic fail, then changing your alias 'n' to Send To Script with:
LastDir = 'north'
Send("sneak north")

repeat for other dirs.

and trigger the fail message to:
Send(LastDir)
Top

Posted by Cas   (5 posts)  Bio
Date Reply #7 on Fri 05 Dec 2008 11:52 AM (UTC)
Message
Thanks guys, that's precisely what I was looking for. I've still got the directions grouped so I can turn them on/off if I need to.


Cas
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.


22,428 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.