Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true # << Make true to use this script, false to disable.
- #===============================================================================
- #
- # ☆ $D13x - Pokemon Style Menu
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Easy / Normal
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Pokemon_Menu]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 21/o4/2o14 - Started, Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script creates a new menu scene - Scene_PokeMenu.
- # You can allow this new scene to overwrite the default menu scene.
- #
- # This script was designed for a 1 actor party. It could be used with more;
- # however, it does not show a status page within the menu scene. If you call
- # a scene that can display various actors - such as scene status, it will
- # always call actor 1's infomation.
- #
- # Additionally, you can use this script to easily add new commands for custom
- # scenes you may be using.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- #
- #===============================================================================
- # ☆ Script Calls
- #-------------------------------------------------------------------------------
- # SceneManager.call( Scene_PokeMenu )
- #
- #===============================================================================
- # ☆ Notetags ( default )
- #-------------------------------------------------------------------------------
- # N/A
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # N/A
- #
- #===============================================================================
- module Pokemon ; module Menu
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Overwrite Default Menu ?
- #-----------------------------------------------------------------------------
- OWDMENU = true
- #-----------------------------------------------------------------------------
- # Command Array Begin - DO NOT REMOVE
- #-----------------------------------------------------------------------------
- Commands=[
- #-----------------------------------------------------------------------------
- # ["Name" , "eval", Icon, Hue, Text_Color, "Scene_Name"]
- #-----------------------------------------------------------------------------
- ["Bag" , "true", 817, 0, Text_Color::White, "Scene_Item"],
- ["Team" , "true", 847, 0, Text_Color::White, "Scene_Team"],
- ["Badges" , "true", 994, 0, Text_Color::White,"Scene_Achievement"],
- # ["Skill" , "true", 380, 0, Text_Color::White, "Scene_Skill"],
- # ["Equip" , "true", 476, 0, Text_Color::White, "Scene_Equip"],
- # ["Status" , "true", 847, 0, Text_Color::White, "Scene_Status"],
- ["Save" , "true", 848, 0, Text_Color::White, "Scene_Save"],
- ["Options" , "true", 1025, 0, Text_Color::White, "Scene_End"],
- ["Debug" , "true", 852, 0, Text_Color::White, "Scene_Debug"],
- #-----------------------------------------------------------------------------
- # Command Array End - DO NOT REMOVE
- #-----------------------------------------------------------------------------
- ] #####################
- # CUSTOMISATION END #
- end ; end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- class Window_Pokemon_Menu_Command < Window_Command
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def self.init_command_position
- @@last_command = nil
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def initialize
- super(Graphics.width-window_width,0)
- select_last
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def select_last
- select(@@last_command)
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def window_width
- return Graphics.width / 4
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_command_list
- Pokemon::Menu::Commands.each do |command|
- next unless command != nil
- enable = (eval(command[1])rescue false)
- add_command(command[0],:command,enable)
- end
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def draw_item(index)
- rect = item_rect_for_text(index)
- icon = Pokemon::Menu::Commands[index][2]
- ihue = Pokemon::Menu::Commands[index][3]
- colo = Pokemon::Menu::Commands[index][4]
- change_color(colo, command_enabled?(index))
- draw_de_icon(icon,rect.x,rect.y,ihue,command_enabled?(index))
- draw_text(rect.x+25,rect.y,rect.width,rect.height,command_name(index))
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def process_ok
- @@last_command = @index
- super
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def call_scene
- SceneManager.call(eval(Pokemon::Menu::Commands[@index][5])) rescue nil
- end
- end
- #===============================================================================
- class Scene_PokeMenu < Scene_MenuBase
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def start
- super
- makec
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def makec
- @command_window = Window_Pokemon_Menu_Command.new
- @command_window.set_handler(:command,method(:press_command))
- @command_window.set_handler(:cancel, method( :return_scene))
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def press_command
- @command_window.activate unless @command_window.call_scene
- end
- end
- #===============================================================================
- if Pokemon::Menu::OWDMENU
- #===============================================================================
- module Menu_Caller
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def self.call
- SceneManager.call(Scene_PokeMenu)
- Window_Pokemon_Menu_Command::init_command_position
- end
- end
- #===============================================================================
- class Scene_Map < Scene_Base
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def call_menu
- Sound.play_ok
- Menu_Caller.call
- end
- end
- #===============================================================================
- class Game_Interpreter
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def command_351
- return if $game_party.in_battle
- Menu_Caller.call
- Fiber.yield
- end
- end
- end # if Pokemon::Menu::OWDMENU
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement