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


Joined: 21 Feb 2004
Posts: 11
Location: United Kingdom

PostPosted: Sat Nov 12, 2005 10:59 am   

#sub with verbatim
 
I have a trigger for substituting an discrete message for one far more visible

#trigger {^You have regained balance.$} {#sub {--- Balance - Balance - Balance -- Balance - Balance - Balance ---};#color green}

This has worked fine for a long time, but I just read that using the option VERBATIM can help speed up the processing time for triggers. As my script has a vast amount of triggers for a full combat system and I have been struggling with speed I thought about switching as much of my system to verbatim triggers as I could.

First I would do a little testing to determine how the option should be used.

On setting the option for my balance trigger instead of seeing
Quote:
--- Balance - Balance - Balance -- Balance - Balance - Balance ---

I recieved
Quote:
--- Balance - Balance - Balance -- Balance - Balance - Balance ---You have regained balance.


Is the verbatim option not compatible with the #sub command or am I doing something wrong?

I tested with out the enclosing ^ $ and had the same result. Inserting a wildcard * into the pattern prevented execution when the verbatim option was set, so Im assuming that ^ and $ are being processed as normal even with the verbatim option. Is that correct?
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