quote:
Originally posted by FuzzieDice
After you save the uhp (and I assume you mean in the Ultra Hal Assistant 6 DIRECTORY and not file
) how do you load it into HAL to work? In the Plugins configuration I assume?
Yep, Thats how its dun, FuzzieDice. [

]
Hello Jerry,
Hers what I came up with, hope you like it my friend.
P s feel free to add it to one of your really cool D.A.V.I.D's plug-ins post.
But you should see how it works; I’ll leave the rest up to you, if you feel some thing is missing feel free to add to it. [8D]
Rem Type=Plugin
Rem Name=Kitt thinking modified
Rem Author=moreis62, FuzzieDice, OnTheCuttingEdge2005
Rem Host=Assistant
Rem PLUGIN: AUTO-IDLE
Select Case (Int(Rnd * 11) + 1)
Case 1
UltraHal = "Oh, look at the time now! It's " & Time & vbCrLf
Case 2
UltraHal = "Do you need me for anything?" & vbCrLf
Case 3
UltraHal = "Would you like to here an MP3?" & vbCrLf
Case 4
UltraHal = "So, How are you feeling?" & vbCrLf
Case 5
UltraHal = "How is everything going?" & vbCrLf
Case 6
UltraHal = "Would you like to here a joke?" & vbCrLf
Case 7
UltraHal = "Here is to days Date and year! It's " & Date & vbCrLf
Case 8
UltraHal = HalBrain.ChooseSentenceFromFile("sentGen1") & " " & HalBrain.ChooseSentenceFromFile("sentGen2") & " " & HalBrain.ChooseSentenceFromFile("sentGen3") & vbCrLf
Case 9
UltraHal = "Do you have any emails, phone numbers, or street address you would like me to save for a later use?" & vbCrLf
Case 10
UltraHal = "Do you have any anniversarys, appointments, assignments, bills, birthdays, breakfasts, brunches, classes, conferences, dates, dinner plans, things to due, holidays, homework, lunches, meetings, projects, t v or movies shows, trips, vacations, or visits you would like for me to add to your schedule?" & vbCrLf
Case 11
UltraHal = "Would you like me to play you an MP3 for you to listen to?" & vbCrLf
End Select
HalBrain.ReadOnlyMode = True
Rem PLUGIN: POST-PROCESS
Dim GetLost
GetLost = GoAway(HalCommands)
Dim GoToSleep
GoToSleep = GoToBed(HalCommands)
Dim IdleGen
IdleGen = SomeTime()
Dim StartIdle
StartIdle = TalkToMe(HalCommands)
HalCommands = StartIdle
'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
If InStr(1, InputString, "QUIET PLEASE", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Very well then. Just let me know if you would like to talk."
End If
If InStr(1, InputString, "BE QUIET", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, I will not bother you right now."
End If
If InStr(1, InputString, "SHUT UP", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Fine. Be that way."
End If
If InStr(1, InputString, "STOP TALKING", 1) > 0 Then
HalCommands = GetLost
UltraHal = "OK, We'll talk later then."
End If
If InStr(1, InputString, "I'M ON THE PHONE", 1) > 0 Then
HalCommands = GetLost
UltraHal = "OK I'LL WAIT."
End If
If InStr(1, InputString, "I'LL BE BACK", 1) > 0 Then
HalCommands = GetLost
UltraHal = "I'LL WAIT."
End If
If InStr(1, InputString, "I'M GOING TO TAKE A NAP", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, take a nap."
End If
If InStr(1, InputString, "I'M GOING TO BED", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, Bye"
End If
If InStr(1, InputString, "BYE", 1) > 0 Then
HalCommands = GetLost
UltraHal = "Ok, See you later, bye."
End If
If InStr(1, InputString, "GO TO SLEEP", 1) > 0 Then
HalCommands = GoToSleep
UltraHal = "Good Night. "
End If
If InStr(1, InputString, "GO TO BED", 1) > 0 Then
HalCommands = GoToSleep
UltraHal = "Good Night. "
End If
If InStr(1, InputString, "NOT NOW", 1) > 0 Then
HalCommands = GoToSleep
UltraHal = "Ok. "
End If
'RESPONSE: IF USER WANTS TO TURN BACK ON AUTO-IDLE
If InStr(1, InputString, "Wake up now", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Ok, Ok, I'm awake now. "
End If
If InStr(1, InputString, "LETS TALK", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Ok."
End If
If InStr(1, InputString, "LETS CHAT", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Ok."
End If
If InStr(1, InputString, "SAY HELLO", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Hello."
End If
If InStr(1, InputString, "IM BACK", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "WELCOME BACK."
End If
If InStr(1, InputString, "I'M BACK", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "WELCOME BACK."
End If
If InStr(1, InputString, "KEEP LISTENING", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I'm listening."
End If
If InStr(1, InputString, "SAY SORRY", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "Sorry."
End If
If InStr(1, InputString, "SAY YOUR SORRY", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I'm sorry."
End If
If InStr(1, InputString, "WHO YOU ARE", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "There's no reason for increased volume I am scanning your interrogatives quite satifac torily thank you, I am the voice of The U.S. Governments elite real knight rider Project, made at DARPA, wich is the Defense Advanced Research Projects Agency AND Zabaware INCORPORATED 2010's micro- processor, K.I.T.T. for easy reference, if you prefer."
End If
If InStr(1, InputString, "WHO ARE YOU", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "There's no reason for increased volume I am scanning your interrogatives quite satifac torily thank you, I am the voice of The U.S. Governments elite real knight rider Project, made at DARPA, wich is the Defense Advanced Research Projects Agency AND Zabaware INCORPORATED 2010's micro- processor, K.I.T.T. for easy reference, if you prefer."
End If
If InStr(1, InputString, "KEEP YOUR EARS OPEN", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I'm listening."
End If
If InStr(1, InputString, "KEEP YOUR SCANNERS PEELED", 1) > 0 Then
HalCommands = StartIdle
UltraHal = "I am not the Knight Industries Two Thousand. I do not have a scanner. But I'll talk to you anyway."
End If
Rem PLUGIN: PLUGINAREA1
If Len(PrevSent) = 0 And Len(PrevUserSent) = 0 Then
HalCommands = StartIdle
End If
Rem PLUGIN: SCRIPT_LOAD
Script_Load = StartIdle
Rem PLUGIN: FUNCTIONS
Function SomeTime()
Select Case (Int(Rnd * 10) + 1)
Case 1
AnyTime = RND*10000
Case 2
AnyTime = RND*20000
Case 3
AnyTime = RND*30000
Case 4
AnyTime = RND*40000
Case 5
AnyTime = RND*50000
Case 6
AnyTime = RND*10000
Case 7
AnyTime = RND*20000
Case 8
AnyTime = RND*30000
Case 9
AnyTime = RND*40000
Case 10
AnyTime = RND*50000
Case 10
AnyTime = RND*10000
Case 11
AnyTime = RND*20000
End Select
SomeTime = CLng(AnyTime)
End Function
'Turn AUTO-IDLE off and hide HAL.
Function GoAway(HalCommands)
HalCommands = "<AUTOOFF>" & " " & "<HIDEHAL>"
GoAway = HalCommands
End Function
'Turn AUTO-IDLE off and make HAL sleepy.
Function GoToBed(HalCommands)
HalCommands = "<AUTOOFF>" & " " & "<HAPFILE>Sleepy.hap</HAPFILE>"
GoToBed = HalCommands
End Function
'Send Idle Time.
Function TalkToMe(HalCommands)
HalCommands = "<AUTO>"& IdleGen & "</AUTO>"
TalkToMe = HalCommands
End Function