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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Mar 27, 2008 2:16 pm   

Alias command config
 
if I have something aliased that was:
w>

Is there any way I can have it take whatever comes after it, without a preceding white space.

currently I have to

w> text
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Mar 27, 2008 2:41 pm   
 
Be more specific; I have no idea what you mean. Some script examples might help. However, you can't use > in an alias name. Alias names can only be letters and underscores.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Mar 27, 2008 4:16 pm   
 
w> works just fine for me as an alias, it's just that normally it needs a whitespace to separate the alias name from any text that may come after it... here's mine:

#AL w> {pmote ~{wwhispers~(to ~{c%1~{w) '~{c%-2~{w'~{x}

So, you type

w> Bob Hey, come check this out.

You whisper (to Bob) Hey, come check this out.

I want to be able to do...

w>Bob Hey, come check this out.

You whisper (to Bob) Hey, come check this out.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Mar 27, 2008 4:35 pm   
 
You could use a trigger with the Command Input type selected. They're exactly the same as normal triggers, but they fire on commands you enter rather than text from the MUD. You'd want a trigger like:

#oninput {^w>(%w) (*)} {#noinput;pmote whisper ~(to %1~) %2}

or whatever it was.

And okay, you're not supposed to be able to use other characters for aliases. I wouldn't advise it.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Mar 27, 2008 4:57 pm   
 
>

Is the direct command in the MUD, hence why I wanted to use it :/
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Mar 27, 2008 5:31 pm   
 
...I'm not sure what you want now. You can use the > character fine with no space in the way I just described, with input triggers. Do you want the > character in the script or something?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Mar 27, 2008 5:34 pm   
 
Aliases *require* a space between the alias name and the arguments. Yes, you can use a > in an alias name if you must, but it is not recommended. But with an alias, the space after the w> would be required.

Fang mentioned the correct way to do it without needing the space is using the #ONINPUT trigger. That's basically a trigger that fires on the contents of the command line and can be used to parse the command line any way you want.
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Mar 27, 2008 5:41 pm   
 
Fang Xianfu wrote:
...I'm not sure what you want now. You can use the > character fine with no space in the way I just described, with input triggers. Do you want the > character in the script or something?


No, it worked just fine. I'm just explaining why I use a > character. Thank you very much for the trigger.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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