=begin ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██ █ CRIME's RGSS3 Scripts █ ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██ ██ ██ █ Save And Quit Menu `█ █ - 1.2 - 26 November 2013 - `█ █ █ █ Contact: █ █ Facebook : fb.me/chairul.crime █ █ Twitter : t.co/owfzpyCEk0 █ █ RPGMakerID : BlackCrows █ █ Website : mythcrows.blogspot.com █ █ █ █ Deskripsi:█ █ Script ini masih terbilang sederhana,█ █ mengimplementasikan menu Save.█ █ Yang bisa langsung keluar dari game.█ █ █ █ - T.O.S - █ █ Jika kamu memakai Script ini, berarti kamu █ █ telah menaati prinsip CRIME: █ █ █ █ C : Credit me if you want this Script █ █ R : Report me if bugs happened with you █ █ I : If you want to contact me, do it now! █ █ M : My Scripts are free to edit █ █ (But, I don't give a guarantee) █ █ E : Ends, Don't be Plagiarism! █ █ █ ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██ ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██ █ Non-Scripter's Region █ ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██ =end module CRIME module SAVENQUIT SCRIPT_SW = true # Switch untuk script ini (false = mati) COMMAND_NAME = "Save and Quit" # Nama Command untuk Save And Quit HIDE_SAVE_SWID = 1 # Switch untuk menyembunyikan Save Command (sepenuhnya) HIDE_GAMEEND_SWID = 2 # Switch untuk menyembunyikan Game End DECISIONSND_SWID = 3 # Switch ID untuk memakai Decision SE (dari Database > System) ONETAKE_SELECT = false # Memakai mode One Take Select Saveslot mode SAVEINDEX_VARID = 1 # Variabel pemilihan save index (gak berlaku kalo pake One Take bla..bla..bla) end end =begin ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██ █ Ingat prinsip "M" kalau mau mengedit! █ █ █ █ Simbol petunjuk penggunaan method di script ini: █ █ (A) = Alias, (+) = New Method, (>) = Overwrite, █ █ - = Class , + = New Class █ █ █ █ - Window_MenuCommand █ █ (>) make_command_list █ █ (+) add_savenquit_command █ █ █ █ - Scene_Menu █ █ (A) create_command_window █ █ (+) command_savenquit █ █ █ █ + Scene_OneTakeSelect █ █ █ █ + DataManager █ █ (+) savenquit █ █ (+) soundplay █ █ (+) gamedispose █ █ (+) fadeout_all █ ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██ =end class Window_MenuCommand < Window_Command def make_command_list add_main_commands add_formation_command add_original_commands add_save_command if $game_switches[CRIME::SAVENQUIT::HIDE_SAVE_SWID] == false add_game_end_command if $game_switches[CRIME::SAVENQUIT::HIDE_GAMEEND_SWID] == false add_savenquit_command if CRIME::SAVENQUIT::SCRIPT_SW == true end def add_savenquit_command add_command(CRIME::SAVENQUIT::COMMAND_NAME, :savequit, main_commands_enabled) end end class Scene_Menu < Scene_MenuBase alias savenquit_command create_command_window def create_command_window savenquit_command @command_window.set_handler(:savequit, method(:command_savequit)) end def command_savequit if CRIME::SAVENQUIT::ONETAKE_SELECT == true SceneManager.call(Scene_OneTakeSelect) else DataManager.savenquit end end end class Scene_OneTakeSelect < Scene_File def help_window_text Vocab::SaveMessage end def first_savefile_index DataManager.last_savefile_index end def on_savefile_ok super if DataManager.save_game(@index) on_save_success else Sound.play_buzzer end end def on_save_success soundplay DataManager.game_dispose end end module DataManager class << self def savenquit savegame soundplay game_dispose end def savegame DataManager.save_game($game_variables[CRIME::SAVENQUIT::SAVEINDEX_VARID]) end def soundplay Sound.play_save if $game_switches[CRIME::SAVENQUIT::DECISIONSND_SWID] == false end def game_dispose fadeout_all SceneManager.exit end def fadeout_all(time = 1000) RPG::BGM.fade(time) RPG::BGS.fade(time) RPG::ME.fade(time) Graphics.fadeout(time * Graphics.frame_rate / 1000) RPG::BGM.stop RPG::BGS.stop RPG::ME.stop end end end =begin ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██ █ End of Script - 26 November 2013 - CRiME █ ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██ =end