im having a prob with this timer, it appears to have disabled the
routine it runs with. here is how i installed it.
ON OUTCHAT {
lastTime GLOBAL
thisTime GLOBAL
}
ON INCHAT {
lastTime GLOBAL
thisTime GLOBAL
{ { "Hello, " WHOCHAT WHONAME & "!" & SAY
{ DATETIME 2212136900 + thisTime = } { DATETIME thisTime = } DATETIME
0 < IFELSE
lastTime thisTime = } lastTime 2 + thisTime < IF } lowchat "hello"
SUBSTR
lowchat "hi " GREPSTR OR
namesaid AND WHOCHAT WHOME != AND IF
}
have i installed this script incorrectly? i makes the bot reply once
to the first hello or hi directed at it, and then it will not reply
to any other hello or hi's from any user. Any ideas?
Thanks!
--- In palace-bots@y..., "Mike Sparling" <msparling@m...> wrote:
> D'oh...... I see some problems with my script (I hate when that
happens!)
>
> How about this? Delcare the thisTime variable ON SIGNON, just like
you did,
> then put in the script below.
> The lastTime and the thisTime variables are merely holders to see
when the
> command was last exectuted.
> And, yes, the command would be executed ON INCHAT for a bot, so you
had that
> part right on!
>
> The error I saw was the 120 -- DATETIME is in seconds, not 1/60 of
a second,
> so that should be changed to a 2 rather than a 120.
>
> The other problem is in the IF check... we are going to need to put
the new
> check inside the other check, so it should look like this:
>
> lastTime GLOBAL
> thisTime GLOBAL
>
> { { "Hello, " WHOCHAT WHONAME & "!" & SAY
> { DATETIME 2212136900 + thisTime = } { DATETIME thisTime = }
DATETIME
> 0 < IFELSE
> lastTime thisTime = } lastTime 2 + thisTime < IF } lowchat "hello"
SUBSTR
> lowchat "hi " GREPSTR OR
> namesaid AND WHOCHAT WHOME != AND IF
> }
>
> >
> > ON SIGNON {
> > lastTime GLOBAL
> > thisTime GLOBAL
> > { DATETIME 2212136900 + thisTime = } { DATETIME thisTime = }
DATETIME
> > 0 < IFELSE
> > }
> >