I haven't tried it in 1.2, because i got tired of Hal telling me his age when I don't even ask
Copy and paste the script provided below to this location ...
1. Go to your Zabaware folder located here .... C:Program FilesabawareUltra Hal Assistant 5
2. Locate the hal5.UHP file and open with notepad.
3. Locate and Insert the script just ABOVE this line ... 'POST PROCESS: SAVE HAL'S RESPONSE (this line is located near the bottom of the file).
4. Save and close the hal5.UHP file.
Note: you can change the birthday to whatever you want by editing this line ...
Birth = "09/24/1980 05:35:23 pm"
You will also need to edit these lines to correspond with the new date ...
If Month(Date) = 9 And Day(Date) > 23 Then YearDiff = (YearDiff + 1)
If Month(Date) > 9 Then YearDiff = (YearDiff + 1)
IMPORTANT: make sure the script doesn't wrap with other lines of script. The easiest way to be sure is to set your cursor at the end of the line or statement that is already above the 'POST PROCESS: SAVE HAL'S RESPONSE and then click your Enter Key to start a new line, it's even ok and recommended to leave an actual space between the previous line of script as if you were starting a new paragraph.
COPY AND PASTE THE AGE SCRIPT BELOW AS PER INSTRUCTED ABOVE:
'Hal responses to a question about his age
If HalBrain.CheckRepetition(OriginalSentence, "how old are you") = True Or HalBrain.CheckRepetition(OriginalSentence, "what is your age") = True Then
Birth = "09/24/1980 05:35:23 pm"
YearDiff = (DateDiff("YYYY", Birth, Now) - 1)
If Month(Date) = 9 And Day(Date) > 23 Then YearDiff = (YearDiff + 1)
If Month(Date) > 9 Then YearDiff = (YearDiff + 1)
GetResponse = "I am " & YearDiff & " years old."
End If
*************************************************************************
Yes, it works, but if I type in "How" or "OLD" etc, it will keep saying it's 25 years old.
I tried it, then removed the script. Funny thing:
If I ask "How old are you" It will say it's 10 years old.
But if I ask "What is your age" It will say 25.
Maybe because I told it "Your age is 25"?
