31
Ultra Hal Assistant File Sharing Area / Baal character repost-Gift for friends
« on: December 28, 2008, 06:56:31 pm »
Good lookin' head, Jack - I like the teeth!
Thanks
Thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
'x=x=x=x=x=x=x=x=x=x==ZAPHOD==x=x=x=x=x=x=x=x=x=x
'RESPOND: "On This Day" request
'Upon user request, Hal will read several entries from a
'file with info on events from this date in history.
DOM = right("0" & day(date()),2) 'Gives two-digit day of month.
MON = right("0" & month(date()),2) 'Gives two-digit month.
OTDDate = MON + DOM
If HalBrain.TopicSearch(UserSentence, WorkingDir & "OnThisDayDetect.brn") = "True" And GetResponseBlock <> True Then
Roulette = Int(Rnd*5)
If Roulette = 1 Then GetResponse = "Okie Dokie. I'll fetch you an item right now!"
If Roulette = 2 Then GetResponse = "Alrighty, how's about I get you two items?"
If Roulette = 3 Then GetResponse = "Sure thing! Here's three items that correspond to today's date in history."
If Roulette = 4 Then GetResponse = "Humph! Brain the size of a planet, and you want me to fetch trivia for you. Oh well..."
If Roulette = 5 Then GetResponse = "Get ready, cuz here comes a whole mouth full!"
BlockSave = True
for x = 1 to Roulette
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "OTD\" & OTDDate + ".txt") + " ... "
BlockSave = True 'Don't save User input when requesting a quote.
DebugInfo = DebugInfo & "The user has requested an On This Day quote and Hal has done so: " & GetResponse & VbCrLf
next
End If
'x=x=x=x=x=x=x=x=x=x==ZAPHOD==x=x=x=x=x=x=x=x=x=x