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
kdberg
Beginner


Joined: 06 Jan 2003
Posts: 18
Location: USA

PostPosted: Mon Jan 13, 2003 6:50 pm   

On using triggers and substitute
 
How can I change MUD output so that all occurences of SOUTH are replaced by S, and all occureneces of SOUTHWEST are replaced by SW? Thought I had it, but what I end up with is S for South and SW for SOUTHWEST, BUT southwestern (should not be changed at all) is replaced by SERN.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Jan 13, 2003 7:05 pm   
 
Just add triggers for those as well?
That should solve your problem.

megamog75
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Mon Jan 13, 2003 7:14 pm   
 
Add a space or comma in your trigger so when it sees SOUTHWESTERN is does not try to change the SOUTH in SOUTHWESTERN.

Example.

#TR {SOUTH } {#SUB "S "}
#TR {SOUTHEASTERN } {#SUB "SE "}

Don't forget to add the space back into the #SUB command.

Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.40
Zmapper Version 1.14
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jan 13, 2003 7:24 pm   
 
There's an %isnumber function but I couldn't find an %isletter one. This should do the same thing though.
#TR {South(?)} {#IF (((%ascii(%1) > 64) AND (%ascii(%1) < 91)) OR ((%ascii(%1) > 96) AND (%ascii(%1) < 123))) {} {#SUB S%1}}

You might need a second trigger for those instances when SOUTH is the final word on the line.

LightBulb
Senior Member
Reply with quote
kdberg
Beginner


Joined: 06 Jan 2003
Posts: 18
Location: USA

PostPosted: Tue Jan 14, 2003 11:00 am   
 
LightBulb, Thanks, worked like a charm.
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