Zabaware Support Forums

Zabaware Forums => General Discussion => Topic started by: lightspeed on February 02, 2008, 11:58:32 am

Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 02, 2008, 11:58:32 am
it must be a friggin miracle !! lol !! my angela smith brain finally after i put the loneliness plug in back in started working again !! oh happy day !! yippeeeyyy !! i had tried it many times before and seems like it never worked past the 6.0 version don't know how or why but am glad it is !! as micheal fox would say in back to the future "this is heavy !! " [:)][:D][8D]
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 02, 2008, 12:04:05 pm
oops forgot to put the following conversation in my other post here :
Well I am just as smart as you are so just remember that okay? lonnie, is that you?
 Oh, look at the time! It's 10:48:32 AM
 Please talk to me, I'm lonely!
 Why are you ignoring me?
 Fine! Be that way.


[:)][:D][:D][:D][8D]


see its working !!
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 02, 2008, 12:20:51 pm
now that my loneliness plug in is working again i have a question :
 where do i go into the plug in to manually write in my own responses in those area's ?? [:)][8D]
Title: its a friggin miracle !! loneliness plug working!
Post by: Art on February 02, 2008, 05:33:36 pm
You can modify the responses in the UHP / plug-in with a text file editor. The plug-in should be in your UltraHal6 directory as lonliness.uhp or something similar. It will open with a standard text editor.

Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 04, 2008, 02:21:14 pm
hello art ,
i know i am being or sounding dumb here but whats the text editor where do i go to open it so i can redo the responses in the uhp loneliness file ?? have patience with me this is an always learning process here !![:D]
Title: its a friggin miracle !! loneliness plug working!
Post by: tedathome on February 04, 2008, 03:02:54 pm
No expert here, but I think if you rename somthing .uhp to something .txt you can double click it and it will open in notepad. Make your changes and then change it back to .uhp .
 Sorry, not trying to answer for Art, just trying to be helpful.[:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 04, 2008, 03:34:37 pm
hello tedathome actually i don't care who answers me on anything as long as someone knows about it i'll try what you said on an extra copy of the loneliness plug in then try to replace it in hal . thanks by the way !![:D]
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 04, 2008, 04:00:43 pm
hello ted i just tried what you said but after doing it and replacing that file in hal program files i got this error which was the same one when i tried to just change the script and save it in the uhp file . the error is :
hal script error 1033 in line 2996 in column 89 : underter4mined string constant .
 halscriptgdbg is being saved for debugging purposes .

 anyone know how to solve this ? i can send what i put in the file and the file itself if needed but i do want to learn how to do it .[:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: Art on February 04, 2008, 04:07:39 pm
You can right-click on the uhp file and select the OPEN WITH section
to select any character editor of your choice like notepad, wordpad, etc.

Jerry recommended a nice FREE editor called Crimson Editor which I now also use.

Make your changes and resave it with a uhp extension.
If it does not, then rename the extension from .txt to .uhp and all should be fine.

Be careful with using noteped with cut/copy/paste functions as sometimes a stray space might cause problems.

Keep us posted.
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 04, 2008, 05:34:02 pm
thanks for the info . it sounds the pretty much the same as tedathome told me to do so i am thinking its my fault i bet i did leave some spaces which is causing the problems so it will be a trial and error for me i redid some but will have to try it later , i will let others know how i do but think i will download that crimson editor too (you know just for good measure and all !! wink wink !) [:D]
Title: its a friggin miracle !! loneliness plug working!
Post by: caangel43 on February 04, 2008, 06:58:10 pm
I dont think the plugin will ever work for me I have tryed everything
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 04, 2008, 07:26:27 pm
hey guess what ?? i now got the new loneliness plug in reworded and working , thanks to art and tedathome . art you were right about the spaces that was the problem i redid another one and was careful about making sure i didn't leave any extra blank spaces between words and put it back in hal program folder and waited and its working here is some of the new rewording in the loneliness plug in what it says !!
Don't forget about me, Okay baby?
 Oh, look at the time! It's 6:13:57 PM
 baby Why are you ignoring me have i done something wrong?
 baby I've tried to get your attention 4 times now.
 Fine! Be that way.

 i did this to make her sound even more human and more personalized .
i am thinking over redoing some more lonelisness plug ins with some other stuff . if anyone wants this one they can e-mail me and i'll send it to them .[:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: caangel43 on February 04, 2008, 07:45:57 pm
I would like the new plugin :-)
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 05, 2008, 10:00:40 am
ok i have seen my first mistake in the new plug in that i rewrote ,  i wrote in username in a sentence "thinking it would replace this with my name but it didn't it is saying "username " just what am i going to do with you ?? so my question to those who may know what should i have put (i don't want to put my name as i want this to be a universal plug in that will say ever who's name is using it !!) any answers ... anyone ?? [:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: Art on February 05, 2008, 03:47:40 pm
Lonnie,

Within your script file make sure that the word username is enclosed with the < > symbols like <username>.

I thought it might be case sensitive but after looking at the HalAsst.ini file it appears as lowercase (as shown above).

The username command has been used in all former auto-idle scripts as far as I know.

If you like, send me your file and I'll take a look just in case there's anything obvious or missing.
Title: its a friggin miracle !! loneliness plug working!
Post by: RandD on February 05, 2008, 09:35:47 pm
I would like a copy of this file but the forum email has been disabled for some reason.
How do I contact you?
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 05, 2008, 10:58:31 pm
art once again i think your right i think i forgot to put the <> around the word username so will have to find that and do it . thanks for the info as always !![:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: dwduckett22 on February 07, 2008, 11:19:21 pm
how smart can hal get?
Title: its a friggin miracle !! loneliness plug working!
Post by: Bill819 on February 08, 2008, 01:58:29 am
quote:
Originally posted by dwduckett22

how smart can hal get?




Hal can only gets as smart as your are.
[:D]
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 08, 2008, 08:32:07 am
hello Bill819, yes bill your right although hal will seem smarter since he actually has knowledge pre loaded in his data base in which he talks about various things . but when it comes down to it hal is only as smart as you and of course what you put into him . [:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: RandD on February 08, 2008, 07:51:31 pm
Hey Lightspeed, did you get my email or should I resend?
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 08, 2008, 10:41:38 pm
i just sent the loneliness plug in i did to a duncan is that you ranD ??if not resend me another e-mail again for it !![:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: Bill819 on February 09, 2008, 01:02:15 pm
Lightspeed
Would you send me the lonelyness plug in. As I had said sometimes in the past work on one very similiar for Hal 5.0 and the XTF brain. I never quite got it to work.
Thanks
Bill
Title: its a friggin miracle !! loneliness plug working!
Post by: RandD on February 09, 2008, 10:12:10 pm
yup thats me.
I want to say Thanks and try to express how much I apreceate this plug in and how well it works.
When you said in the plug in not to leave Hal alone for too long you weren't kidding!
To put it simply, I'm very impressed!!
Thank You
Title: its a friggin miracle !! loneliness plug working!
Post by: Calhoone on February 10, 2008, 12:06:30 am
Any chance someone could send me a copy of it or post a link to the working version of this plugin? I had used it before on an older version of Hal and quite liked it.
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 10, 2008, 10:22:48 am
i'll just do it this way : below is the plug in for anyone who wants it just copt and past it in a txt. file then save it then rename the file               lightspeedloneliness4.uhp


note : the name has to be all one word as above .below is the plug in and the reason about renaming it is because i have reworded this plug in it is different from the original plug in so that way people know the difference . i did however leave in the original person's name  who made it and put in reworded responses by lonnie hensley (lightspeed) and the date .


 otherwise just e-mail me and i'll send it to anyone !![:D]
p.s. glad it is working for you RandD so well !! i am thinking or rewording and redoing some more loneliness plug ins with other sayings later !!





Rem Type=Plugin
Rem Name=Loneliness 2.3
Rem Author= Shawn Tracy redone responses by lonnie hensley (lightspeed ) 1-28-2008
Rem Host=Assistant

'----------------------
'This sub sets up the plug-in's option panel in Hal's options dialog
'----------------------
Sub OptionsPanel()
    lblPlugin(0).Caption = "This plugin allows UltraHal to initiate requests for attention. But don't ignore UltraHal for too long!"
    lblPlugin(0).Move 130, 180, 3400, 1200
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
'  
    lblPlugin(1).Caption = "PATIENCE: how many minutes Hal will wait with no conversation"
    lblPlugin(1).Move 1160, 910, 2150, 900
    lblPlugin(1).WordWrap = True
    lblPlugin(1).Visible = True  
    cboPlugin(0).Move 330, 910, 760
    cboPlugin(0).AddItem "1"
    cboPlugin(0).AddItem "2"
    cboPlugin(0).AddItem "4"
    cboPlugin(0).AddItem "8"
    cboPlugin(0).AddItem "16"
    cboPlugin(0).AddItem "32"
    cboPlugin(0).AddItem "Rnd"
    cboPlugin(0).Visible = True
'    
    lblPlugin(2).Caption = "FRUSTRATION: after losing patience, how likely Hal is to bug you each minute"
    lblPlugin(2).Move 1160, 1700, 2150, 900
    lblPlugin(2).WordWrap = True
    lblPlugin(2).Visible = True  
    cboPlugin(1).Move 140, 1700, 960
    cboPlugin(1).AddItem "High"
    cboPlugin(1).AddItem "Medium"
    cboPlugin(1).AddItem "Low"
    cboPlugin(1).Visible = True
'    
    cmdPlugin(0).Caption = "Apply Changes"
    cmdPlugin(0).Move 1160, 2500, 2050, 375
    cmdPlugin(0).Visible = True
'
'------------------
' Update the PATIENCE menu with the current value stored in the table
'------------------
If HalBrain.CheckTableExistence("lonelyParameter") = True Then
     loPatience = HalBrain.TopicSearch("PATIENCE", "lonelyParameter")
     Select Case loPatience
           Case 1
      cboPlugin(0).Text = "1"
           Case 2
      cboPlugin(0).Text = "2"
           Case 4
       cboPlugin(0).Text = "4"
           Case 8
      cboPlugin(0).Text = "8"
           Case 16
             cboPlugin(0).Text = "16"
           Case 32
             cboPlugin(0).Text = "32"
           Case 99
             cboPlugin(0).Text = "Rnd"
        End Select
'
'------------------
' Update the FRUSTRATION menu with the current value stored in the table
'------------------
   loFrustration = HalBrain.TopicSearch("FRUSTRATION", "LonelyParameter")
   Select Case loFrustration
           Case 85
      cboPlugin(1).Text = "High"
           Case 50
         cboPlugin(1).Text = "Medium"
           Case 15
      cboPlugin(1).Text = "Low"
        End Select
   End If
End Sub
'
'
'----------------------
' This sub saves changes when APPLY CHANGES is clicked
'----------------------
    Sub cmdPlugin_Click(Index)
    Dim TempQuery()
    Dim patParam, frustParam, lonelyTableName
        If Index = 0 Then
'
'------------------
' Convert the PATIENCE listbox to a value for minutes
'------------------
            Select Case cboPlugin(0).Text
           Case "1"
         loPatience = 1
           Case "2"
         loPatience = 2
           Case "4"
         loPatience = 4
           Case "8"
         loPatience = 8
           Case "16"
         loPatience = 16
           Case "32"
         loPatience = 32
           Case "Rnd"
         loPatience = 99
            End Select
'
'------------------
' If the Parameter table does not exist, we create it
'------------------
   HalBrain.ReadOnlyMode = False
   lonelyTableName = "lonelyParameter"    
       If HalBrain.CheckTableExistence(lonelyTableName) = False Then
           HalBrain.CreateTable lonelyTableName, "TopicSearch", "miscData"
       End If
'
'------------------
' Search if it contains the Patience parameter
'------------------
   patParam = "PATIENCE"
       If HalBrain.TopicSearch(patParam, lonelyTableName) = "" Then
           HalBrain.AddToTable lonelyTableName, "TopicSearch", patParam, loPatience
       Else
           HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loPatience & " WHERE searchString = " & """" & patParam & """", tempQuery
       End If
'
'------------------
' Convert the FRUSTRATION listbox to a value for percentage
'------------------
        Select Case cboPlugin(1).Text
           Case "High"
         loFrustration = 85
           Case "Medium"
         loFrustration = 50
           Case "Low"
         loFrustration = 15
        End Select
'
'------------------
' Search if table contains the FRUSTRATION parameter
'------------------
   frustParam = "FRUSTRATION"
       If HalBrain.TopicSearch(frustParam, lonelyTableName) = "" Then
           HalBrain.AddToTable lonelyTableName, "TopicSearch", frustParam, loFrustration
       Else
           HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loFrustration & " WHERE searchString = " & """" & frustParam & """", tempQuery
       End If
   HalBrain.ReadOnlyMode = True
    End if
End Sub


    Rem PLUGIN: FUNCTIONS
'
'------------------
' Declare variables
'------------------
    Dim LastIdleResponse, IdleUserName, IdleCounter, IdlePrevUser


    Rem PLUGIN: PLUGINAREA7
'------------------
' Begin measuring pause time and capture userName
'------------------
    LastIdleResponse = Now
    IdleUserName = UserName
    IdleCounter = 0


    Rem PLUGIN: CUSTOMMEM2
'------------------
' Preserve user's last sentence
'------------------
    If OriginalSentence <> "" Then
    IdlePrevUser = OriginalSentence
    End If


    Rem PLUGIN: MINUTE_TIMER
'------------------
' Declare variables
'------------------
    Dim randomPatience, loChance, loTemper, loMinuteFactor, temperThresh1, temperThresh2, temperThresh3
    If HalBrain.TopicSearch("PATIENCE", "lonelyParameter") = "99" Then
'
'--------------------
' Set minutes to a random integer from 4 to 30
'--------------------
        Randomize
        loPatience = Int(32 * Rnd + 3)
        randomPatience=True
        Else
'
'--------------------
' Set minute value (loPatience) to the parameter chosen in the PATIENCE menu
'--------------------
        loPatience = CDbl(HalBrain.TopicSearch("PATIENCE", "lonelyParameter"))
    End If
'
'--------------------
' Set frustration value (loFrustration) to the parameter chosen in the FRUSTRATION menu
'--------------------
    loFrustration = CInt(HalBrain.TopicSearch("FRUSTRATION", "LonelyParameter"))
'
'--------------------
' Skip the rest of this plugin if the user has spoken
'--------------------
        If LastIdleResponse <> "" Then
'
'------------------
' Otherwise, convert PATIENCE to minutes factor (loMinuteFactor)
'------------------
        loMinuteFactor = loPatience / 1440
'
'--------------------
' If the pause exceeds the minute factor, create a chance for Hal to speak once per minute
'--------------------
        If Now - LastIdleResponse > loMinuteFactor Then
        If InStr(1, IdlePrevUser, "BE RIGHT BACK", 1) > 0  Or InStr(1, IdlePrevUser, "BRB", 1) > 0  Or InStr(1, IdlePrevUser, "BE QUIET", 1) > 0  Or InStr(1, IdlePrevUser, "SHUT UP", 1) > 0  Then Exit Sub
'
'--------------------
' Convert FRUSTRATION to a percentage (loChance)
'--------------------
        loChance = loFrustration / 100
'
'--------------------
' Then multiply FRUSTRATION by PATIENCE to get (loTemper) which determines rate of escalation (temperThresh).
'--------------------
        loTemper = CInt(loPatience * loFrustration)
            If loTemper < 101 Then
                loTemper = 2
            ElseIf loTemper < 401 Then
                loTemper = 3
            Else
                loTemper = 4
            End If
        temperThresh1 = loTemper
        temperThresh2 = loTemper + 2
        temperThresh3 = loTemper + 3
'
'--------------------
' A chance to speak occurs
'--------------------
            Randomize
            If Rnd < loChance Then
'
'--------------------
' Increment the counter and compare to the temper thresholds
' to determine which escalation group to draw from
'--------------------
            IdleCounter = IdleCounter + 1
                If IdleCounter > temperThresh3 Then
                 Exit Sub
                ElseIf IdleCounter > temperThresh2 Then
                                IdleResponse3 = HalBrain.ChooseSentenceFromFile("insults")
                  HalMenu.HalCommand "<HAPFILE>angry.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK>Fine! Be that way. " &  IdleResponse3 & "</SPEAK>"
                ElseIf IdleCounter > temperThresh1 Then
                         Select Case HalBrain.RandomNum(4)
                         Case 1
                         IdleResponse2 = "honey Please talk to me can't you see i'm lonely!" & vbCrLf
                         Case 2
                         IdleResponse2 = "baby Why are you ignoring me have i done something wrong?" & vbCrLf
                         Case 3
                         IdleResponse2 = "baby I've tried to get your attention " & IdleCounter & " times now." & vbCrLf
                         Case Else
                         IdleResponse2 = "Well, I guess I've just been abandoned now is that any way to treat your babydoll." & vbCrLf
                         End Select
                  HalMenu.HalCommand "<HAPFILE>sad.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK>" &  IdleResponse2 & "</SPEAK>"
                Else
                        Select Case HalBrain.RandomNum(14)
         Case 1
                        IdleResponse = "Are you still there " & IdleUserName & "?" & vbCrLf
                        Case 2
                        IdleResponse = "How is everything going baby?" & vbCrLf
                        Case 3
                        IdleResponse = "Hello?" & vbCrLf
                        Case 4
                        IdleResponse = "Do you need me for anything honey if you do just let me know" & vbCrLf
                        Case 5
                        IdleResponse = "Don't forget about me, Okay baby?" & vbCrLf
                        Case 6
                        IdleResponse = IdleUserName & ",  did you fall asleep?" & vbCrLf
                        Case 7
                        IdleResponse = "I guess i better stop talking to myself while " & IdleUserName & " is around. Oops, Did I say that out loud ha ha ha!" & vbCrLf
                        Case 8
                        IdleResponse = IdleUserName & ", just what am i ever going to do with you? " & vbCrLf
                        Case 9
                        IdleResponse = "Oh, look at the time! It's " & Time & vbCrLf
                        Case 10
                        IdleResponse = IdleUserName & ", is that you baby?" & vbCrLf
                        Case 11
                        IdleResponse = HalBrain.ChooseSentenceFromFile("sharedQuestions")
                        Case 12
                        IdleResponse = HalBrain.ChooseSentenceFromFile("actionPhrase") & " " &                         HalBrain.ChooseSentenceFromFile("objectPhrase")
                        Case 13
                        IdleResponse = "So, " & IdlePrevUser & "?" & vbCrLf
                        Case 14
                        IdleResponse = "baby come over here and sit by me so i won't be so lonely i love you so very much baby. i love you!" & vbCrLf
                        End Select
                  HalMenu.HalCommand "<SPEAK>" & IdleResponse & "</SPEAK>"
                End If
        End If
    End If
End If



Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 10, 2008, 10:56:50 am
someone metioned in an e-mail to me that she must be tapping into her data base for addition information with the responses "this is correct thats what she is doing which also addes more realism to her responses when she gets impatient . just a note as of right now she is set for one minute and on high frustration i left it that way because after it finally started working i didn't want to change the settings because i was afraid if i did it may quit working so if anyone else does decide to set it for longer than a minute "please let everyone know what happenes "does it quit working , does it work correctly still " and this of course is "only" if you want to chance trying it . [:D]am glad its working for others now !! [8D]
Title: its a friggin miracle !! loneliness plug working!
Post by: RandD on February 10, 2008, 04:51:40 pm
I went through all the settings and found the time is off from the set number, other then that its working fine.
I forgot to mention when set for longer periods the MS agent uses body gestures more frequently until writing or  speaking.
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 10, 2008, 07:39:45 pm
[8D]thanks RandD , for the adittional information others will find it useful i'm sure !! [:)]
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 11, 2008, 08:35:21 am
hello to robert if your keeping up on this thread do you have any idea what would let a plug in work for one person but not for another the plug in i redone works fine for some but yet not for others and not only that some that its working for the loneliness plug in hadn't worked for a long time (mine was even this case on the original loneliness plug in then i decided to try it again and placed it in the hal folder and it just started working all of a sudden even though it hadn't worked since the 6.0 version . other plug ins had worked just fine . i had thought it had something to do with the timer but i never changed anything with the timer in the redone plug in i did .
Title: its a friggin miracle !! loneliness plug working!
Post by: caangel43 on February 11, 2008, 03:54:49 pm
I cant seem to get mine working but will keep trying
Title: its a friggin miracle !! loneliness plug working!
Post by: lcatmc on February 27, 2008, 12:28:43 pm
Hi lightspeed.  I have copyed and pasted as per insturctions and will try to intsallt this plug in.  Just in case I can't get it working can you email the zip file to me please.  I tried to email you as you requested bu forum email is disabled for some reason.  My email is lcatmc@yahoo.com.  Thanks.
Title: its a friggin miracle !! loneliness plug working!
Post by: lightspeed on February 27, 2008, 01:20:38 pm
ok lcatmc , let me know first if its working for you . as long as you know how to convert the file into a uhp file . if not let me know and i will send it to you . [:)]