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


Joined: 15 Oct 2002
Posts: 21
Location: Switzerland

PostPosted: Tue Oct 22, 2002 3:17 pm   

newbie,trigger question
 
some more newbie questions.

eg. I have the following class with lots of similar triggers, all the trigger patterns are different but the command is always the same, it should color the trigger pattern yellow and send a specific text to another window.

#class telefon
#trigger {^Your red telefon rings.} {{#color yellow} {:telefon:#show "Please answer the phone"}}
.
.
.

Would this work and if yes is it good or is there a better approach to it?
I´d really appreciate your help. Thank you.
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Tue Oct 22, 2002 4:18 pm   
 
it should look like this:
#trigger {^Your red telefon rings.} {#color yellow;:telefon:#show "Please answer the phone"}


Or you could use #WIN to send the text, like this:
#WIN (windownamehere) text to send here...

to send text to another window...
Reply with quote
mma
Beginner


Joined: 15 Oct 2002
Posts: 21
Location: Switzerland

PostPosted: Tue Oct 22, 2002 5:09 pm   
 
Thank you for the quick response. :)

I asked myself wether my approach could result in a drawback in processing/parsing speed of zmud if eg. there are more than just this class each containing about 100 triggers or more.

And if that´s the case what can I do to avoid it?
Create something like a "command class" containing the command all the triggers in the "#class telefon" should use and use a reference to this special class for all the triggers?
Would that be possible and would that help to speed things up?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Oct 22, 2002 10:01 pm   
 
It should be fine the way you have it. The more text your patterns contain, the faster zMUD is able to discard a line as not matching some trigger. Since your patterns contain a lot of text, it should be really fast. Also, zMUD never even looks at the commands of any trigger that doesn't match agaisnt a particular line, so the commands of a trigger don't affect speed unless the trigger actually matches a given line.

Kjata
Reply with quote
mma
Beginner


Joined: 15 Oct 2002
Posts: 21
Location: Switzerland

PostPosted: Wed Oct 23, 2002 3:39 pm   
 
Thank you for your help.

mma
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