Exemplo n.º 1
0
def reload_func(nick,match,target):
	mb.load(match.group('thing'))
	mb.tell("Done. Probably.",target)
Exemplo n.º 2
0
def interview_func(nick,match,target):
	mb.load("interview_questions")
	who=nick
	role=match.group("role")
	
	
	
	
	for player in mb.data['aliases']:
		if nick in mb.data['aliases'][player]:
			who=player
			break	
			
	if role:
		if role in mb.data['interview'].keys():
			name = mb.data['interview'][role]	
			mb.tell(nick+": "+name+" called dibs on being a "+role+". get rekt nerd",target)
			return;
		else:
			mb.data['interview'][role]=who	
			
	if not who in mb.data['interview_stats']:
		mb.data['interview_stats'][who]={"as detective":{"wins":0,"losses":0},"as replicant":{"wins":0,"losses":0}}
		mb.save('interview_stats')
		
	if len(mb.data['interview']['players'])==2:	
		mb.tell("wait until the current game ends you poopsquirrel",target)
		return
	else:		
		mb.data['interview']['players'].append(nick)
		mb.data['interview'][nick]=who
		if len(mb.data['interview']['players'])==1:
			mb.tell("Game started, waiting for another player to join.",target)
		else:	
			if "detective" in mb.data['interview']:
				if mb.data['interview']['detective'] == mb.data['interview']['players'][0]:
					mb.data['interview']['suspect']=mb.data['interview']['players'][1]
				else:
					mb.data['interview']['suspect']=mb.data['interview']['players'][0]
			elif "suspect" in mb.data['interview']:
				if mb.data['interview']['suspect'] == mb.data['interview']['players'][0]:
					mb.data['interview']['detective']=mb.data['interview']['players'][1]
				else:
					mb.data['interview']['detective']=mb.data['interview']['players'][0]
		
			else:
				shuffle(mb.data['interview']['players'])
				mb.data['interview']['suspect']=mb.data['interview']['players'][0]
				mb.data['interview']['detective']=mb.data['interview']['players'][1]
		
			fate=choice(['human','replicant'])
			if fate=='human':
				answer="SPEAK TRULY"
			else:
				answer="LIE"
			mb.data['interview']['fate'] = fate
			suspect = mb.data['interview']['suspect']
			detective = mb.data['interview']['detective']

			question=choice(mb.data["interview_questions"])
			mb.data['interview']['questions']=[question]
			
			mb.tell(detective+" is the detective, "+suspect+" is the suspect",target)
			
			
			mb.tell("You're a "+fate+" bruh, that means you are REQUIRED TO "+answer+" answerin' "+detective+"'s questions.",suspect)
			
			mb.tell("You're the detective. Ask this question miss marple, you can paraphrase it:", detective)
			
			
			

			mb.tell(question,detective)
			
			interview_responses(target)
	
	mb.save('interview')
Exemplo n.º 3
0
def interview_func(nick, match, target):
    mb.load("interview_questions")
    who = nick
    role = match.group("role")

    for player in mb.data['aliases']:
        if nick in mb.data['aliases'][player]:
            who = player
            break

    if role:
        if role in mb.data['interview'].keys():
            name = mb.data['interview'][role]
            mb.tell(
                nick + ": " + name + " called dibs on being a " + role +
                ". get rekt nerd", target)
            return
        else:
            mb.data['interview'][role] = who

    if not who in mb.data['interview_stats']:
        mb.data['interview_stats'][who] = {
            "as detective": {
                "wins": 0,
                "losses": 0
            },
            "as replicant": {
                "wins": 0,
                "losses": 0
            }
        }
        mb.save('interview_stats')

    if len(mb.data['interview']['players']) == 2:
        mb.tell("wait until the current game ends you poopsquirrel", target)
        return
    else:
        mb.data['interview']['players'].append(nick)
        mb.data['interview'][nick] = who
        if len(mb.data['interview']['players']) == 1:
            mb.tell("Game started, waiting for another player to join.",
                    target)
        else:
            if "detective" in mb.data['interview']:
                if mb.data['interview']['detective'] == mb.data['interview'][
                        'players'][0]:
                    mb.data['interview']['suspect'] = mb.data['interview'][
                        'players'][1]
                else:
                    mb.data['interview']['suspect'] = mb.data['interview'][
                        'players'][0]
            elif "suspect" in mb.data['interview']:
                if mb.data['interview']['suspect'] == mb.data['interview'][
                        'players'][0]:
                    mb.data['interview']['detective'] = mb.data['interview'][
                        'players'][1]
                else:
                    mb.data['interview']['detective'] = mb.data['interview'][
                        'players'][0]

            else:
                shuffle(mb.data['interview']['players'])
                mb.data['interview']['suspect'] = mb.data['interview'][
                    'players'][0]
                mb.data['interview']['detective'] = mb.data['interview'][
                    'players'][1]

            fate = choice(['human', 'replicant'])
            if fate == 'human':
                answer = "SPEAK TRULY"
            else:
                answer = "LIE"
            mb.data['interview']['fate'] = fate
            suspect = mb.data['interview']['suspect']
            detective = mb.data['interview']['detective']

            question = choice(mb.data["interview_questions"])
            mb.data['interview']['questions'] = [question]

            mb.tell(
                detective + " is the detective, " + suspect +
                " is the suspect", target)

            mb.tell(
                "You're a " + fate + " bruh, that means you are REQUIRED TO " +
                answer + " answerin' " + detective + "'s questions.", suspect)

            mb.tell(
                "You're the detective. Ask this question miss marple, you can paraphrase it:",
                detective)

            mb.tell(question, detective)

            interview_responses(target)

    mb.save('interview')