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


Joined: 15 Aug 2004
Posts: 33

PostPosted: Sun Sep 19, 2004 3:36 pm   

2 Lines with #TRIGGER, possible?
 
I'm trying to write up a news post for the MUD I play, which automatically word wraps at 80 characters. The problem is, when the reader copies and pastes the zmud script from my post into their input line, it breaks since it looks like this:

#TRIGGER {blah blah blah } { blah
blah blah}

Is there something I can put at the end of the first line to let zMud know the following line is part of it? Like in VBSript for instance I could do:

#TRIGGER {blah blah blah } { blah \
blah blah }

the \ at the end of hte first line tells the parser to recognize the next line as well...

Any help would be appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Sep 19, 2004 5:25 pm   
 
No, I don't think there's any way to make zMUD ignore a hard return. You'll probably have to instruct your readers to remove them.

There are some things you can do.
1. Use abbreviated commands: #TR instead of #TRIGGER
2. Keep your patterns short. It isn't usually necessary to match an entire line.
3. Keep variable, alias, and class names short.
4. Place line-breaks in places where zMUD would be starting a new line anyway, such as the beginning of the Value (Commands) parameter, the action parameters of #IF, anywhere you are using a semi-colon, etc.

For example, this (one line, wrapped)
Code:
#TRIGGER {^Blah blah (%w) (%d)$} {#VARIABLE ThisIsTheWordWhichComesBetweenBlahAndANumber {%1};#IF (%2 > @TheMaximumAmountOfBlahWeCanTolerate) {WeveGotTheBlahsAlias;#VARIABLE BlahNumber %2}}

could just as easily be this (six lines, not wrapped)
Code:
#TR {blah (%w) (%d)} {
#VA BlahWord {%1}
#IF (%2 > @MaxBlah) {
Blahs
#VA BlahNum {%2}
}}

Another possibility would be to post your script in the Finished Scripts forum and direct your readers to it, instead of posting the script on your MUD's news.

Since you're planning to post this trigger somewhere anyway, it would have been nice (and might have helped) if you had given us the actual trigger instead of 'blah blah blah' nonsense. Your example, boring blahs and all, is only 44 characters long so it wouldn't get wrapped anyway.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
Bajed
Novice


Joined: 15 Aug 2004
Posts: 33

PostPosted: Sun Sep 19, 2004 6:59 pm   
 
The script is not yet written heh, therefore I had nothing to post. But thanks, your reply was most helpful.
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