Author Topic: Vary the username to add variety  (Read 3819 times)

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Vary the username to add variety
« on: October 04, 2003, 03:54:09 pm »
Here's a couple of pieces of very simple script that add some variety to Hal. The first just ensures good random number generation. The second says that in 5 out of 20 times through GetResponse the UserName gets swapped with a nickname or petname. It's just another way to make Hal seem more human. You may notice that "Jimmy" is used twice. This just illustrates a method to make "Jimmy" more commonly chosen than the other choices.
 

'This code ensures that random numbers are based on
'the ever changing seconds as a seed value. Makes for
'better randomized numbers.
Randomize(Timer)


'Place this code just after the start of GetResponse.
'This code varies the UserName for added variety.
Select Case Int(Rnd * 20)
   Case 0
      UserName = "Big J"
   Case 1
      UserName = "Jim"
   Case 2
      UserName = "Jimmy"
   Case 3
      UserName = "Jimmy"
   Case 4
      UserName = "JJ"
   Case Else
End Select


= vonsmith =

UPDATE: PLEASE DO NOT USE THE CODE ABOVE. HAL USES THE USERNAME VARIABLE TO BUILD USER SPECIFIC FILE NAMES. THE CODE HAS AN UNINTENDED EFFECT OF HAL CREATING INCORRECTLY NAMED USER FILES. THIS ISN'T HARMFUL, BUT WHAT HAL LEARNS GETS SPREAD OUT INTO MANY UNRELATED FILES. SORRY FOR ANY INCONVENIENCE. TO ERR IS HUMAN, I'LL TRY TO BE LESS HUMAN IN THE FUTURE.

= vonsmith =
« Last Edit: October 06, 2003, 11:38:19 pm by vonsmith »
 

Larry

  • Sr. Member
  • ****
  • Posts: 266
    • View Profile
Vary the username to add variety
« Reply #1 on: October 04, 2003, 08:13:57 pm »
Interesting stuff... how could you make this work with aim bots?
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Vary the username to add variety
« Reply #2 on: October 04, 2003, 08:25:30 pm »
I've only had Hal for a couple of weeks. I have to profess ignorance in the area of AIM bot usage. My focus has been on Hal's performance on the desktop with a single user. I haven't gotten around to any AIM stuff yet.

I'm sure someone in the forum could answer your question though.

= vonsmith =
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Vary the username to add variety
« Reply #3 on: October 06, 2003, 11:28:47 pm »
Whoops! I made an error here. I forgot that UserName is the variable used for creating user specific .brn file names. When the code I posted changes UserName randomly for variety then Hal writes the conversation results and such to a variety of differently named user files. Sorry, my mistake.

I think the variable I want to change is <UserName>, but <UserName> cannot be substituted for UserName in the code I posted. It's an entirely different kind of variable.

Delete the code. Back to the drawing board. Sorry for any inconvenience.


= vonsmith =
 

kevinvr

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • http://kevinvr.tripod.com
Vary the username to add variety
« Reply #4 on: October 08, 2003, 08:43:55 pm »
Hmm, I tried to make Hal change username with the new if....then... brain adaptation but it didn't work either :)  

We won't give up... he he he!!!
regards
kevin
I dream of creating a self replicating, self maintaining, autonomous robot :)