class Scene_Map def call_menu # Clear menu call flag $game_temp.menu_calling = false # If menu beep flag is set if $game_temp.menu_beep # Play decision SE $game_system.se_play($data_system.decision_se) # Clear menu beep flag $game_temp.menu_beep = false end # Straighten player position $game_player.straighten # Switch to menu screen $scene = Scene_Item.new end end class Scene_Item def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen # $scene = Scene_Menu.new(0) $scene = Scene_Map.new return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item unless @item.is_a?(RPG::Item) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @item.scope == 4 || @item.scope == 6 @target_window.index = -1 else @target_window.index = 0 end # If effect scope is other than an ally else # If command event ID is valid if @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen $scene = Scene_Map.new return end end return end end end