forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
C_eightball.py
32 lines (32 loc) · 1.23 KB
/
C_eightball.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from random import choice as fsample #Yay for added speed!
global responses
responses = ['Yes','Too bad','Will you turn me off if I tell you?','Absolutely',
"Not at all", "Nope", "It does", "No", "All the time",
"I don't really know", "Could be","Possibly","You're still here?",# Chaoticag
"No idea", "Of course", "Would you turn me off if I tell you?",
"Sweet!","Nah","Certainly","Yeah","Yup","I am quite confident that the answer is Yes",
"Perhaps", "Yeeeeaah... No.", "Indubitably" ] # Richard
def eightball(data,debug,sender,prefix):
global responses
arg = data.lower().replace(prefix+"eightball ","")
arg = arg.replace(prefix+"8ball ","")
if debug:
print sender+":"+prefix+"eightball", arg
if "answer" in arg and "everything" in arg and "to" in arg:
if debug:
print "Responded with",42
return "42"
elif arg == "derp":
if debug:
print "Responded with herp"
return("herp")
elif arg == "herp":
if debug:
print "Responded with derp"
return("derp")
else:
#choice = sample(responses,1)[0]
choice = fsample(responses)
if debug:
print "Responded with", choice
return(choice)