Started by nathmatt, March 04, 2008, 10:39:58 am
#==============================================================================# Job_changer#==============================================================================class Job_changer #-------------------------------------------------------------------------- # * Main - Handles drawing/disposing windows and the main loop #-------------------------------------------------------------------------- def main #Draw Windows main_draw #Execute transition Graphics.transition #Main Loop loop do #Main Loop main_loop break if main_scenechange? end #Prepare for transition Graphics.freeze #Dispose Windows main_dispose end #-------------------------------------------------------------------------- # * Main Draw - Handles drawing windows #-------------------------------------------------------------------------- def main_draw #Draw Windows # List31452956 @list31452956 = Window_Command.new(160,['job change','skill upgrade',],21) @list31452956.windowskin = RPG::Cache.windowskin('001-Blue01') @list31452956.x = 236 @list31452956.y = 140 end #-------------------------------------------------------------------------- # * Main Scene Change #-------------------------------------------------------------------------- def main_scenechange? # Abort loop if screen is changed if $scene != self return true end return false end #-------------------------------------------------------------------------- # * Main Dispose #-------------------------------------------------------------------------- def main_dispose # Dispose All Windows # Dispose List31452956 @list31452956.dispose end #-------------------------------------------------------------------------- # * Main Loop #-------------------------------------------------------------------------- def main_loop # Update game screen Graphics.update # Update input information Input.update # Frame update update end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- def update # Update Windows update_windows #Update list31452956 update_list31452956 if @list31452956.active and @list31452956.visible end #-------------------------------------------------------------------------- # * Update list31452956 #-------------------------------------------------------------------------- def update_list31452956 # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) return end # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 0 # job change $scene = Scene_ClassChange.new when 1 # skill upgrade $scene = Scene_SkillChange.new end end end #-------------------------------------------------------------------------- # * Window Update #-------------------------------------------------------------------------- def update_windows # Update List31452956 @list31452956.update if @list31452956.visible endend
Quote#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=# Plug-in Save Point by Blizzard# Version: 2.0b# Type: Development Tool for Non-Scripters# Date: 26.5.2006# Date v2.0: 20.10.2007# Date v2.0b: 20.2.2008#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=# # Compatibility:# # 99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause# problems with CMS-es, but very unlikely. Could cause problems with callable# scenes.# # # Explanation:# # This add-on allows you to create a save point like menu where the player# can change to any scene you specify. You are not limited to savepoints.# # # Features:# # - create a menu that calls scenes within minutes# - use any script you have; this add-on allows you to call any scene# - returns to the calling scene after finishing processing the other scene# # # new in v2.0:# - first REAL public release# - completely overworked# - now supports any scene# # new in v2.0b:# - fixed a bug caused by a typing mistake# - now beta# # # Instructions:# # - Configuration:# # SCENE_CALLS - add any scene class declarations from other scripts like# Scene_PartySwitcher, Scene_Bestiary, etc., you can also add# any default scene like Scene_Save, Scene_Load, Scene_End etc.# SCENE_NAMES - add here the corresponding names for the scenes (in other# words: you can call your scenes however you like)# WIN_WIDTH - if your text gets squeezed together, increase this value# EXIT_SAVE - word displayed to exit the Scene_SavePoint# MAP_BACK - set to false if you don't want a map background or set to# filename of picture file located in your "Pictures" folder# that should be displayed as background# HOW_TO_BACK - if you are using a picture as background, set this value to 1# if you want a centered background, to 2 if you want a# stretched background and to 0 if you want it simply to stay# in the upper left corner# # - Additional Funtions:# # You can call the Save Point by using the "Call Script" Event Command. Type# in the window following syntax:# # $scene = Scene_SavePoint.new# # When calling the scene, you can also specify disabled items by using an# array of indices.# # $scene = Scene_SavePoint.new([0, 2, 3])# # This example would disable the 1st, the 3rd and the 4th option.# # # If you find any bugs, please report them here:# http://forum.chaos-project.com/#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
Quote from: winkioI do not speak to bricks, either as individuals or in wall form.
Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# START Configuration#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: SCENE_CALLS = ['Scene_ClassChange','Scene_SkillChange','Scene_Save', 'Scene_Load', 'Scene_End'] SCENE_NAMES = ['job change','skill upgrade','Save Game', 'Load Game', 'End Game'] WIN_WIDTH = 192 EXIT_SAVE = 'Exit' MAP_BACK = true HOW_TO_BACK = 2#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# END Configuration#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::