'Hi Glenn.
'Try this script, It's pretty good.
'Edit the HalsAge.brn and the HalsAgeDetect.brn to suit your bots
'birthday and birth sign and all that good stuff.
'I re-altered the HalsAge.brn so use this one instead of the last
'one from prior posting above.
'Calculate Hal's Birthday version 1.1.
Dim Birth
If HalBrain.CheckRepetition(GetResponse, "I am 8 years old") = True Then
Birth = "09/07/2003 06:00:20 pm"
YearDiff = DateDiff("YYYY", Birth, Now)
If Month(Date) = 7 And Day(Date) > 26 Then YearDiff = (YearDiff + 1)
If Month(Date) > 7 Then YearDiff = (YearDiff + 1)
Birthday = HalBrain.ChooseSentenceFromFile(WorkingDir & "HalsAge.brn")
GetResponse = " I am " & Replace(GetResponse, "I am 8 years old", YearDiff, 1, -1, vbTextCompare) & " years old " & ", " & Birthday
End If
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "HalsAgeDetect.brn") = "TRUE" Then
Birthday = HalBrain.ChooseSentenceFromFile(WorkingDir & "HalsAge.brn")
GetResponse = Birthday & VbCrLf
DebugInfo = DebugInfo & Birthday & VbCrLf
End If
'Best of wishes and brand new discoveries.
'Jerry.
Download Attachment:
HalsAge.brn629 Bytes
Download Attachment:
HalsAgeDetect.brn949 Bytes