Skip to content

Instantly share code, notes, and snippets.

@teejayvanslyke
Created October 24, 2009 17:06
Show Gist options
  • Save teejayvanslyke/217626 to your computer and use it in GitHub Desktop.
Save teejayvanslyke/217626 to your computer and use it in GitHub Desktop.
Attribute VB_Name = "Module1"
Dim namepro As String
Dim nameguy As String
Public newmem As Variant
Sub ai()
'''''''''''''''''''''Declare Variables'''''''''''''
Dim say As Integer
Dim ran As Integer
Randomize
ran = Int((Rnd * 10) + 1)
'''''''''''''''''''What they type in effects'''''''
'| |
If (frmPhone.guy.Text = "What?" Or frmPhone.guy.Text = "What" Or frmPhone.guy.Text = "what?" Or frmPhone.guy.Text = "what?") Then
frmPhone.guy.Text = ""
Exit Sub
End If
'''''''''''''''''Questions''''''''''''''''''''''''
who = frmPhone.guy.Text Like "*Who*"
wholow = frmPhone.guy.Text Like "*who*"
what = frmPhone.guy.Text Like "*What*"
whatlow = frmPhone.guy.Text Like "*what*"
Where = frmPhone.guy.Text Like "*Where*"
wherelow = frmPhone.guy.Text Like "*where*"
when = frmPhone.guy.Text Like "*When*"
whenlow = frmPhone.guy.Text Like "*when*"
why = frmPhone.guy.Text Like "*Why*"
whylow = frmPhone.guy.Text Like "*why*"
how = frmPhone.guy.Text Like "*How*"
howlow = frmPhone.guy.Text Like "*how*"
can = frmPhone.guy.Text Like "*Can*"
canlow = frmPhone.guy.Text Like "*can*"
doword = (frmPhone.guy.Text Like "*do*" Or frmPhone.guy.Text Like "*Do*")
' Determine if true
If (who = True Or wholow = True) Then
WhoQues = True
ElseIf (what = True Or whatlow = True) Then
WhatQues = True
ElseIf (Where = True Or wherelow = True) Then
WhereQues = True
ElseIf (when = True Or whenlow = True) Then
WhenQues = True
ElseIf (why = True Or whylow = True) Then
WhyQues = True
ElseIf (how = True Or howlow = True) Then
HowQues = True
ElseIf (can = True Or canlow = True) Then
CanQues = True
ElseIf doword = True Then
DoQues = True
End If
''''''''''''''''''''Dictionary'''''''''''''''''''''
'Positive words
cool = frmPhone.guy.Text Like "*cool*"
neat = frmPhone.guy.Text Like "*neat*"
nice = frmPhone.guy.Text Like "*nice*"
good = frmPhone.guy.Text Like "*good*"
fun = frmPhone.guy.Text Like "*fun*"
awesome = frmPhone.guy.Text Like "*awesome*"
love = frmPhone.guy.Text Like "*love*"
'negitave words
dont = frmPhone.guy.Text Like "*don't*"
hate = frmPhone.guy.Text Like "*hate*"
notword = frmPhone.guy.Text Like "*not*"
stink = frmPhone.guy.Text Like "*stink*"
bad = frmPhone.guy.Text Like "*bad*"
suck = frmPhone.guy.Text Like "*suck*"
stupid = frmPhone.guy.Text Like "*stupid*"
dumb = frmPhone.guy.Text Like "*dumb*"
idiot = frmPhone.guy.Text Like "*idiot*"
sick = frmPhone.guy.Text Like "*sick*"
lose = frmPhone.guy.Text Like "*lose*"
'user pronouns
i = frmPhone.guy.Text Like "*I*"
mehigher = frmPhone.guy.Text Like "*Me*"
melower = frmPhone.guy.Text Like "*me*"
'computer pronouns
you = frmPhone.guy.Text Like "*you*"
youhigh = frmPhone.guy.Text Like "*You*"
him = frmPhone.guy.Text Like "*him*"
himhigher = frmPhone.guy.Text Like "*Him*"
he = frmPhone.guy.Text Like "*he*"
hehigher = frmPhone.guy.Text Like "*He*"
she = frmPhone.guy.Text Like "*she*"
shehigher = frmPhone.guy.Text Like "*She*"
her = frmPhone.guy.Text Like "*Her*"
herlow = frmPhone.guy.Text Like "*her*"
'Opinions
yes = (frmPhone.guy.Text Like "*yes*" Or frmPhone.guy.Text Like "*Yes*")
no = (frmPhone.guy.Text Like "*no*" Or frmPhone.guy.Text Like "*No*")
'Topics
'sports
hockey = (frmPhone.guy.Text Like "*hockey*" Or frmPhone.guy.Text Like "*Hockey*")
If hockey = True Then topic = "hockey"
bike = (frmPhone.guy.Text Like "*bik*" Or frmPhone.guy.Text Like "*Bik*")
If biking = True Then topic = "biking"
swim = (frmPhone.guy.Text Like "*swim*" Or frmPhone.guy.Text Like "*Swim*")
If swim = True Then topic = "swim"
baseball = (frmPhone.guy.Text Like "*baseball*" Or frmPhone.guy.Text Like "*Baseball*")
If baseball = True Then topic = "baseball"
football = (frmPhone.guy.Text Like "*football*" Or frmPhone.guy.Text Like "*Football*")
If football = True Then topic = "football"
basketball = (frmPhone.guy.Text Like "*basketball*" Or frmPhone.guy.Text Like "*Basketball*")
If basketball = True Then topic = "basketball"
gymnastic = (frmPhone.guy.Text Like "*gymnastic*" Or frmPhone.guy.Text Like "*Gymnastic*")
If gymnastic = True Then topic = "gymnastics"
track = (frmPhone.guy.Text Like "*track*" Or frmPhone.guy.Text Like "*Track*")
If track = True Then topic = "track"
soccer = (frmPhone.guy.Text Like "*soccer*" Or frmPhone.guy.Text Like "*Soccer*")
If soccer = True Then topic = "soccer"
lacrosse = (frmPhone.guy.Text Like "*lacrosse*" Or frmPhone.guy.Text Like "*Lacrosse*")
If lacrosse = True Then topic = "lacrosse"
golf = (frmPhone.guy.Text Like "*golf*" Or frmPhone.guy.Text Like "*Golf*")
If golf = True Then topic = "golf"
bowl = (frmPhone.guy.Text Like "*bowl*" Or frmPhone.guy.Text Like "*Bowl*")
If bowl = True Then topic = "bowling"
sports = (frmPhone.guy.Text Like "*sport*" Or frmPhone.guy.Text Like "*Sport*")
If sports = True Then topic = "sports"
'education
school = (frmPhone.guy.Text Like "*school*" Or frmPhone.guy.Text Like "*School*")
If school = True Then topic = "school"
college = (frmPhone.guy.Text Like "*college*" Or frmPhone.guy.Text Like "*College*")
If college = True Then topic = "college"
Class = (frmPhone.guy.Text Like "*class*" Or frmPhone.guy.Text Like "*Class*")
If Class = True Then topic = "classes"
universe = (frmPhone.guy.Text Like "*university*" Or frmPhone.guy.Text Like "*University*")
If universe = True Then topic = "university"
homework = (frmPhone.guy.Text Like "*homework*" Or frmPhone.guy.Text Like "*Homework*")
If homework = True Then topic = "homework"
science = (frmPhone.guy.Text Like "*science*" Or frmPhone.guy.Text Like "*Science*")
If science = True Then topic = "science"
Mathword = (frmPhone.guy.Text Like "*math*" Or frmPhone.guy.Text Like "*Math*")
If Mathword = True Then topic = "math"
history = (frmPhone.guy.Text Like "*history*" Or frmPhone.guy.Text Like "*History*")
If history = True Then topic = "history"
'T.V.
TV = (frmPhone.guy.Text Like "*T.V.*" Or frmPhone.guy.Text Like "*televison*")
If TV = True Then topic = "T.V."
Show = (frmPhone.guy.Text Like "*show*" Or frmPhone.guy.Text Like "*Show*")
If Show = True Then topic = "T.V. shows"
program = (frmPhone.guy.Text Like "*program*" Or frmPhone.guy.Text Like "*Program*")
If program = True Then topic = "program"
remote = (frmPhone.guy.Text Like "*remote*" Or frmPhone.guy.Text Like "*Remote*")
If remote = True Then topic = "remotes"
'animals
pets = (frmPhone.guy.Text Like "*pet*" Or frmPhone.guy.Text Like "*Pet*")
If pets = True Then topic = "pets"
cat = (frmPhone.guy.Text Like "*cat*" Or frmPhone.guy.Text Like "*Cat*")
If cat = True Then topic = "cats"
dog = (frmPhone.guy.Text Like "*dog*" Or frmPhone.guy.Text Like "*Dog*")
If dog = True Then topic = "dogs"
hampster = (frmPhone.guy.Text Like "*hampster*" Or frmPhone.guy.Text Like "*Hampster*")
If hampster = True Then topic = "hampsters"
guinneapig = (frmPhone.guy.Text Like "*guinneapig*" Or frmPhone.guy.Text Like "*Guinneapig*")
If guinneapig = True Then topic = "guinneapig"
mouse = (frmPhone.guy.Text Like "*mouse*" Or frmPhone.guy.Text Like "*Mouse*")
If mouse = True Then topic = "mice"
snake = (frmPhone.guy.Text Like "*snake*" Or frmPhone.guy.Text Like "*Snake*")
If snake = True Then topic = "snakes"
boa = (frmPhone.guy.Text Like "*boa*" Or frmPhone.guy.Text Like "*Boa*")
If boa = True Then topic = "boa constrictor"
lizard = (frmPhone.guy.Text Like "*lizard*" Or frmPhone.guy.Text Like "*Lizard*")
If lizard = True Then topic = "lizards"
'music
Music = (frmPhone.guy.Text Like "*music*" Or frmPhone.guy.Text Like "*Music*")
If Music = True Then topic = "music"
rock = (frmPhone.guy.Text Like "*rock*" Or frmPhone.guy.Text Like "*Rock*")
If rock = True Then topic = "rock music"
altern = (frmPhone.guy.Text Like "*alternative*" Or frmPhone.guy.Text Like "*Alternatave*")
If altern = True Then topic = "alternative music"
jazz = (frmPhone.guy.Text Like "*jazz*" Or frmPhone.guy.Text Like "*Jazz*")
If jazz = True Then topic = "jazz music"
classic = (frmPhone.guy.Text Like "*classical*" Or frmPhone.guy.Text Like "*Classical*")
If classic = True Then topic = "classical music"
pop = (frmPhone.guy.Text Like "*pop*" Or frmPhone.guy.Text Like "*Pop*")
If pop = True Then topic = "pop music"
rap = (frmPhone.guy.Text Like "*rap*" Or frmPhone.guy.Text Like "*Rap*")
If rap = True Then topic = "rap music"
country = (frmPhone.guy.Text Like "*country*" Or frmPhone.guy.Text Like "*Country*")
If country = True Then topic = "country music"
'games
'card games
poker = (frmPhone.guy.Text Like "*poker*" Or frmPhone.guy.Text Like "*Poker*")
If poker = True Then topic = "poker"
jack = (frmPhone.guy.Text Like "*blackjack*" Or frmPhone.guy.Text Like "*Blackjack*")
If jack = True Then topic = "blackjack"
war = (frmPhone.guy.Text Like "*war*" Or frmPhone.guy.Text Like "*War*")
If war = True Then topic = "war"
rummy = (frmPhone.guy.Text Like "*rummy*" Or frmPhone.guy.Text Like "*Rummy*")
If rummy = True Then topic = "rummy"
'board games
checkers = (frmPhone.guy.Text Like "*checker*" Or frmPhone.guy.Text Like "*Checker*")
If checkers = True Then topic = "checkers"
chess = (frmPhone.guy.Text Like "*chess*" Or frmPhone.guy.Text Like "*Chess*")
If chess = True Then topic = "chess"
backgammon = (frmPhone.guy.Text Like "*backgammon*" Or frmPhone.guy.Text Like "*Backgammon*")
If backgammon = True Then topic = "backgammon"
'Computers
computer = (frmPhone.guy.Text Like "*computer*" Or frmPhone.guy.Text Like "*Computer*")
If computer = True Then topic = "computers"
monitor = (frmPhone.guy.Text Like "*monitor*" Or frmPhone.guy.Text Like "*Monitor*")
If monitor = True Then topic = "monitors"
Prin = (frmPhone.guy.Text Like "*printer*" Or frmPhone.guy.Text Like "*Printer*")
If Prin = True Then topic = "printers"
'Kinds of People
people = (frmPhone.guy.Text Like "*people*" Or frmPhone.guy.Text Like "*People*")
If people = True Then topic = "people"
childre = (frmPhone.guy.Text Like "*children*" Or frmPhone.guy.Text Like "*Children*")
If childre = True Then topic = "children"
adult = (frmPhone.guy.Text Like "*adult*" Or frmPhone.guy.Text Like "*Adult*")
If adult = True Then topic = "adults"
seinor = (frmPhone.guy.Text Like "*seinor*" Or frmPhone.guy.Text Like "*Seinor*")
If seinor = True Then topic = "seinors"
grand = (frmPhone.guy.Text Like "*grand*" Or frmPhone.guy.Text Like "*Grand*")
If grand = True Then topic = "grandparents"
aunt = (frmPhone.guy.Text Like "*aunt*" Or frmPhone.guy.Text Like "*Aunt*")
If aunt = True Then topic = "aunts"
uncle = (frmPhone.guy.Text Like "*uncle*" Or frmPhone.guy.Text Like "*Uncle*")
If uncle = True Then topic = "uncles"
cousin = (frmPhone.guy.Text Like "*cousin*" Or frmPhone.guy.Text Like "*Cousin*")
If cousin = True Then topic = "cousins"
'books
fiction = (frmPhone.guy.Text Like "*fiction*" Or frmPhone.guy.Text Like "*Fiction*")
If fiction = True Then topic = "fiction books"
nonfiction = (frmPhone.guy.Text Like "*non*fiction*" Or frmPhone.guy.Text Like "*Non*fiction*")
If nonfiction = True Then topic = "non-fiction books"
scifi = (frmPhone.guy.Text Like "*sci*fi*" Or frmPhone.guy.Text Like "*Sci*fi*")
If scifi = True Then topic = "SciFi books"
fantasy = (frmPhone.guy.Text Like "*fantasy*" Or frmPhone.guy.Text Like "*Fantasy*")
If fantasy = True Then topic = "fantasy books"
horror = (frmPhone.guy.Text Like "*horror*" Or frmPhone.guy.Text Like "*Horror*")
If horror = True Then topic = "horror books"
adventure = (frmPhone.guy.Text Like "*adventure*" Or frmPhone.guy.Text Like "*Adventure*")
If adventure = True Then topic = "adventure books"
story = (frmPhone.guy.Text Like "*story*" Or frmPhone.guy.Text Like "*Story*")
If story = True Then topic = "story books"
stories = (frmPhone.guy.Text Like "*stories*" Or frmPhone.guy.Text Like "*Stories*")
If stories = True Then topic = "stories"
book = (frmPhone.guy.Text Like "*book*" Or frmPhone.guy.Text Like "*Book*")
If book = True Then topic = "books"
read = (frmPhone.guy.Text Like "*read*" Or frmPhone.guy.Text Like "*Read*")
If read = True Then topic = "reading"
'determine if true
If (lose = True Or dont = True Or hate = True Or notword = True Or stink = True Or bad = True Or suck = True Or stupid = True Or dumb = True Or idiot = True) Then
Negitave = True
End If
If (cool = True Or neat = True Or nice = True Or good = True Or fun = True Or awesome = True Or love = True) Then
positive = True
End If
If (i = True Or mehigher = True Or melower = True) Then
PronounsGuy = True
End If
If (you = True Or youhigh = True Or him = True Or himhigher = True Or he = True Or she = True Or shehigher = True Or her = True Or herlow = True) Then
PronounsCom = True
End If
''''''''''''''''''''THE Ifs'''''''''''''''''''''''
If (topic <> "") And (positive = True) Then
Randomize
say = Int((Rnd * 5) + 1)
If say = 1 Then
frmPhone.pro.Text = "I like " + topic + ", too."
ElseIf say = 2 Then
frmPhone.pro.Text = "I think that's cool."
ElseIf say = 3 Then
frmPhone.pro.Text = "That's fun."
ElseIf say = 4 Then
frmPhone.pro.Text = "That's really neat."
ElseIf say = 5 Then
frmPhone.pro.Text = "That's really awesome."
ElseIf say = 6 Then
frmPhone.pro.Text = "Neato!"
ElseIf say = 7 Then
frmPhone.pro.Text = "Nifty!"
ElseIf say = 8 Then
frmPhone.pro.Text = "Totally cool!"
End If
Exit Sub
ElseIf (DoQues = True) And (topic <> "") Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "That's okay."
ElseIf say = 2 Then
frmPhone.pro.Text = "That's neat"
ElseIf say = 3 Then
frmPhone.pro.Text = "I like " + topic
End If
Exit Sub
ElseIf (Negitave = True) And (topic <> "") Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "I don't like " + topic + ", either"
ElseIf say = 2 Then
frmPhone.pro.Text = "I don't like " + topic + "at all."
ElseIf say = 3 Then
frmPhone.pro.Text = "I think " + topic + " ain't all that fun, too."
End If
Exit Sub
'Determine if asking who the computer is
ElseIf (WhoQues = True) And (PronounsCom = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "I don't know, who are you?"
ElseIf say = 2 Then
frmPhone.pro.Text = "I have no clue."
ElseIf say = 3 Then
frmPhone.pro.Text = "You tell me."
End If
Exit Sub
'Determine if asking what the computer is
ElseIf (WhatQues = True) And (PronounsCom = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "Who knows, who cares."
ElseIf say = 2 Then
frmPhone.pro.Text = "Uh..."
ElseIf say = 3 Then
frmPhone.pro.Text = "A co... com... pu... ter. Ah!"
End If
Exit Sub
'Determine if asking where the computer is
ElseIf (WhereQues = True) And (PronounsCom = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "Somewhere over the rainbow."
ElseIf say = 2 Then
frmPhone.pro.Text = "Somewhere. (You can tell I'm very specific.)"
ElseIf say = 3 Then
frmPhone.pro.Text = "I forget"
End If
Exit Sub
ElseIf (HowQues = True) And (PronounsCom = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "I'm okay"
ElseIf say = 2 Then
frmPhone.pro.Text = "I feel good"
ElseIf say = 3 Then
frmPhone.pro.Text = "I could use a little reprogramming."
End If
Exit Sub
ElseIf CanQues = True Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "Mabye."
ElseIf say = 2 Then
frmPhone.pro.Text = "I don't know, can you?"
ElseIf say = 3 Then
frmPhone.pro.Text = "Probably"
End If
Exit Sub
ElseIf (WhoQues = True Or WhatQues = True Or WhereQues = True Or WhenQues = True Or WhyQues = True Or HowQues = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "Mabye."
ElseIf say = 2 Then
frmPhone.pro.Text = "What do you mean?"
ElseIf say = 3 Then
frmPhone.pro.Text = "I guess."
End If
Exit Sub
'Determine if negitave to user
ElseIf (Negitave = True) And (PronounsGuy = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "I think you're OK."
ElseIf say = 2 Then
frmPhone.pro.Text = "Stop putting yourself down."
ElseIf say = 3 Then
frmPhone.pro.Text = "Think positive."
End If
Exit Sub
'Determine if negitave to computer
ElseIf (Negitave = True) And (PronounsCom = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "Stop putting me down!!"
ElseIf say = 2 Then
frmPhone.pro.Text = "Look who's talking!"
ElseIf say = 3 Then
frmPhone.pro.Text = "I take that as an insult."
End If
Exit Sub
'Determine if positive to user
ElseIf (positive = True) And (PronounsGuy) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "You are pretty cool."
ElseIf say = 2 Then
frmPhone.pro.Text = "I think you are awesome too."
ElseIf say = 3 Then
frmPhone.pro.Text = "You are so cool."
End If
Exit Sub
'Determine if positive to computer
ElseIf (positive = True) And (PronounsCom = True) Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "Thank you."
ElseIf say = 2 Then
frmPhone.pro.Text = "I think you're cool, too."
ElseIf say = 3 Then
frmPhone.pro.Text = "That's nice of you."
End If
Exit Sub
ElseIf (topic <> "") Then
Randomize
say = Int((Rnd * 3) + 1)
If say = 1 Then
frmPhone.pro.Text = "That's cool."
ElseIf say = 2 Then
frmPhone.pro.Text = "Nifty"
ElseIf say = 3 Then
frmPhone.pro.Text = "Neato"
End If
Exit Sub
End If
''''''''''''''''''Random effects''''''''''''''''''
If ran = 1 Then
frmPhone.pro.Text = "I feel your emotions"
ElseIf ran = 2 Then
frmPhone.pro.Text = "Hm hm"
ElseIf ran = 3 Then
frmPhone.pro.Text = "Ah, yes"
ElseIf ran = 4 Then
frmPhone.pro.Text = "I see"
ElseIf ran = 5 Then
frmPhone.pro.Text = "Oh, of course"
ElseIf ran = 6 Then
frmPhone.pro.Text = "Oh, I remember"
ElseIf ran = 7 Then
frmPhone.pro.Text = "That's nice"
ElseIf ran = 8 Then
frmPhone.pro.Text = "Yeah"
ElseIf ran = 9 Then
frmPhone.pro.Text = "Yup"
ElseIf ran = 10 Then
frmPhone.pro.Text = "I feel your pain."
ElseIf ran = 13 Or 14 Then
frmPhone.pro.Text = "Speak up, speak up"
End If
End Sub
Sub main()
nameguy = InputBox("What is your name?")
namepro = InputBox("What would you like the chatter's name to be?")
frmPhone.Show 1
End Sub
Sub newchatter()
namepro = InputBox("What would you like the chatter's name to be?")
End Sub
Sub newuser()
nameguy = InputBox("What is your name?")
End Sub
Sub startup()
frmPhone.Label1.Caption = namepro + " says:"
frmPhone.Label2.Caption = nameguy + " says:"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment