|
Aerin Newbie
Joined: 02 Sep 2004 Posts: 3 Location: Dallas, TX
|
Posted: Thu Sep 02, 2004 10:46 pm
Random Alias Generation |
I know this is possible, but after using the help files and such, I'm not sure how to go about doing it.
How would I go about making one aliased command use a random version of the command without having to set up a 'step counter'. To clarify:
I want the command 'gd <blah>' to alias to one of several command lines that have various tags attached to them, although they all start with the MUD command 'gdt'. So, one time 'gd Hi!' may result in "gdt [Blah1] Hi!" being sent to the MUD and the next 'gd' may send "gdt [2Blah] <text>". Which aliased version of 'gdt' it chose to use, though, would be random in my perfect world. Does this make any sense? Thanks! |
|
_________________ --Aerin
zMUD user since 1995 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Sep 03, 2004 1:11 am |
#AL gd {gdt %case( %random( 1, 2), Blah1, 2Blah)}
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
Aerin Newbie
Joined: 02 Sep 2004 Posts: 3 Location: Dallas, TX
|
Posted: Fri Sep 03, 2004 4:08 pm |
Hrms...
After much testing with this, I discovered an issue. I had to change my parameters character from the %. None of the %case or %random things will fucntion properly with my new character (the +). Thanks for the help, though! |
|
_________________ --Aerin
zMUD user since 1995 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Sep 03, 2004 8:07 pm |
Obviously, + is a bad choice. I'd recommend returning to the default Parameter character.
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
|
|