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


Joined: 29 May 2001
Posts: 48
Location: USA

PostPosted: Fri Dec 21, 2001 7:00 pm   

counting
 
I need to be able to count how many times I receive the exact same txt from the mud. Then when that count reaches a certain number to execute a command and reset the count back to 0.

Any suggestions on how to incorporate a count would be appreciated.

Thank you.
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Fri Dec 21, 2001 7:47 pm   
 
#TRIGGER {text you want to count} {#ADD CountedText 1;#IF (@CountedText = 5) {Execute the commands;CountedText = 0}}

Acaila
Reply with quote
SHASCO
Novice


Joined: 29 May 2001
Posts: 48
Location: USA

PostPosted: Fri Dec 21, 2001 9:23 pm   
 
Thank you. You make it very simple and that is appreciated.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Dec 22, 2001 8:54 am   
 
quote:

I need to be able to count how many times I receive the exact same txt from the mud. Then when that count reaches a certain number to execute a command and reset the count back to 0.

Any suggestions on how to incorporate a count would be appreciated.

Thank you.



Is it going to be a literal string of text (ie, 'this is a test')? If so you're safe with what's been posted already.

If it's a pattern string (ie, 'this * test'), then the following would only make the trigger fire once:

this is a test. this is a test. test. test. test. this line is too big to fit on one row test.

li'l shmoe of Dragon's Gate MUD
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