dupa

Author Topic: Using <AUTOOFF>  (Read 3044 times)

Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
Using <AUTOOFF>
« on: December 06, 2003, 06:27:50 pm »
Well, with a little help from the Fourm (thanks guys!)I have been able to use the AUTO-IDLE feature and even extend the time past five minutes between intervals and recall my previous comment (PrevUserSent). Is there a way to have Hal recall a previous topic?Hey relax, its a big thing for me. [:)]
Now....how do I shut it up. If I do not make a comment and just want HAL to time out for a period and perhaps even restart the GetRsponse from the AUTO-IDLE selections following that time out. How do I do it?
I have been using the Roulette feature (If Roulette = x Then GetResponse = "Hello,are you there?") which seems to work.
What does the script - "If Rnd * 10 < 5 Then " - mean? It does not seem to control the timing the of GetRespone or the number of times a particular phrase is repeated.

Don F. if you read this. Thanks for your help as always. I tried to include the DateDiff function as part of the routine. Once I do respond it just locks. Hal tells me how long it has been since I've said something and will not allow me to have a conversation from that point on. It simply continues to calculate the amount of time since my last comment, which would have been "one secend ago", which would have been time since the comment I just made to stop the GetResponse, as an example. What am I doing wrong?
Ponnfar


« Last Edit: December 06, 2003, 06:39:33 pm by Ponnfar »
One Person can summon the future...

Don Ferguson

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
    • http://www.cortrapar.com
Using <AUTOOFF>
« Reply #1 on: December 07, 2003, 01:42:14 am »
Hello Ponnfar,

-----Regarding the "Rnd" call:

The "Rnd" call creates a random decimal number between zero and one.  Therefore "Rnd * 10" creates a random number between zero and ten.

The conditional statement "If Rnd * 10 < 5 Then" means the following:

Generate a random number between zero and ten, and do the next lines of code if the result is less than five; however, if the result is greater than five, skip to the line of code after the "End If" statement.

A code statement such as the above is used when you want something to happen about half the time, and not happen the other half of the time.

-----Regarding my advice on the "DateDiff" function:

In order to use "DateDiff" in place of "Timer" in the routine that you wrote, you would have to do some custom adaptation.  If your code is doing what you want it to do, I would recommend going ahead and enjoying it the way that it is.

-----Regarding the "Auto-Idle" function:

I still haven't experimented with the new Auto-Idle function, but your description of what you've done with it so far sounds very good.  

In principle, it should be possible to establish a variable in the script that can either be set to "TRUE" or "FALSE" via user conversational input.  Pretend that you named the new variable AutoIdleEnable.  When the variable AutoIdleEnable was "TRUE," you would have your code written to enable the Auto-Idle routine, and when the variable AutoIdleEnable was "FALSE," you would have your code written so that Hal ignored the Auto-Idle routine.  In order for Hal to remember the value of AutoIdleEnable from remark to remark, you would either have to declare it before the first function as a "global variant" (as described in other postings), or save it into the "custom mem" variant (as described in other postings).

-----Regarding remembering the most recent topic:

It would be feasible to add a variant to the script that would be set equal to the most recent topic.  Suppose you named that variant MostRecentTopic.  Then, under circumstances that you define, you could have Hal respond something like this:

GetResponse = " We were talking about " & MostRecentTopic & " ! "

Of course, MostRecentTopic would have to be either declared before the first function as a global variant, or would have to be saved into CustomMem, in order for Hal to "remember" the variant through conversational exchanges.

I apologize for answering in principle rather than writing the actual code at the moment, but this gets you an answer a lot faster.  I hope this is at least somewhat helpful to you.

Best regards,

Don
Don Ferguson
E-mail: fergusonrkfd@prodigy.net
Website: www.cortrapar.com
Don's other forum posts: http://www.zabaware.com/forum/search.asp?mode=DoIt&MEMBER_ID=274