Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==============================================================================
- # ▼▼▼▼▼▼ TroyZ - Timer Control Extended ▼▼▼▼▼▼
- # ==============================================================================
- # Script by : Agung Prasetyo(TroyZ)
- # Contact me by : - Email agung.endisnear.xyz@gmail.com
- # - Forum RPGMakerID, username TroyZ
- # - Handphone 085756289121
- # Engine : VXAce
- # Level : Easy
- # Version : 1.0
- # ------------------------------------------------------------------------------
- # Change Logs :
- # 16 December 2013 : Version 1.0 released
- # ------------------------------------------------------------------------------
- # How this work :
- # This script allows you to control the timer inside the game at extended rate.
- # ------------------------------------------------------------------------------
- # How to use :
- # Place it between material and main. While the timer on the game is active,
- # you can control the timer with the following script call :
- #
- # set_timer(seconds)
- # This will set the timer at the seconds that you've defined before. For
- # example, set_timer(60), means that the timer will be set at 60 seconds.
- #
- # add_timer_sec(seconds)
- # This will add the said seconds at the timer. For example, add_timer_sec(5),
- # means that the total seconds at the timer will be added by 5 seconds.
- #
- # min_timer_sec(seconds)
- # This will subtract the said seconds at the timer. For example, min_timer_sec(5),
- # means that the total seconds at the timer will be reduced by 5 seconds.
- #
- # add_var_timer_sec(var)
- # This will add the said variable's value as seconds at the timer.
- # For example, variable 1 has the value of 3, and then you use
- # add_var_timer_sec(1) to get the value at variable 1 and use the value to
- # add the total seconds at the timer. So, the seconds at the timer will be
- # added by 3 seconds.
- #
- # min__var_timer_sec(var)
- # This will subtract the said variable's value as seconds at the timer.
- # For example, variable 1 has the value of 3, and then you use
- # min_var_timer_sec(1) to get the value at variable 1 and use the value to
- # reduce the total seconds at the timer. So, the seconds at the timer will be
- # reduced by 3 seconds.
- # ------------------------------------------------------------------------------
- # Compatibility issues :
- # None yet. If you found some, let me know, and bug fixes will come out soon.
- # ------------------------------------------------------------------------------
- # Who to credit :
- # - Allah swt. : For the chance of living that he has given to me.
- # - Nabi Muhammad saw. : As a leader and messenger and prophet of Muslim.
- # I'm proud to be your follower. :)
- # - Agung Prasetyo(TroyZ) : Thats me, of course, the ones that made this script. :P
- # ------------------------------------------------------------------------------
- # License :
- # - Free Game : Just credit those names above.
- # - Commercial Game : Same as free game's license.
- # ------------------------------------------------------------------------------
- $imported = {} if $imported.nil?
- $imported[:TroyZ_TimerControlExtended] = true
- # ------------------------------------------------------------------------------
- # You shall not pass
- # ------------------------------------------------------------------------------
- class Game_Timer
- attr_accessor :count
- end
- class Game_Interpreter
- def set_timer(seconds)
- $game_timer.count = seconds * 60
- end
- def add_timer_sec(seconds)
- $game_timer.count += (seconds * 60)
- end
- def min_timer_sec(seconds)
- $game_timer.count -= (seconds * 60)
- end
- def add_var_timer_sec(var)
- $game_timer.count += ($game_variables[var] * 60)
- end
- def min_var_timer_sec(var)
- $game_timer.count -= ($game_variables[var] * 60)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement