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.
Joined: 15 Oct 2002 Posts: 21 Location: Switzerland
Posted: 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?
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.
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