Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- # V's Level Up Switches #
- # Version 1.0 #
- # #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Written By: V #
- # Last Edited: June 29, 2013 #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Special Thanks to: #
- # #
- # Tsukihime #
- # BigEd781 #
- # D&P3 #
- # Enelvon #
- # Shaz #
- # #
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- #==============================================================================#
- #------------------------------------------------------------------------------#
- # ** Disclaimer #
- #------------------------------------------------------------------------------#
- # #
- # I do not mind sharing credit for this script if alterations to the script #
- # are made. I am not making this script for commercial uses. If anyone wants #
- # to use this script in one there games just give credit to any and everyone #
- # who took part in creating it. #
- # #
- #------------------------------------------------------------------------------#
- # ** How To Use #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- # If you want to add more levels just add to the hash below. The Switch is set #
- # true whenever anyone reaches that level. To control what happens when the #
- # switch is set you can set the switch as a trigger for a common event. From #
- # there you can "if" statement as much as you like. #
- # #
- #------------------------------------------------------------------------------#
- # ** Description #
- #------------------------------------------------------------------------------#
- # #
- # v1.0 #
- # ~=~=~=~ #
- # #
- # This script allows you to set a switch to true when anyone reaches a desired #
- # level. I suggest controlling the outcomes with common events. As I said it #
- # turns the desired switch true whenever ANYONE reaches the set level. #
- # #
- #------------------------------------------------------------------------------#
- #==============================================================================#
- #==============================================================================
- # ** V's Level Up Switches Module
- #------------------------------------------------------------------------------
- # This module manages customizable features and methods.
- #==============================================================================
- module V_LV_UP_Switches
- module Specs
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- # Start Customizable Area. #
- # #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- # ONLY EDIT AFTER THE EQUALS SYMBOL. #
- # #
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- #============================================================================
- # Levels And The Game Switches They Set Off
- #============================================================================
- Levels_And_Switches = {
- #Level Game Switch ID
- #~~~~~~~~# #~~~~~~~~~~~~~~~~#
- 2 => { :switch => 22 },
- 5 => { :switch => 23 },
- 7 => { :switch => 24 },
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- # End Customizable Area. #
- # #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- # DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOUR DOING. #
- # #
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- }
- end
- end
- #==============================================================================
- # ** Game_Actor
- #------------------------------------------------------------------------------
- # This class handles actors. It is used within the Game_Actors class
- # ($game_actors) and is also referenced from the Game_Party class ($game_party).
- #==============================================================================
- class Game_Actor < Game_Battler
- include V_LV_UP_Switches::Specs
- alias v_lv_up_switches_ga_lu level_up
- #--------------------------------------------------------------------------
- # * Level Up
- #--------------------------------------------------------------------------
- def level_up
- @level += 1
- $game_switches[Levels_And_Switches[level][:switch]] = true if Levels_And_Switches.has_key?(@level)
- v_lv_up_switches_ga_lu()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement