Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # Kadafi - Command Disabler
- # Version : 1.2
- # Contact : http://kakakadafi.blogspot.com or umarqadafi1@hotmail.com
- # =============================================================================
- ($imported ||= {})[:Kadafi_CommandDisabler] = true
- # =============================================================================
- # CHANGE LOGS:
- # -----------------------------------------------------------------------------
- # 2014.06.19 - Started and Finished script
- # 2014.06.20 - Added Formation, Save, and Escape Commands to configuration
- # 2014.06.20 - Updated the Script Structures
- # =============================================================================
- =begin
- Introduction :
- This script allows you to disable almost all of the commands in every scene
- by just turn ON / OFF the switches.
- How to Use :
- [*] Turn ON the Switches to DISABLE the commands.
- [*] Turn OFF the Switches to RE-ENABLE the commands.
- Special Thanks :
- TheoAllen
- KilloZapit
- TERMS OF USE :
- Free for use on any non-Commercial or Commercial Game Projects.
- If you use this for commercial uses,
- give me a free copy of your game would be nice :)
- Credit: Kadafi
- =end
- # =============================================================================
- # Configuration
- # =============================================================================
- module Kadafi
- module CommandDisabler
- Switch_Disabler = {
- # =============================================================================
- # "Command Name" => switch_id
- # The name of the "Command Name" must be the same as Command Name
- # in the database or vocab.
- # =============================================================================
- # Menu
- "Items" => 1, # Items switch
- "Skills" => 2, # Skills switch
- "Equipment" => 3, # Equipment switch
- "Status" => 4, # Status switch
- "Formation" => 5, # Formation switch
- "Save" => 6, # Save switch
- "Game End" => 7, # Game End switch
- # Menu > Items
- "Items" => 8, # Weapons switch
- "Weapons" => 9, # Weapons switch
- "Armours" => 10, # Armours switch
- "Key Items" => 11, # Key Items switch
- # Menu > Skills
- "Special" => 12, # Game End switch
- # Menu > Equipment
- "Change" => 13, # Change switch
- "Optimize" => 14, # Optimize switch
- "Clear" => 15, # Clear switch
- # Shop
- "Buy" => 16, # Buy switch
- # Battle
- "Escape" => 17, # Escape switch
- "Attack" => 18, # Attack switch
- "Special" => 19, # Skills switch
- "Guard" => 20, # Guard switch
- "Items" => 21, # Items switch
- } # <<< Don't touch this.
- end
- end
- # =============================================================================
- # End of Configuration
- # =============================================================================
- class Window_Command < Window_Selectable
- alias_method :add_command_switch_base, :add_command
- def add_command(name, symbol, enabled = true, ext = nil)
- switch_id = Kadafi::CommandDisabler::Switch_Disabler[name]
- enabled = !$game_switches[switch_id] if switch_id
- add_command_switch_base(name, symbol, enabled, ext)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement