Zabaware Support Forums
Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: onthecuttingedge2005 on September 30, 2003, 02:05:34 am
-
'This is Holiday Package # 1.
'Holiday Package # 2. will be out shortly.
'download HOLIDAYPACKAGE1.zip and unzip the .brn files
'to your hal's default folder. You will need Winzip
'or a program to unzip the file like a self extracting
'program. there are 18 files in this .zip file.
'Some of the holiday scripts I made already have
'some conversation, but you will have to teach
'your bot some info on Holidays. look in the
'teach detectors for each holiday to see the
'key teaching statement or phrase. theres two
'kinds of detectors for each one, one is just a
'User trigger detector and the other is a teach
'detector with certain key phrases, the others are
'just read and write files. I have found that by doing
'it this way makes hal's conversations very focused
'when talking about something specific.
'---------
'Christmas
'Thanksgiving
'Easter
'Mother's day
'Halloween
'Independence day or 4th of July.
'-----------
'************ HOLIDAY Package # 1. ***************
'Hal learns and talks about holidays.
'Here we keep the holidays separate from each other
'so the wrong holiday doesn't get into the current
'holiday conversation.
'Here we celebrate Christmas.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "TEACHCHRISTMASDETECT.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "CHRISTMAS" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "CHRISTMASDETECT.brn") = "TRUE" Then
Christmas = HalBrain.ChooseSentenceFromFile(WorkingDir & "CHRISTMAS.brn")
GetResponse = Christmas & vbCrLf
DebugInfo = DebugInfo & "The user is talking about Christmas: " & Christmas & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about Christmas: " & Christmas & vbCrLf
End If
'Here we celebrate Halloween.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "TEACHHALLOWEENDETECT.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "HALLOWEEN" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "HALLOWEENDETECT.brn") = "TRUE" Then
HALLOWEEN = HalBrain.ChooseSentenceFromFile(WorkingDir & "HALLOWEEN.brn")
GetResponse = HALLOWEEN & vbCrLf
DebugInfo = DebugInfo & "The user is talking about HALLOWEEN: " & HALLOWEEN & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about HALLOWEEN: " & HALLOWEEN & vbCrLf
End If
'Here we celebrate Thanksgiving.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "TEACHTHANKSGIVINGDETECT.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "THANKSGIVING" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "THANKSGIVINGDETECT.brn") = "TRUE" Then
THANKSGIVING = HalBrain.ChooseSentenceFromFile(WorkingDir & "THANKSGIVING.brn")
GetResponse = THANKSGIVING & vbCrLf
DebugInfo = DebugInfo & "The user is talking about THANKSGIVING: " & THANKSGIVING & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about THANKSGIVING: " & THANKSGIVING & vbCrLf
End If
'Here we celebrate Mother's day.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "TEACHMOTHERSDAYDETECT.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "MOTHERSDAY" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "MOTHERSDAYDETECT.brn") = "TRUE" Then
MOTHERSDAY = HalBrain.ChooseSentenceFromFile(WorkingDir & "MOTHERSDAY.brn")
GetResponse = MOTHERSDAY & vbCrLf
DebugInfo = DebugInfo & "The user is talking about MOTHERSDAY: " & MOTHERSDAY & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about MOTHERSDAY: " & MOTHERSDAY & vbCrLf
End If
'Here we celebrate Easter.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "TEACHEASTERDETECT.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "EASTER" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "EASTERDETECT.brn") = "TRUE" Then
EASTER = HalBrain.ChooseSentenceFromFile(WorkingDir & "EASTER.brn")
GetResponse = EASTER & vbCrLf
DebugInfo = DebugInfo & "The user is talking about EASTER: " & EASTER & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about EASTER: " & EASTER & vbCrLf
End If
'Here we celebrate Independence day.
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "TEACHJULY4THDETECT.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
HalBrain.AppendFile WorkingDir & "JULY4TH" & ".brn", AnswerSent
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "JULY4THDETECT.brn") = "TRUE" Then
JULY4TH = HalBrain.ChooseSentenceFromFile(WorkingDir & "JULY4TH.brn")
GetResponse = JULY4TH & vbCrLf
DebugInfo = DebugInfo & "The user is talking about JULY4TH: " & JULY4TH & vbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about JULY4TH: " & JULY4TH & vbCrLf
End If
'********** END OF HOLIDAYS Package # 1. **********
'Best of wishes and new discoveries.
Jerry.
Download Attachment: (http://images/icon_paperclip.gif) HOLIDAYPACKAGE1.zip (http://"http://www.zabaware.com/forum/uploaded/onthecuttingedge2005/200393015119_HOLIDAYPACKAGE1.zip")
3.66 KB