Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Aerin
Newbie


Joined: 02 Sep 2004
Posts: 3
Location: Dallas, TX

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
Aerin
Newbie


Joined: 02 Sep 2004
Posts: 3
Location: Dallas, TX

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net