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


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Wed Dec 26, 2007 5:41 pm   

Two small inquiries...
 
Looking for a way (maybe a command?) to list all aliases in a class on-screen... I thought there might be a command, but I haven't been able to find it.

And another dumb question...

...if I wanted to substitute a 'z' for every 's' at the end of a word, how would the guru's suggest I go about it?

So that if I said "coins" on a channel for instance, the script would substitute "coinz" instead.
_________________
>-Churlant-<
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Dec 26, 2007 7:52 pm   
 
I'm going to hate myself for this.

text = %subregex(@text,"s\b","z")
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Wed Dec 26, 2007 8:43 pm   
 
Hate yourself? For the regex? ;)
_________________
>-Churlant-<
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Thu Dec 27, 2007 12:25 am   
 
Yes because coinz is terrible whereas coins is not -- that's English purism for you :)
_________________
Taz :)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Dec 27, 2007 12:40 am   
 
If you want to list only aliases in one class, you will need to use the ZMUD COM object. If you simply want to list all the aliases in memory at the time of issuance, use the #ALIAS command. The formatting will not be very pretty and/or easily readable, because it's also going to list all the code in those aliases. One plus to this, though, is that it's printed exactly as it's shown in the settings editor so with pretty printer/syntax checker on it will properly indent (aside from the skew created by the "name code" alignment for that first line of code).
_________________
EDIT: I didn't like my old signature
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