dupa

Author Topic: Combining Alice and DefBrain  (Read 4420 times)

jose7

  • Newbie
  • *
  • Posts: 13
    • View Profile
Combining Alice and DefBrain
« on: February 06, 2005, 11:53:46 am »
Hello,

   I am being trying to combine, Alice and Hal brain, but I being unable to do it, will someone help me please.

I needed detailed explanation of how to do it.

thanks in advance.
jose7
 

moreis62

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.myway.com/
Combining Alice and DefBrain
« Reply #1 on: February 12, 2005, 01:32:02 am »
quote:
Originally posted by jose7

Hello,

   I am being trying to combine, Alice and Hal brain, but I being unable to do it, will someone help me please.

I needed detailed explanation of how to do it.

thanks in advance.
jose7

hey jose7 thank you for e-mailing me.
will the first thing you need to do, is to open your

C:  Program Files  Zabaware  Ultra Hal Assistant 5
then you need to Edit the alice.uph file to what ever brain
you would to use.
noe, keep in mined that some file need to be edit like this,

 Function GetResponse(ByVal UserSentence, ByVal UserName, ByVal ComputerName, ByVal LearningLevel, ByRef WorkingDir, ByRef Hate, ByRef Swear, ByRef Insults, ByRef Compliment, ByRef PrevSent, ByRef LastResponseTime, ByRef PrevUserSent, ByRef ScriptMem3, ByRef ScriptMem4, ByRef ScriptMem5)

    Set Alice = CreateObject("HalAlice.PlugIn")
    GetResponse = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
    Set Alice = Nothing
    Randomize()

        'PROCESS: CREATE HALBRAIN ACTIVEX OBJECT
    'This ActiveX control contains many functions
   'needed for the script to proccess a sentence.
   Set Alice = CreateObject("HalAlice.PlugIn")
    GetResponse = Alice.Respond(UserSentence, UserName,   WorkingDir, "data\bot.ini", "loglocaluser.txt")
    Set HalBrain = CreateObject("UltraHalAsst.Brain")
    Set WN = CreateObject("UltraHalAsst.WordNet")
    Set Alice = Alice
    Set Alice = WN
    Randomize()


Now, at the botton of what ever brain you are using add this.



'If the user clicks on the About/Options button for this plugin
'this sub will be called. There are no extra settings for this brain,
'so we'll display an information box
Sub AboutOptions()
   Set HalBrain = CreateObject("UltraHalAsst.Brain")
   GetResponse = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
   Set Alice = CreateObject("HalAlice.PlugIn")
   Set Alice = HalBrain
    Set Alice = Nothing
    Randomize()
    HalBrain.MsgAlert "This is the ALICE plug-in for Ultra Hal Assistant. It allows the ALICE bot program from http://www.alicebot.org to work together with the Ultra Hal Assistant software from Zabaware."
   HalBrain.MsgAlert "This is the Ultra Hal 4.5 Default Brain. This brain has no additional options."
End Sub
       
'This sub will be called when the Ultra Hal program starts up in case
'the script needs to load some modules or seperate programs.
Sub Script_Load()
End Sub

'This sub will be called before the Ultra Hal program is closed in case
'the script needs to do any cleanup work.
Sub Script_Unload()
End Sub

« Last Edit: February 12, 2005, 01:45:06 am by moreis62 »
ISMAEL LEDESMA.

jose7

  • Newbie
  • *
  • Posts: 13
    • View Profile
Combining Alice and DefBrain
« Reply #2 on: February 13, 2005, 12:16:03 am »
Hi,

   Thank you very much for the info.
 I going to do that.