Sujet n°5491
Posté par Quentindu93200 le 26 Nov - 07:54 (2009)
Titre : Plusieurs Problemes
VOILA quand je met nouvelle partie sa deroule l'intro mais quand il y le pokémon de krosk sa mais cette images:
logs



---------- Erreur de script : évènement ---------- ----- Type TypeError ----- Message Section110:774:in `sprintf'cannot convert Range into Integer ----- Position de l'évènement MAP 1 EVENT 2 SCRIPT cry_pokemon("RHINOFEROS") ----- Backtrace Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355' Script : Interpreter | Ligne : 774 | Méthode : in `cry_pokemon' Script : Loading | Ligne : 1 | Méthode : in `command_355' Script : Interpreter 2 | Ligne : 215 | Méthode : in `eval' Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355' Script : Interpreter 2 | Ligne : 215 | Méthode : in `execute_command' Script : Interpreter 1 | Ligne : 199 | Méthode : in `update' Script : Interpreter 1 | Ligne : 113 | Méthode : in `loop' Script : Interpreter 1 | Ligne : 204 | Méthode : in `update' Script : Scene_Map | Ligne : 48 | Méthode : in `alias_update' Script : Scene_Map | Ligne : 46 | Méthode : in `loop' Script : Scene_Map | Ligne : 59 | Méthode : in `alias_update' Script : MAPPANEL | Ligne : 90 | Méthode : in `update' Script : Scene_Map | Ligne : 25 | Méthode : in `main' Script : Scene_Map | Ligne : 19 | Méthode : in `loop' Script : Scene_Map | Ligne : 30 | Méthode : in `main' Script : Main | Ligne : 57



script

 
Code:
#============================================================================== # ■ Interpreter # Pokemon Script Project - Krosk  # 18/07/07 #----------------------------------------------------------------------------- # Scène à modifier à loisir #----------------------------------------------------------------------------- # Fonctions personnelles "Insérer un script" #-----------------------------------------------------------------------------  class Interpreter   include POKEMON_S      #-----------------------------------------------------------------------------   # call_battle_wild   #   Appel d'un combat contre un Pokémon sauvage quelconque   #   (Pour un légendaire mobile, cf fonction suivante)   #   id: id Pokémon   #   level: niveau du Pokémon sauvage   #-----------------------------------------------------------------------------   def call_battle_wild(id_data, level, shiny = false, ia = false)     $game_temp.map_bgm = $game_system.playing_bgm     $game_system.bgm_stop     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     end     pokemon = Pokemon.new(id, level, shiny)     $scene = Pokemon_Battle_Wild.new($pokemon_party, pokemon, ia)     @wait_count = 2     return true   end   alias demarrer_combat call_battle_wild    #-----------------------------------------------------------------------------   # call_battle_existing   #   Appel d'un combat contre un Pokémon défini   #   (Pour un légendaire mobile par exemple déjà créé)   #   pokemon: class Pokemon   #-----------------------------------------------------------------------------   def call_battle_existing(pokemon, ia = false)     $game_temp.map_bgm = $game_system.playing_bgm     $game_system.bgm_stop     if pokemon == nil or pokemon.dead?       return false     end     $scene = Pokemon_Battle_Wild.new($pokemon_party, pokemon, ia)     @wait_count = 2     return true   end   alias demarrer_combat_existant call_battle_existing      #-----------------------------------------------------------------------------   # call_battle_trainer   #   Appel d'un combat contre un Dresseur   #   id: id Dresseur   #-----------------------------------------------------------------------------   def call_battle_trainer(id, ia = true, run_able = false, lose_able = false)     $game_temp.map_bgm = $game_system.playing_bgm     $game_system.bgm_stop     $scene = Pokemon_Battle_Trainer.new($pokemon_party, id, ia, run_able, lose_able)     @wait_count = 2     return true   end      #-----------------------------------------------------------------------------   # set_encounter(rate, listx)   #   Définition de liste de rencontre des Pokémons   #   rate: de 1 à 50 de préférence   #   listx: (x = tag du terrain) [[id, level, rareté], [id, level], ...]   #-----------------------------------------------------------------------------     def set_encounter(rate = 0, list1 = [], list2 = [], list3 = [], list4 = [])     $random_encounter = [0]     $random_encounter[0] = rate     $random_encounter[1] = list1     $random_encounter[2] = list2     $random_encounter[3] = list3     $random_encounter[4] = list4     @wait_count = 2     return false   end      def set_encounter_name(rate, list1 = [], list2 = [], list3 = [], list4 = [])     for pokemon in list1       pokemon[0] = id_conversion(pokemon[0])     end     for pokemon in list2       pokemon[0] = id_conversion(pokemon[0])     end     for pokemon in list3       pokemon[0] = id_conversion(pokemon[0])     end     for pokemon in list4       pokemon[0] = id_conversion(pokemon[0])     end     set_encounter(rate, list1, list2, list3, list4)   end      #-----------------------------------------------------------------------------   # run_computer   #   Appel de PC   #-----------------------------------------------------------------------------   def run_computer     $scene = Pokemon_Computer.new     @wait_count = 2     return false   end   alias demarrer_pc run_computer      def enable_pokedex     $data_pokedex[0] = true   end   alias activer_pokedex enable_pokedex      #-----------------------------------------------------------------------------   # heal_party   #   Refill du Centre Pokémon   #-----------------------------------------------------------------------------     def heal_party_center     $pokemon_party.refill_party   end   alias soigner_equipe heal_party_center      #-----------------------------------------------------------------------------   # add_pokemon(id_data, level, shiny)   #   Ajout d'un Pokémon dans l'équipe   #-----------------------------------------------------------------------------    def add_pokemon(id_data, level = 5, shiny = false)     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     end     pokemon = Pokemon.new(id, level, shiny)     $pokemon_party.add(pokemon)   end   alias ajouter_pokemon add_pokemon      def add_or_store_pokemon(id_data, level = 5, shiny = false)     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     end     pokemon = Pokemon.new(id, level, shiny)     $pokemon_party.add_or_store(pokemon)   end   alias ajouter_stocker_pokemon add_or_store_pokemon      def add_pokemon_parameter(hash)     if hash["ID"] == nil or hash["NV"] == nil       return     end     pokemon = Pokemon.new(hash["ID"], hash["NV"], hash["SHINY"])     if hash["GR"] != nil and [0, 1, 2, "F", "G", "I"].include?(hash["GR"])       pokemon.set_gender(hash["GR"])     end     if hash["FORM"] != nil       pokemon.form = hash["FORM"]     end     if hash["MOVE"] != nil and hash["MOVE"].type == Array       i = 0       for skill in hash["MOVE"]         if skill != nil and skill != "AUCUN"           pokemon.skills_set[i] = Skill.new(Skill_Info.id(skill))         end         if skill == "AUCUN"           pokemon.skills_set[i] = nil         end         i += 1       end       pokemon.skills_set.compact!     end     if hash["OBJ"] != nil       if hash["OBJ"].type == Fixnum         pokemon.item_hold = hash["OBJ"]       elsif hash["OBJ"].type == String         pokemon.item_hold = Item.id(hash["OBJ"])       end     end     if hash["STAT"] != nil and hash["STAT"].type == Array and          hash["STAT"].length == 6       pokemon.dv_modifier(hash["STAT"])     end     ajouter_pokemon_cree(pokemon)   end   alias ajouter_pokemon_param add_pokemon_parameter      def store_pokemon(id_data, level = 5, shiny = false)     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     end     pokemon = Pokemon.new(id, level, shiny)     $pokemon_party.store_captured(pokemon)   end   alias stocker_pokemon store_pokemon      #-----------------------------------------------------------------------------   # add_and_name_pokemon(id_data, level)   #   Ajout d'un Pokémon dans l'équipe   #-----------------------------------------------------------------------------    def add_and_name_pokemon(id_data, level = 5, shiny = false)     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     end     pokemon = Pokemon.new(id, level, shiny)     name_pokemon(pokemon)     $pokemon_party.add(pokemon)   end   alias ajouter_et_nommer_pokemon add_and_name_pokemon      #-----------------------------------------------------------------------------   # add_created_pokemon(pokemon)   #   Ajout d'un Pokémon (objet de classe Pokemon) dans l'équipe   #-----------------------------------------------------------------------------    def add_created_pokemon(pokemon)     $pokemon_party.add(pokemon)   end   alias ajouter_pokemon_cree add_created_pokemon      def add_store_created_pokemon(pokemon)     $pokemon_party.add_or_store(pokemon)   end   alias ajouter_stocker_pokemon_cree add_store_created_pokemon      #-----------------------------------------------------------------------------   # remove_pokemon(id_data)   #   Enleve un seul Pokémon de l'équipe par son ID ou son nom   #-----------------------------------------------------------------------------    def remove_pokemon(id_data)     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     elsif id_data.type == Pokemon       $pokemon_party.actors.delete(id_data)       return     end     $pokemon_party.remove_id(pokemon_index(id))   end   alias retirer_pokemon remove_pokemon      #-----------------------------------------------------------------------------   # remove_pokemon_index(index)   #   Enleve un seul Pokémon de l'équipe par son index   #-----------------------------------------------------------------------------    def remove_pokemon_index(index)     $pokemon_party.remove_id(index)   end   alias retirer_pokemon_index remove_pokemon_index         #-----------------------------------------------------------------------------   # create_pokemon(id, level)   #   Crèe un Pokémon, à utiliser comme il se doit   #-----------------------------------------------------------------------------    def create_pokemon(id_data, level, shiny = false)     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     end     return pokemon = Pokemon.new(id, level, shiny)   end      #-----------------------------------------------------------------------------   # make_pokemon(slot, id, level, shiny)   #   Crèe un Pokémon, et le stocke   #-----------------------------------------------------------------------------    def make_pokemon(slot, id_data, level, shiny = false)     if id_data.type == Fixnum       id = id_data     elsif id_data.type == String       id = id_conversion(id_data)     end     if $existing_pokemon[slot] == nil       $existing_pokemon[slot] = Pokemon.new(id, level, shiny)     end   end   alias enregistrer_pokemon make_pokemon      #-----------------------------------------------------------------------------   # existing_pokemon?(slot)   #   Demande si un slot est occupé   #-----------------------------------------------------------------------------    def existing_pokemon?(slot)     if $existing_pokemon[slot] != nil       return true     end     return false   end   alias pokemon_existant? existing_pokemon?      #-----------------------------------------------------------------------------   # erase_existing_pokemon(slot)   #   Efface un pokémon au slot   #-----------------------------------------------------------------------------    def erase_existing_pokemon(slot)     $existing_pokemon[slot] = nil     return false   end   alias effacer_pokemon_existant erase_existing_pokemon      #-----------------------------------------------------------------------------   # call_pokemon(slot)   #   Renvoie le pokemon (class) dans un slot.   #-----------------------------------------------------------------------------    def call_pokemon(slot)     return $existing_pokemon[slot]   end   alias appel_pokemon call_pokemon      #-----------------------------------------------------------------------------   # skill_conversion   #   Conversion script -> BDD par exportation   #-----------------------------------------------------------------------------      def skill_conversion     # Conversion     for id in 1..$data_skills_pokemon.length-1       skill = Skill.new(id)              if $data_skills[id] == nil         $data_skills[id] = RPG::Skill.new       end              $data_skills[id].name = skill.name       $data_skills[id].element_set = [skill.type]       if skill.power > 200         $data_skills[id].atk_f = 200         $data_skills[id].eva_f = skill.power - 200       else         $data_skills[id].atk_f = skill.power         $data_skills[id].eva_f = 0       end       $data_skills[id].hit = skill.accuracy       $data_skills[id].power = skill.effect       $data_skills[id].pdef_f = skill.effect_chance       $data_skills[id].sp_cost = skill.ppmax       case skill.target       when 1         $data_skills[id].scope = 0       when 0         $data_skills[id].scope = 1       when 8         $data_skills[id].scope = 2       when 4         $data_skills[id].scope = 3       when 20         $data_skills[id].scope = 4       when 40         $data_skills[id].scope = 5       when 10         $data_skills[id].scope = 7       end       $data_skills[id].animation1_id = skill.user_anim_id       $data_skills[id].animation2_id = skill.target_anim_id       $data_skills[id].description = skill.description       $data_skills[id].variance = skill.direct? ? 1 : 0       $data_skills[id].mdef_f = skill.priority       if skill.map_use != 0         $data_skills[id].occasion = 0         $data_skills[id].common_event_id = skill.map_use       else         $data_skills[id].occasion = 1         $data_skills[id].common_event_id = 0       end              # Effacement       $data_skills[id].plus_state_set = []       $data_skills[id].minus_state_set = []       $data_skills[id].agi_f = 0       $data_skills[id].str_f = 0       $data_skills[id].dex_f = 0       $data_skills[id].agi_f = 0       $data_skills[id].int_f = 0     end          file = File.open("Skills.rxdata", "wb")     Marshal.dump($data_skills, file)     file.close   end         #-----------------------------------------------------------------------------   # pokemon_conversion   #   Conversion script -> BDD par exportation   # $data_enemies et $data_classes   #-----------------------------------------------------------------------------      def pokemon_conversion     # Inscription des noms     for i in 118..175       if $data_weapons[i-84] == nil         $data_weapons[i-84] = RPG::Weapon.new       end       $data_weapons[i-84].name = Item.name(i)     end          # Inscription des capa spé     for i in 1..77       if $data_armors[i+33] == nil         $data_armors[i+33] = RPG::Armor.new       end       $data_armors[i+33].name = $data_ability[i][0]       $data_armors[i+33].description = $data_ability[i][1]     end               # Conversion     for id in 1..$data_pokemon.length-1       pokemon = Pokemon.new(id)              if $data_enemies[id] == nil         $data_enemies[id] = RPG::Enemy.new       end              if $data_classes[id] == nil         $data_classes[id] = RPG::Class.new       end              # Reset données       $data_enemies[id].mdef = 0       $data_enemies[id].pdef = 0       $data_enemies[id].actions = []              $data_classes[id].weapon_set = []       $data_classes[id].armor_set = []              # Nom       $data_enemies[id].name = pokemon.name       $data_enemies[id].battler_name = "Front_Male/"+sprintf("%03d",id)+".png"              # ID secondaire       $data_enemies[id].maxsp = id              # Base Stats       $data_enemies[id].maxhp = pokemon.base_hp       $data_enemies[id].agi = pokemon.base_spd       $data_enemies[id].int = pokemon.base_ats       $data_enemies[id].str = pokemon.base_atk       $data_enemies[id].dex = pokemon.base_dfe       $data_enemies[id].atk = pokemon.base_dfs              # Apprentissage des skills       $data_classes[id].learnings = []       for skill in pokemon.skills_table         learning = RPG::Class::Learning.new         learning.level = skill[1]         learning.skill_id = skill[0]         $data_classes[id].learnings.push(learning)       end              # CT/CS: support script              # Exp Type       $data_classes[id].weapon_set.push(pokemon.exp_type + 15)              # Evolution       $data_classes[id].name = ""              # Evolution unique       if pokemon.evolve_list.length == 2         # Evolution naturelle seulement         name = pokemon.evolve_list[1][0]         data = pokemon.evolve_list[1][1]         if data.type == Fixnum and name != ""           $data_classes[id].name = name + "/" + data.to_s           $data_classes[id].weapon_set.push(22)         elsif data == "loyal"           $data_classes[id].name = name#"L" + "/" + name           $data_classes[id].weapon_set.push(24)         elsif data == "trade"           $data_classes[id].name = name#"T" + "/" + name           $data_classes[id].weapon_set.push(25)         elsif data == "stone"           $data_classes[id].name = name#"S" + "/" + name           $data_classes[id].weapon_set.push(23)         end       else         # Evolution spéciale/multiple         $data_classes[id].weapon_set.push(26)       end              # Type       if pokemon.type1 != 0         $data_enemies[id].element_ranks[pokemon.type1] = 1         $data_classes[id].element_ranks[pokemon.type1] = 3       end       if pokemon.type2 != 0         $data_enemies[id].element_ranks[pokemon.type2] = 2         $data_classes[id].element_ranks[pokemon.type2] = 3       end              # Rareté       $data_enemies[id].gold = pokemon.rareness              # Genre       $data_classes[id].armor_set = []       case Pokemon_Info.female_rate(id) # Female rate       when -1         $data_classes[id].armor_set.push(2)       when 0         $data_classes[id].armor_set.push(3)       when 12.5         $data_classes[id].armor_set.push(4)       when 25         $data_classes[id].armor_set.push(5)       when 50         $data_classes[id].armor_set.push(6)       when 75         $data_classes[id].armor_set.push(7)       when 87.5         $data_classes[id].armor_set.push(   8)          when 100         $data_classes[id].armor_set.push(9)       else         $data_classes[id].armor_set.push(6)       end              # Loyauté       case pokemon.loyalty       when 0         $data_classes[id].armor_set.push(11)       when 35         $data_classes[id].armor_set.push(12)       when 70         $data_classes[id].armor_set.push(13)       when 90         $data_classes[id].armor_set.push(14)       when 100         $data_classes[id].armor_set.push(15)       when 140         $data_classes[id].armor_set.push(16)       else         $data_classes[id].armor_set.push(13)       end              # EV et Base Exp       i = 0       for element in pokemon.battle_list         if i == pokemon.battle_list.length-1           $data_enemies[id].exp = element           next         end                  case element         when 1           $data_classes[id].weapon_set.push(2+i)         when 2           $data_classes[id].weapon_set.push(8+i)         when 3           $data_classes[id].weapon_set.push(2+i)           $data_classes[id].weapon_set.push(8+i)         end         i += 1       end              # Breed Groupe       for group in pokemon.breed_group         $data_classes[id].armor_set.push(group + 17)       end              # Egg Hatch       case pokemon.hatch_step       when 1280         $data_classes[id].weapon_set.push(28)       when 2560         $data_classes[id].weapon_set.push(29)       when 3840         $data_classes[id].weapon_set.push(28)         $data_classes[id].weapon_set.push(29)       when 5120         $data_classes[id].weapon_set.push(30)       when 6400         $data_classes[id].weapon_set.push(30)         $data_classes[id].weapon_set.push(28)       when 7680         $data_classes[id].weapon_set.push(30)         $data_classes[id].weapon_set.push(29)       when 8960         $data_classes[id].weapon_set.push(30)         $data_classes[id].weapon_set.push(29)         $data_classes[id].weapon_set.push(28)       when 10240         $data_classes[id].weapon_set.push(31)       when 20480         $data_classes[id].weapon_set.push(32)       when 30720         $data_classes[id].weapon_set.push(31)         $data_classes[id].weapon_set.push(32)       else         $data_classes[id].weapon_set.push(30)       end              # Liste CT/CS       for element in pokemon.skills_allow         if element.type == Fixnum           $data_classes[id].weapon_set.push(33 + element)         end         if element.type == Array           $data_classes[id].weapon_set.push(33 + 50 + element[0])         end       end              # Capa Spé       list = []       for i in 1..$data_ability.length-1         list.push($data_ability[i][0])       end       for ability in Pokemon_Info.ability_list(id)         abid = list.index(ability) + 1         $data_classes[id].armor_set.push(abid + 33)       end              # Attaque par accouplement       r = 0       for skill in pokemon.breed_move         if $data_enemies[id].actions[r] == nil           $data_enemies[id].actions[r] = RPG::Enemy::Action.new         end         $data_enemies[id].actions[r].kind = 1         $data_enemies[id].actions[r].skill_id = skill         r += 1       end     end          file = File.open("Enemies.rxdata", "wb")     Marshal.dump($data_enemies, file)     file.close     file = File.open("Classes.rxdata", "wb")     Marshal.dump($data_classes, file)     file.close     file = File.open("Weapons.rxdata", "wb")     Marshal.dump($data_weapons, file)     file.close     file = File.open("Armors.rxdata", "wb")     Marshal.dump($data_armors, file)     file.close   end      #-----------------------------------------------------------------------------   # item_conversion   #   Conversion script -> BDD par exportation   # $data_items   #-----------------------------------------------------------------------------   def item_conversion     for i in 1..$data_item.length-1       data = $data_item[i]       item = RPG::Item.new              if data == nil or data == []         $data_items[i] = item         next       end              item.id = i       item.name = data[0]       item.icon_name = data[1]       item.description = data[3]       item.price = data[4]              # Texte objet utilisé       if data[6] != nil and data[6] != ""         item.description += "//" + data[6]       end              # Poche       case data[2]       when "ITEM"         item.element_set.push(28)#23       when "BALL"         item.element_set.push(29)       when "TECH"         item.element_set.push(30)       when "BERRY"         item.element_set.push(31)       when "KEY"         item.element_set.push(32)       else         item.element_set.push(28)       end              # Profil       for j in 0...data[5].length         if data[5][j]           item.element_set.push(34 + j)         end       end              # Logdata       if data[8] != nil         item.recover_hp_rate = data[8][0]         item.recover_hp = data[8][1]         item.recover_sp_rate = data[8][2]         item.recover_sp = data[8][3]       end       if data[9] != nil         item.minus_state_set = data[9]       end              # Conversion Event       if data[7] != nil and data[7][0] == "event"         item.common_event_id = data[7][1]       end              $data_items[i] = item            end          file = File.open("Items.rxdata", "wb")     Marshal.dump($data_items, file)     file.close   end        #-----------------------------------------------------------------------------   # id_conversion(name)   #   Renvoie l'id du Pokémon nommé name   #-----------------------------------------------------------------------------     def id_conversion(name)     for id in 1..$data_pokemon.length-1       if name == Pokemon_Info.name(id)         return id       end     end   end      #-----------------------------------------------------------------------------   # draw_choice   #   Fenêtre de choix Oui, non   #-----------------------------------------------------------------------------      def draw_choice(arg1 = "OUI", arg2 = "NON")     window = Window_Command.new(1, [arg1, arg2], $fontsizebig)     width = [window.contents.text_size(arg1).width, window.contents.text_size(arg2).width].max + 16     window.dispose     @command = Window_Command.new(width + 32, [arg1, arg2], $fontsizebig)     @command.x = 605 - width     @command.y = 215     @command.z = 10000     loop do       Graphics.update       Input.update       @command.update       if Input.trigger?(Input::C) and @command.index == 0         @command.dispose         @command = nil         #Input.update         @wait_count = 2         return true       end       if Input.trigger?(Input::C) and @command.index == 1         @command.dispose         @command = nil         #Input.update         @wait_count = 2         return false       end     end   end      #-----------------------------------------------------------------------------   # cry_pokemon   #   Effet sonore: cri du Pokémon   #-----------------------------------------------------------------------------    def cry_pokemon(id_data)     if id_data.type == String       id = id_conversion(id_data)     elsif id_data.type == Fixnum       id = id_data     end     ida = sprintf("%03d", id)     filename = "Audio/SE/Cries/" + ida + "Cry.wav"     if FileTest.exist?(filename)       Audio.se_play(filename)     end     return true   end      #-----------------------------------------------------------------------------   # complete_pokedex   #   Complète le Pokédex   #-----------------------------------------------------------------------------    def complete_pokedex     for i in 1..$data_pokedex.length-1       $data_pokedex[i] = [true, true]     end   end      #-----------------------------------------------------------------------------   # name_pokemon   #   Scene de nom   #-----------------------------------------------------------------------------    def name_pokemon(pokemon)     if pokemon == nil       return false     end     Graphics.freeze     name_scene = Pokemon_Name.new(pokemon)     name_scene.main     name_scene = nil     Graphics.transition     return true   end      #-----------------------------------------------------------------------------   # Dresseur   #-----------------------------------------------------------------------------    def trainer_spotted(distance)     character = $game_map.events[@event_id]     if $game_player.moving?       return false     end     case character.direction     when 4 # Tourné vers la gauche       if character.y == $game_player.y and           character.x - $game_player.x >= 0 and           (character.x - $game_player.x).abs <= distance         $game_player.turn_right         return true       end     when 8 # Tourné vers le haut       if character.x == $game_player.x and           character.y - $game_player.y >= 0 and           (character.y - $game_player.y).abs <= distance         $game_player.turn_down         return true       end     when 6 # Tourné vers la droite       if character.y == $game_player.y and           character.x - $game_player.x <= 0 and           (character.x - $game_player.x).abs <= distance         $game_player.turn_left         return true       end     when 2 # Tourné vers le bas       if character.x == $game_player.x and           character.y - $game_player.y <= 0 and           (character.y - $game_player.y).abs <= distance         $game_player.turn_up         return true       end     end     if Input.trigger?(Input::C) and $game_player.front_tile_event == character       return true     end     return false   end      def player_front_tile     return $game_player.front_tile   end      def player_front_terrain_tag     coord = $game_player.front_tile     return $game_map.terrain_tag(coord[0], coord[1])   end      def player_front_passable?     coord = $game_player.front_tile     return $game_map.passable?(coord[0],coord[1], 10 - $game_player.direction)   end      # ------------------------------------------------------   #                       Acessibilité   # ------------------------------------------------------      # ------------------------------------------------------   # pokemon_numero(numero)   #   Renvoie le Pokémon (objet de classe Pokemon) au numéro   #   dans l'équipe: 0 = premier Pokémon, 1 = 2ème...   # ------------------------------------------------------   def pokemon_number(num)     if num < 0 or num >= $pokemon_party.actors.length       return nil     end     return $pokemon_party.actors[num]   end   alias pokemon_numero pokemon_number      def pokemon_selected     return pokemon_number(var(4))   end   alias pokemon_choisi pokemon_selected      # ------------------------------------------------------   # appel_menu_equipe   #   Permet d'ouvrir une fenêtre de sélection du Pokémon.   #   Renvoie -1, ou l'index du Pokémon (0 pour le premier,   #   1 pour le suivant, 2 pour le suisuivant...   # ------------------------------------------------------   def call_party_menu     Graphics.freeze     scene = Pokemon_Party_Menu.new(0, 10000, "selection")     scene.main     data = scene.return_data     scene = nil     Graphics.transition     $game_variables[4] = data     return data   end   alias appel_menu_equipe call_party_menu      # ------------------------------------------------------   # enseigner_capacite(pokemon, skill_id)   #   Permet d'enseigner une capacité à un pokemon (class), et d'écraser    #   un skill choisi par le joueur si celui-ci a déjà plus de 4 skills.   # ------------------------------------------------------   def teach_skill(pokemon, skill_id)     if skill_id.type == Fixnum       id = skill_id     elsif skill_id.type == String       id = Skill_Info.id(skill_id)     end     if pokemon == nil       return false     end     if not(pokemon.skill_learnt?(id))       scene = Pokemon_Skill_Learn.new(pokemon, id)       scene.main       return scene.return_data     end     return false   end   alias enseigner_capacite teach_skill      # ------------------------------------------------------   # skill_selection   #   Permet d'ouvrir une fenêtre de sélection d'un skill.   #   Renvoie -1, ou l'index du de l'attaque (0 pour le premier,   #   1 pour le suivant, 2 pour le suisuivant...   # ------------------------------------------------------   def skill_selection(pokemon)     if pokemon == nil       return -1     end     scene = Pokemon_Skill_Selection.new(pokemon)     scene.main     data = scene.return_data     scene = nil     $game_variables[5] = data     return data   end      # ------------------------------------------------------   # appliquer_objet(skill_id, pokemon)   #   Permet d'imiter l'usage d'un objet.   # ------------------------------------------------------   def apply_item(id_data, pokemon = nil)     if id_data.type == Fixnum       item_id = id_data     elsif id_data.type == String       item_id = Skill_Info.id(id_data)     end     if Item.use_on_pokemon?(item_id)       if pokemon == nil         item_mode = "item_use"         if Item.item_able_mode?(item_id)           item_mode = "item_able"         end         scene = Pokemon_Party_Menu.new(0, 1000, item_mode, item_id)         scene.main         # return_data = [id item_utilisé, utilisé oui/non]         data = scene.return_data         scene = nil         Graphics.transition         return data[1]       else         $game_system.se_play($data_system.decision_se)         result = Item.effect_on_pokemon(item_id, pokemon)         if result[1] != ""           draw_text(result[1])           Input.update           until Input.trigger?(Input::C)             Input.update             Graphics.update           end         end         return result[0]       end     else       data = Item.effect(item_id)       used = data[0]       string = data[1]       return used     end   end   alias appliquer_objet apply_item      # ------------------------------------------------------   # pokemon_possede(id)   #   Renvoie si le pokémon est possédé ou non.   # ------------------------------------------------------   def got_pokemon(id_data)     return $pokemon_party.got_pokemon(id_data)   end   alias pokemon_possede got_pokemon      # ------------------------------------------------------   # pokemon_index(id)   #   Renvoie l'index du Pokémon.   # ------------------------------------------------------   def get_pokemon(id_data)     return $pokemon_party.get_pokemon(id_data)   end   alias pokemon_index get_pokemon      # ------------------------------------------------------   # sauv_retour(id)   #   Enregistre une ou position du joueur dans le point de retour   # ------------------------------------------------------   def sauv_retour(map_id = $game_map.map_id, x = $game_player.x, y = $game_player.y)     $game_variables[1] = map_id     $game_variables[2] = x     $game_variables[3] = y   end    # ------------------------------------------------------   # var(id)   #   $game_variables   # ------------------------------------------------------   def var(index)     return $game_variables[index]   end      def switch(index)     return $game_switches[index]   end      def equipe_vide?     return $pokemon_party.actors.length == 0   end      # ------------------------------------------------------   # actualiser_rencontre   #   Update les rencontres aléatoires après un changement   #   A appeler manuellement   # ------------------------------------------------------   def actualiser_rencontre     if $scene.is_a?(Scene_Map)       $scene.update_encounter     end   end      # ------------------------------------------------------   # ajouter_oeuf   #   Ajoute un oeuf dont l'espèce est déterminée par id   # ------------------------------------------------------   def ajouter_oeuf(mother, father = nil)     egg = Pokemon.new.new_egg(mother, father)     ajouter_pokemon_cree(egg)   end      # ------------------------------------------------------   # effectif_equipe   #   Compte combien de membre appelable au combat   # ------------------------------------------------------   def effectif_equipe     resultat = 0     for member in $pokemon_party.actors       if not member.egg?         resultat += 1       end     end     return resultat   end end    










ps:quand j'edite message c'est en ordre et quand j'envoi sa se mais sans les saut

Posté par Sphinx le 26 Nov - 07:56 (2009)
Par contre, faut vraiment que tu m'expliques un truc Mollasse enragé Pourquoi tu ne gardes pas les sauts de ligne dans ton rapport de log et dans ton script ? Mollasse enragé

Posté par Quentindu93200 le 26 Nov - 11:52 (2009)
quand je copie sa se mais comme sa 

Posté par Ace Attorney Man le 26 Nov - 16:57 (2009)
Et dans ton script à la base, tu as le saut de ligne ?

Posté par Quentindu93200 le 26 Nov - 17:00 (2009)
probleme resolu par moi meme mais j'ai un autre bug mas s'approche du début du jeux lol cette fois cet l'intro je vais modifier mon premier post et mon titre 


ps:
Ace Attorney Man a écrit:
Et dans ton script à la base, tu as le saut de ligne ? oui je l'ai 


Posté par Ace Attorney Man le 26 Nov - 17:04 (2009)
Explique comment tu as résolu. '_'

Posté par Quentindu93200 le 26 Nov - 17:12 (2009)
j'ai essayer pluseur fois te tester mon jeux et le bug a été KO lol 

Posté par Ace Attorney Man le 26 Nov - 17:13 (2009)
... Hein ?

Posté par Quentindu93200 le 26 Nov - 17:19 (2009)
bon essaye de resourdre probleme et je te le dit par MP comment le bug a été KO 

Posté par Ace Attorney Man le 26 Nov - 17:23 (2009)
J'ai pas que ça à faire.

Posté par Quentindu93200 le 26 Nov - 17:25 (2009)
alors pas grave j'essaye avec ma methode de mis KO lol 

Posté par Ace Attorney Man le 26 Nov - 17:26 (2009)
Mais puisque je te dit qu'il faut faire quelque chose et qu'un bug ne se règle pas comme ça !

Posté par Quentindu93200 le 26 Nov - 17:35 (2009)
ma met methode marche pas cette fois en + j'ai tros envie de tester mon jeux

Posté par Ace Attorney Man le 26 Nov - 17:36 (2009)
Ben oui, juste impossible de corriger un bug comme ça...

Posté par Quentindu93200 le 26 Nov - 17:38 (2009)
j'ai tros envie de tester mon projet et je peut a cause de ce bug

Posté par Ace Attorney Man le 26 Nov - 17:42 (2009)
Supprimes la commande de script "cry_pokemon(machin)"Clin d'œil foireux.

Posté par Quentindu93200 le 26 Nov - 17:47 (2009)
ok je vais voir sa toute suite

Posté par Ace Attorney Man le 26 Nov - 17:49 (2009)
Met OK dans le titre si c'est ... OK :D.

Posté par Quentindu93200 le 26 Nov - 18:23 (2009)
c'est a motié oK maitenant sa me mais sa:
et il y a pas d'intications sur l'erreur

Posté par Ace Attorney Man le 26 Nov - 18:33 (2009)
Ca, c'est juste ton PC qui lag.

Posté par Quentindu93200 le 26 Nov - 18:34 (2009)
Ok je vais voir si sa remarche 

Posté par Ace Attorney Man le 26 Nov - 18:35 (2009)
Et OK dans le titre si ça marche ...

Posté par Quentindu93200 le 26 Nov - 18:37 (2009)
sa marche pas je vais redemarez mon pc pour voir si sa fait la meme chose

Posté par Ace Attorney Man le 26 Nov - 18:39 (2009)
Laisse-le éteint 5 minutes.

Posté par Quentindu93200 le 26 Nov - 18:41 (2009)
ok je vais suivre tes conseil je l'eteint 5min

Posté par Ace Attorney Man le 26 Nov - 18:42 (2009)
Bien.

Posté par ThunderZ le 26 Nov - 18:43 (2009)
Ace Attorney Man a écrit:
Laisse-le éteint 5 minutes.




 
Où alors redémarre le projet plusieurs fois

Posté par Ace Attorney Man le 26 Nov - 18:44 (2009)
ho-oh obscur a écrit:

Ace Attorney Man a écrit:
Laisse-le éteint 5 minutes.





 
Où alors redémarre le projet plusieurs fois

Ben nan, ma solution est la meilleure ...

Posté par ThunderZ le 26 Nov - 18:45 (2009)
Ba moi elle marche biien aussi.^^

Posté par Quentindu93200 le 26 Nov - 18:58 (2009)
Ace ta solution a pas marché j'essaye celle de ho-oh

Posté par Ace Attorney Man le 26 Nov - 19:02 (2009)
... OK...

Posté par Quentindu93200 le 26 Nov - 19:04 (2009)
celle de ho-oh marche pas aussi :( Ace tu veux que je t'envoie le fichier du Projet??

Posté par Ace Attorney Man le 26 Nov - 19:07 (2009)
Non.

Posté par ThunderZ le 26 Nov - 20:29 (2009)
Si cela marque ??????????? c'est que ton ordi réfléchi trop , éteint le ce soir et essaye demain si sa marche pas je peut plus riien pour toi. Même Ace car il à dit ce qu'il fallait faire d'un côté et moi aussi donc.

Posté par Ace Attorney Man le 26 Nov - 20:54 (2009)
ho-oh obscur a écrit:

Si cela marque ??????????? c'est que ton ordi réfléchi trop , éteint le ce soir et essaye demain si sa marche pas je peut plus riien pour toi. Même Ace car il à dit ce qu'il fallait faire d'un côté et moi aussi donc.

Ou alors si il travaille sur une machine parallels et qu'il active le mode partage de session.

Posté par Quentindu93200 le 27 Nov - 09:04 (2009)
non je partage pas ma session dans ma famille chacun sa session avec passe 

Posté par Van Pokamon le 27 Nov - 11:37 (2009)
j'ai une autre voir 2 autres idée(s) :
-réinstalle PSP 0.7
-Change d'ordi, au cas où .

Posté par Quentindu93200 le 27 Nov - 11:43 (2009)
maintenant c'est plus les ???? c'est le pokédex co/aa


voici le logs:
---------- Erreur de script : évènement ----------
----- Type
TypeError


----- Message
Section127:51:in `[]'no implicit conversion from nil to integer


----- Position de l'évènement
MAP 12 EVENT 1
SCRIPT






----- Backtrace
Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355'
Script : Pokemon_Data | Ligne : 51 | Méthode : in `id_bis'
Script : Pokemon | Ligne : 264 | Méthode : in `temp_initialize'
Script : Pokemon_Custom | Ligne : 34 | Méthode : in `initialize'
Script : Interpreter | Ligne : 135 | Méthode : in `new'
Script : Interpreter | Ligne : 135 | Méthode : in `ajouter_pokemon'
Script : Loading | Ligne : 1 | Méthode : in `command_355'
Script : Interpreter 2 | Ligne : 215 | Méthode : in `eval'
Script : Interpreter Bis | Ligne : 444 | Méthode : in `command_355'
Script : Interpreter 2 | Ligne : 215 | Méthode : in `execute_command'
Script : Interpreter 1 | Ligne : 199 | Méthode : in `update'
Script : Interpreter 1 | Ligne : 113 | Méthode : in `loop'
Script : Interpreter 1 | Ligne : 204 | Méthode : in `update'
Script : Scene_Map | Ligne : 48 | Méthode : in `alias_update'
Script : Scene_Map | Ligne : 46 | Méthode : in `loop'
Script : Scene_Map | Ligne : 59 | Méthode : in `alias_update'
Script : MAPPANEL | Ligne : 90 | Méthode : in `update'
Script : Scene_Map | Ligne : 25 | Méthode : in `main'
Script : Scene_Map | Ligne : 19 | Méthode : in `loop'
Script : Scene_Map | Ligne : 30 | Méthode : in `main'
Script : Main | Ligne : 57


voici le script:
 
Code:
 #==============================================================================  
# ■ Pokemon_Pokedex  
  
# 05/10/09 -  par Slash et sphinx  
#-----------------------------------------------------------------------------  
# Scène modifiable  
#-----------------------------------------------------------------------------  
# Pokédex  
#-----------------------------------------------------------------------------  
  
module POKEMON_S  
    
#---------------------------------------------------------------------------------  
# Class Pokedex Pokedex  
# Cette class gere la page d'acceuil du pokedex  
#---------------------------------------------------------------------------------    
  class Pokemon_Pokedex #(Numérique)  
    def initialize(index = 0, show = true)  
      @index = index  
      @show = show  
      @table = []  
      @commande = []  
      # Regional  
      if POKEMON_S._DEXREG  
        for id in 1..$data_pokedex.length-1  
          @table[Pokemon_Info.id_bis(id)] = id  
        end  
        @table.shift # débarasser l'élément 0  
        @table.compact!  
      else  
      # National  
        for id in 1..$data_pokedex.length-1  
          @table.push(id)  
        end  
      end  
    end  
      
    def main  
      # Fenêtre principale  
      # Fond  
      @background = Sprite.new  
      @background.bitmap = RPG::Cache.picture("COAA_pokedex.png")  
      @background.z = 5  
        
      # Liste  
      @list = []  
      for i in 0..@table.length-1  
        if $data_pokedex[@table[i]][0]  
          @list.push(@table[i]) # liste des ID vus  
        end  
      end     
      # Vu/Capture  
      @pokemon_amount = Window_Base.new(27 - 16, 306, 640, 400)  
      @pokemon_amount.contents = Bitmap.new(640, 400-32)  
      @pokemon_amount.contents.font.name = $fontface  
      @pokemon_amount.contents.font.size = $fontsize  
      @pokemon_amount.contents.font.bold = true  
      @pokemon_amount.opacity = 0  
      viewed = @list.length.to_s  
      captured = 0  
      for element in @list  
        if $data_pokedex[element][1]  
          captured += 1  
        end  
      end  
  
      @pokemon_amount.contents.draw_text(-40, 10, 300, 35, "POKEMONS APERCUS", 2)  
      @pokemon_amount.contents.draw_text(250, 10, 300, 35, "POKEMONS ATTRAPES", 2)  
      @pokemon_amount.contents.draw_text(-40, 22, 300, 35, ". . . . . . . . . . . . . . . . . .", 2)  
      @pokemon_amount.contents.draw_text(250, 22, 300, 35, ". . . . . . . . . . . . . . . . . .", 2)  
      string_viewed = sprintf("%03d", viewed)  
      string_captured = sprintf("%03d", captured)  
      @pokemon_amount.contents.draw_text(-40, 47, 300, 35, "[ "+ string_viewed +" ]", 2)  
      @pokemon_amount.contents.draw_text(250, 47, 300, 35, "[ "+ string_captured +" ]", 2)  
        
      Graphics.transition  
      loop do  
        Graphics.update  
        Input.update  
        update  
        if $scene != self  
          break  
        end  
      end  
      Graphics.freeze  
      @background.dispose  
      @pokemon_amount.dispose  
    end  
      
    def update  
       
      if Input.trigger?(Input::B)  
        $game_system.se_play($data_system.cancel_se)  
        $scene = POKEMON_S::Pokemon_Menu.new(0)  
        return  
      end  
      if Input.trigger?(Input::C)  
        @pokemon_amount.dispose  
        @pokemon_amount = Window_Base.new(27 - 16, 306, 640, 400)  
        @pokemon_amount.contents = Bitmap.new(640, 400-32)  
        @pokemon_amount.contents.font.name = $fontface  
        @pokemon_amount.contents.font.size = $fontsize  
        @pokemon_amount.contents.font.bold = true  
        @pokemon_amount.opacity = 0  
        @pokemon_amount.contents.draw_text(120, 10, 300, 35, "CHARGEMENT DU POKEDEX", 2)  
        @pokemon_amount.contents.draw_text(112, 47, 300, 35, "PATIENTEZ UN INSTANT", 2)  
        $game_system.se_play($data_system.cancel_se)  
        $scene = POKEMON_S::Pokemon_Pokedex_List.new(@table, @list,true)  
        return  
      end  
    end  
  end  
    
#---------------------------------------------------------------------------------  
# Class Pokedex Pokedex List  
# Cette class gere l'affichage de la page principale du pokédex  
#---------------------------------------------------------------------------------    
  class Pokemon_Pokedex_List  
    def initialize (table, id_list = [],show = true,index = 0)  
      @index = index  
      @table = table  
      @list = id_list  
      @pokelist = []  
      @show = show  
      if show == true  
        n = 0   
        for i in 0..@table.length-1    
          if $data_pokedex[@table.length-1-i][0]   
            n=@table.length-1-i   
            break   
          end    
        end   
        for i in 0..n-1  
          if POKEMON_S._DEXREG  
            ida = "   " + sprintf("%03d",Pokemon_Info.id_bis(@table[i]))  
          else  
            ida = "   " + sprintf("%03d",@table[i])  
          end  
          @pokelist.push(ida)  
        end  
      else  
        for i in 0..@table.length-1  
          if POKEMON_S._DEXREG  
            ida = "   " + sprintf("%03d",Pokemon_Info.id_bis(@table[i]))  
          else  
            ida = "   " + sprintf("%03d",@table[i])  
          end  
          @pokelist.push(ida)  
        end  
      end  
        
    end  
      
    def main  
      #affichage du background du pokedex  
      @back = Sprite.new  
      @back.bitmap = RPG::Cache.picture("Pokedexsl.png")  
      @back.x = 0  
      @back.y = 0  
      @back.z = 5  
      #affichage de l'avant du pokedex  
      @front = Sprite.new  
      @front.bitmap = RPG::Cache.picture("Pokedex_list.png")  
      @front.x = 0  
      @front.y = 0  
      @front.z = 10007        
      #affichage des <b style="color:#054C3C">pokemon</b> ds le pokedex  
      @pokemon_window = POKEMON_S::Pokedex_Command.new(520, @table, @pokelist, $fontsize, 5, 104)  
      @pokemon_window.x = 54  
      @pokemon_window.y = -20  
      @pokemon_window.z = 6  
      @pokemon_window.height = 440  
      @pokemon_window.opacity  = 0  
      #affichage du nom des <b style="color:#054C3C">pokemon</b> ds le pokedex  
      idn = @table[@pokemon_window.index]  
      @pokemonname = POKEMON_S::Pokedex_Name.new(idn)  
      @pokemonname.x = 145  
      @pokemonname.y = 337  
      @pokemonname.z = 10008  
      @pokemonname.opacity = 0  
      @pokemon_window.index = @index  
      Graphics.transition  
      loop do  
        Graphics.update  
        Input.update          
        @pokemon_window.update  
        #affichage du nom des <b style="color:#054C3C">pokemon</b> ds le pokedex  
        @pokemonname.dispose  
        idn = @table[@pokemon_window.index]  
        @pokemonname = POKEMON_S::Pokedex_Name.new(idn)  
        @pokemonname.x = 145  
        @pokemonname.y = 337  
        @pokemonname.z = 10008  
        @pokemonname.opacity = 0  
        update  
        if $scene != self  
          break  
        end  
      end  
      @pokemonname.dispose  
      @pokemon_window.dispose  
      @back.dispose  
      @front.dispose  
        
    end  
    def update  
      if Input.trigger?(Input::C)  
        @index = @pokemon_window.index  
        pokemon_id = @table[@index]  
        seen = $data_pokedex[pokemon_id][0]  
        if seen == false  
          $game_system.se_play($data_system.buzzer_se)  
          return  
        end  
        $scene = Pokemon_Detail.new(pokemon_id, @show)  
        return  
      end    
        
      #si j'appuis sur ECHAP je retourne a la page de garde du pokedex  
      if Input.trigger?(Input::B)  
        $game_system.se_play($data_system.cancel_se)  
        $scene = POKEMON_S::Pokemon_Pokedex.new  
        return  
      end  
      #si j'appuis sur SHIFT je tronque ou détronque le pokedex  
      if Input.trigger?(Input::A)  
        $game_system.se_play($data_system.cancel_se)  
        if @show == true  
        $scene = POKEMON_S::Pokemon_Pokedex_List.new(@list,@table, false,0)  
        else  
        $scene = POKEMON_S::Pokemon_Pokedex_List.new(@list,@table, true,0)  
        end  
        return  
      end  
    end    
  end  
    
#---------------------------------------------------------------------------------  
# Class Pokedex Name  
# Cette class gere l'affichage du nom des pokémon ds le pokedex  
#---------------------------------------------------------------------------------  
  
  class Pokedex_Name < Window_Base  
    def initialize(index)  
      super(0, 0, 350,100)  
      @idn = index  
      self.contents = Bitmap.new(width - 32, height - 32)  
      self.contents.font.name = $fontface  
      self.contents.font.size = $fontsize  
      refresh  
    end  
  
    def refresh  
      if $data_pokedex[@idn][0]  
        name = $data_pokemon[@idn][0]  
      else  
        name = " "  
      end  
      x = self.contents.text_size(name).width / 2  
      self.contents.clear  
      self.contents.font.color = Color.new(107,107,107,255)  
      self.contents.draw_text(162-x, 0, 300, 32,name)  
      self.contents.draw_text(160-x, 2, 300, 32,name)  
      self.contents.draw_text(162-x, 2, 300, 32,name)  
      self.contents.font.color = Color.new(251,251,251,255)  
      self.contents.draw_text(160-x, 0, 300, 32,name)  
    end  
  end  
    
#---------------------------------------------------------------------------------  
# Class Pokedex Command  
# Cette class gere l'affichage des pokémon ds le pokedex  
#---------------------------------------------------------------------------------  
  class Pokedex_Command < Window_Selectable  
    attr_reader :item_max  
    attr_reader :commands  
    
    def initialize(width,table, commands, size = $fontsize, column = 1, height = nil)  
      @table = table  
      if size == $fontsize  
        @heightsize = 32  
      elsif size == $fontsizebig  
        @heightsize = 43  
      else  
        @heightsize = 32  
      end  
      if height != nil  
        @height = height  
      else  
        @height = @heightsize  
      end  
      super(0, 0, width, commands.size * @height + 32, @height)  
      @item_max = commands.size  
      @commands = commands  
      @column_max = column  
      self.contents = Bitmap.new(width, @item_max * @height)  
      self.contents.font.name = $fontface  
      self.contents.font.size = size  
      refresh  
      self.index = 0  
    end  
    
    def refresh  
      self.contents.clear  
      for i in 0...@item_max  
        draw_item(i, normal_color)  
      end  
    end      
  
    def draw_item(index, color = normal_color)  
      self.contents.font.color = color  
      # Modification pour le tracé du texte  
      rect = Rect.new(4 + 8 + (index % @column_max) * (width/@column_max),   
        @height * (index/@column_max) + (@height-@heightsize)/2, self.contents.width/@column_max, @heightsize)  
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))  
      id = @table[index]  
      if $data_pokedex[id][0]  
        self.contents.font.color = Color.new(107, 107, 107, 255)  
      else  
        self.contents.font.color = Color.new(173, 173, 173, 255)  
      end    
      self.contents.font.bold = true  
      self.contents.draw_text(rect, @commands[index])  
      if $data_pokedex[id][0]  
        string = sprintf("%03d",id)  
        bitmap = RPG::Cache.battler("Icon/#{sprintf('%03d', id)}.png", 0)  
        self.contents.blt(8 + (index % @column_max) * (width/@column_max),   
         @height * (index/@column_max) + (@height-@heightsize)/2 + 24, bitmap, Rect.new(0, 0, 64, 64),128)  
      end          
      if $data_pokedex[id][1]  
        bitmap = RPG::Cache.picture("Pokedexball.png")  
        self.contents.blt(8 + (index % @column_max) * (width/@column_max),   
         @height * (index/@column_max) + (@height-@heightsize)/2 + 4, bitmap, Rect.new(0, 0, 24, 24))  
        string = sprintf("%03d",id)  
        bitmap = RPG::Cache.battler("Icon/#{sprintf('%03d', id)}.png", 0)  
        self.contents.blt(8 + (index % @column_max) * (width/@column_max),   
         @height * (index/@column_max) + (@height-@heightsize)/2 + 24, bitmap, Rect.new(0, 0, 64, 64))  
      end  
    end  
  
    def disable_item(index)  
      draw_item(index, disabled_color)  
    end  
    
    def enable_item(index)  
      # Nouvelle fonction  
      draw_item(index, normal_color)  
  
    end  
  end  
    
#---------------------------------------------------------------------------------  
# Class Pokedex Detail  
# Cette class gere l'affichage des infos sur les pokemons  
#---------------------------------------------------------------------------------  
  class Pokemon_Detail  
    def initialize(id, show, mode = 0)  
      @id = id  
      @show = show  
      @mode = mode  
      @table = []  
      # Regional  
      if POKEMON_S._DEXREG  
        for id in 1..$data_pokedex.length-1  
          @table[Pokemon_Info.id_bis(id)] = id  
        end  
        @table.shift # débarasser l'élément 0  
        @table.compact!  
      else  
      # National  
        for id in 1..$data_pokedex.length-1  
          @table.push(id)  
        end  
      end  
    end  
     
    def main  
      # Fenêtre détail  
      @background = Sprite.new  
      @background.bitmap = RPG::Cache.picture("PokedexShfond1.png")  
      @background.z = 0  
       
      # Sprite  
      @pokemon_sprite = Sprite.new  
      @pokemon_sprite.x = 26  
      @pokemon_sprite.y = 71  
      @pokemon_sprite.z = 10  
      @pokemon_sprite.visible = false  
       
      # Identité  
      @data_window = Window_Base.new(233-16, 76-16, 370+32, 196+32)  
      @data_window.contents = Bitmap.new(370, 196)  
      color = Color.new(60,60,60)  
      @data_window.contents.font.name = $fontface  
      @data_window.contents.font.size = $fontsizebig  
      @data_window.contents.font.color = color  
      @data_window.opacity = 0  
      @data_window.z = 10  
      @data_window.visible = false  
       
      # Descr  
      @text_window = Window_Base.new(60 - 16, 252 - 16 + 51, 550 + 32, 160 + 32)  
      @text_window.contents = Bitmap.new(550 , 160)  
      @text_window.contents.font.name = $fontface  
      @text_window.contents.font.size = $fontsize  
      @text_window.contents.font.color = color  
      @text_window.opacity = 0  
      @text_window.z = 10  
      @text_window.visible = false  
       
      @list = []  
      for i in 0..@table.length-1  
        if $data_pokedex[@table[i]][0]  
          @list.push(@table[i])  
        end  
      end  
       
      if @mode == 0  
        filename = "Audio/SE/Cries/" + sprintf("%03d", @id) + "Cry.wav"  
        if FileTest.exist?(filename)  
          Audio.se_play(filename)  
        end  
      end  
       
      data_refresh  
      @background.visible = false  
      @pokemon_sprite.visible = false  
      @data_window.visible = false  
      @text_window.visible = false  
      case @mode  
      when 0  
        @background.visible = true  
        @pokemon_sprite.visible = true  
        @data_window.visible = true  
        @text_window.visible = true  
      when 1  
        refresh_zone  
      when 2  
        refresh_cri  
      when 3  
        refresh_tail  
      end  
         
      Graphics.transition  
      loop do  
        Graphics.update  
        Input.update  
        update  
        if $scene != self  
          break  
        end  
      end  
      Graphics.freeze  
      @background.dispose  
      @data_window.dispose  
      @pokemon_sprite.dispose  
      @text_window.dispose  
    end  
     
    def update  
      if Input.trigger?(Input::B)  
        $game_system.se_play($data_system.cancel_se)  
        Graphics.freeze  
        hide  
        if @show == true  
          index = @table.index(@id)  
          $scene = POKEMON_S::Pokemon_Pokedex_List.new(@table,@list, @show, index)  
        else  
          index = @list.index(@id)  
          $scene = POKEMON_S::Pokemon_Pokedex_List.new(@list,@table, @show, index)  
        end  
        return  
      end  
       
      if Input.trigger?(Input::C) and @mode == 1  
        Graphics.freeze  
        hide  
        $game_system.se_play($data_system.decision_se)  
        $game_temp.map_temp = ["PKDX", false, $game_map.map_id, $game_player.x,  
          $game_player.y, $game_player.direction, $game_player.character_name,  
          $game_player.character_hue, $game_player.step_anime,  
          $game_system.menu_disabled, POKEMON_S::_MAPLINK, @id, @show]  
        $game_temp.transition_processing = true  
        $game_temp.transition_name = ""  
        POKEMON_S::_MAPLINK = false  
         
        $scene = Scene_Map.new  
        $game_map.setup(POKEMON_S::_WMAPID)  
        $game_player.moveto(9, 7)  
        $game_map.autoplay  
        $game_map.update  
        return  
      end  
       
      if Input.trigger?(Input::C) and @mode == 2  
        filename = "Audio/SE/Cries/" + sprintf("%03d", @id) + "Cry.wav"  
        if FileTest.exist?(filename)  
          Audio.se_play(filename)  
        end  
      end  
       
      if Input.trigger?(Input::DOWN)  
        Graphics.freeze  
        index = @list.index(@id)  
        if @id == @list.last  
          @id = @list.first  
        else  
          @id = @list[index+1]  
        end  
        hide  
        Graphics.transition(5)  
        Graphics.freeze  
        @mode = 0  
        data_refresh  
        Graphics.transition  
        filename = "Audio/SE/Cries/" + sprintf("%03d", @id) + "Cry.wav"  
        if FileTest.exist?(filename)  
          Audio.se_play(filename)  
        end  
      end  
       
      if Input.trigger?(Input::UP)  
        Graphics.freeze  
        index = @list.index(@id)  
        if @id == @list.first  
          @id = @list.last  
        else  
          @id = @list[index-1]  
        end  
        hide  
        Graphics.transition(5)  
        Graphics.freeze  
        @mode = 0  
        data_refresh  
        Graphics.transition  
        filename = "Audio/SE/Cries/" + sprintf("%03d", @id) + "Cry.wav"  
        if FileTest.exist?(filename)  
          Audio.se_play(filename)  
        end  
      end  
       
      if Input.trigger?(Input::LEFT)  
        if @mode > 0  
          Graphics.freeze  
          hide  
          #Graphics.transition(1)  
          @mode -= 1  
          #Graphics.freeze  
          case @mode  
          when 0  
            data_refresh  
          when 1  
            refresh_zone  
          when 2  
            refresh_cri  
          when 3  
            refresh_tail  
          end  
          Graphics.transition(1)  
        end  
      end  
       
      if Input.trigger?(Input::RIGHT)  
        if @mode < 3  
          Graphics.freeze  
          hide  
          #Graphics.transition(1)  
          @mode += 1  
          #Graphics.freeze  
          case @mode  
          when 0  
            data_refresh  
          when 1  
            refresh_zone  
          when 2  
            refresh_cri  
          when 3  
            refresh_tail  
          end  
          Graphics.transition(1)  
        end  
      end  
    end  
     
    def hide  
      @background.visible = false  
      @pokemon_sprite.visible = false  
      case @mode  
      when 0  
        @data_window.visible = false  
        @text_window.visible = false  
      when 1  
        @text.dispose  
      when 2  
        @data_window.visible = false  
        @text_window.visible = false  
      when 3  
        @trainer.dispose  
        @pokemon_new_sprite.dispose  
        @text.dispose  
      end  
    end  
         
     
    def data_refresh  
      @background.bitmap = RPG::Cache.picture("PokedexShfond1.png")  
      @pokemon_sprite.x = 26  
      @pokemon_sprite.y = 71  
      @data_window.x = 233-16  
      @data_window.y = 76-16  
      @pokemon_sprite.visible = true  
      @background.visible = true  
      @data_window.visible = true  
      @text_window.visible = true  
       
      @<b style="color:#054C3C">pokemon</b> = $data_pokemon[@id]  
      show = $data_pokedex[@id][1]  
      ida = sprintf("%03d", @id)  
      @pokemon_sprite.bitmap = RPG::Cache.battler("Front_Male/" + ida + ".png", 0)  
  
      if POKEMON_S._DEXREG  
        name = "N." + sprintf("%03d", Pokemon_Info.id_bis(@id)) + "  " + @<b style="color:#054C3C">pokemon</b>[0]  
      else  
        name = "N." + ida + "  " + @<b style="color:#054C3C">pokemon</b>[0]  
      end  
  
      if show # Descr accessible  
        species = @<b style="color:#054C3C">pokemon</b>[9][1]  
        height_data = @<b style="color:#054C3C">pokemon</b>[9][2]  
        weight = @<b style="color:#054C3C">pokemon</b>[9][3]  
      else  
        species = "???"  
        height_data = "???"  
        weight = "???  "  
      end  
       
      @data_window.contents.clear  
      @data_window.contents.draw_text(15, 0, 370, 47, name)  
      @data_window.contents.draw_text(15, 41, 370, 47, "Pokémon " + species)  
      @data_window.contents.draw_text(41, 95, 230, 47, "Taille: ")  
      @data_window.contents.draw_text(41, 95, 212, 47, height_data, 2)  
      @data_window.contents.draw_text(41, 148, 230, 47, "Poids: ")  
      @data_window.contents.draw_text(41, 148, 230, 47, weight, 2)  
       
      @text_window.contents.clear  
      if show  
        text = @<b style="color:#054C3C">pokemon</b>[9][0]  
        string = string_builder(text, 51)  
        string1 = string[0]  
        string2 = string[1]  
        string3 = string[2]  
        string4 = string[3]  
        @text_window.contents.draw_text(0, 0, 550, 40, string1)  
        @text_window.contents.draw_text(0, 40, 550, 40, string2)  
        @text_window.contents.draw_text(0, 80, 550, 40, string3)  
        @text_window.contents.draw_text(0, 120, 550, 40, string4)  
      end  
    end  
     
    def refresh_zone  
      @background.bitmap = RPG::Cache.picture("PokedexShfond2.png")  
      @background.visible = true  
      @text = Window_Base.new(32-16, 223-16, 576+32, 47+32)  
      @text.contents = Bitmap.new(576, 47)  
      @text.contents.font.name = $fontface  
      @text.contents.font.size = $fontsizebig  
      @text.contents.font.color = Color.new(60,60,60)  
      @text.contents.draw_text(0, 0, 576, 47, "OUVRIR LA CARTE", 1)  
      @text.opacity = 0  
    end  
     
    def refresh_cri  
      @background.bitmap = RPG::Cache.picture("PokedexShfond3.png")  
      @pokemon_sprite.visible = true  
      @background.visible = true  
      @data_window.visible = true  
      @pokemon_sprite.x = 26  
      @pokemon_sprite.y = 75  
      @data_window.x = 211 - 16  
      @data_window.y = 75 - 5  
      @data_window.contents.clear  
      @data_window.contents.draw_text(50, 27, 339, 47, "CRI DE")  
      @data_window.contents.draw_text(50, 68, 339, 47, @<b style="color:#054C3C">pokemon</b>[0])  
    end  
     
    def refresh_tail  
      @background.bitmap = RPG::Cache.picture("PokedexShfond4.png")  
      @background.visible = true  
      @pokemon_new_sprite = Sprite.new  
      ida = sprintf("%03d", @id)  
      @pokemon_new_sprite.bitmap = RPG::Cache.battler("Front_Male/" + ida + ".png", 0)  
      @pokemon_new_sprite.color = Color.new(0, 0, 0, 255)  
       
      @trainer = Sprite.new  
      @trainer.bitmap = RPG::Cache.battler("trainer000.png", 0)  
      @trainer.color = Color.new(0, 0, 0, 255)  
       
      sizes = []  
      for sprite in [@trainer, @pokemon_new_sprite]  
        i = j = 0  
        while sprite.bitmap.get_pixel(i,j).alpha == 0  
          i += 1  
          if i > sprite.bitmap.width  
            i = 0  
            j += 1  
          end  
        end  
        up_pix = j  
        i = 0  
        j = sprite.bitmap.height  
        while sprite.bitmap.get_pixel(i,j).alpha == 0  
          i += 1  
          if i > sprite.bitmap.width  
            i = 0  
            j -= 1  
          end  
        end  
        down_pix = j  
        sizes.push( down_pix-up_pix + 0.0 )  
        sizes.push( down_pix )  
      end  
       
      if $data_pokemon[@id][9][2].to_f > 1.50  
        zoom_pok = 1.00  
        zoom_dre = 1.50 / $data_pokemon[@id][9][2].to_f * sizes[2] / sizes[0]  
      else  
        zoom_pok = $data_pokemon[@id][9][2].to_f/1.50 * sizes[0] / sizes[2]  
        zoom_dre = 1.00  
      end  
       
      @pokemon_new_sprite.ox = @pokemon_new_sprite.bitmap.width/2  
      @pokemon_new_sprite.oy = sizes[3]#@pokemon_new_sprite.bitmap.height  
      @pokemon_new_sprite.x = 141 + @pokemon_new_sprite.ox  
      @pokemon_new_sprite.y = 92 + 160#@pokemon_new_sprite.oy  
       
      @trainer.ox = @trainer.bitmap.width/2  
      @trainer.oy = sizes[1]#@trainer.bitmap.height  
      @trainer.x = 339 + @trainer.ox  
      @trainer.y = 92 + 160 #@trainer.oy  
       
      @pokemon_new_sprite.zoom_x = @pokemon_new_sprite.zoom_y = zoom_pok  
      @trainer.zoom_x = @trainer.zoom_y = zoom_dre  
       
      @text = Window_Base.new(32-16, 367-16, 576+32, 47+32)  
      @text.contents = Bitmap.new(576, 47)  
      @text.contents.font.name = $fontface  
      @text.contents.font.size = $fontsizebig  
      @text.contents.font.color = Color.new(60,60,60)  
      @text.contents.draw_text(0, 0, 576, 47, "TAILLE COMPARE A #{Player.name}", 1)  
      @text.opacity = 0  
    end  
     
    def string_builder(text, limit)  
      length = text.length  
      full1 = false  
      full2 = false  
      full3 = false  
      full4 = false  
      string1 = ""  
      string2 = ""  
      string3 = ""  
      string4 = ""  
      word = ""  
      for i in 0..length  
        letter = text[i..i]  
        if letter != " " and i != length  
          word += letter.to_s  
        else  
          word = word + " "  
          if (string1 + word).length < limit and not(full1)  
            string1 += word  
            word = ""  
          else  
            full1 = true  
          end  
           
          if (string2 + word).length < limit and not(full2)  
            string2 += word  
            word = ""  
          else  
            full2 = true  
          end  
           
          if (string3 + word).length < limit and not(full3)  
            string3 += word  
            word = ""  
          else  
            full3 = true  
          end  
           
          if (string4 + word).length < limit and not(full4)  
            string4 += word  
            word = ""  
          else  
            full4 = true  
          end  
        end  
      end  
      return [string1, string2, string3, string4]  
    end  
     
     
  end  
    
end 
 



Posté par Van Pokamon le 27 Nov - 11:48 (2009)
Titre : PROBLeme de l'intro [intro résolu]
Quentin, retélécharge psp. ou arrete totalement psp. car la, ca commence a se devier du sujet (ce n'est plus l'intro mais le pokédex -_-)
Ou sinon, cherche les résolution.
A locker je pense .

Note: La commande Spoiler EXISTE :x

Posté par Quentindu93200 le 27 Nov - 12:11 (2009)
Titre : Plusieurs Problemes
bon ok je vais reintallé psp 

Posté par Ace Attorney Man le 27 Nov - 16:54 (2009)
Quentindu93200 a écrit:

non je partage pas ma session dans ma famille chacun sa session avec passe 
Non, là je te parle d'une section emu/parallels, mais c'est plus compliqué que ça Clin d'œil foireux.
Changli a écrit:

Quentin, retélécharge psp. ou arrete totalement psp. car la, ca commence a se devier du sujet (ce n'est plus l'intro mais le pokédex -_-)
Ou sinon, cherche les résolution.
A locker je pense .

Note: La commande Spoiler EXISTE :x

+1

Posté par ThunderZ le 25 Déc - 23:46 (2009)
+4 je ne flood pas, reinstalle PSP.

Posté par Ace Attorney Man le 26 Déc - 01:25 (2009)
Hein !?

Posté par Nuri Yuri le 26 Déc - 10:25 (2009)
Bon tu sais pas lire un rapport log C'est écris en gros :
rapport log a écrit:

Map12 EVENT1
SCRIPT

Que veux dire ce qui est écris la ?
Ba c'est tout con c'est écris que tu a mal utiliser la commande d'appel de script !
Donc regarde bien ce que tu as écris c'est peut être un erreur de tape genre ajouter_pokemon(1,25,shiney = true) au lieu de ajouter_pokemon(1,25,true)

PS: ton log ne mentionne a aucun endroit que le script pokedex bug donc relis bien le log !
Voila inspecte bien l'évènement 1 de la map 12 puis normalement il devrais pas y avoir de bug !

Posté par Van Pokamon le 27 Déc - 12:57 (2009)
Youri a écrit:
Bon tu sais pas lire un rapport log C'est écris en gros :
rapport log a écrit:

Map12 EVENT1
SCRIPT

Que veux dire ce qui est écris la ?
Ba c'est tout con c'est écris que tu a mal utiliser la commande d'appel de script !
Donc regarde bien ce que tu as écris c'est peut être un erreur de tape genre ajouter_pokemon(1,25,shiney = true) au lieu de ajouter_pokemon(1,25,true)

PS: ton log ne mentionne a aucun endroit que le script pokedex bug donc relis bien le log !
Voila inspecte bien l'évènement 1 de la map 12 puis normalement il devrais pas y avoir de bug !


+2

Posté par Ace Attorney Man le 27 Déc - 20:02 (2009)
+3

Posté par Nuri Yuri le 27 Déc - 21:47 (2009)
Ca serais bien que quentin nous dise si son problème est régler !

Posté par Van Pokamon le 28 Déc - 12:02 (2009)
il faudrait qu'il soit la. on l'as pas vu depuis longtemps.

Posté par Nuri Yuri le 28 Déc - 13:46 (2009)
Il s'est fait manger en passant par la surement.

Posté par Van Pokamon le 3 Jan - 01:09 (2010)
Youri a écrit:
Il s'est fait manger en passant par la surement.


Tant mieux !

bon laissons couler le topic pour le moment.

Posté par Schtroumpf Anarchiste le 3 Jan - 12:44 (2010)
Changli a écrit:

Youri a écrit:
Il s'est fait manger en passant par la surement.


Tant mieux !

bon laissons couler le topic pour le moment.

Loul ... Il était déjà en train de couler avant que tu ne postes =D

Posté par Sphinx le 3 Jan - 17:47 (2010)
Si vous tenez tant à le laisser couler, pourquoi postez vous encore !

Non, ce message n'appelle AUCUNE réponse ! Ne postez ici que si vous avez quelque chose d'utile à dire, sinon, laissez le couler en silence ! Merci !