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
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Fri Sep 12, 2003 11:50 pm   

Aliases and Wild Cards
 
I'm helping my friend make an alias so when they speak its different than the usual thing, but I'm having a bit of trouble... Its currently:

#ALIAS say {:says in a crisp, Illianer accent, '%1'}

It's mostly working, like when you type say hello it sends :says in a crisp, Illianer accent, 'hello'
But it doesnt work with anything more than one word. If I do say whats up it sends :says in a crisp, Illianer accent, 'whats' up

I tried:

#ALIAS say * {:says in a crisp, Illianer accent, '%1'}

But that didnt work. Like that, when I did say hi it sent say hi... I know this is possible, I've done it before, I just cant remember how...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Sep 13, 2003 12:45 am   
 
#ALIAS say {~:says in a crisp, Illianer accent, '%-1'}
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Sat Sep 13, 2003 1:10 am   
 
thanks :) is there a way to ake it so it capitalizes the beginning?
Reply with quote
moksha
Novice


Joined: 13 Oct 2002
Posts: 37
Location: United Kingdom

PostPosted: Sat Sep 13, 2003 2:33 am   
 
Hi

Instead of an alias you could use #ONINPUT.

#ONINPUT {'(?)(%w)(*)$} {#SUB {~:says in a crisp, Illianer accent, '%upper(%1)%2%3'}} "" {notrig}

You'll need to start your tells with a single quote instead of Say.

Moksha
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Sep 13, 2003 3:15 am   
 
Yes, there's a way to make it capitalize the beginning -- the SHIFT key.

#ALIAS say {~:says in a crisp, Illianer accent, '%upper( %left, "%1", 1)%right( "%-1", 1)'}

This may create problems with handling punctuation and special characters that didn't exist in the original version. The first solution is preferred.

There's no reason to use #ONINPUT. #ALIAS is easier to use because it was designed for making user-defined commands.
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