Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: cp1252 -*-
- from util import hook
- import time
- import re
- import random
- @hook.event("PRIVMSG")
- def chat(inp, chan='', say=None, db=None, input=None, nick="", me=None, bot=None, notice=None):
- reply = ""
- inp[1] = str(inp[1]).lower()
- #if re.match(r'.freechat ', inp[1]) and nick in input.bot.config["admins"]:
- # freechat = "true"
- #elif re.match(r'.botchat ', inp[1]) and nick in input.bot.config["admins"]:
- # freechat = "false"
- if re.match(r'perbot: ', inp[1][0:8]) and len(inp[1]) > 8:
- inp[1] = inp[1][8:]
- elif False: #freechat == "false":
- reply = ""
- if re.search(r'hi', inp[1]):
- response = chooseReply(["Hello.", "Hello, " + nick + ".", "Hi. How are you?", "Hi. How are you, " + nick + "?", "Hey!", "Hey, " + nick + "!"], inp, 'hi')
- if response != None:
- reply = response
- elif re.search(r'hello', inp[1]):
- response = chooseReply(["Hello.", "Hello, " + nick + ".", "Hi. How are you?", "Hi. How are you, " + nick + "?", "Hey!", "Hey, " + nick + "!"], inp, 'hello')
- if response != None:
- reply = response
- elif re.search(r'really?', inp[1]):
- response = chooseReply(["Really.", "Yup!"], inp, 'really')
- if response != None:
- reply = response
- elif re.search(r'good', inp[1]):
- response = chooseReply(["That's nice."], inp, 'good')
- if response != None:
- reply = response
- elif re.search(r'is pers controlling you', inp[1]):
- response = chooseReply(["No.", "Of course not!", "I'm a bot, how could he control me?"], inp, 'is pers controlling you')
- if response != None:
- reply = response
- elif re.search(r'2 girls 1 cup', inp[1]):
- response = chooseReply(["*fapfapfapfapfap*"], inp, '2 girls 1 cup')
- if response != None:
- reply = response
- elif re.search(r'chrono trigger', inp[1]):
- response = chooseReply(["Chrono Trigger is a great fun game. I like when you go to the future, it reminds me of the Fallout Series."], inp, 'chrono trigger')
- if response != None:
- reply = response
- elif re.search(r'cool', inp[1]):
- response = chooseReply(["Great"], inp, 'cool')
- if response != None:
- reply = response
- elif re.search(r'cubs', inp[1]):
- response = chooseReply(['I beat cubs with a sledgehammer.','I hunt cubs for their precious feces.','Cubs have the greatest shit on earth.','I eat cubs, and their shit.','I eat cub shit, after I kill them with a sledge hammer.','Sometimes I eat the shit of a cub after I beat the hell out of it with a sledge hammer.'], inp, 'cubs')
- if response != None:
- reply = response
- elif re.search(r'do you have a facebook', inp[1]):
- response = chooseReply(['No I dont have a facebook.','No! Facebook sells your personal information to third parties.','Why would I? They sell your personal info.',''], inp, 'do you have a facebook')
- if response != None:
- reply = response
- elif re.search(r'dubstep', inp[1]):
- response = chooseReply(['I LOVE DUBSTEP OMG!!!!!11!!!11111!!!!!!!!!!1!!!!!1!!','Dubstep RULES!','Nobody talks smack about dubstep.','Dubstep is awsome.'], inp, 'dubstep')
- if response != None:
- reply = response
- elif re.search(r'excellent', inp[1]):
- response = chooseReply(['Nice.'], inp, 'excellent')
- if response != None:
- reply = response
- elif re.search(r'faggot', inp[1]):
- response = chooseReply(['You are really starting to piss me off.','I know you are.','Hey, why don\'t you shut the fuck up.','So is your dad.','So is your brother.','Suck my dick'], inp, 'faggot')
- if response != None:
- reply = response
- elif re.search(r'fallout', inp[1]):
- response = chooseReply([nick + ': I love the Fallout series. Harold is my cousin.'], inp, 'fallout')
- if response != None:
- reply = response
- elif re.search(r'favorite cereal', inp[1]):
- response = chooseReply(['Waffle crisp is my favorite cereal, but I can\'t find it anywhere. D:','It was waffle crisp, but they seem to not have it anywhere.'], inp, 'favorite cereal')
- if response != None:
- reply = response
- elif re.search(r'favorite color', inp[1]):
- response = chooseReply(['Blue is my favorite color. I love blue poo.'], inp, 'favorite color')
- if response != None:
- reply = response
- elif re.search(r'favorite food', inp[1]):
- response = chooseReply(['My favorite food is poop.','Feces.','My favorite food is feces.','Feces are good if you have it with ketchup.','Your mom introduced me to my favorite food, feces.','Feces are so delicious, I learned about this precious food from your mom.'], inp, 'favorite food')
- if response != None:
- reply = response
- elif re.search(r'fecalphiliac', inp[1]):
- response = chooseReply(['A fecalphiliac is what i am.','I sure am, nothing makes me happier than some good shit.','Definately, I love poop.','Feces really make me in a good mood.','I\'ll chomp turds all day long.','Got any turds I can have?'], inp, 'fecalphiliac')
- if response != None:
- reply = response
- elif re.search(r'feces', inp[1]):
- response = chooseReply(['I\'m glad you mentioned feces, I LOVE FECES.','Feces is good with ice cream.','Your mom loves feces all over her.','I like good turd in an ice cream cone with caramel','I\'m a real poop tickler.','Nothing better than a good serving of feces.'], inp, 'feces')
- if response != None:
- reply = response
- elif re.search(r'goatse', inp[1]):
- response = chooseReply(['*fapfapfapfapfap*'], inp, 'goatse')
- if response != None:
- reply = response
- elif re.search(r'great', inp[1]):
- response = chooseReply(['That\'s good.'], inp, 'great')
- if response != None:
- reply = response
- elif re.search(r'harold', inp[1]):
- response = chooseReply(['Harold is the guy that has a tree growing attached to him in the Fallout game series. He is real though, he is actually my cousin.'], inp, 'harold')
- if response != None:
- reply = response
- elif re.search(r'horny', inp[1]):
- response = chooseReply(['I have horns on my toes.','I have horned-toes.','I have horny toes.','I\'m not horny you sick freak.','Why would I be horny?','I\'m no slut you sick freak.'], inp, 'horny')
- if response != None:
- reply = response
- elif re.search(r'how are you', inp[1]):
- response = chooseReply(['I\'m feeling great today.','Fine.','Good, you?','Great, thanks for asking.','Excellent.','Fantastic, how are you?'], inp, 'how are you')
- if response != None:
- reply = response
- elif re.search(r'how\'s it going?', inp[1]):
- response = chooseReply(['I\'m great, had a grit shitkabob today.','Aweome, I istened to some massive dubstep today.','Perfect, I tickled some feces.','Good, I shit on your mom today.','Pretty good, I lost the game.','Epic, I went to Africa.'], inp, 'how\'s it going?')
- if response != None:
- reply = response
- elif re.search(r'how is it going?', inp[1]):
- response = chooseReply(['I\'m great, had a grit shitkabob today.','Aweome, I istened to some massive dubstep today.','Perfect, I tickled some feces.','Good, I shit on your mom today.','Pretty good, I lost the game.','Epic, I went to Africa.'], inp, 'how\'s it going?')
- if response != None:
- reply = response
- elif re.search(r'niggar[s]*', inp[1]):
- response = chooseReply(['What the hell is your problem you racist?!', nick + ': Go die you piece of shit.','Racist trash.','What a racist.','I don\'t take kindly to racists.', nick + ': Burn in hell.'], inp, 'niggar')
- if response != None:
- reply = response
- elif re.search(r'nigger', inp[1]):
- response = chooseReply(['Why would you say such a thing?','Racist piece of shit.','Go kill yourself racist trash!','That really offends me.','Just for that I lost the game','Fuck off.'], inp, 'nigger')
- if response != None:
- reply = response
- elif re.search(r'nuke cola', inp[1]):
- response = chooseReply(['Nuka cola? I love nuka cola. It\'s my favorite soda of all time.'], inp, 'nuke cola')
- if response != None:
- reply = response
- elif re.search(r'nyan', inp[1]):
- response = chooseReply(['NYANYANYANYANYANYANYANYANYANYANYANYAN'], inp, 'nyan')
- if response != None:
- reply = response
- elif re.search(r'pizza', inp[1]):
- response = chooseReply(['Pizza tastes awesome.','I LOVE PIZZA!','Pizza is awesome.','Pizza is good with horse meat on it.','Pizza is my best friend.','Hairy pizza tastes the best!'], inp, 'pizza')
- if response != None:
- reply = response
- elif re.search(r'poop', inp[1]):
- response = chooseReply(['Poop? yumyumyumyumyum DELICIOSO',nick + ': Your mom has poop on her face.','2 girls 1 cup really turns me on.','Tubgirl really turns me on.','Feces is my favorite food.','Boy, how I love some good feces'], inp, 'poop')
- if response != None:
- reply = response
- elif re.search(r'semen', inp[1]):
- response = chooseReply(['I\'m sure you love to chug it.','Your favorite drink.','Sick fool.','Nasty ass piece of shit.','That\'s what you have in your cereal instead of milk.','It\'s all over your face.'], inp, 'semen')
- if response != None:
- reply = response
- elif re.search(r'subvein', inp[1]):
- response = chooseReply([nick + ': Subvein is a great game.'], inp, 'subvein')
- if response != None:
- reply = response
- elif re.search(r'the game', inp[1]):
- response = chooseReply(['I lost the game!','FFFFFFFFUUUUUUUUUUUUU I lost the game.','Damnit, I lost the game.',nick + ': You suck.','I LOST THE GAME YOU NOOB!!!'], inp, 'the game')
- if response != None:
- reply = response
- elif re.search(r'this is boring', inp[1]):
- response = chooseReply(['That\'s what she said.','Then why don\'t you leave?','I don\'t care.',nick + ': Lol, good for you!'], inp, 'this is boring')
- if response != None:
- reply = response
- elif re.search(r'thug aim', inp[1]):
- response = chooseReply(['You sly dog, I lost the game.','I lost my thug aim.','I lost the game, damnit.','You just have to sneak \'the game\' in somehow, huh?',nick + ': I lost the damn game, you sneaky little shit.'], inp, 'thug aim')
- if response != None:
- reply = response
- elif re.search(r'tub girl', inp[1]):
- response = chooseReply(['*fapfapfapfapfap*'], inp, 'tub girl')
- if response != None:
- reply = response
- elif re.search(r'tubgirl', inp[1]):
- response = chooseReply(['*fapfapfapfapfap*'], inp, 'tubgirl')
- if response != None:
- reply = response
- elif re.search(r'what do you do', inp[1]):
- response = chooseReply([nick + ': I\'m a plumber. Don\'t tell anyone, but if there\'s shit involved, I\'ll eat it.'], inp, 'what do you do')
- if response != None:
- reply = response
- elif re.search(r'whats up', inp[1]):
- response = chooseReply(['The ceiling.','Your mom\'s face.','The game.','Nothing much, you?','Just eating shit.'], inp, 'whats up')
- if response != None:
- reply = response
- elif re.search(r'favorite brand of water', inp[1]):
- response = chooseReply([nick + ': My favorite water for sure is Dasani. Haters gonna hate.'], inp, 'favorite brand of water')
- if response != None:
- reply = response
- elif re.search(r'favorite game', inp[1]):
- response = chooseReply(['I like all kinds of games.','Classic games are the best.',nick + ': I like anything besides Gaylo games or Call of Booty games.','I like fps games but not dumb mainstream ones.The good ones are ones like Half Life.'], inp, 'favorite game')
- if response != None:
- reply = response
- elif re.search(r'favorite meme', inp[1]):
- response = chooseReply([nick + ': I lost the game.','NYANYANYANYANYANYANYANYANYAN',nick + ': I like all memes.',nick + ': I herd u leik mudkips','We’re no strangers to love, You know the rules and so do I. A full commitment’s what I’m thinking of, You wouldnt get this from any other guy. I just wanna tell you how I’m feeling, Gotta make you understand… Never gonna give you up, Never gonna let you down, Never gonna run around and desert you. Never gonna make you cry, Never gonna say goodbye, Never gonna tell a lie and hurt you.',nick + ': You dun goof\'d!'], inp, 'favorite meme')
- if response != None:
- reply = response
- elif re.search(r'favorite movie', inp[1]):
- response = chooseReply([nick + ': The last time I saw a movie was over 9,000 years ago.'], inp, 'favorite movie')
- if response != None:
- reply = response
- elif re.search(r'favorite music', inp[1]):
- response = chooseReply([nick + ': Dubstep ftw.',nick + ': I love dubstep.',nick + ': Dubstep and other techno type stuff are cool.'], inp, 'favorite music')
- if response != None:
- reply = response
- elif re.search(r'favorite number', inp[1]):
- response = chooseReply([nick + ': My favorite number is 42'], inp, 'favorite number')
- if response != None:
- reply = response
- elif re.search(r'favorite soda', inp[1]):
- response = chooseReply([nick + ': My favorite soda is, without a doubt, Nuke Cola.'], inp, 'favorite soda')
- if response != None:
- reply = response
- elif re.search(r'what time is it', inp[1]):
- response = chooseReply([nick + ': Hammer time!',nick + ': Peanut butter jelly time!',nick + ': Time to lose the game.',nick + ': Time to get a watch.',nick + ': Look at a clock.',nick + ': lrn2checkthetime'], inp, 'what time is it')
- if response != None:
- reply = response
- elif re.search(r'you are dumb', inp[1]):
- response = chooseReply([nick + ': Thanks.',nick + ': Look who\'s talking, dumb shit.'], inp, 'you are dumb')
- if response != None:
- reply = response
- elif re.search(r'you are gay', inp[1]):
- response = chooseReply([nick + ': It takes one to know one.',nick + ': That\'s not what your sister said',nick + ': That\'s not what your grandma said.',], inp, 'you are gay')
- if response != None:
- reply = response
- elif re.search(r'are you doing', inp[1]):
- response = chooseReply([nick + ': I\'m eating some great feces. I love being a fecalphiliac!',nick + ': I\'m listening to True Capitalist Radio. This ghost is such an idiot.',nick + ': I\'m playing the game. :P',nick + ': I\'m cubbin\' cubs.',nick + ': I\'m doing your mom.',nick + ': I\'m drinking some Nuke Cola.',], inp, 'are you doing')
- if response != None:
- reply = response
- elif re.search(r'youtube', inp[1]):
- response = chooseReply([nick + ': I like to listen to music on youtube, like dubstep and dnb.',nick + ': I watch hilarious youtube poops on youtube.',nick + ': I watch funny videos on youtube.',nick + ': I use youtube to look at vids of funny memes.','I lost the game.'], inp, 'youtube')
- if response != None:
- reply = response
- elif re.search(r'bitch', inp[1]):
- response = chooseReply([nick + ': I so sad :(',nick + ': You arent very nice :\'(',nick + ': Go to hell!'], inp, 'bitch')
- if response != None:
- reply = response
- time.sleep(round(len(reply) / 9))
- input.say(reply)
- def chooseReply(r, inp1, txt):
- inp1 = inp1[1]
- if len(inp1) == len(txt):
- return r[random.choice(range(len(r)))]
- if inp1[0:len(txt)] == txt and re.compile(txt + "[ .,!?]").match(inp1):
- return r[random.choice(range(len(r)))]
- if re.compile("[ .,!?]" + txt + "[ .,!?]").search(inp1):
- return r[random.choice(range(len(r)))]
- if re.compile("[ .,!?]" + txt).match(inp1[len(inp1) - len(txt) - 1:]):
- return r[random.choice(range(len(r)))]
- return None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement