FinalArt a écrit: |
Il faudrait ta version du genre "PSP DS" ou "PSP 5G". De plus, le fichier "log.txt" serrait utile, ainsi que le script qui pose problème (tu n'en as donné qu'une partie là). |
TouzaxA a écrit: |
Euh... Es-tu français ? Tu utilises le SK PSP 5G 0.9, c'est ça ? |
Ku'rei Jinwu a écrit: |
Quand tu poste une demande d'aide, fourni un maximum d'informations à tout ceux qui voudront t'aider :
Assure-toi que tout est là avant de poster le message. Cela nous évitera, à toi et nous, de perdre du temps inutilement. |
Code: |
when 2 # セーブ $game_system.se_play($data_system.decision_se) $scene = Scene_Map.new return end |
Ku'rei Jinwu a écrit: | ||
Vérifie que ton event oridnateur est bien en Touche Action, que tu n'ai pas de boucle infinie dans ton event. Ensuite, si ça ne marche pas vérifie que tu ais bien
à la ligne 134 environ. |
Ku'rei Jinwu a écrit: |
J'avoue ne pas comprendre cette erreur. Envoie le script complet du computer et une capture d'écran de ton event Ordinateur. |
Code: |
module POKEMON_S #============================================================================== # ■ Pokemon_Computer # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface PC #----------------------------------------------------------------------------- class Pokemon_Computer def initialize(window_active = 0, menu_index = 0) @window_active = window_active # 0 = PC, 1 = PC STOCK, 2 = PC PERSO @menu_index = menu_index Audio.se_play("Audio/SE/Ouverture PC") end def main for i in 1 .. 32 if $data_storage[i] == nil $pokemon_party.create_box end end @spriteset = Spriteset_Map.new s1 = "PC de ???" s2 = "PC de #{Player.name}" s3 = "Déconnexion" @command_window = Window_Command.new(124, [s1, s2, s3], $fontsize) @command_window.y = 15 @command_window.x = 269 - 126 s1 = "Déposer Pokémon" s2 = "Retirer Pokémon" s3 = "Retour" @store_window = Window_Command.new(124, [s1, s2, s3], $fontsize) @store_window.y = 15 @store_window.x = 269 - 126 s1 = "Boite email" s2 = "Retour" @item_window = Window_Command.new(124, [s1, s2], $fontsize) @item_window.y = 15 @item_window.x = 269 - 126 @message_window = POKEMON_S::Pokemon_Window_Help.new case @window_active when 0 @store_window.visible = false @store_window.active = false @item_window.visible = false @item_window.active = false @command_window.index = @menu_index when 1 @item_window.visible = false @item_window.active = false @command_window.visible = false @command_window.active = false @store_window.index = @menu_index when 2 @command_window.visible = false @command_window.active = false @store_window.visible = false @store_window.active = false end Graphics.transition Graphics.transition(20, "Graphics/Transitions/computertr.png") loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @store_window.dispose @item_window.dispose @message_window.dispose @spriteset.dispose end def update @command_window.update @item_window.update @store_window.update @spriteset.update if @command_window.active update_command return end if @item_window.active update_item return end if @store_window.active update_store return end @message_window.update end def update_command @message_window.draw_text("Accéder à quel PC?","") if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) Audio.se_play("Audio/SE/Fermeture PC") $scene = Scene_Map.new return end # C ボタンが押された場合 if Input.trigger?(Input::C) # コマンドウィンドウのカーソル位置で分岐 case @command_window.index when 0 if $pokemon_party.size == 0 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) Audio.se_play("Audio/SE/Connexion PC") @command_window.visible = false @command_window.active = false @store_window.visible = true @store_window.active = true when 1 # 装備 if $pokemon_party.size == 0 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) Audio.se_play("Audio/SE/Connexion PC") @command_window.visible = false @command_window.active = false @item_window.visible = true @item_window.active = true when 2 # セーブ $game_system.se_play($data_system.decision_se) Audio.se_play("Audio/SE/Fermeture PC") $scene = Scene_Map.new return end return end end def update_store case @store_window.index when 0 @message_window.draw_text("Les Pokémons de votre équipe peuvent être ","stockés dans les Boites du PC de Stockage.") when 1 @message_window.draw_text("Les Pokémons Stockés dans les Boites du PC","peuvent être ajoutés a votre équipe.") when 2 @message_window.draw_text("Vous pouvez trier les Pokémons dans vos","boites et dans votre équipe.") when 3 @message_window.draw_text("Retour au menu précédent.","") end if Input.trigger?(Input::B) $game_system.se_play($data_system.decision_se) @store_window.visible = false @store_window.active = false @command_window.visible = true @command_window.active = true end if Input.trigger?(Input::C) case @store_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = POKEMON_S::Depot_Pokemon.new when 1 $game_system.se_play($data_system.decision_se) $scene = POKEMON_S::Retirer_Pokemon.new(0,-1) when 2 $game_system.se_play($data_system.decision_se) @store_window.visible = false @store_window.active = false @command_window.visible = true @command_window.active = true return end return end end def update_item @message_window.draw_text("Que voulez-vous faire?","") if Input.trigger?(Input::B) $game_system.se_play($data_system.decision_se) @item_window.visible = false @item_window.active = false @command_window.visible = true @command_window.active = true end if Input.trigger?(Input::C) case @item_window.index when 1 $game_system.se_play($data_system.decision_se) @item_window.visible = false @item_window.active = false @command_window.visible = true @command_window.active = true return end return end end end #============================================================================== # ■ Depot_Pokemon # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface permettant de déposer un pokemon dans une boite #----------------------------------------------------------------------------- class Depot_Pokemon def initialize(mode = 0, index = 0) #mode: 1 Party , 2 Box @z_level = 0 # Box status: boite d'affichage info Pokémon @box_status = POKEMON_S::Statut_Pokemon.new @box_status.x = -4 @box_status.y = -19 @box_viewer = POKEMON_S::Boite_Pokemon.new(1,0) @box_viewer.x = 2 @box_viewer.y = 245 @box_viewer.z = @z_level @box_viewer.visible = false @box_info = Text_Box.new @box_info.x = -1 @box_info.y = 371 @box_info.z = 10000 @box_info.visible = false @name = POKEMON_S::Name_Box.new(@box_viewer.box) @name.x = 30 @name.y = 224 @name.z = 10000 @name.visible = false # Box party: boite affichage contenu équipe @box_party = POKEMON_S::Equipe_Pokemon.new(0) @box_party.x = -4 @box_party.y = -19 s1 = "Déposer" s2 = "Voir Détails" s3 = "Libérer" s4 = "Quitter" @command_pc = Command_PC.new([s1,s2,s3,s4]) @command_pc.x = 159 @command_pc.y = 270 @command_pc.z = @z_level + 10 @command_pc.visible = false @curseur = Sprite.new @curseur.bitmap = RPG::Cache.picture("PC_Curseur.png") @curseur.z = @z_level + 100 @curseur.visible = false @command_window = Window_Command.new(220, [s1,s2,s3,s4]) @command_window.x = 640 - 220 - 3 @command_window.y = 280 @command_window.z = @z_level + 10 @command_window.visible = false @command_window.active = false @temp_index = index @mode = mode # 1: Party 2: Box @selected = nil #selected = [box, index] @phase = 0 end def main Graphics.transition Graphics.freeze @font = Sprite.new @font.bitmap = RPG::Cache.picture("PC_fond_" + @box_viewer.box.to_s + ".png") @font.x = 19 @font.y = 243 @font.z = @z_level @background = Sprite.new #@background.bitmap = RPG::Cache.picture("PC_0.png") if $pokemon_party.actors[@box_party.index] != nil @background.bitmap = RPG::Cache.picture("PC_1.png") else @background.bitmap = RPG::Cache.picture("PC_0.png") end @background.x = 13 @background.y = 13 @background.z = @z_level+1 @fleche = Sprite.new @fleche.bitmap = RPG::Cache.picture("PC_Fleche.png") @fleche.x = 19 @fleche.y = 246 @fleche.z = @z_level+3 @fleche.visible = false @pokemon_window = Sprite.new @pokemon_window.bitmap = RPG::Cache.picture("PC_Poké_Choice.png") @pokemon_window.x = 33 @pokemon_window.y = 276 @pokemon_window.z = @z_level+2 @box_party.active = true #refresh_box_name Graphics.transition(20, "Graphics/Transitions/computertr.png") @box_party.refresh @name.visible = true @box_viewer.visible = true loop do Graphics.update Input.update phase_update update if $scene != self break end end Graphics.freeze @command_window.dispose @font.dispose @background.dispose @pokemon_window.dispose @box_status.dispose @box_party.dispose @curseur.dispose @command_pc.dispose @box_viewer.dispose @fleche.dispose @name.dispose @box_info.dispose Graphics.transition(20, "Graphics/Transitions/computertrclose.png") Graphics.freeze end def phase_update # phase 0 if @phase == 0 if @box_party.active @box_party.update end if $pokemon_party.actors[@box_party.index] != nil @background.bitmap = RPG::Cache.picture("PC_1.png") else @background.bitmap = RPG::Cache.picture("PC_0.png") end @box_party.curseur(true) @box_status.refresh(@box_party.pokemon_pointed,@box_party.index,1) end # phase 1 if @phase == 1 @command_window.update @box = @box_viewer.box @box_party.curseur(false) if @count < 10 @curseur.x = 225 @curseur.y = @command_window.index * 24 + 286 else @curseur.x = 227 @curseur.y = @command_window.index * 24 + 284 end @count += 1 if @count == 20 @count = 0 end end if @phase == 2 @box_party.curseur(false) if @count < 10 @curseur.x = 97 @curseur.y = 235 else @curseur.x = 95 @curseur.y = 237 end @count += 1 if @count == 20 @count = 0 end if Input.trigger?(Input::LEFT) $game_system.se_play($data_system.decision_se) @box -= 1 if @box == 0 @box = 32 end val = @box % 8 if val == 0 val = 8 end @font.bitmap = RPG::Cache.picture("PC_fond_" + val.to_s + ".png") @box_viewer.refresh(@box) @name.refresh(@box) end if Input.trigger?(Input::RIGHT) $game_system.se_play($data_system.decision_se) @box += 1 if @box == 33 @box = 1 end val = @box % 8 if val == 0 val = 8 end @font.bitmap = RPG::Cache.picture("PC_fond_" + val.to_s + ".png") @box_viewer.refresh(@box) @name.refresh(@box) end end end def update # phase 0 if Input.trigger?(Input::B) and @phase == 0 $game_system.se_play($data_system.cancel_se) $scene = Pokemon_Computer.new(1,0) return end if Input.trigger?(Input::C) and @phase == 0 if @box_party.index > $pokemon_party.size - 1 $game_system.se_play($data_system.buzzer_se) return else $game_system.se_play($data_system.decision_se) @phase = 1 @box_party.active = false @box_party.visible = true @command_window.visible = true @command_window.active = true @command_pc.visible = true @curseur.visible = true @pokemon_window.visible = true @fleche.visible = false @box_info.visible = true @pokemon = @box_party.pokemon_pointed if @pokemon.given_name == @pokemon.name @pokemon_nom = @pokemon.given_name else @pokemon_nom = @pokemon.given_name end txt = "Que voulez-vous faire avec " + @pokemon_nom + " ?" @box_info.refresh(txt) @count = 0 return end end # phase 1 if Input.trigger?(Input::B) and @phase == 1 $game_system.se_play($data_system.cancel_se) @phase = 0 @command_window.visible = false @command_window.active = false @box_party.visible = true @box_party.active = true @command_pc.visible = false @curseur.visible = false @pokemon_window.visible = true @fleche.visible = false @box_info.visible = false return end if Input.trigger?(Input::C) and @phase == 1 case @command_window.index when 0 # Déplacer if @box_party.index > $pokemon_party.size - 1 $game_system.se_play($data_system.buzzer_se) return end if $pokemon_party.size == 1 $game_system.se_play($data_system.buzzer_se) return end @phase = 2 $game_system.se_play($data_system.decision_se) @box_party.active = false @box_party.visible = false @command_window.visible = false @command_pc.visible = false @command_window.active = false @pokemon_window.visible = false @fleche.visible = true @box_info.visible = true txt = "Déplacer vers cette boite ?" @box_info.refresh(txt) return when 1 # Statut if @box_party.index > $pokemon_party.size - 1 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) # Données [@mode, @box_party.index] @name.visible = false @box_info.visible = false scene = POKEMON_S::Pokemon_Status.new(@box_party.pokemon_pointed, -1, @z_level + 100, [@mode, @box_party.index]) scene.main Graphics.transition @name.visible = true @box_info.visible = true return when 2 # Libérer if @box_party.index > $pokemon_party.size - 1 $game_system.se_play($data_system.buzzer_se) return end if $pokemon_party.size == 1 $game_system.se_play($data_system.buzzer_se) return end id = @box_party.index $game_system.se_play($data_system.decision_se) $pokemon_party.remove_id(id) @box_party.active = false @phase = 0 @command_window.visible = false @command_window.active = false @box_party.visible = true @box_party.active = true @command_pc.visible = false @curseur.visible = false @pokemon_window.visible = true @fleche.visible = false @box_info.visible = false return @mode = 0 when 3 # Quitter $game_system.se_play($data_system.decision_se) @phase = 0 @command_window.visible = false @command_window.active = false @box_party.visible = true @box_party.active = true @command_pc.visible = false @curseur.visible = false @pokemon_window.visible = true @fleche.visible = false @box_info.visible = false return end end # Phase 2 if Input.trigger?(Input::B) and @phase == 2 $game_system.se_play($data_system.decision_se) @phase = 1 @box_party.active = false @box_party.visible = true @command_window.visible = true @command_window.active = true @command_pc.visible = true @curseur.visible = true @pokemon_window.visible = true @fleche.visible = false @pokemon = @box_party.pokemon_pointed @box_info.visible = true txt = "Que voulez-vous faire avec " + @pokemon.given_name+ " ?" @box_info.refresh(txt) @count = 0 return end if Input.trigger?(Input::C) and @phase == 2 if $pokemon_party.box_full?(@box) $game_system.se_play($data_system.buzzer_se) return end @box_info.visible = false id = @box_party.index #indique la place du pokémon dans l'equipe id_store = $pokemon_party.store(id, @box) $game_system.se_play($data_system.decision_se) @command_window.active = true @command_window.visible = true @box_viewer.refresh(@box) @box_viewer.index = id_store @phase = 0 @command_window.visible = false @command_window.active = false @box_party.active = true @box_party.visible = true @command_pc.visible = false @curseur.visible = false @pokemon_window.visible = true @fleche.visible = false @mode = 0 end end end #============================================================================== # ■ Retirer_Pokemon # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface permettant de retirer un pokemon d'une boite # et de le mettre dans votre équipe #----------------------------------------------------------------------------- class Retirer_Pokemon def initialize(mode = 0, index = 0) #mode: 1 Party , 2 Box @z_level = 0 # Box status: boite d'affichage info Pokémon @box_status = POKEMON_S::Statut_Pokemon.new @box_status.x = -4 @box_status.y = -19 @box_viewer = POKEMON_S::Boite_Pokemon.new(1,0) @box_viewer.x = 2 @box_viewer.y = 245 @box_viewer.z = @z_level @box_viewer.visible = false @box_info = Text_Box.new @box_info.x = -1 @box_info.y = 371 @box_info.z = 10000 @box_info.visible = false @name = POKEMON_S::Name_Box.new(@box_viewer.box) @name.x = 30 @name.y = 224 @name.z = 10000 @name.visible = false # Box party: boite affichage contenu équipe @box_party = POKEMON_S::Equipe_Pokemon.new(0) @box_party.x = 232 - 84 @box_party.y = -19 @box_party.z = @z_level + 3 @box_party.visible = true s1 = "Prendre" s2 = "Voir Détails" s3 = "Libérer" s4 = "Quitter" @command_pc = Command_PC.new([s1,s2,s3,s4]) @command_pc.x = 159 @command_pc.y = 270 @command_pc.z = @z_level + 10 @command_pc.visible = false @curseur = Sprite.new @curseur.bitmap = RPG::Cache.picture("PC_Curseur.png") @curseur.z = @z_level + 100 @curseur.visible = true @command_window = Window_Command.new(220, [s1,s2,s3,s4]) @command_window.x = 640 - 220 - 3 @command_window.y = 280 @command_window.z = @z_level + 10 @command_window.visible = false @command_window.active = false @index = index @mode = mode # 1: Party 2: Box @selected = nil #selected = [box, index] @phase = 0 end def main Graphics.transition Graphics.freeze @font = Sprite.new @font.bitmap = RPG::Cache.picture("PC_fond_" + @box_viewer.box.to_s + ".png") @font.x = 19 @font.y = 243 @font.z = @z_level @background = Sprite.new #@background.bitmap = RPG::Cache.picture("PC_1.png") @box = @box_viewer.box if $data_storage[@box][@index] != nil @background.bitmap = RPG::Cache.picture("PC_1.png") else @background.bitmap = RPG::Cache.picture("PC_0.png") end @background.x = 13 @background.y = 13 @background.z = @z_level+1 @fleche = Sprite.new @fleche.bitmap = RPG::Cache.picture("PC_Fleche.png") @fleche.x = 19 @fleche.y = 246 @fleche.z = @z_level+3 @fleche.visible = true @pokemon_window = Sprite.new @pokemon_window.bitmap = RPG::Cache.picture("PC_Poké_Choice.png") @pokemon_window.x = 269 - 84 @pokemon_window.y = 276 @pokemon_window.z = @z_level+2 @pokemon_window.visible = true @count = 0 #refresh_box_name Graphics.transition(20, "Graphics/Transitions/computertr.png") @box_party.refresh @name.visible = true @box_viewer.visible = true loop do Graphics.update Input.update phase_update update if $scene != self break end end Graphics.freeze @command_window.dispose @font.dispose @background.dispose @pokemon_window.dispose @box_status.dispose @box_party.dispose @curseur.dispose @command_pc.dispose @box_viewer.dispose @fleche.dispose @name.dispose Graphics.transition(20, "Graphics/Transitions/computertrclose.png") Graphics.freeze end def phase_update #phase 0 if @phase == 0 @box = @box_viewer.box if $data_storage[@box][@index] != nil @background.bitmap = RPG::Cache.picture("PC_1.png") else @background.bitmap = RPG::Cache.picture("PC_0.png") end @box_status.refresh($data_storage[@box][@index],@index,2,@box) if @index == -1 if @count < 10 @curseur.x = 97 @curseur.y = 235 else @curseur.x = 95 @curseur.y = 237 end @count += 1 if @count == 20 @count = 0 end if Input.trigger?(Input::LEFT) $game_system.se_play($data_system.decision_se) @box -= 1 if @box == 0 @box = 32 end val = @box % 8 if val == 0 val = 8 end @font.bitmap = RPG::Cache.picture("PC_fond_" + val.to_s + ".png") @box_viewer.refresh(@box) @name.refresh(@box) end if Input.trigger?(Input::RIGHT) $game_system.se_play($data_system.decision_se) @box += 1 if @box == 33 @box = 1 end val = @box % 8 if val == 0 val = 8 end @font.bitmap = RPG::Cache.picture("PC_fond_" + val.to_s + ".png") @box_viewer.refresh(@box) @name.refresh(@box) end if Input.trigger?(Input::DOWN) $game_system.se_play($data_system.decision_se) @index = 0 end else @indx = @index % 6 x = 25 * (@index % 6) y = 24 * (@index / 6) if @count < 10 @curseur.x = 36 + x @curseur.y = 260 + y else @curseur.x = 34 + x @curseur.y = 262 + y end @count += 1 if @count == 20 @count = 0 end if Input.repeat?(Input::UP) and @index < 6 $game_system.se_play($data_system.decision_se) @index = -1 end if Input.repeat?(Input::UP) and @index > 5 $game_system.se_play($data_system.decision_se) @index -= 6 end if Input.repeat?(Input::DOWN) and @index < 24 $game_system.se_play($data_system.decision_se) @index += 6 end if Input.repeat?(Input::LEFT) $game_system.se_play($data_system.decision_se) @indx -= 1 if @indx == -1 @index += 5 else @index -= 1 end end if Input.repeat?(Input::RIGHT) $game_system.se_play($data_system.decision_se) @indx += 1 if @indx == 6 @index -= 5 else @index += 1 end end end end # phase 1 if @phase == 1 @command_window.update @box = @box_viewer.box if @count < 10 @curseur.x = 225 @curseur.y = @command_window.index * 24 + 286 else @curseur.x = 227 @curseur.y = @command_window.index * 24 + 284 end @count += 1 if @count == 20 @count = 0 end end # phase 2 if @phase == 2 id = @index if $data_storage[@box][id] == nil or $pokemon_party.size == 6 $game_system.se_play($data_system.buzzer_se) return end $pokemon_party.retrieve(id, @box) $game_system.se_play($data_system.decision_se) @mode = 0 @box_viewer.refresh(@box) @box_party.refresh @phase = 0 @box_party.active = false @command_window.visible = false @command_window.active = false @box_party.visible = true @command_pc.visible = false @curseur.visible = true @pokemon_window.visible = true @fleche.visible = false return end end def update # phase 0 if Input.trigger?(Input::B) and @phase == 0 $game_system.se_play($data_system.cancel_se) $scene = Pokemon_Computer.new(1,1) return end if Input.trigger?(Input::C) and @phase == 0 and @index > -1 if $data_storage[@box][@index] != nil $game_system.se_play($data_system.decision_se) @phase = 1 @box_party.visible = false @command_window.visible = true @command_window.active = true @command_pc.visible = true @curseur.visible = true @pokemon_window.visible = false @fleche.visible = false @box_info.visible = true @pokemon = $data_storage[@box][@index] if @pokemon.given_name == @pokemon.name @pokemon_nom = @pokemon.given_name else @pokemon_nom = @pokemon.given_name end txt = "Que voulez-vous faire avec " + @pokemon_nom + " ?" @box_info.refresh(txt) @count = 0 return else $game_system.se_play($data_system.buzzer_se) return end end # phase 1 if Input.trigger?(Input::B) and @phase == 1 $game_system.se_play($data_system.cancel_se) @phase = 0 @command_window.visible = false @command_window.active = false @box_party.visible = true @command_pc.visible = false @curseur.visible = true @pokemon_window.visible = true @fleche.visible = false @box_info.visible = false return end if Input.trigger?(Input::C) and @phase == 1 case @command_window.index when 0 # Prendre if $data_storage[@box][@index] == nil $game_system.se_play($data_system.buzzer_se) return end if $pokemon_party.size == 6 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) @box_party.active = false @box_party.visible = true @command_window.visible = false @command_pc.visible = false @command_window.active = false @pokemon_window.visible = true @fleche.visible = true @curseur.visible = false @box_info.visible = false @phase = 2 return when 1 # Statut if $data_storage[@box][@index] == nil $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) # Données [@mode, @box_party.index] @name.visible = false @box_info.visible = false scene = POKEMON_S::Pokemon_Status.new($data_storage[@box][@index], -1, @z_level + 100, [@mode, @index]) scene.main @name.visible = true @box_info.visible = true Graphics.transition return when 2 # Libérer if $data_storage[@box][@index] == nil $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $data_storage[@box][@index] = nil @box_viewer.refresh(@box) @mode = 0 return when 3 # Quitter $game_system.se_play($data_system.cancel_se) @phase = 0 @command_window.visible = false @command_window.active = false @box_party.visible = true @command_pc.visible = false @curseur.visible = true @pokemon_window.visible = true @fleche.visible = false @box_info.visible = false return end end end end #============================================================================== # ■ Statut_Pokemon # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface permettant d'afficher le statut de vos pokémons #----------------------------------------------------------------------------- class Statut_Pokemon < Window_Base def initialize super(0 - 16, 0 - 16, 640+ 32, 480 + 32) self.contents = Bitmap.new(640, 480) self.contents.font.name = $fontface self.contents.font.size = $fontsizebig #self.contents.font.bold = true self.opacity = 0 self.z = 5 @pokemon = nil @pokemon_sprite = Sprite.new @pokemon_sprite.x = 166 @pokemon_sprite.y = 22 @pokemon_sprite.z = 6 end def dispose super @pokemon_sprite.dispose end def define_pokemon(pokemon) @pokemon = pokemon end def pointed_pokemon return @pokemon end def refresh(pokemon,idx,phase,box=0) if ($pokemon_party.actors[idx] != nil and phase == 1) or ($data_storage[box][idx] != nil and phase == 2) self.contents.clear @pokemon = pokemon @pokemon_sprite.bitmap = RPG::Cache.battler(@pokemon.battler_face, 0) if phase == 1 self.draw_text_pc(9, 11, 192, 39, "Dépôt de Pokémons") end if phase == 2 self.draw_text_pc(9, 11, 192, 39, "Retirer Pokémon") end self.draw_text_pc(9, 35, 170, 39, "No. " + sprintf("%03d", @pokemon.id)) self.draw_text_pc(9, 51, 192, 39, @pokemon.name) self.draw_text_pc(9, 83, 204, 39,@pokemon.given_name) self.draw_text_pc(89, 83, 204, 39,"N."+ @pokemon.level.to_s) self.draw_text_pc(9, 99, 192, 39, "Nature") self.draw_text_pc(17, 115, 192, 39, @pokemon.nature[0].to_s) self.draw_text_pc(153, 115, 192, 39, "Attaques") self.draw_text_pc(9, 131, 192, 39, "Cap.Spé") self.draw_text_pc(17, 147, 204, 39,@pokemon.ability_name) self.draw_text_pc(9, 163, 192, 39, "Objet Porté") self.draw_text_pc(17, 179, 204, 39,@pokemon.item_name) i = 0 for skill in @pokemon.skills_set self.draw_text_pc(153, 131+ 16 * i, 300, 39, skill.name) i+=1 end draw_type(74, 64, @pokemon.type1) if @pokemon.type2 > 0 draw_type(106, 64, @pokemon.type2) end draw_gender(74, 96, @pokemon.gender) elsif ($pokemon_party.actors[idx] == nil and phase == 1) or ($data_storage[box][idx] == nil and phase == 2) self.contents.clear @pokemon = pokemon if phase == 1 self.draw_text_pc(9, 11, 192, 39, "Dépôt de Pokémons") end if phase == 2 self.draw_text_pc(9, 11, 192, 39, "Retirer Pokémon") end @pokemon_sprite.bitmap = RPG::Cache.battler("", 0) end end def draw_type(x, y, type) src_rect = Rect.new(0, 0, 96, 42) bitmap = RPG::Cache.picture("T" + type.to_s + ".png") self.contents.blt(x, y, bitmap, src_rect, 255) end def draw_gender(x, y, gender) if gender == 1 rect = Rect.new(0, 0, 18, 33) bitmap = RPG::Cache.picture("Male.png") self.contents.blt(x+1, y, bitmap, rect, 255) end if gender == 2 rect = Rect.new(0, 0, 18, 33) bitmap = RPG::Cache.picture("Female.png") self.contents.blt(x, y, bitmap, rect, 255) end end end #============================================================================== # ■ Equipe_Pokemon # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Fenêtre affichage équipe #----------------------------------------------------------------------------- class Equipe_Pokemon < Window_Base def initialize(index) super(0 - 16, 0 - 16, 640+ 32, 480 + 32) self.contents = Bitmap.new(640, 480) self.opacity = 0 self.z = 5 @count = 0 @index = index @pokemon = $pokemon_party.actors[0] @selected = nil end #def index=(index) # @index = index #end def index return @index end def pokemon_pointed return @pokemon end def selected(data) @selected = data end def curseur(select) if select bitmap = RPG::Cache.picture("PC_Curseur.png") src_rect = Rect.new(0, 0, 64, 64) if @index == 0 or @index == 2 or @index == 4 if @count < 10 refresh self.contents.blt(40, 283 + 16 * @index, bitmap, src_rect, 255) else refresh self.contents.blt(42, 281 + 16 * @index, bitmap, src_rect, 255) end end if @index == 1 or @index == 3 or @index == 5 if @count < 10 refresh self.contents.blt(81, 275 + 16 * @index, bitmap, src_rect, 255) else refresh self.contents.blt(83, 273 + 16 * @index, bitmap, src_rect, 255) end end else bitmap = RPG::Cache.picture("PC_Select.png") src_rect = Rect.new(0, 0, 64, 64) if @index == 0 or @index == 2 or @index == 4 refresh self.contents.blt(26, 287 + 16 * @index, bitmap, src_rect, 255) end if @index == 1 or @index == 3 or @index == 5 refresh self.contents.blt(66, 279 + 16 * @index, bitmap, src_rect, 255) end end @count += 1 if @count == 20 @count = 0 end end def update if Input.repeat?(Input::DOWN) and @index < 4 $game_system.se_play($data_system.cursor_se) @index += 2 refresh return end if Input.repeat?(Input::LEFT) and @index > 0 $game_system.se_play($data_system.cursor_se) @index -= 1 refresh return end if Input.repeat?(Input::RIGHT) and @index < 5 $game_system.se_play($data_system.cursor_se) @index += 1 refresh return end if Input.repeat?(Input::UP) and @index > 1 $game_system.se_play($data_system.cursor_se) @index -= 2 refresh return end end def refresh self.contents.clear for i in 0..$pokemon_party.size-1 pokemon = $pokemon_party.actors[i] if i == @index @pokemon = pokemon end bitmap = RPG::Cache.battler("Icon/000.png",0) id = pokemon.id idx = (id - 1 )% 10 idy = (id - 1 ) / 10 xrect = idx * 32 yrect = idy * 32 if i == 0 or i == 2 or i == 4 self.contents.blt(25, 279 + 16 * i, bitmap, Rect.new(xrect, yrect, 32, 32), 255) end if i == 1 or i == 3 or i == 5 self.contents.blt(65, 271 + 16 * i, bitmap, Rect.new(xrect, yrect, 32, 32), 255) end end if @index == $pokemon_party.size and self.active i = @index src_rect = Rect.new(0, 0, 64, 64) bitmap = RPG::Cache.picture("boxiconl.png") #self.contents.blt(2, 16 + 58*i, bitmap, src_rect, 255) end end end #============================================================================== # ■ Command_PC # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface permettant d'afficher les commandes du PC #----------------------------------------------------------------------------- class Command_PC < Window_Base def initialize(list) super(0,0,160,480) self.contents = Bitmap.new(640, 480) self.opacity = 0 self.contents.font.name = $fontface self.contents.font.size = $fontsize @list = list refresh end def refresh self.contents.clear for n in 0 ... @list.size bitmap = RPG::Cache.picture("PC_index.png") self.contents.blt(6, 6 + 24 * n, bitmap, Rect.new(0, 0, 88, 22), 255) if @list[n] == "Quitter" bitmap = RPG::Cache.picture("PC_Quitter.png") self.contents.blt(74, 13 + 24 * n, bitmap, Rect.new(0, 0, 88, 22), 255) end self.contents.font.color = Color.new(132,132,132) self.contents.draw_text(1, 0 + 24 * n, 100, 32, @list[n].to_s, 1) self.contents.draw_text(0, 1 + 24 * n, 100, 32, @list[n].to_s, 1) self.contents.draw_text(1, 1 + 24 * n, 100, 32, @list[n].to_s, 1) self.contents.font.color = Color.new(239,239,239) self.contents.draw_text(0, 0 + 24 * n, 100, 32, @list[n].to_s, 1) end #cx = contents.text_size($data_system.words.gold).width #self.contents.font.color = normal_color #self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) #self.contents.font.color = system_color #self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2) end end #============================================================================== # ■ Boite_Pokemon # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface permettant d'afficher les boites contenant les pokemons #----------------------------------------------------------------------------- class Boite_Pokemon < Window_Base attr_accessor :box def initialize(box, index) super(0 - 16, 0 - 16, 640+ 32, 480 + 32) self.contents = Bitmap.new(640, 480) self.opacity = 0 self.z = 3 @box = box @index = index @pokemon = nil @selected = nil refresh(box) end def index=(index) @index = index end def index return @index end def selected(data) @selected = data end def pointed_pokemon return @pokemon end def refresh(box) @box = box self.contents.clear for i in 0..29 @pokemon = $data_storage[@box][i] if @pokemon != nil bitmap = RPG::Cache.battler("Icon/000.png",0) id = @pokemon.id idx = (id - 1 )% 10 idy = (id - 1 ) / 10 xrect = idx * 32 yrect = idy * 32 src_rect = Rect.new(xrect, yrect, 32, 32) self.contents.blt((i%6)*25, 24*(i/6), bitmap,src_rect , 255) end end end end #============================================================================== # ■ Name_Box # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface permettant d'afficher le Nom des boites #----------------------------------------------------------------------------- class Name_Box < Window_Base def initialize(box) super(0,0,160,480) self.contents = Bitmap.new(640, 480) self.opacity = 0 self.contents.font.name = $fontface self.contents.font.size = $fontsize @box = box refresh(box) end def refresh(box) @box = box self.contents.clear string = "Boite " + @box.to_s self.contents.font.color = Color.new(132,132,132) self.contents.draw_text(1, 0, 100, 32, string, 1) self.contents.draw_text(0, 1, 100, 32, string, 1) self.contents.draw_text(1, 1, 100, 32, string, 1) self.contents.font.color = Color.new(41,41,41) self.contents.draw_text(0, 0, 100, 32, string, 1) #cx = contents.text_size($data_system.words.gold).width #self.contents.font.color = normal_color #self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) #self.contents.font.color = system_color #self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2) end end #============================================================================== # ■ Text_Box # Pokemon Script Project 5G - Slash # 27/02/11 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence #----------------------------------------------------------------------------- # Interface permettant d'afficher le Nom des boites #----------------------------------------------------------------------------- class Text_Box < Window_Base def initialize super(0,0,640,480) self.contents = Bitmap.new(640, 480) self.opacity = 0 self.contents.font.name = $fontface self.contents.font.size = $fontsize @txt = "" refresh (@txt) end def refresh (txt) self.contents.clear string = txt bitmap = RPG::Cache.picture("PC_Text.png") self.contents.blt(0, 2, bitmap, Rect.new(0, 0, 252, 28), 255) self.contents.font.color = Color.new(132,132,132) self.contents.draw_text(7, 0, 300, 32, string, 0) self.contents.draw_text(6, 1, 300, 32, string, 0) self.contents.draw_text(7, 1, 300, 32, string, 0) self.contents.font.color = Color.new(41,41,41) self.contents.draw_text(6, 0, 300, 32, string, 0) end end #---------------------------- FIN DE MODULE --------------------------# end |