Advertisement
vindaca510

V's Level Up Switches v1.0

Jun 30th, 2013
1,226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 7.46 KB | None | 0 0
  1.  
  2.  
  3. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  4. #                                                                              #
  5. #                            V's Level Up Switches                             #
  6. #                                 Version  1.0                                 #
  7. #                                                                              #
  8. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  9. #                                Written By:  V                                #
  10. #                         Last Edited:   June 29, 2013                         #
  11. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  12. #                              Special Thanks to:                              #
  13. #                                                                              #
  14. #                                  Tsukihime                                   #
  15. #                                   BigEd781                                   #
  16. #                                     D&P3                                     #
  17. #                                   Enelvon                                    #
  18. #                                     Shaz                                     #
  19. #                                                                              #
  20. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  21.  
  22.  
  23. #==============================================================================#
  24. #------------------------------------------------------------------------------#
  25. # ** Disclaimer                                                                #
  26. #------------------------------------------------------------------------------#
  27. #                                                                              #
  28. # I do not mind sharing credit for this script if alterations to the script    #
  29. # are made. I am not making this script for commercial uses. If anyone wants   #
  30. # to use this script in one there games just give credit to any and everyone   #
  31. # who took part in creating it.                                                #
  32. #                                                                              #
  33. #------------------------------------------------------------------------------#
  34. # ** How To Use                                                                #
  35. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  36. #                                                                              #
  37. # If you want to add more levels just add to the hash below. The Switch is set #
  38. # true whenever anyone reaches that level. To control what happens when the    #
  39. # switch is set you can set the switch as a trigger for a common event. From   #
  40. # there you can "if" statement as much as you like.                            #
  41. #                                                                              #
  42. #------------------------------------------------------------------------------#
  43. # ** Description                                                               #
  44. #------------------------------------------------------------------------------#
  45. #                                                                              #
  46. #  v1.0                                                                        #
  47. # ~=~=~=~                                                                      #
  48. #                                                                              #
  49. # This script allows you to set a switch to true when anyone reaches a desired #
  50. # level. I suggest controlling the outcomes with common events. As I said it   #
  51. # turns the desired switch true whenever ANYONE reaches the set level.         #
  52. #                                                                              #
  53. #------------------------------------------------------------------------------#
  54. #==============================================================================#
  55.  
  56.  
  57.  
  58. #==============================================================================
  59. # ** V's Level Up Switches Module
  60. #------------------------------------------------------------------------------
  61. #  This module manages customizable features and methods.
  62. #==============================================================================
  63.    
  64. module V_LV_UP_Switches
  65.   module Specs
  66.    
  67. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  68. #                                                                              #
  69. #                           Start Customizable Area.                           #
  70. #                                                                              #
  71. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  72. #                                                                              #
  73. #                      ONLY EDIT AFTER THE EQUALS SYMBOL.                      #
  74. #                                                                              #
  75. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  76.    
  77.    
  78.   #============================================================================
  79.   #  Levels And The Game Switches They Set Off
  80.   #============================================================================
  81.  
  82.     Levels_And_Switches = {
  83.  
  84.                 #Level                      Game Switch ID
  85.               #~~~~~~~~#                  #~~~~~~~~~~~~~~~~#
  86.                   2    =>    { :switch    =>      22      },
  87.                   5    =>    { :switch    =>      23      },
  88.                   7    =>    { :switch    =>      24      },
  89.        
  90.    
  91.  
  92.        
  93.        
  94.        
  95.        
  96.        
  97.        
  98.        
  99.        
  100.        
  101.        
  102.        
  103. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  104. #                                                                              #
  105. #                            End Customizable Area.                            #
  106. #                                                                              #
  107. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  108. #                                                                              #
  109. #         DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOUR DOING.         #
  110. #                                                                              #
  111. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  112.    
  113. }    
  114.   end
  115. end
  116.  
  117.  
  118. #==============================================================================
  119. # ** Game_Actor
  120. #------------------------------------------------------------------------------
  121. #  This class handles actors. It is used within the Game_Actors class
  122. # ($game_actors) and is also referenced from the Game_Party class ($game_party).
  123. #==============================================================================
  124.  
  125. class Game_Actor < Game_Battler
  126.  
  127.   include V_LV_UP_Switches::Specs
  128.  
  129.   alias v_lv_up_switches_ga_lu                                       level_up
  130.  
  131.   #--------------------------------------------------------------------------
  132.   # * Level Up
  133.   #--------------------------------------------------------------------------
  134.   def level_up
  135.     @level += 1
  136.     $game_switches[Levels_And_Switches[level][:switch]] = true if Levels_And_Switches.has_key?(@level)
  137.     v_lv_up_switches_ga_lu()
  138.   end
  139.  
  140. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement