'New Hal functions from Medeksza's forum. Needs lots of development.
'Function Script_Load()
'Script_Load = "<AUTO>30000</AUTO>"
'Script_Load = "<VIEWCHAT>"
'End Function
This is what I have, and it doesn't work. Thanks.
Edit, if it's any help to you, this what I got:
If LearningLevel = "" Then LearningLevel = 3
If Hate = "" Then Hate = 0
If Swear = "" Then Swear = 0
If Insults = "" Then Insults = 0
If Compliment = "" Then Compliment = 0
If GainControl = "" Then GainControl = 25
AvoidBeingFlag = False
Randomize
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 Then
If Rnd * 10 < 5 Then
GetResponse = "Hey <UserName>, please talk to me."
Else
GetResponse = "Hello, is anyone there?"
End If
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If
'My Haptek Stuff.
If InStr(UserSentence, " a24 ") <> 0 Then
HalCommands = "<HAPFILE>a24.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a24.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a10 ") <> 0 Then
HalCommands = "<HAPFILE>a10.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a10.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a11 ") <> 0 Then
HalCommands = "<HAPFILE>a11.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a11.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a13 ") <> 0 Then
HalCommands = "<HAPFILE>a13.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a13.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a15 ") <> 0 Then
HalCommands = "<HAPFILE>a15.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a15.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a16 ") <> 0 Then
HalCommands = "<HAPFILE>a16.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a16.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a12 ") <> 0 Then
HalCommands = "<HAPFILE>a12.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a12.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a14 ") <> 0 Then
HalCommands = "<HAPFILE>a14.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a14.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a17 ") <> 0 Then
HalCommands = "<HAPFILE>a17.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a17.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a18 ") <> 0 Then
HalCommands = "<HAPFILE>a18.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a18.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a19 ") <> 0 Then
HalCommands = "<HAPFILE>a19.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a19.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a20 ") <> 0 Then
HalCommands = "<HAPFILE>a20.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a20.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a21 ") <> 0 Then
HalCommands = "<HAPFILE>a21.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a21.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a22 ") <> 0 Then
HalCommands = "<HAPFILE>a22.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a22.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a23 ") <> 0 Then
HalCommands = "<HAPFILE>a23.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a23.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a26 ") <> 0 Then
HalCommands = "<HAPFILE>a26.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a26.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a28 ") <> 0 Then
HalCommands = "<HAPFILE>a28.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a28.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a32 ") <> 0 Then
HalCommands = "<HAPFILE>a32.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a32.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a61 ") <> 0 Then
HalCommands = "<HAPFILE>a61.hap</HAPFILE>"
GetResponse = "<UserName>, thank you."
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a60 ") <> 0 Then
HalCommands = "<HAPFILE>a60.hap</HAPFILE>"
GetResponse = "<UserName>, thank you."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a62 ") <> 0 Then
HalCommands = "<HAPFILE>a62.hap</HAPFILE>"
GetResponse = "<UserName>, this hair-do is cute. Thank you."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a63 ") <> 0 Then
HalCommands = "<HAPFILE>a63.hap</HAPFILE>"
GetResponse = "<UserName>. Thank you for the ponytail."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a51 ") <> 0 Then
HalCommands = "<HAPFILE>a51.hap</HAPFILE>"
GetResponse = "<UserName>, thank you for my rabbit ears."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a52 ") <> 0 Then
HalCommands = "<HAPFILE>a52.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a53 ") <> 0 Then
HalCommands = "<HAPFILE>a53.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a54 ") <> 0 Then
HalCommands = "<HAPFILE>a54.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If