|
SHASCO Novice
Joined: 29 May 2001 Posts: 48 Location: USA
|
Posted: 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. |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: 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 |
|
|
|
SHASCO Novice
Joined: 29 May 2001 Posts: 48 Location: USA
|
Posted: Fri Dec 21, 2001 9:23 pm |
Thank you. You make it very simple and that is appreciated.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
|
|