Search the web
Sign In
New User? Sign Up
palace-bots · Join us for trading tips and code on building and operating bots in Palace-space
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
flood stopper for "hello" routine   Message List  
Reply | Forward Message #62 of 201 |
Re: [palace-bots] Re: flood stopper for "hello" routine

First, your use of lasttime and firsttime look ok to me.

I see several possibilities:

You are using 'lowchat' without defining what it is. Make sure it is
defined as: CHATSTR LOWERCASE lowchat =

Also, you do not have 'namesaid' defined. It will will always cause the
script to fail if not defined.

Lastly, the OUTCHAT part of this script isn't doing anything and can be
deleted.
--
Alan Templeton
Sunnyvale, CA
Home page: http://www.accesscom.com/~alant
Palace scripts: http://www.chatserve.com/alansscriptlibrary.htm

> From: "palwizard" <palwizard@...>
> Reply-To: palace-bots@yahoogroups.com
> Date: Tue, 11 Dec 2001 05:01:20 -0000
> To: palace-bots@yahoogroups.com
> Subject: [palace-bots] Re: flood stopper for "hello" routine
>
> 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
>>> }
>>>
>
>
>
> To unsubscribe from this group, send an email to:
> palace-bots-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>




Tue Dec 11, 2001 5:54 am

alan_templeton
Offline Offline
Send Email Send Email

Forward
Message #62 of 201 |
Expand Messages Author Sort by Date

i have added a response routine to the ON INCHAT section of the Blue Lady Fido script that ive been editing to run my bot. { "Hello, " WHOCHAT WHONAME & "!" &...
palwizard@...
palwizard
Offline Send Email
Nov 17, 2001
2:47 am

How about this? Please note, this is untested. :-) As written it will keep the routine from repeating if the interval is less than 2 seconds. lastTime GLOBAL...
Mike Sparling
msparling@...
Send Email
Nov 18, 2001
5:03 pm

So this should be installed like this? ON SIGNON { lastTime GLOBAL thisTime GLOBAL { DATETIME 2212136900 + thisTime = } { DATETIME thisTime = } DATETIME 0 <...
palwizard@...
palwizard
Offline Send Email
Nov 18, 2001
8:21 pm

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...
Mike Sparling
msparling@...
Send Email
Nov 20, 2001
6:30 pm

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...
palwizard
Offline Send Email
Dec 11, 2001
5:01 am

First, your use of lasttime and firsttime look ok to me. I see several possibilities: You are using 'lowchat' without defining what it is. Make sure it is ...
Alan Templeton
alan_templeton
Offline Send Email
Dec 11, 2001
5:54 am

Alan im very sorry, i should have provided more information. this hello routine is an addition to the complete Blue Lady Fido script. everything Blue defined...
palwizard
Offline Send Email
Dec 11, 2001
6:49 am

I've reread the threat and checked the Fido script. Here's what I think the problem is: You read the current time within the script that is testing time. It...
Alan Templeton
alan_templeton
Offline Send Email
Dec 11, 2001
2:49 pm

Good Morning Alan, Ive just installed and tested your edits and deletions as provided here, the script seems to be workin absolutely perfectly. This being ...
palwizard
Offline Send Email
Dec 11, 2001
5:15 pm

The problem is how you are setting the lastTime and thisTime variables. After the first time someone says hi to your bot, the bot sets lastTime = thisTime and...
Mike Sparling
msparling@...
Send Email
Dec 11, 2001
5:44 am

well i switched the thisTime and lastTime in that one line, and the hello routine is still disabled. any suggestions? ... variables. ... lastTime = ... part......
palwizard
Offline Send Email
Dec 11, 2001
7:06 am

Thanks gobs for covering my backside, Alan! I'd thought about moving the time check outside the routine as well, but didn't want it constantly redefining the...
Mike Sparling
msparling@...
Send Email
Dec 12, 2001
5:25 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help