from LIBSCII import * map0 = """ ######################################################## # ________ \|/ # # | ) | _|_ # # |_)____| \_/ ______ # # ^ [==-==-] _ # # <=> [-===-=] // # # / \ [==-==-] <=// # # | || # ######################################################## """ portrait = """ ___ /\\/\\\\ \\. ./ / \\ """ animations = { "replace_animations": { '-': { "frames": ['=', '-'], "animation_frame": 0 }, '=': { "frames": ['-', '='], "animation_frame": 0 } }, "coords_animations": { "4, 4": { "frames": ['^', ' '], "animation_frame": 0 } } } def npc_collision(self, npc): global portrait if npc["name"] == "lephenixnoir": self.show_text("""C'est moi, Lephe', Je suis aussi dans le jeu !""", portrait) if npc["name"] == "massena": txt = self.ask_choice("T'as besoin d'aide pour des pixel arts ?", ["Oui", "Non"]) if txt == 1: self.show_text("Merci !") else: self.show_text("Dommage") world = { "dmode": STICKY, "map_num": 0, "maps": [ { "layers": [ { "data": map0, "transp_char": None, "animations": animations } ], "jumps": [ { "x": 4, "y": 4, "to_x": 1, "to_y": 1, "to_map": 0, "isactive": 1 } ] } ], "npc": [ { "x": 35, "y": 1, "isvisible": 1, "collision_check": 1, "layer": 0, "map": 0, "char": '&', "name": "massena" }, { "x": 35, "y": 6, "isvisible": 1, "collision_check": 1, "layer": 0, "map": 0, "char": '&', "name": "lephenixnoir" } ] } player = { "x": 3, "y": 4, "isvisible": 1, "collision_check": 1, "layer": 0, "playerc": '@' } scii = Scii(world, player, npc_collision) scii.mainloop()