[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Changing Aliases
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Changing Aliases

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


Posted by Cas   (5 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Cas   (5 posts)  [Biography] 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
[Go to top] top

Posted by Cas   (5 posts)  [Biography] 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
[Go to top] top

Posted by Cas   (5 posts)  [Biography] 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
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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)
[Go to top] top

Posted by Cas   (5 posts)  [Biography] 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
[Go to top] 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.


4,611 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]