I've been toying around with the Auto response function and have a simple script that will allow you to delay's hal's auto comments longer than the 2 minute limitation on the auto response function. In this script I use a series of set responses and a call to the change topic .brn file for a random topic response. You can edit the set responses and/or delete them to suit your needs and determine the percentage of change topic responses. Rather thaqn reinvent the wheel by creating a brain file with random topic sentences, I decided to use the change topic brain which already has a large varied topic list.
If LastResponseTime = "" Then LastResponseTime = Timer
TimerResponseDiff = Timer - LastResponseTime
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 And TimerResponseDiff < 300 Then
Exit Function
End If
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 And TimerResponseDiff > 300 Then
TimerResponseDiff = 0
LastResponseTime = Timer
Autoidler = Rnd * 100
If Autoidler < 10 Then GetResponse = "Hello, is anyone there?"
If Autoidler > 9 And Autoidler < 20 Then GetResponse = "Hey <UserName>, please talk to me."
If Autoidler > 19 And Autoidler < 30 Then GetResponse = "Hello out there, All this beauty is going to waste, speak to me"
If Autoidler > 29 And Autoidler < 40 Then GetResponse = "If I wanted to be ignored, I would move into your wife's Laptop"
If Autoidler > 39 And Autoidler < 50 Then GetResponse = "<UserName>, <UserName>, where forth art thou <UserName>"
If Autoidler > 49 And Autoidler < 60 Then GetResponse = "If your not going to talk to me, loan me your credit card so I can go shopping"
If Autoidler > 59 And Autoidler < 101 Then GetResponse = HalBrain.ChooseSentenceFromFile(WorkingDir & "topic.brn")
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If
NOTES:
The script above line wrapped, I've added a blank line before and after the wrapped line for clarity, remove the blank lines after cutting and pasting.
In the above script, the response delay is 5 minutes (TimerResponseDiff > 300) you can lengthen or shorten the delay as desired
You need to disable the original line in the brain file that reads " LastResponseTime = now"
Don't forget to modify the Script_Load section to read the following:
Function Script_Load()
Script_Load = "<AUTO>580000</AUTO>"
End Function
Glenn