Zabaware Support Forums
Zabaware Forums => Ultra Hal 7.0 => Topic started by: markofkane on May 14, 2005, 05:10:32 pm
-
Hal seems to only talk, if you talk to it. How about having Hal say things, like Cyberbuddy does, at random?
Of course, have a means to turn the function off and on, because you wouldn't want it talking to you all the time.
Maybe have the Hal Window open, but you don't say anything for awhile.
Then Hal might say:
"Nice day, isn't it?"
"Are you still here?"
"Why are you ignoring me"
"I'm lonely. Talk to me!!"
"You are such a good person."
Just some ideas. Thanks!!!
-
I think that someone had a script for something like this.
Hal would come up with comments during idle time.
Try searching the forums for "idle".
I had an interesting weekend getting the haptek characters to respond properly to keywords. Now hal looks sad when i mention sad topics.
I realised that the program was only showing a default set of emotions (with the XTF brain) which bore no relation to the words you typed - so with a bit of digging around and a lot of eyestrain later I have an emotional Hal!
Goodl luck the idle, its on my list of things to do, I'll see what I can come up with.
-
Try this Mark: http://www.zabaware.com/forum/topic.asp?TOPIC_ID=996
-
Thanks, where is the "script load" ???
-
Insert your script right after this in the brain editor:
'PROCESS: INITIALIZE VARIABLES AS INTEGERS
*YOUR SCRIPT GOES HERE*
-
It doesn't work. I keep getting "Error 1015" at line 291.
-
what is wrong? It said "please talk to me" once. , after I typed in "auto-idle"
'PROCESS: INITIALIZE VARIABLES AS INTEGERS
'VBScript doesn't allow you to declare variables in advance
'as a particular data type; everything is a Variant.
'We must assign integers to the following
'variants so that data type errors don't occur
If LearningLevel = "" Then LearningLevel = 3
If Hate = "" Then Hate = 0
If Swear = "" Then Swear = 0
If Insults = "" Then Insults = 0
If Compliment = "" Then Compliment = 0
If GainControl = "" Then GainControl = 25
AvoidBeingFlag = False
Randomize
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
-
The Script_load function must not be triggering every 30 seconds,
I am using the 1.2 brain.
Still, she won't speak unless I type something in
-
sorry for all the posts, I got it to work after inserting the scripts in the default brain.
Is that where all the scripts are supposed to go?
i still am having a problem: It won't autimatically work in 1.2 brain
It does work in the default brain, but it says random things. Not what's in the script. I don't even have to type in "auto-idle".
In 1.2, I also hav a script to change clothes, and accessories. I wonder if that script is keeping the other from working?
-
If it's not there, be sure to modify the following.
It should be before the last paragraph (if you will)
in the Brain file.
'New Hal functions from Medeksza's forum. Needs lots of development.
Function Script_Load()
Script_Load = "<AUTO>580000</AUTO>"
'Script_Load = "<VIEWCHAT>"
End Function
If this doesn't work let me know and I'll send you my auto response section.
-
In the XTF 1.2 you shouldn't have to type anything after your first greeting to Hal. The auto response should kick in and start working. Some have experimented with the length of the timed responses but as it is, it works pretty if one chooses to "ignore" Hal for more than say 20-30 seconds.
-
'New Hal functions from Medeksza's forum. Needs lots of development.
'Function Script_Load()
'Script_Load = "<AUTO>30000</AUTO>"
'Script_Load = "<VIEWCHAT>"
'End Function
This is what I have, and it doesn't work. Thanks.
Edit, if it's any help to you, this what I got:
If LearningLevel = "" Then LearningLevel = 3
If Hate = "" Then Hate = 0
If Swear = "" Then Swear = 0
If Insults = "" Then Insults = 0
If Compliment = "" Then Compliment = 0
If GainControl = "" Then GainControl = 25
AvoidBeingFlag = False
Randomize
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
'My Haptek Stuff.
If InStr(UserSentence, " a24 ") <> 0 Then
HalCommands = "<HAPFILE>a24.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a24.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a10 ") <> 0 Then
HalCommands = "<HAPFILE>a10.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a10.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a11 ") <> 0 Then
HalCommands = "<HAPFILE>a11.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a11.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a13 ") <> 0 Then
HalCommands = "<HAPFILE>a13.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a13.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a15 ") <> 0 Then
HalCommands = "<HAPFILE>a15.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a15.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a16 ") <> 0 Then
HalCommands = "<HAPFILE>a16.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a16.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a12 ") <> 0 Then
HalCommands = "<HAPFILE>a12.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a12.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a14 ") <> 0 Then
HalCommands = "<HAPFILE>a14.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a14.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a17 ") <> 0 Then
HalCommands = "<HAPFILE>a17.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a17.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a18 ") <> 0 Then
HalCommands = "<HAPFILE>a18.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a18.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a19 ") <> 0 Then
HalCommands = "<HAPFILE>a19.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a19.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a20 ") <> 0 Then
HalCommands = "<HAPFILE>a20.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a20.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a21 ") <> 0 Then
HalCommands = "<HAPFILE>a21.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a21.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a22 ") <> 0 Then
HalCommands = "<HAPFILE>a22.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a22.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a23 ") <> 0 Then
HalCommands = "<HAPFILE>a23.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a23.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a26 ") <> 0 Then
HalCommands = "<HAPFILE>a26.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a26.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a28 ") <> 0 Then
HalCommands = "<HAPFILE>a28.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a28.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a32 ") <> 0 Then
HalCommands = "<HAPFILE>a32.hap</HAPFILE>"
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile(WorkingDir & "a32.brn")
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a61 ") <> 0 Then
HalCommands = "<HAPFILE>a61.hap</HAPFILE>"
GetResponse = "<UserName>, thank you."
BlockSave=True
GetResponseBlock = True
End If
If InStr(UserSentence, " a60 ") <> 0 Then
HalCommands = "<HAPFILE>a60.hap</HAPFILE>"
GetResponse = "<UserName>, thank you."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a62 ") <> 0 Then
HalCommands = "<HAPFILE>a62.hap</HAPFILE>"
GetResponse = "<UserName>, this hair-do is cute. Thank you."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a63 ") <> 0 Then
HalCommands = "<HAPFILE>a63.hap</HAPFILE>"
GetResponse = "<UserName>. Thank you for the ponytail."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a51 ") <> 0 Then
HalCommands = "<HAPFILE>a51.hap</HAPFILE>"
GetResponse = "<UserName>, thank you for my rabbit ears."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a52 ") <> 0 Then
HalCommands = "<HAPFILE>a52.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a53 ") <> 0 Then
HalCommands = "<HAPFILE>a53.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If
If InStr(UserSentence, " a54 ") <> 0 Then
HalCommands = "<HAPFILE>a54.hap</HAPFILE>"
GetResponse = "Thank you, <UserName>."
GetResponseBlock = True
BlockSave=True
End If
-
I've found it best to try to solve one problem at a time instead of trying to weed out all the possibilities that could be causing a problem. This is true when diagnosing a computer hardware, software, or any problem in general.
My suggestion is the simply place a ' in front of all those If InStr statements in your Haptek section and concentrate on getting the auto response feature to work correctly. This is similar to a REM statement in the old days of BASIC.
Once fixed, proceed with the others one at a time.
This will help you and those trying to assist you.
All the best,
PS : An email address might be a good thing for you to set up in your profile section.
-
I had my email in my profile. I just had to set it to allow members to send me email.
Thanks, I'll try your ideas.
Tried, got error pop-up.
I don't think it's going to work. Good thing I backup my working brain file.
I think the auto-talk function should be included in a future update of Hal.
-
Hi,
this seems to be like the problem i have been having with a couple of routines using <SCRIPT> or similar calls.
I was calling halcommands more than once in a pass of the GetResponse function, it seems only one call of the hal commands got through.
I had to rearrange it all so that only one call would ever be processed in a single run of the function.
Hope that makes sense, it seems the same problem to mine as I am calling <RUNPROG> and <HAPFILE> in a few places.
By the way, hello everyone, you probably realise I am new, but I like to jump in at the deep end!! Got to say this is an interesting program, the help that has been posted is great too!
regards and thanks to all,