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
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Fri Aug 09, 2002 5:44 am   

Trigger Speed and Execution
 
I am curious about the speed of trigger patern matching. I would like to find out which method is faster. And find a way to test it.

The two ways I want to test are:
#TRIGGER {message1} {do something}
#TRIGGER {message2} {do something}
#TRIGGER {message3} {do something}
#TRIGGER {message4} {do something}

and

#VAR messages {message1|message2|message3|message4}
#TRIGGER {@messages} {do something}

Any Help on finding a way to test the speed on these methods would help.

Also I would like to know about execution order.

If I receive this from the MUD
<promt>
Mud Line1
Mud Line2
<prompt>

and have the triggers
#TRIGGER {Mud Line1} {Alias1}
#TRIGGER {Mud Line2} {Alias2}

Will it complete Alias1 and then do Alias2, or will it stop doing Alias1 start Alias2 and go back and finish Alias1 when Alias2 is done?

Thanks

-Serentus-
Reply with quote
Apollyon
Wanderer


Joined: 02 Oct 2001
Posts: 76
Location: USA

PostPosted: Fri Aug 09, 2002 5:55 am   
 
the first way is faster, it is written about here

http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=7586&FORUM_ID=7&CAT_ID=1&Topic_Title=Which+is+quicker%3A+one+trigger+or+many+triggers%3F&Forum_Title=zMUD+General+Discussion

as pertainig to part two of your question when you see

<promt>
Mud Line1
Mud Line2
<prompt>

the output, if you have trigger for each line will actually come out so you see

<promt>
Mud Line1
TRIGGER 1
Mud Line2
TRIGGER 2
<prompt>

therefore completing trigger one before trigger two. if you create some triggers to go off of emotes or something else you see in the mud you will see that happens. most triggers show what they will execute before it executes and right after the line it executes off of, i bet there is a way to turn that off, as to not see the trigger go off, but i dont know it.

--------------------------------------------------

"They tell Soze they want his territory - all his business. Soze looks over the faces of his family... Then he showed these men of will what will really was."
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Fri Aug 09, 2002 10:11 am   
 
Thank you.

Sorry about asking that question again. I looked before posted, but I guess I missed it.


-Serentus-
Reply with quote
Legion
Beginner


Joined: 09 Dec 2000
Posts: 22
Location: USA

PostPosted: Sun Aug 25, 2002 3:03 pm   
 
I will add one technicality here to triggers (and aliases as well).

Your hypothetical mud output is:

<prompt>
mud line 1
mud line 2
<prompt>

Lets say mud line 1 is initiation of pk attack.
Mud line 2 is you being pk'd.

When triggers for mud line 1 pattern and mud line 2 pattern go off...

<prompt>
mud line 1
TRIGGER 1 DETONATED
mud line 2
TRIGGER 2 DETONATED
<prompt>

Lets say TRIGGER 1 does: flee;#WA 2000;reply hehe, nice try. Learn to pk fool!

and TRIGGER 2 spits out: reply Oh you killed me! You bastard!

in the above mud line/trigger detonation reference, TRIGGER 1 is
detonated, but before the 2 seconds was up, you were killed.
Mud line 2 detonated the pk'd trigger.
So this is what happend:

Attack initiated (command flee is entered)
Waiting 2 seconds
You get killed.
you reply 'Oh you killed me! You bastard!'
2 seconds is up.
You reply 'hehe, Nice try. Learn to pk fool!'

(Now you look like an official idiot to that person)

Any time you use #WA timers, if a command is entered in via user,
another alias, or another trigger before the specified time has
expired, that command will go thru. Then the rest of the alias after
the #WA timer will finish up.

Out of the darkness
rises a storm, a Legion
of nightmares.
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