Code: |
#============================================================================== # ■ Pokemon_Menu # Pokemon Script Project - Krosk # 18/07/07 #----------------------------------------------------------------------------- # Scène modifiable #----------------------------------------------------------------------------- # Menu principal accessible par échap #----------------------------------------------------------------------------- module POKEMON_S class Pokemon_Menu #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def main @spriteset = Spriteset_Map.new s1 = "POKéDEX" s2 = "POKéMON" s3 = "SAC" s4 = Player.name s5 = "SAUVER" s7 = "FOLLOW ME" s6 = "QUITTER" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s7, s6]) @command_window.index = @menu_index @command_window.x = 480 - 3 @command_window.y = 3 if $pokemon_party.size == 0 # Enlève accès Equipe @command_window.disable_item(1) end if not($data_pokedex[0]) # Enlève accès Pokédex si non possédé @command_window.disable_item(0) end if $game_system.save_disabled @command_window.disable_item(4) end Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @spriteset.dispose end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def update # ウィンドウを更新 @command_window.update @spriteset.update # コマンドウィンドウがアクティブの場合: update_command を呼ぶ if @command_window.active update_command return end end #-------------------------------------------------------------------------- # ● フレーム更新 (コマンドウィンドウがアクティブの場合) #-------------------------------------------------------------------------- def update_command # B ボタンが押された場合 if Input.trigger?(Input::B) # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) # マップ画面に切り替え $scene = Scene_Map.new return end # C ボタンが押された場合 if Input.trigger?(Input::C) # パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合 if $game_party.actors.size == 0 and @command_window.index < 4 # ブザー SE を演奏 $game_system.se_play($data_system.buzzer_se) return end # コマンドウィンドウのカーソル位置で分岐 case @command_window.index when 0 # Pokédex if not($data_pokedex[0]) $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Pokemon_Pokedex.new when 1 # Menu if $pokemon_party.size == 0 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Pokemon_Party_Menu.new when 2 # Sac $game_system.se_play($data_system.decision_se) $scene = Pokemon_Item_Bag.new when 3 # Carte dresseur $game_system.se_play($data_system.decision_se) $game_temp.common_event_id = 19 $scene = Scene_Map.new when 4 # Sauvegarde if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Pokemon_Save.new when 5 # Quitter le menu $game_system.se_play($data_system.decision_se) $scene = Scene_Map.new when 6 # Follow Me If menu_index == 6 if $game_switches[50] == true $game_switches[50] = false end if $game_switches[50] == false $game_switches[50] = true end end return end end end end |
Code: |
if $game_switches[50] == true $game_switches[50] = false end if $game_switches[50] == false $game_switches[50] = true end |
Code: |
[*]if $game_switches[50] == true [*] [*] $game_switches[50] = false [*] [*] end [*] [*] if $game_switches[50] == false [*] [*] $game_switches[50] = true [*] [*] end |
Code: |
$game_switches[50]=!$game_switches[50] end |
Code: |
when 6 # Follow Me If menu_index == 6 if $game_switches[50] == true $game_switches[50] = false end if $game_switches[50] == false $game_switches[50] = true end end return |
Code: |
when 6 # Follow Me $game_switches[50]=!$game_switches[50] end return |
Code: |
s6 = "FOLLOW ME" s7 = "QUITTER" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7]) |