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


Joined: 09 Jan 2004
Posts: 17

PostPosted: Sat Jan 31, 2004 5:09 pm   

Placing multi-line exits into a variable
 
I need to capture the individual exits in a line like this:

Obvious exits are: down, east, north, northeast, northwest, south, southeast, southwest, up, and west.

And place them into a variable. I've tried searching the forums and fooling around with commands, but nothing has worked. I'd appreciate any help, thanks.
Reply with quote
slicertool
Magician


Joined: 09 Oct 2003
Posts: 459
Location: USA

PostPosted: Sat Jan 31, 2004 5:37 pm   
 
I usually get around this by configuring my settings on the mud to have a screen width of 2048 characters and let zmud wrap for me at whatever I define zmud to. This way zmud is passed the string entirely and then decides what to do with it.

I originally started doing this so the mudreader plugin would work a little easier.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jan 31, 2004 6:07 pm   
 
This is usually just one line, even though it's been wrapped and looks like it's more than one (similarly, this entire paragraph is just one line even though it's been wrapped to look like three or four). A single line trigger will usually work and should be the first thing you try.
#TR {Obvious exits are: (*).} {#VAR exits {%replace( "%1", " and ", " ")}}

If it is multiple lines, then add a multi-state trigger. It's probably not necessary though.
#TR {Obvious exits are: (*)} {#VAR exit1 {%1};#IF (!%ends( {%1}, "." )) {#VAR exits {%replace( "%1", " and ", " ")}}}
#COND {(*).} {#VAR exit2 {%1};#IF (!%ends( {@exit1}, ".")) {#VAR exits {%replace( {@exit1 @exit2}, " and ", " ")}}} {Within|Param=1}
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