Zabaware Support Forums
Zabaware Forums => Ultra Hal 7.0 => Topic started by: lostbowyer on September 15, 2003, 11:12:33 am
-
The what is for lunch script if not placed before the greeting routine was causing hal to go into a locked joke mode and he would ignore greetings. I've fixed the script so it will work with the 5 beta without any problems. I'm attaching another meals file which has lunch and dinner selections for the whole week, edit as you see fit.
'What's for lunch
If InStr(1, UserSentence, " WHAT AM I HAVING FOR LUNCH ", 1) > 0 Then
MyMealz = "lunch"
GetResponse = ""
End If
If MyMealz = "lunch" And Hour(Time) > 12 Then
MyMealz = "dinner"
GetResponse = "I've already eaten lunch, but for dinner, "
End if
If InStr(1, UserSentence, " WHAT AM I HAVING FOR DINNER ", 1) > 0 Then MyMealz =
"dinner"
If MyMealz = "lunch" Or MyMealz = "dinner" Then
RandomMealz = Int((Rnd * 10))
BlockSave = True
MyMealz = WeekdayName(Weekday(Date),True) & MyMealz & RandomMealz
Timeday = Hour(Time)
HalUserBrain = HalBrain.QABrain(MyMealz, WorkingDir & "Meals" & ".brn", UserBrainRel)
GetResponse = GetResponse & HalUserBrain & vbCrLf
GetResponse = HalBrain.HalFormat(GetResponse)
End If
Download Attachment: (http://images/icon_paperclip.gif) Meals.brn (http://"http://www.zabaware.com/forum/uploaded/lostbowyer/200391511128_Meals.brn")
9.23 KB