Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # TheoAllen - Auto-Toggle Switches
- # Version : 1.0
- # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
- # (English Documentation)
- # =============================================================================
- ($imported ||= {})[:Theo_AutoSwitch] = true
- # =============================================================================
- # CHANGE LOGS:
- # -----------------------------------------------------------------------------
- # 2013.08.22 - Finished script
- # =============================================================================
- =begin
- Introduction :
- This script make the game switches will be switched automatically depends on
- script condition eval
- How to use :
- Put this script below material but above main
- Edit the configuration
- Terms of use :
- Credit me, TheoAllen. You are free to edit this script by your own. As long
- as you don't claim it yours. For commercial purpose, don't forget to give me
- a free copy of the game.
- =end
- # =============================================================================
- # Configuration :
- # =============================================================================
- module THEO
- module Switch
- List = {
- # ID => "Script Eval"
- 5 => "$game_system.playtime > 10",
- }
- end
- end
- # =============================================================================
- # End of configuration
- # =============================================================================
- class Game_Switches
- def update
- THEO::Switch::List.each do |id,script|
- cond = eval(script)
- self[id] = cond if self[id] != cond
- end
- end
- end
- class Scene_Base
- alias theo_auto_toggle_switches_update update
- def update
- theo_auto_toggle_switches_update
- $game_switches.update
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment