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
ballegator
Novice


Joined: 19 Jun 2001
Posts: 30
Location: USA

PostPosted: Tue Jan 06, 2004 8:27 pm   

Seeking Alias(?)
 
I can't figure out how to set it up so that when I emote, I get a random emote from a list I designate. For example the smile emote. If I type smile, I want it to choose from a list of three smile emotes. Can someone help?
Reply with quote
Guede
Wanderer


Joined: 30 Nov 2003
Posts: 65
Location: United Kingdom

PostPosted: Tue Jan 06, 2004 9:01 pm   
 
Hi,

This works on my MUD where you would type smile like a fox to emote "smiles like a fox" smile shyly to emote "smiles shyly". You can of course change the relevant bits to suit your own tastes as these were only created as an example for you. (or the MUD smile command)

Alias Name:

smile

Value:

#VAR smlist {sweetly|menacingly|slyly}
~smile %item(@smlist,%random(1,3))

What it does is creates a list of 'ways I've decided I can smile' in the first line. Then in the second line sends 'smile' to the MUD followed by a random item from the list of 3. If you want to be flash you can change the '3' in that line to something that counts the number of elements in the list so that if you add more ways to smile in the future that's all you need to do.

Maybe someone has another or better way of doing this, but I hope this helps.

-G-
Reply with quote
Guede
Wanderer


Joined: 30 Nov 2003
Posts: 65
Location: United Kingdom

PostPosted: Tue Jan 06, 2004 9:03 pm   
 
Oh to add, if you wanted you could of course have the variable smlist created elsewhere, or in your login script and the alias will work fine without assigning the same values to it everytime you run it. If you do that though, you are better off changing the '3' to a %countlist(@smlist) (is that correct?) formula so if you change the list the alias will still work.

-G-
Reply with quote
ballegator
Novice


Joined: 19 Jun 2001
Posts: 30
Location: USA

PostPosted: Wed Jan 07, 2004 4:22 am   
 
Ok, i'm an absolute dweeb on this type of stuff. So if I use what you wrote but I had a list of say 5 smiles, I would change the 3 to a 5 and add my smiles in the first line?
Reply with quote
ballegator
Novice


Joined: 19 Jun 2001
Posts: 30
Location: USA

PostPosted: Wed Jan 07, 2004 6:12 am   
 
Actually, let me explain further. I have a few smiles aliased on my mud. Smile1, smile2, smile3, etc. I want to be able to just type 'smile' and have one of those aliased smiles come up. Is that better explained?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Wed Jan 07, 2004 6:27 am   
 
Then, you would do this:

#alias emote {#VAR smlist {smile1|smile2|smile3|smile4};%item(@smlist,%random(1,%numitems(@smlist)))}

If you have any more emotes you would like to choose from, just add to the @Smlist variable.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jan 07, 2004 10:58 am   
 
#AL smile {smile%random( 1, 5)}
Reply with quote
ballegator
Novice


Joined: 19 Jun 2001
Posts: 30
Location: USA

PostPosted: Wed Jan 07, 2004 3:03 pm   
 
You know? Things don't get any easier than this. Thank you LIGHTBULB. Not only does it work, it's simple.
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