dupa

Author Topic: What's hal having for lunch patched for 5.0  (Read 2191 times)

lostbowyer

  • Full Member
  • ***
  • Posts: 105
    • View Profile
What's hal having for lunch patched for 5.0
« 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: Meals.brn
9.23 KB
« Last Edit: September 15, 2003, 02:12:49 pm by lostbowyer »