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.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Alias Snippet
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Alkarindil
Brazil (70 posts) Bio
|
Date
| Fri 11 Apr 2008 06:45 PM (UTC) |
Message
| I told in the last topic I was looking for an alias snippet.
I found it here: http://www.smaugmuds.org/index.php?a=files&s=viewfile&fid=19
I want to know:
Someone ever used this mod?
It's working quite well, but I want to make possible the use of more than one command in an alias. Someone have ever done this before?
For example:
<10hp 10mn 10mv> alias gohome n ; n ; e ; ne ; n
Player goes north twice, east, northeast and north with the alias "gohome". | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Fri 11 Apr 2008 07:29 PM (UTC) |
Message
| Not sure if anybody has done it, but it would be easy enough to do. Just iterate over the string looking for semi-colons, and then interpret the command up till then, and so forth.
But note that you might introduce exploits into your game. Some commands have delays based on handling incoming network data; an alias that just interprets them all in one go will remove that delay.
Also note that this should probably be in the SMAUG section, not the general programming section. :-) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,102 posts) Bio
Forum Administrator |
Date
| Reply #2 on Fri 11 Apr 2008 09:47 PM (UTC) |
Message
| I have moved your thread to the SMAUG section.
As for the question, why bother? If someone is sophisticated enough to use aliases, they will probably have one of the MUD clients that supports them anyway (and command stacking).
After all, MUSHclient is free, that sort of stuff is implemented in that. There are also other good MUD clients around which are free or cheap. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Darwin
USA (125 posts) Bio
|
Date
| Reply #3 on Sat 12 Apr 2008 12:18 AM (UTC) |
Message
| I had the alias snippet added to my source, but I recoded it to use Lua instead. I also tried to allow multiple commands but I ran into the exploit David mentioned and removed that feature before I ran the code live. What I was able to do though was to allow setting variables.
The only reason I can see that the alias snippet should be used is for people who play from work or other places where they don't have access to a MUD client and have to rely on using a basic telnet client instead. Having aliases loaded by the MUD instead of client allows players to play from anywhere and still have their aliases available to them. | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #4 on Sat 12 Apr 2008 12:44 AM (UTC) |
Message
| Another reason to have aliases on the MUD is in case there is some semantic value to them that the client wouldn't be aware of. This would be coupled with a character-by-character mode I mentioned a while ago. Imagine you had an alias "potion" that took as an argument the name of a potion and executed something like "get [potion] bag; drink [potion]". A MUD client could do that, yes, but the server alias could be aware that the argument is supposed to be an object or potion; it could then enable tab-completion (the client would have to send the tab character to the MUD) to autocomplete the argument to an appropriate string.
Basically, if your MUD implemented something like a shell instead of just a string interpreter, it could be useful to move things like aliases to the MUD-shell level. But without, the only advantage I see for MUD-side aliases is what Darwin mentioned. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | 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,548 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top