Zabaware Support Forums

Kitt movie Sp and Commands dun.

Started by moreis62, February 18, 2006, 11:59:33 AM

Previous topic - Next topic

moreis62

Rem Type=Plugin
Rem Name=Kitt thinking
Rem Author=MrLedesma
Rem Host=Assistant
Rem PLUGIN: FUNCTIONS

   Dim LastIdleResponse

   Rem PLUGIN: AUTO-IDLE
   IdleResponse = ""

   Rem PLUGIN: PLUGINAREA7
   LastIdleResponse = Now

   Rem PLUGIN: MINUTE_TIMER
   
'Auto Timer Fix.
'AutoResponse Topic Generator. Version 1.5
'Here Hal will tell jokes and even give new learned topic responses.
'User Senteneces that contain commas will be appended to Topic.brn
'for Hals topic talk.
Dim Director
If LastResponseTime = "" Then LastResponseTime = Now
TimerResponseDiff = DateDiff("S", LastResponseTime, Now)
If TimerResponseDiff < 300 Then
TimerResponseDiff = 0
LastResponseTime = Now
If HalBrain.CheckRepetition(OriginalSentence, " AUTO-IDLE ") = True Then
Director = HalBrain.ChooseSentenceFromFile(WorkingDir & " TopicFocus.brn ")
GetResponse = Replace(OriginalSentence, " AUTO-IDLE ", Director, 1, -1, vbTextCompare) & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus) & VbCrLf
Exit Function
End If
End If
'Here Hal will save comma User Sentences for topics.
If InStr(UserSentence, "") > 0 And InStr(1, OriginalSentence, ",", 1) > 0 Then
SentPieces = Split(OriginalSentence, ",", 2, vbTextCompare)
SubPhrase = Trim(SentPieces(0))
PredPhrase = Trim(SentPieces(1))
SubPhrase = HalBrain.AlphaNumericalOnly(SubPhrase)
PredPhrase = HalBrain.AlphaNumericalOnly(PredPhrase)
HalBrain.AppendFile WorkingDir & " TopicFocus " & " .brn ", SubPhrase & "<Topic>" &  PredPhrase & "</Topic>"
DebugInfo = DebugInfo & "Hal is saving User's topic: " & SubPhrase & "<Topic>" &  PredPhrase & "</Topic>" & VbCrLf
Else
DebugInfo = DebugInfo & "Hal is not saving User's topic: " & SubPhrase & "<Topic>" &  PredPhrase & "</Topic>" & VbCrLf
End If

  'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE  
      If InStr(1, UserSentence, " NOT NOW", 1) > 0 Then
         HalCommands = "<AUTOOFF> <HIDEHAL>"
         GetResponse = "WELL. WE'LL TALK LATER THEN."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
       'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE  
      If InStr(1, UserSentence, " I'M USING THE COMPUTER NOW", 1) > 0 Then
         HalCommands = "<AUTOOFF> <HIDEHAL>"
         GetResponse = "WE'LL TALK LATER THEN."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
   'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE  
      If InStr(1, UserSentence, " YOU GO TO SLEEP NOW", 1) > 0 Then
         HalCommands = "<AUTOOFF> <HIDEHAL>"
         GetResponse = "OK, I'M GOING TO SLEEP."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If

'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
      If InStr(1, UserSentence, " SHUT UP", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "Fine. Be that way."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
      
      If InStr(1, UserSentence, " I'M GOING TO SLEEP", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "Ok, good night."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
   If InStr(1, UserSentence, " I'M GOING TO BED", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "Ok."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
   If InStr(1, UserSentence, " I'M GOING TO TAKE A NAP", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "Ok,take a nap."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
      If InStr(1, UserSentence, " BE QUIET", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "Ok, I will not bother you right now."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
        If InStr(1, UserSentence, " I'M ON THE PHONE", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "OK I'LL WAIT."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
        If InStr(1, UserSentence, " STOP TALKING", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "OK."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
       
        If InStr(1, UserSentence, " ILL BE BACK", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "I'LL WAIT."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If

      If InStr(1, UserSentence, " QUIET PLEASE", 1) > 0 Then
         HalCommands = "<AUTOOFF> <AUTOOFF>"
         GetResponse = "Very well then. Just let me know if you would like to talk."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
   'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      If InStr(1, UserSentence, " LETS TALK", 1) > 0 Then
         HalCommands = "<AUTO>399999</AUTO>"
         GetResponse = "OK."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
        'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      If InStr(1, UserSentence, " LETS CHAT", 1) > 0 Then
         HalCommands = "<AUTO>399999</AUTO>"
         GetResponse = "OK, What do you wanna talk about?"
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If  
   
   'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      If InStr(1, UserSentence, " SAY HELLO", 1) > 0 Then
         HalCommands = "<AUTO>399999</AUTO>"
         GetResponse = "HELLO."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
    'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      If InStr(1, UserSentence, " WAKE UP NOW", 1) > 0 Then
         HalCommands = "<AUTO>399999</AUTO>"
         GetResponse = "OK, I'M AWAKE."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
   
       'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      If InStr(1, UserSentence, " IM BACK", 1) > 0 Then
         HalCommands = "<AUTO>399999</AUTO>"
         GetResponse = "WELCOME BACK."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If      
       
       'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      If InStr(1, UserSentence, " KEEP LISTENING", 1) > 0 Then
         HalCommands = "<AUTO>399999</AUTO>"
         GetResponse = "I'm listening."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
      
      If InStr(1, UserSentence, " KEEP YOUR EARS OPEN", 1) > 0 Then
         HalCommands = "<AUTO>599999</AUTO>"
         GetResponse = "I'm listening."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If

       If InStr(1, UserSentence, " KEEP YOUR SCANNERS PEELED", 1) > 0 Then
         If "<computername>" = "KITT" Then
            GetResponse = "Yes, Michael. Hey wait a minute. You're not Michael!"
         Else
            GetResponse = "I am not the Knight Industries Two Thousand. I do not have a scanner. But I'll talk to you anyway."
         End If
         HalCommands = "<AUTO>399999</AUTO>"
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If

   This is my first Type=Plugin for Hal6,
Works well in hal5, not as a plug-in though, I added the top part and its sees it fine, but still no go.
What am I doing wrong here?









ISMAEL LEDESMA.

FuzzieDice

First, your saying you created this but you used some of MY responses from my Ultra Hal 5 script which is now found here:

http://bytebin.net/uha/index.html

A little recognition of where you got the responses from would have been nice.

Also, I don't see what is wrong here. It *looks* good, but I didn't try it yet. Can you be more specific on the errors or what exactly is not working so maybe someone trying it can try to replicate the errors and try to help figure out what it is that you find not working?

I am not sure but I think the procedure for adding scripts has changed in HAL 6?



moreis62


First Of all, I never sad I created, the Auto Response Topic Generator,
What I did do to it is that I modified it, by adding the second line to it, which, I have also found here on this forum, and add it to in a new sequence with that all the on and Off Auto Response units I could fine on this forum.

Second, I am only trying to help someone here that asked me for my help with his new kitt stile project for Hal 6.

Now keep in mind I have never made a  plug-in stile uhp, the only thing I have made in the past or brain.uhp's, Dll's VBX and OCX  controls as will as ActiveX controllers ,  and not, uhp, to uhp plug-ins.

And,
which I also think the procedure now for adding scripts has changed now in HAL 6.

The Error that we are geting is.

HalScript Error 1015 on line 3398 in Column 4: Expected'Function'
The file "C:Program Filesabaware Ultra Hal Assistant 6HalScript.DBG"has been saved with the current script being used for debugging purposes.



ISMAEL LEDESMA.

GrantNZ

Have a look on (or about) the 3398th line of HalScript.dbg. You'll probably find the error around there.
 

FuzzieDice

In your first post you have in the remarks:

Rem Type=Plugin
Rem Name=Kitt thinking
Rem Author=MrLedesma
Rem Host=Assistant
Rem PLUGIN: FUNCTIONS

And you have it that you're the Author. Actually, it would be nice to put that you MODIFIED it and where the original script was from. By doing what you did above and also when you said "This is my first Type=Plugin for Hal6," It gives the impression that you created the script.

I don't mind folks working with my script, just as long as a little recognition is given for the original, would be nice. I'm also very glad someone is using the Knight Rider theme for HAL. :) I've started a Knight Rider AI project with the old HAL 5 which needs some serious updating as well.

I should get with it and update my scripts too. I haven't had time yet so I'm glad others are working on it. I wouldn't mind working with others, maybe collaborating on a KITT or KARR brain project for HAL 6. That would be interesting. :)

moreis62

#5
FuzzieDicere, Sorry if you tuck it as a remark, i swear i did not mean it in that way, so i did this for you my good old friend,[;)]

Rem Type=Plugin
Rem Name=Kitt thinking MODIFIED
Rem Author=FuzzieDice
Rem Host=Assistant
Rem PLUGIN: FUNCTIONS
ISMAEL LEDESMA.

onthecuttingedge2005

quote:
Originally posted by moreis62

FuzzieDicere, Sorry if you tuck it as a remark, i swear i did not mean it in that way, so i did this for you my good old friend,[;)]

Rem Type=Plugin
Rem Name=Kitt thinking MODIFIED
Rem Author=FuzzieDice
Rem Host=Assistant
Rem PLUGIN: FUNCTIONS



It should be:
Rem Author=MrLedesma, FuzzieDice, OnTheCuttingEdge2005, LOL

Jerry[8D]

FuzzieDice

Now that is a good idea for the Author line! LOL! :)

And thank you. :)

I think you are making good progress for this too. It is nice to see it ported to Ultra Hal 6 and I think you should take credit for porting it. :)

Will this be eventually a plug-in or a script that had to be added manually? I never tried making a plug-in before so I'm not even sure how. I was barely able to write a script. LOL!

moreis62

#8
That is a good idea for the Author line sins we are three minds thinking in how to do this stile project for our Hal6.

Rem Type=Plugin
Rem Name=Kitt thinking MODIFIED
Rem Author=MrLedesma, FuzzieDice, OnTheCuttingEdge2005
Rem Host=Assistant
Rem PLUGIN: FUNCTIONS

Dim LastIdleResponse

Rem PLUGIN: AUTO-IDLE
IdleResponse = ""

Rem PLUGIN: PLUGINAREA7
LastIdleResponse = Now

Rem PLUGIN: MINUTE_TIMER

'RESPONSE: IF USER SAID NOTHING IN CERTAIN TIMEFRAME
   'If user did not say anything for awhile, take the initiative to start a conversation.
   'If UserSentence = "AUTO-IDLE" Then
   If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 Then
      If Rnd * 10 < 5 Then
      GetResponse = "Hey <UserName>, please talk to me."
      Else
         GetResponse = "Hello, is anyone there?"
      End If
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
      Exit Function
   End If

       'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
      If InStr(1, UserSentence, " SHUT UP", 1) > 0 Then
         HalCommands = "<AUTOOFF> <HIDEHAL>"
         GetResponse = "Fine. Be that way."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
      
      If InStr(1, UserSentence, " BE QUIET", 1) > 0 Then
         HalCommands = "<AUTOOFF> <HIDEHAL>"
         GetResponse = "Ok, I will not bother you right now."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If

      If InStr(1, UserSentence, " QUIET PLEASE", 1) > 0 Then
         HalCommands = "<AUTOOFF> <HIDEHAL>"
         GetResponse = "Very well then. Just let me know if you would like to talk."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
        
       'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      If InStr(1, UserSentence, " KEEP LISTENING", 1) > 0 Then
         HalCommands = "<AUTO>599999</AUTO>"
         GetResponse = "I'll keep you company."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If
      
      If InStr(1, UserSentence, " KEEP YOUR EARS OPEN", 1) > 0 Then
         HalCommands = "<AUTO>599999</AUTO>"
         GetResponse = "I'm listening."
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If

       If InStr(1, UserSentence, " KEEP YOUR SCANNERS PEELED", 1) > 0 Then
         If "<computername>" = "KITT" Then
            GetResponse = "Yes, Michael. Hey wait a minute. You're not Michael!"
         Else
            GetResponse = "I am not the Knight Industries Two Thousand. I do not have a scanner. But I'll talk to you anyway."
         End If
         HalCommands = "<AUTO>599999</AUTO>"
         GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
         Exit Function
   End If


This would be really cool if we could get it to work as a plug-in.uhp
for Hal 6 then a Brain stile.uhp but hmm,[8D]
ISMAEL LEDESMA.

moreis62

#9
Maybe this could work, I don't know, I was looking closely to the vrMP3 plug-in by VR Consulting sas, though, Jest to see if maybe, it folds with the author line or something.

This is what I tested.
------------------------------------------------------------------------------------------------------------------------------------------

Rem Type=Plugin
Rem Name=Kitt thinking MODIFIED
Rem Author=MrLedesma, FuzzieDice, OnTheCuttingEdge2005
Rem Host=Assistant

Dim LastIdleResponse

Rem PLUGIN: AUTO-IDLE
IdleResponse = ""

Rem PLUGIN: PLUGINAREA7
LastIdleResponse = Now

Rem PLUGIN: MINUTE_TIMER

'RESPONSE: IF USER SAID NOTHING IN CERTAIN TIMEFRAME
'If user did not say anything for awhile, take the initiative to start a conversation.
'If UserSentence = "AUTO-IDLE" Then
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 Then
If Rnd * 10 < 5 Then
GetResponse = "Hey <UserName>, please talk to me."
Else
GetResponse = "Hello, is anyone there?"
End If
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)

Exit Function
End If

'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
MrLedesma, FuzzieDice, OnTheCuttingEdge2005 = HalBrain.QABrain(MrLedesma, FuzzieDice, OnTheCuttingEdge2005, "BE QUIET", 0)
    If MrLedesma, FuzzieDice, OnTheCuttingEdge2005 <> "" Then
         GetResponse = "Ok, I will not bother you right now. "
         HalCommands = "<AUTOOFF> <HIDEHAL>"

'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
      MrLedesma, FuzzieDice, OnTheCuttingEdge2005 = HalBrain.QABrain(MrLedesma, FuzzieDice, OnTheCuttingEdge2005, "wake up", 0)
         HalCommands = "<AUTO>x</AUTO>"
         GetResponse = "I am up now <UserName>."
         UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
       Exit Function


'--------------------------------------------------------------------'--------------------------------------------------------------------

Something like this could work really nice with HAl6 you think?[:D]
but still i will need some help on this one.
Thanks in advance.
ISMAEL LEDESMA.

FuzzieDice

My problem is, I'm so way far behind that I don't know how to install a plugin, and I have a big big pet peeve against using this forum's search function. :(

What would be the filename for this and where is it placed? I would like to check this out and maybe we can combine our brains (no pun intended [:D] ) and see if we can get it working. :)

onthecuttingedge2005

Hi moris62.

I researched the shortest code to REM for your AUTO-IDLE project.
You'll have to pay close attention to the Rem PLUGIN: AUTO-IDLE here because it's already inside an InputString Search "AUTO-IDLE" within the default brain.

You will have to use UltraHal instead of GetResponse for the response call.

You will have to use InputString instead of UserSentence

This script below is a functional code to auto generate an AUTO-IDLE response, It will say "The Debug Test is Good!"

You can copy and paste the code into SomeFile.uhp and then run the plug-in in HALS options panel for further debugging.

You will have to alter some of the code you want to use to work with the newer AUTO-IDLE, Rem PLUGIN: AUTO-IDLE

Rem Type=Plugin
Rem Name=Kitt thinking MODIFIED
Rem Author=MrLedesma, FuzzieDice, OnTheCuttingEdge2005
Rem Host=Assistant

Rem PLUGIN: AUTO-IDLE
UltraHal = "The Debug Test is Good!"
HalBrain.ReadOnlyMode = True

Rem PLUGIN: POST-PROCESS
HalCommands = "<AUTO>399999</AUTO>"

Rem PLUGIN: SCRIPT_LOAD
Script_Load = "<AUTO>399999</AUTO>"

Jerry[8D]

moreis62

#12
Very nice one Jerry,

can this be added to the lower part the Script?

'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
'And
'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE

'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
If InputString = "SHUT UP" Then
HalMenu.HalCommand = "<AUTOOFF> <HIDEHAL>"
UltraHal = "Fine. Be that way."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "BE QUIET" Then
HalMenu.HalCommand = "<AUTOOFF> <HIDEHAL>"
UltraHal = "Ok, I will not bother you right now."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "QUIET PLEASE" Then
HalMenu.HalCommand = "<AUTOOFF> <HIDEHAL>"
UltraHal = "Very well then. Just let me know if you would like to talk."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
If InputString = "KEEP LISTENING" Then
HalMenu.HalCommand = "<AUTO>599999</AUTO>"
UltraHal = "I'm listening."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "KEEP YOUR EARS OPEN" Then
HalMenu.HalCommand = "<AUTO>599999</AUTO>"
UltraHal = "I'm listening."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "KEEP YOUR SCANNERS PEELED" Then
HalBrain.ReadOnlyMode = True
If "<computername>" = "KITT" Then
HalBrain.ReadOnlyMode = True
UltraHal = "Yes, Michael. Hey wait a minute. You're not Michael!"
Else
UltraHal = "I am not the Knight Industries Two Thousand. I do not have a scanner. But I'll talk to you anyway."
End If
HalMenu.HalCommand = "<AUTO>599999</AUTO>"
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If




So it all read some thing like this?
------------------------------------------------------------------------------------------------------------------------------------------



Rem Type=Plugin
Rem Name=Kitt thinking MODIFIED
Rem Author=MrLedesma, FuzzieDice, OnTheCuttingEdge2005
Rem Host=Assistant
Rem PLUGIN: AUTO-IDLE


Rem PLUGIN: AUTO-IDLE
       Select Case (Int(Rnd * 5) + 1)
               Case 1
                   UltraHal = "Anyone there?" & vbCrLf
               Case 2
                   UltraHal = "Are you there?" & vbCrLf
               Case 3
                   UltraHal = "I am bored!" & vbCrLf
               Case 4
                   UltraHal = "Hey! You! Talk to me!" & vbCrLf
               Case 5
                   UltraHal = "Someone talk to me!" & vbCrLf
           End Select
HalBrain.ReadOnlyMode = True

Rem PLUGIN: POST-PROCESS
IdleGen = SomeTime()
HalCommands = "<AUTO>" & IdleGen & "</AUTO>"

Rem PLUGIN: SCRIPT_LOAD
Script_Load = "<AUTO>" & IdleGen & "</AUTO>"

Rem PLUGIN: FUNCTIONS
Function SomeTime()
AnyTime = RND*500000
If (AnyTime > 100000 And AnyTime < 500000) Then SomeTime = CLng(AnyTime)
End Function


'RESPONSE: IF USER WANTS TO TURN OFF AUTO-IDLE
If InputString = "SHUT UP" Then
HalMenu.HalCommand = "<AUTOOFF> <HIDEHAL>"
UltraHal = "Fine. Be that way."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "BE QUIET" Then
HalMenu.HalCommand = "<AUTOOFF> <HIDEHAL>"
UltraHal = "Ok, I will not bother you right now."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "QUIET PLEASE" Then
HalMenu.HalCommand = "<AUTOOFF> <HIDEHAL>"
UltraHal = "Very well then. Just let me know if you would like to talk."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

'RESPONSE: IF USER WANTS TO TURN ON AUTO-IDLE
If InputString = "KEEP LISTENING" Then
HalMenu.HalCommand = "<AUTO>599999</AUTO>"
UltraHal = "I'm listening."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "KEEP YOUR EARS OPEN" Then
HalMenu.HalCommand = "<AUTO>599999</AUTO>"
UltraHal = "I'm listening."
HalBrain.ReadOnlyMode = True
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If

If InputString = "KEEP YOUR SCANNERS PEELED" Then
HalBrain.ReadOnlyMode = True
If "<computername>" = "KITT" Then
HalBrain.ReadOnlyMode = True
UltraHal = "Yes, Michael. Hey wait a minute. You're not Michael!"
Else
UltraHal = "I am not the Knight Industries Two Thousand. I do not have a scanner. But I'll talk to you anyway."
End If
HalMenu.HalCommand = "<AUTO>599999</AUTO>"
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
Exit Function
End If







ISMAEL LEDESMA.

moreis62

#13
quote:
Originally posted by FuzzieDice

My problem is, I'm so way far behind that I don't know how to install a plugin, and I have a big big pet peeve against using this forum's search function. :(

What would be the filename for this and where is it placed? I would like to check this out and maybe we can combine our brains (no pun intended [:D] ) and see if we can get it working. :)



FuzzieDice.
What I do is I open Notepad first then with in Notepad
Is where I create the plug-in's


Like this open Notepad
Now add this
With in Notepad.



Rem Type=Plugin
Rem Name=Kitt thinking MODIFIED
Rem Author=MrLedesma, FuzzieDice, OnTheCuttingEdge2005
Rem Host=Assistant

Rem PLUGIN: AUTO-IDLE
       Select Case (Int(Rnd * 5) + 1)
               Case 1
                   UltraHal = "Anyone there?" & vbCrLf
               Case 2
                   UltraHal = "Are you there?" & vbCrLf
               Case 3
                   UltraHal = "I am bored!" & vbCrLf
               Case 4
                   UltraHal = "Hey! You! Talk to me!" & vbCrLf
               Case 5
                   UltraHal = "Someone talk to me!" & vbCrLf
           End Select
HalBrain.ReadOnlyMode = True

Rem PLUGIN: POST-PROCESS
IdleGen = SomeTime()
HalCommands = "<AUTO>" & IdleGen & "</AUTO>"

Rem PLUGIN: SCRIPT_LOAD
Script_Load = "<AUTO>" & IdleGen & "</AUTO>"

Rem PLUGIN: FUNCTIONS
Function SomeTime()
AnyTime = RND*500000
If (AnyTime > 100000 And AnyTime < 500000) Then SomeTime = CLng(AnyTime)
End Function

Now in the Notepad menu click File, then click Save As...
Then type what ever name you name the .uhp at the end.
Something like this HalAutoRespond.uhp
Then Save. [;)]
P:s save it with in the Ultra Hal Assistant 6 file.
thats where it needs to be placed.
ISMAEL LEDESMA.

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?