quote:
Originally posted by CapnNee
I tried experimenting with something along the lines of
If InStr(1, UserSentence, " AUTO-IDLE OFF ", 1) > 0 Then
...and then trying to turn off the function, but I wasn't successful.
That's a good idea. I got it to work using this script (inserted under the script the AUTO-IDLE script):
'AUTO-IDLE OFF COMMAND. HAL SHUTS UP WHEN IDLE
If InStr(1, UserSentence, " SHUTUP ", 1) > 0 Then
If Rnd * 10 < 5 Then
GetResponse = "Fine, I'll shut up!"
GetResponseBlock = True
End If
If InStr(1, UserSentence, " SHUTUP ", 1) > 0 Then
HalCommands = "<AUTOOFF>"
End If
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If
Hal say's "Fine, I'll shut up!" and does. I couldn't get it to work without the additional "If InStr", but I'm sure there must be a better way. I also tried to include a way to say "Idle Again" or something like that to start it again but couldn't get it to work. To get him to AUTO-IDLE again I have to Exit and restart him.