def on_opt_leaveme(self, game:Game, player:int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.navi_greet) pname = game.player_info[player].first_name diag = "Hey! Listen! Hey {pname}! Listen!".format(pname = pname) roboy_interface.roboy_say(diag)
def on_opt_fun1(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.glados_end) pname = game.player_info[player].first_name diag = "The cake is a lie. However, I got this just for you. Releasing deadly neurotoxin." roboy_interface.roboy_say(diag)
def on_opt_fun2(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.glados_end) pname = game.player_info[player].first_name diag = "I have a nice gift just for you. Releasing deadly neurotoxin." roboy_interface.roboy_say(diag)
def on_gps(self, game: Game, player: int): pname = game.player_info[player].first_name diag = "Companion Pi position received. Please receive your results." roboy_interface.roboy_say(diag) self.set_priv_data(game, player, "ball_done", True) states.set_mission_done() states.set_ongoing_mission("Go back to GlaDOS") game.update_single(player)
def on_opt_refusedo(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.glados_refusal) pname = game.player_info[player].first_name diag = "Are you ready for a challenge!" roboy_interface.roboy_say(diag)
def on_opt_what(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.khajit_what) pname = game.player_info[player].first_name diag = "Khajiit has wares if you have coin." roboy_interface.roboy_say(diag)
def on_opt_who(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.khajit_who) pname = game.player_info[player].first_name diag = "Ah, I see my friend. I used to be an adventurer like you." roboy_interface.roboy_say(diag)
def on_init(self, game: Game, player: int): if self.get_priv_data(game, player, "what_done") and self.get_priv_data( game, player, "who_done"): game.set_player_state(player, states.GS.khajit_whathap) pname = game.player_info[player].first_name diag = "May the sun keep you warm even in this land of bitter cold." roboy_interface.roboy_say(diag)
def on_opt_fun1(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.glados_challenge) pname = game.player_info[player].first_name diag = "It seems the subject is deaf. I've had that before. Let me reapeat it for you." roboy_interface.roboy_say(diag)
def on_opt_fun2(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.glados_quest) pname = game.player_info[player].first_name diag = "The please commence testing. There will be cake." roboy_interface.roboy_say(diag)
def on_opt_yes(self, game:Game, player:int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.navi_quest) pname = game.player_info[player].first_name diag = "Hey listen! Hold the sword in the air and jump!" roboy_interface.roboy_say(diag)
def on_opt_hello(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" self.set_priv_data(game, player, "who_disabled", True) game.set_player_state(player, states.GS.khajit_whatwho) pname = game.player_info[player].first_name diag = "I welcome you friend, how can I serve you?" roboy_interface.roboy_say(diag)
def on_opt_diag1(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.khajit_whatsword) pname = game.player_info[player].first_name diag = "Have you seen a sword around here? They blame Khajiit for stealing it." roboy_interface.roboy_say(diag) pass
def on_opt_diag2(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.khajit_whatwho) pname = game.player_info[player].first_name diag = "These sands are cold, but Khajiit feels warm from your presence." roboy_interface.roboy_say(diag) pass
def on_opt_diag1(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.khajit_whatwho) pname = game.player_info[player].first_name diag = "Oh, I see. These lands are cruel." roboy_interface.roboy_say(diag) pass
def on_opt_diag2(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.khajit_whatwho) pname = game.player_info[player].first_name diag = "I travel all across Garshing to serve you, but I seem to have an unfortunate talent for getting myself involved with misunderstandings with the law." roboy_interface.roboy_say(diag) pass
def on_opt_imdone(self, game:Game, player:int): if not states.is_focused(game, player): return "Face roboy when you speak!" if game.dm.get_data("ball") != {"x":5,"y":5,"z":5}: roboy_interface.roboy_say("Hey you! You aren't done! Listen!") else: roboy_interface.roboy_say("Hey you! Hey! Thank you!") game.set_player_state(player, states.GS.navi_end)
def on_opt_no(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" game.set_player_state(player, states.GS.glados_challenge) pname = game.player_info[player].first_name diag = "Subject number {pname}. Please commence testing.".format( pname=abs(player)) roboy_interface.roboy_say(diag)
def on_opt_greetings(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" self.set_priv_data(game, player, "who_disabled", False) game.set_player_state(player, states.GS.khajit_whatwho) pname = game.player_info[player].first_name diag = "You approach as if you know Khajiit. Who are you and what do you want?" roboy_interface.roboy_say(diag)
def process_updates(updates): for update in updates: if update.type == "focus" and update.data["val"] == True: roboy_interface.roboy_say("I used to be an adventurer like you.") #roboy_interface.roboy_say("Firtina pellar inleeler yeaneethen yuksellejeck") telegramapp.the_game.dm.set_data(update.type, update.data) log.info("UPDATE: {name}:{data}".format(name = update.type, data = json.dumps(update.data))) return "ok"
def on_done(self, game: Game, player: int): if not is_focused(game, player): return "Face roboy when you speak!" if game.dm.get_data("ball") != {"x": 5, "y": 5, "z": 5}: roboy_interface.roboy_say( "You can't fool me! You didn't put the ball!") else: roboy_interface.roboy_say("You are amazing!") game.set_player_state(player, GS.greet)
def on_opt_yes(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" states.set_mission_done() game.set_player_state(player, states.GS.glados_quest) game.update_single(player) pname = game.player_info[player].first_name diag = "Please escort the companion pi to the local research facility." roboy_interface.roboy_say(diag)
def on_opt_not(self, game:Game, player:int): if not states.is_focused(game, player): return "Face roboy when you speak!" self.set_priv_data(game, player, "said_not", True) self.set_priv_data(game, player, "not_count", self.get_priv_data(game, player, "not_count") + 1) pname = game.player_info[player].first_name diag = "{pname}! Listen! Hey! Hey you! Listen!".format(pname = pname) game.update_single(player) roboy_interface.roboy_say(diag)
def on_opt_isdone(self, game: Game, player: int): if not states.is_focused(game, player): return "Face roboy when you speak!" gpsdone = self.get_priv_data(game, player, "ball_done") if not gpsdone: pname = game.player_info[player].first_name diag = "Do not try to lie. the companion pi has not reached its destination." roboy_interface.roboy_say(diag) else: game.set_player_state(player, states.GS.glados_results) pname = game.player_info[player].first_name diag = "Congratulations for the slowest team in eternity award." roboy_interface.roboy_say(diag)
def on_waddup(self, game: Game, player: int): if not is_focused(game, player): return "Face roboy when you speak!" roboy_interface.roboy_say("Be respectful adventurer!") game.set_player_state(player, GS.putball)
def on_greetings(self, game: Game, player: int): if not is_focused(game, player): return "Face roboy when you speak!" roboy_interface.roboy_say("Greetings!") game.set_player_state(player, GS.putball)
def on_cancel(self, game: Game, player: int): roboy_interface.roboy_say("Casuals") game.set_player_state(player, GS.greet)