Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- # V's Cheat Menu #
- # Version 0.2 #
- # #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Written By: V #
- # Last Edited: July 14, 2013 #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Special Thanks to: #
- # #
- # Tsukihime #
- # BigEd781 #
- # D&P3 #
- # Enelvon #
- # #
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- #==============================================================================#
- #------------------------------------------------------------------------------#
- # ** 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 #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- # To access this window use SceneManager.call(Scene_Cheat) #
- # #
- #------------------------------------------------------------------------------#
- # ** Description #
- #------------------------------------------------------------------------------#
- # #
- # v0.1 #
- # ~=~=~=~ #
- # #
- # I wanted to bring back the old school style cheat code input, so this is my #
- # rendition with an RPG twist. In v0.1, there is only a few codes to unlock #
- # and it is not very customizable to the non-scripter. There will be more #
- # codes later and more customizable area to work with. #
- # #
- # v0.2 #
- # ~=~=~=~ #
- # #
- # I added up to 3 new cheats that turn a assigned switch to true. #
- # #
- #------------------------------------------------------------------------------#
- #==============================================================================#
- #==============================================================================
- # ** V's Cheat Module
- #------------------------------------------------------------------------------
- # This module manages customizable features and methods.
- #==============================================================================
- module V_Cheats
- module Specs
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- # Start Customizable Area. #
- # #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- # ONLY EDIT AFTER THE EQUALS SYMBOL. #
- # #
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- #============================================================================
- #
- # Menu Cosmetics
- # ****************
- #
- # ** All Pictures must be imported to the picture file
- #
- #============================================================================
- Background = "StarlitSky"
- Icon = "Hand"
- Use_Menu_Command = true
- #============================================================================
- # Code Info
- #============================================================================
- Codes = { #<---- Do not edit this line
- 0 => { :name => "God Mode",
- :input => ["U", "D", "U", "D", "L",
- "R", "L", "R", "U", "D"]},
- 1 => { :name => "Unlimited Gold",
- :input => ["U", "U", "U", "D", "D",
- "D", "L", "R", "L", "R"]},
- 2 => { :name => "Triple XP",
- :input => ["D", "R", "U", "L", "D",
- "R", "U", "L", "D", "R"]},
- 3 => { :name => "Double Item Drop",
- :input => ["D", "D", "U", "U", "D",
- "D", "U", "U", "U", "U"]},
- 4 => { :name => "No Random Fights",
- :input => ["U", "U", "U", "U", "U",
- "U", "U", "U", "U", "U"]},
- 5 => { :name => "1 Hit K.O.",
- :input => ["D", "D", "D", "D", "D",
- "D", "D", "D", "D", "D"]},
- 6 => { :name => "Test Switch 1",
- :switch => 88,
- :input => ["D", "D", "D", "D", "D",
- "D", "D", "D", "D", "U"]},
- 7 => { :name => "Test Switch 2",
- :switch => 89,
- :input => ["D", "D", "D", "D", "D",
- "D", "D", "D", "D", "L"]},
- 8 => { :name => "Test Switch 3",
- :switch => 90,
- :input => ["D", "D", "D", "D", "D",
- "D", "D", "D", "D", "R"]},
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- # End Customizable Area. #
- # #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- # DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOUR DOING. #
- # #
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- } #<---- Do not edit this line
- end
- end
- #==============================================================================
- # ** Window Tip Texts
- #------------------------------------------------------------------------------
- # This window displays the party's gold.
- #==============================================================================
- class Window_Enter_Cheat < Window_Base
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 544, 416)
- refresh
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- draw_header unless $game_system.cheat_counter == 10
- draw_input1
- draw_input2
- draw_input3
- draw_input4
- draw_input5
- draw_input6
- draw_input7
- draw_input8
- draw_input9
- draw_input10
- end
- #--------------------------------------------------------------------------
- # * Scan Code Inputs
- #--------------------------------------------------------------------------
- def scan_code_inputs
- unlocked = false
- Codes.each_key do |code|
- if Codes[code][:input] == $game_system.cheat_input
- $game_system.cheat_unlocked = code
- unlocked = true
- end
- end
- show_wrong_code unless unlocked
- show_unlocked if unlocked
- unlocked = false
- end
- #--------------------------------------------------------------------------
- # * Check if Previously Unlocked
- #--------------------------------------------------------------------------
- def check_previously_unlocked
- show_unlocked unless Codes[$game_system.cheat_unlocked][:unlocked]
- show_already_unlocked if Codes[$game_system.cheat_unlocked].has_key?(:unlocked)
- end
- #--------------------------------------------------------------------------
- # * Dispose and Reset Inputs
- #--------------------------------------------------------------------------
- def dispose_and_reset
- $game_system.cheat_unlocked = 0
- $game_system.close = 0
- reset_inputs
- dispose_inputs
- $game_system.closing = true
- $game_system.unlocked_one = false
- end
- #--------------------------------------------------------------------------
- # * Draw Header
- #--------------------------------------------------------------------------
- def draw_header
- make_font_bigger
- draw_text(-15, -160, 544, 416, "Enter Code Now", 1)
- make_font_smaller
- end
- #--------------------------------------------------------------------------
- # * Show Unlocked
- #--------------------------------------------------------------------------
- def show_unlocked
- make_font_bigger
- draw_text(-15, -150, 544, 416, (Codes[$game_system.cheat_unlocked][:name] + " Unlocked!"), 1) unless Codes[$game_system.cheat_unlocked][:unlocked]
- draw_text(-15, -150, 544, 416, "Code Already Entered", 1) if Codes[$game_system.cheat_unlocked][:unlocked]
- make_font_smaller
- $game_system.close += 1
- Codes[$game_system.cheat_unlocked][:toggle] = false unless Codes[$game_system.cheat_unlocked][:unlocked]
- Codes[$game_system.cheat_unlocked][:unlocked] = true unless Codes[$game_system.cheat_unlocked][:unlocked]
- $game_switches[Codes[$game_system.cheat_unlocked][:switch]] = true if Codes[$game_system.cheat_unlocked].has_key?(:switch)
- end
- #--------------------------------------------------------------------------
- # * Show Wrong Code
- #--------------------------------------------------------------------------
- def show_wrong_code
- make_font_bigger
- draw_text(-15, -150, 544, 416, "Try Again", 1)
- make_font_smaller
- $game_system.close += 1
- end
- #--------------------------------------------------------------------------
- # * Draw Input 1
- #--------------------------------------------------------------------------
- def draw_input1
- if $game_system.cheat_input[0] == "U"
- @input1 = Sprite.new
- @input1.bitmap = Cache.picture("U")
- @input1.x = 5
- @input1.y = 175
- elsif $game_system.cheat_input[0] == "D"
- @input1 = Sprite.new
- @input1.bitmap = Cache.picture("D")
- @input1.x = 5
- @input1.y = 175
- elsif $game_system.cheat_input[0] == "L"
- @input1 = Sprite.new
- @input1.bitmap = Cache.picture("L")
- @input1.x = 5
- @input1.y = 175
- elsif $game_system.cheat_input[0] == "R"
- @input1 = Sprite.new
- @input1.bitmap = Cache.picture("R")
- @input1.x = 5
- @input1.y = 175
- else
- @input1 = Sprite.new
- @input1.bitmap = Cache.picture("Blank")
- @input1.x = 5
- @input1.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 2
- #--------------------------------------------------------------------------
- def draw_input2
- if $game_system.cheat_input[1] == "U"
- @input2 = Sprite.new
- @input2.bitmap = Cache.picture("U")
- @input2.x = 59
- @input2.y = 175
- elsif $game_system.cheat_input[1] == "D"
- @input2 = Sprite.new
- @input2.bitmap = Cache.picture("D")
- @input2.x = 59
- @input2.y = 175
- elsif $game_system.cheat_input[1] == "L"
- @input2 = Sprite.new
- @input2.bitmap = Cache.picture("L")
- @input2.x = 59
- @input2.y = 175
- elsif $game_system.cheat_input[1] == "R"
- @input2 = Sprite.new
- @input2.bitmap = Cache.picture("R")
- @input2.x = 59
- @input2.y = 175
- else
- @input2 = Sprite.new
- @input2.bitmap = Cache.picture("Blank")
- @input2.x = 59
- @input2.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 3
- #--------------------------------------------------------------------------
- def draw_input3
- if $game_system.cheat_input[2] == "U"
- @input3 = Sprite.new
- @input3.bitmap = Cache.picture("U")
- @input3.x = 113
- @input3.y = 175
- elsif $game_system.cheat_input[2] == "D"
- @input3 = Sprite.new
- @input3.bitmap = Cache.picture("D")
- @input3.x = 113
- @input3.y = 175
- elsif $game_system.cheat_input[2] == "L"
- @input3 = Sprite.new
- @input3.bitmap = Cache.picture("L")
- @input3.x = 113
- @input3.y = 175
- elsif $game_system.cheat_input[2] == "R"
- @input3 = Sprite.new
- @input3.bitmap = Cache.picture("R")
- @input3.x = 113
- @input3.y = 175
- else
- @input3 = Sprite.new
- @input3.bitmap = Cache.picture("Blank")
- @input3.x = 113
- @input3.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 4
- #--------------------------------------------------------------------------
- def draw_input4
- if $game_system.cheat_input[3] == "U"
- @input4 = Sprite.new
- @input4.bitmap = Cache.picture("U")
- @input4.x = 167
- @input4.y = 175
- elsif $game_system.cheat_input[3] == "D"
- @input4 = Sprite.new
- @input4.bitmap = Cache.picture("D")
- @input4.x = 167
- @input4.y = 175
- elsif $game_system.cheat_input[3] == "L"
- @input4 = Sprite.new
- @input4.bitmap = Cache.picture("L")
- @input4.x = 167
- @input4.y = 175
- elsif $game_system.cheat_input[3] == "R"
- @input4 = Sprite.new
- @input4.bitmap = Cache.picture("R")
- @input4.x = 167
- @input4.y = 175
- else
- @input4 = Sprite.new
- @input4.bitmap = Cache.picture("Blank")
- @input4.x = 167
- @input4.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 5
- #--------------------------------------------------------------------------
- def draw_input5
- if $game_system.cheat_input[4] == "U"
- @input5 = Sprite.new
- @input5.bitmap = Cache.picture("U")
- @input5.x = 221
- @input5.y = 175
- elsif $game_system.cheat_input[4] == "D"
- @input5 = Sprite.new
- @input5.bitmap = Cache.picture("D")
- @input5.x = 221
- @input5.y = 175
- elsif $game_system.cheat_input[4] == "L"
- @input5 = Sprite.new
- @input5.bitmap = Cache.picture("L")
- @input5.x = 221
- @input5.y = 175
- elsif $game_system.cheat_input[4] == "R"
- @input5 = Sprite.new
- @input5.bitmap = Cache.picture("R")
- @input5.x = 221
- @input5.y = 175
- else
- @input5 = Sprite.new
- @input5.bitmap = Cache.picture("Blank")
- @input5.x = 221
- @input5.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 6
- #--------------------------------------------------------------------------
- def draw_input6
- if $game_system.cheat_input[5] == "U"
- @input6 = Sprite.new
- @input6.bitmap = Cache.picture("U")
- @input6.x = 275
- @input6.y = 175
- elsif $game_system.cheat_input[5] == "D"
- @input6 = Sprite.new
- @input6.bitmap = Cache.picture("D")
- @input6.x = 275
- @input6.y = 175
- elsif $game_system.cheat_input[5] == "L"
- @input6 = Sprite.new
- @input6.bitmap = Cache.picture("L")
- @input6.x = 275
- @input6.y = 175
- elsif $game_system.cheat_input[5] == "R"
- @input6 = Sprite.new
- @input6.bitmap = Cache.picture("R")
- @input6.x = 275
- @input6.y = 175
- else
- @input6 = Sprite.new
- @input6.bitmap = Cache.picture("Blank")
- @input6.x = 275
- @input6.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 7
- #--------------------------------------------------------------------------
- def draw_input7
- if $game_system.cheat_input[6] == "U"
- @input7 = Sprite.new
- @input7.bitmap = Cache.picture("U")
- @input7.x = 329
- @input7.y = 175
- elsif $game_system.cheat_input[6] == "D"
- @input7 = Sprite.new
- @input7.bitmap = Cache.picture("D")
- @input7.x = 329
- @input7.y = 175
- elsif $game_system.cheat_input[6] == "L"
- @input7 = Sprite.new
- @input7.bitmap = Cache.picture("L")
- @input7.x = 329
- @input7.y = 175
- elsif $game_system.cheat_input[6] == "R"
- @input7 = Sprite.new
- @input7.bitmap = Cache.picture("R")
- @input7.x = 329
- @input7.y = 175
- else
- @input7 = Sprite.new
- @input7.bitmap = Cache.picture("Blank")
- @input7.x = 329
- @input7.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 8
- #--------------------------------------------------------------------------
- def draw_input8
- if $game_system.cheat_input[7] == "U"
- @input8 = Sprite.new
- @input8.bitmap = Cache.picture("U")
- @input8.x = 383
- @input8.y = 175
- elsif $game_system.cheat_input[7] == "D"
- @input8 = Sprite.new
- @input8.bitmap = Cache.picture("D")
- @input8.x = 383
- @input8.y = 175
- elsif $game_system.cheat_input[7] == "L"
- @input8 = Sprite.new
- @input8.bitmap = Cache.picture("L")
- @input8.x = 383
- @input8.y = 175
- elsif $game_system.cheat_input[7] == "R"
- @input8 = Sprite.new
- @input8.bitmap = Cache.picture("R")
- @input8.x = 383
- @input8.y = 175
- else
- @input8 = Sprite.new
- @input8.bitmap = Cache.picture("Blank")
- @input8.x = 383
- @input8.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 9
- #--------------------------------------------------------------------------
- def draw_input9
- if $game_system.cheat_input[8] == "U"
- @input9 = Sprite.new
- @input9.bitmap = Cache.picture("U")
- @input9.x = 437
- @input9.y = 175
- elsif $game_system.cheat_input[8] == "D"
- @input9 = Sprite.new
- @input9.bitmap = Cache.picture("D")
- @input9.x = 437
- @input9.y = 175
- elsif $game_system.cheat_input[8] == "L"
- @input9 = Sprite.new
- @input9.bitmap = Cache.picture("L")
- @input9.x = 437
- @input9.y = 175
- elsif $game_system.cheat_input[8] == "R"
- @input9 = Sprite.new
- @input9.bitmap = Cache.picture("R")
- @input9.x = 437
- @input9.y = 175
- else
- @input9 = Sprite.new
- @input9.bitmap = Cache.picture("Blank")
- @input9.x = 437
- @input9.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Input 10
- #--------------------------------------------------------------------------
- def draw_input10
- if $game_system.cheat_input[9] == "U"
- @input10 = Sprite.new
- @input10.bitmap = Cache.picture("U")
- @input10.x = 491
- @input10.y = 175
- elsif $game_system.cheat_input[9] == "D"
- @input10 = Sprite.new
- @input10.bitmap = Cache.picture("D")
- @input10.x = 491
- @input10.y = 175
- elsif $game_system.cheat_input[9] == "L"
- @input10 = Sprite.new
- @input10.bitmap = Cache.picture("L")
- @input10.x = 491
- @input10.y = 175
- elsif $game_system.cheat_input[9] == "R"
- @input10 = Sprite.new
- @input10.bitmap = Cache.picture("R")
- @input10.x = 491
- @input10.y = 175
- else
- @input10 = Sprite.new
- @input10.bitmap = Cache.picture("Blank")
- @input10.x = 491
- @input10.y = 175
- end
- end
- #--------------------------------------------------------------------------
- # * Dispose Inputs
- #--------------------------------------------------------------------------
- def dispose_inputs
- @input1.dispose
- @input1.bitmap.dispose
- @input2.dispose
- @input2.bitmap.dispose
- @input3.dispose
- @input3.bitmap.dispose
- @input4.dispose
- @input4.bitmap.dispose
- @input5.dispose
- @input5.bitmap.dispose
- @input6.dispose
- @input6.bitmap.dispose
- @input7.dispose
- @input7.bitmap.dispose
- @input8.dispose
- @input8.bitmap.dispose
- @input9.dispose
- @input9.bitmap.dispose
- @input10.dispose
- @input10.bitmap.dispose
- end
- #--------------------------------------------------------------------------
- # * Reset Inputs
- #--------------------------------------------------------------------------
- def reset_inputs
- $game_system.cheat_counter = 0
- $game_system.cheat_input = ["Blank", "Blank", "Blank", "Blank", "Blank",
- "Blank", "Blank", "Blank", "Blank", "Blank"]
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super()
- $game_system.close += 1 if $game_system.close != 0 && $game_system.close != 125
- dispose_and_reset if $game_system.close == 125
- #--------------------------------------------------------------------------
- # * Update B Trigger
- #--------------------------------------------------------------------------
- if Input.trigger?(:B)
- $game_system.closing = true
- dispose_and_reset
- #--------------------------------------------------------------------------
- # * Update Up Trigger
- #--------------------------------------------------------------------------
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 0
- dispose_inputs
- $game_system.cheat_input[0] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 1
- dispose_inputs
- $game_system.cheat_input[1] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 2
- dispose_inputs
- $game_system.cheat_input[2] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 3
- dispose_inputs
- $game_system.cheat_input[3] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 4
- dispose_inputs
- $game_system.cheat_input[4] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 5
- dispose_inputs
- $game_system.cheat_input[5] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 6
- dispose_inputs
- $game_system.cheat_input[6] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 7
- dispose_inputs
- $game_system.cheat_input[7] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 8
- dispose_inputs
- $game_system.cheat_input[8] = "U"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_counter == 9
- dispose_inputs
- $game_system.cheat_input[9] = "U"
- $game_system.cheat_counter += 1
- refresh
- scan_code_inputs
- #--------------------------------------------------------------------------
- # * Update Down Trigger
- #--------------------------------------------------------------------------
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 0
- dispose_inputs
- $game_system.cheat_input[0] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 1
- dispose_inputs
- $game_system.cheat_input[1] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 2
- dispose_inputs
- $game_system.cheat_input[2] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 3
- dispose_inputs
- $game_system.cheat_input[3] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 4
- dispose_inputs
- $game_system.cheat_input[4] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 5
- dispose_inputs
- $game_system.cheat_input[5] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 6
- dispose_inputs
- $game_system.cheat_input[6] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 7
- dispose_inputs
- $game_system.cheat_input[7] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 8
- dispose_inputs
- $game_system.cheat_input[8] = "D"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 9
- dispose_inputs
- $game_system.cheat_input[9] = "D"
- $game_system.cheat_counter += 1
- refresh
- scan_code_inputs
- #--------------------------------------------------------------------------
- # * Update Left Trigger
- #--------------------------------------------------------------------------
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 0
- dispose_inputs
- $game_system.cheat_input[0] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 1
- dispose_inputs
- $game_system.cheat_input[1] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 2
- dispose_inputs
- $game_system.cheat_input[2] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 3
- dispose_inputs
- $game_system.cheat_input[3] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 4
- dispose_inputs
- $game_system.cheat_input[4] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 5
- dispose_inputs
- $game_system.cheat_input[5] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 6
- dispose_inputs
- $game_system.cheat_input[6] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 7
- dispose_inputs
- $game_system.cheat_input[7] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 8
- dispose_inputs
- $game_system.cheat_input[8] = "L"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 9
- dispose_inputs
- $game_system.cheat_input[9] = "L"
- $game_system.cheat_counter += 1
- refresh
- scan_code_inputs
- #--------------------------------------------------------------------------
- # * Update Right Trigger
- #--------------------------------------------------------------------------
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 0
- dispose_inputs
- $game_system.cheat_input[0] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 1
- dispose_inputs
- $game_system.cheat_input[1] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 2
- dispose_inputs
- $game_system.cheat_input[2] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 3
- dispose_inputs
- $game_system.cheat_input[3] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 4
- dispose_inputs
- $game_system.cheat_input[4] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 5
- dispose_inputs
- $game_system.cheat_input[5] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 6
- dispose_inputs
- $game_system.cheat_input[6] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 7
- dispose_inputs
- $game_system.cheat_input[7] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 8
- dispose_inputs
- $game_system.cheat_input[8] = "R"
- $game_system.cheat_counter += 1
- refresh
- elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 9
- dispose_inputs
- $game_system.cheat_input[9] = "R"
- $game_system.cheat_counter += 1
- refresh
- scan_code_inputs
- end
- end
- end
- #==============================================================================
- # ** Window Cheat Select
- #------------------------------------------------------------------------------
- # This window displays the icon for the cheat menu.
- #==============================================================================
- class Window_Cheat_Select < Window_Base
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 544, 416)
- refresh
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- draw_cheat_select
- end
- #--------------------------------------------------------------------------
- # * Draw Selector Background
- #--------------------------------------------------------------------------
- def draw_cheat_select
- @cheat_select = Sprite.new
- @cheat_select.bitmap = Cache.picture(Icon)
- @cheat_select.x = 60
- @cheat_select.y = 55 + $game_system.newy
- @cheat_select.opacity = 180
- @cheat_select.visible = true
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super()
- if Input.trigger?(:UP) && $game_system.cheat_option == 0
- self.y += (40 + ((Codes.size - 1) * 30))
- $game_system.newy += (40 + ((Codes.size - 1) * 30))
- $game_system.cheat_option = Codes.size
- @cheat_select.dispose
- @cheat_select.bitmap.dispose
- RPG::SE.new("Push", 80, 150).play
- refresh
- elsif Input.trigger?(:UP) && $game_system.cheat_option > 0
- self.y -= 30 unless $game_system.cheat_option == 1
- self.y -= 40 if $game_system.cheat_option == 1
- $game_system.newy -= 30 unless $game_system.cheat_option == 1
- $game_system.newy -= 40 if $game_system.cheat_option == 1
- $game_system.cheat_option -= 1
- @cheat_select.dispose
- @cheat_select.bitmap.dispose
- RPG::SE.new("Push", 80, 150).play
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_option == Codes.size
- self.y = 0
- $game_system.newy = 0
- $game_system.cheat_option = 0
- @cheat_select.dispose
- @cheat_select.bitmap.dispose
- RPG::SE.new("Push", 80, 150).play
- refresh
- elsif Input.trigger?(:DOWN) && $game_system.cheat_option < Codes.size
- self.y += 30 unless $game_system.cheat_option == 0
- self.y += 40 if $game_system.cheat_option == 0
- $game_system.newy += 30 unless $game_system.cheat_option == 0
- $game_system.newy += 40 if $game_system.cheat_option == 0
- $game_system.cheat_option += 1
- @cheat_select.dispose
- @cheat_select.bitmap.dispose
- RPG::SE.new("Push", 80, 150).play
- refresh
- elsif Input.trigger?(:C) && $game_system.cheat_option == 0
- @cheat_select.dispose
- @cheat_select.bitmap.dispose
- elsif Input.trigger?(:B)
- @cheat_select.dispose
- @cheat_select.bitmap.dispose
- end
- end
- end
- #==============================================================================
- # ** Window Cheat
- #------------------------------------------------------------------------------
- # This window displays the cheats.
- #==============================================================================
- class Window_Cheat < Window_Base
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 544, (Codes.size * 64) + 150)
- refresh
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- draw_cheat_list
- draw_toggles
- end
- #--------------------------------------------------------------------------
- # * Draw Cheat List
- #--------------------------------------------------------------------------
- def draw_cheat_list
- draw_text(0, 0, 544, 50, "Cheat Menu", 1)
- contents.fill_rect(0, 65, 520, 2, line_color)
- draw_text(75, -110 + x, 544, 416, "Enter Cheat", 0)
- x = 0
- Codes.each_key do |code|
- make_font_smaller
- draw_text(75, -70 + x, 544, 416, Codes[code][:name], 0) if Codes[code][:unlocked]
- draw_text(75, -70 + x, 544, 416, "????", 0) unless Codes[code][:unlocked]
- make_font_bigger
- x += 30
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Toggles
- #--------------------------------------------------------------------------
- def draw_toggles
- y = 0
- Codes.each_key do |code|
- make_font_smaller
- draw_text(-150, -70 + y, 544, 416, "ON", 2) if Codes[code][:toggle] && Codes[code][:unlocked]
- draw_text(-150, -70 + y, 544, 416, "OFF", 2) if Codes[code][:toggle] == false && Codes[code][:unlocked]
- make_font_bigger
- y += 30
- end
- end
- #--------------------------------------------------------------------------
- # * Get Color of Horizontal Line
- #--------------------------------------------------------------------------
- def line_color
- color = normal_color
- color.alpha = 48
- color
- end
- #--------------------------------------------------------------------------
- # * Toggle Code
- #--------------------------------------------------------------------------
- def toggle_code
- case
- when Codes[$game_system.cheat_option - 1][:toggle]
- Codes[$game_system.cheat_option - 1][:toggle] = false
- when Codes[$game_system.cheat_option - 1][:toggle] == false
- Codes[$game_system.cheat_option - 1][:toggle] = true
- end
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super()
- if Input.trigger?(:UP)
- refresh
- elsif Input.trigger?(:DOWN)
- refresh
- elsif Input.trigger?(:LEFT)
- toggle_code
- RPG::SE.new("Cursor1", 80, 150).play
- refresh
- elsif Input.trigger?(:RIGHT)
- toggle_code
- RPG::SE.new("Cursor1", 80, 150).play
- refresh
- elsif Input.trigger?(:C) && $game_system.cheat_option != 0
- toggle_code
- RPG::SE.new("Cursor1", 80, 150).play
- refresh
- elsif Input.trigger?(:C) && $game_system.cheat_option == 0
- SceneManager.call(Scene_Enter_Cheat)
- RPG::SE.new("Cursor1", 80, 150).play
- $game_system.cheat_option = 0
- end
- end
- end
- #==============================================================================
- # ** Scene Enter Cheat
- #------------------------------------------------------------------------------
- # This class performs Enter Cheat screen processing.
- #==============================================================================
- class Scene_Enter_Cheat < Scene_MenuBase
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Start Processing
- #--------------------------------------------------------------------------
- def start
- super
- draw_input_window
- #--------------------------------------------------------------------------
- # * Background Processing
- #--------------------------------------------------------------------------
- @cheat_input_bg = Sprite.new
- @cheat_input_bg.bitmap = Cache.picture(Background)
- @cheat_input_bg.x = 0
- @cheat_input_bg.y = 0
- @cheat_input_bg.zoom_x = ( Graphics.width.to_f / 544 )
- @cheat_input_bg.zoom_y = ( Graphics.height.to_f / 416 )
- @cheat_input_bg.opacity = 180
- @cheat_input_bg.visible = true
- end
- #--------------------------------------------------------------------------
- # * Draw Input Window
- #--------------------------------------------------------------------------
- def draw_input_window
- @cheat_window = Window_Enter_Cheat.new
- @cheat_window.opacity = 0
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super()
- if Input.trigger?(:B) || $game_system.closing
- $game_system.closing = false
- $game_system.newy = 0
- RPG::SE.new("Cancel1", 80, 130).play
- return_scene
- end
- end
- end
- #==============================================================================
- # ** Scene Cheat
- #------------------------------------------------------------------------------
- # This class performs Cheat screen processing.
- #==============================================================================
- class Scene_Cheat < Scene_MenuBase
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Start Processing
- #--------------------------------------------------------------------------
- def start
- super
- create_cheat_window
- create_cheat_select_window
- #--------------------------------------------------------------------------
- # * Background Processing
- #--------------------------------------------------------------------------
- @cheat_bg = Sprite.new
- @cheat_bg.bitmap = Cache.picture(Background)
- @cheat_bg.x = 0
- @cheat_bg.y = 0
- @cheat_bg.zoom_x = ( Graphics.width.to_f / 544 )
- @cheat_bg.zoom_y = ( Graphics.height.to_f / 416 )
- @cheat_bg.opacity = 180
- @cheat_bg.visible = true
- end
- #--------------------------------------------------------------------------
- # * Create Cheat Window
- #--------------------------------------------------------------------------
- def create_cheat_window
- @cheat_window = Window_Cheat.new
- @cheat_window.opacity = 0
- end
- #--------------------------------------------------------------------------
- # * Create Cheat Toggle Window
- #--------------------------------------------------------------------------
- def create_cheat_select_window
- @cheat_toggle_window = Window_Cheat_Select.new
- @cheat_toggle_window.opacity = 0
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super()
- if Input.trigger?(:B)
- $game_system.newy = 0
- $game_system.cheat_option = 0
- RPG::SE.new("Cancel1", 80, 130).play
- return_scene
- end
- end
- end
- #==============================================================================
- # ** Game_Battler
- #------------------------------------------------------------------------------
- # A battler class with methods for sprites and actions added. This class
- # is used as a super class of the Game_Actor class and Game_Enemy class.
- #==============================================================================
- class Game_Battler < Game_BattlerBase
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Calculate Damage
- #--------------------------------------------------------------------------
- def make_damage_value(user, item)
- value = item.damage.eval(user, self, $game_variables)
- value *= item_element_rate(user, item)
- value *= pdr if item.physical?
- value *= mdr if item.magical?
- value *= rec if item.damage.recover?
- value = apply_critical(value) if @result.critical
- value = apply_variance(value, item.damage.variance)
- value = apply_guard(value)
- value = 99999 if user.actor?
- @result.make_damage(value.to_i, item)
- end
- end
- #==============================================================================
- # ** Game_Player
- #------------------------------------------------------------------------------
- # This class handles the player. It includes event starting determinants and
- # map scrolling functions. The instance of this class is referenced by
- # $game_player.
- #==============================================================================
- class Game_Player < Game_Character
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Execute Encounter Processing
- #--------------------------------------------------------------------------
- def encounter
- return false if $game_map.interpreter.running?
- return false if $game_system.encounter_disabled && Codes[4][:toggle] == false
- return false if Codes[4][:toggle]
- return false if @encounter_count > 0
- make_encounter_count
- troop_id = make_encounter_troop_id
- return false unless $data_troops[troop_id]
- BattleManager.setup(troop_id)
- BattleManager.on_encounter
- return true
- end
- end
- #==============================================================================
- # ** BattleManager
- #------------------------------------------------------------------------------
- # This module manages battle progress.
- #==============================================================================
- module BattleManager
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * Dropped Item Acquisition and Display
- #--------------------------------------------------------------------------
- def self.gain_drop_items
- $game_troop.make_drop_items.each do |item|
- $game_party.gain_item(item, 1) unless Codes[3]
- $game_party.gain_item(item, 2) if Codes[3]
- $game_message.add(sprintf(Vocab::ObtainItem, item.name)) unless Codes[3]
- $game_message.add(sprintf(Vocab::ObtainItem, (item.name + " x2"))) if Codes[3]
- end
- wait_for_message
- end
- #--------------------------------------------------------------------------
- # * EXP Acquisition and Level Up Display
- #--------------------------------------------------------------------------
- def self.gain_exp
- $game_party.all_members.each do |actor|
- actor.gain_exp($game_troop.exp_total) unless Codes[2][:toggle]
- actor.gain_exp($game_troop.exp_total * 3) if Codes[2][:toggle]
- end
- wait_for_message
- end
- #--------------------------------------------------------------------------
- # * Display EXP Earned
- #--------------------------------------------------------------------------
- def self.display_exp
- if $game_troop.exp_total > 0
- text = sprintf(Vocab::ObtainExp, $game_troop.exp_total) unless Codes[2][:toggle]
- text = sprintf(Vocab::ObtainExp, ($game_troop.exp_total * 3)) if Codes[2][:toggle]
- $game_message.add('\.' + text)
- end
- end
- end
- #==============================================================================
- # ** Window_Base
- #------------------------------------------------------------------------------
- # This is a super class of all windows within the game.
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * For Creating An Alias
- #--------------------------------------------------------------------------
- alias v_cheats_winbase_update_57463 update
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super
- if Codes[0][:toggle]
- $game_party.members.each do |party|
- if party.hp < party.mhp
- party.hp = party.mhp
- elsif party.mp < party.mmp
- party.mp = party.mmp
- elsif party.tp && party.tp < 100
- party.tp = 100
- end
- end
- end
- $game_party.gain_gold($game_party.max_gold) if Codes[1][:toggle]
- v_cheats_winbase_update_57463()
- end
- end
- #==============================================================================
- # ** Window_MenuCommand
- #------------------------------------------------------------------------------
- # This command window appears on the menu screen.
- #==============================================================================
- class Window_MenuCommand < Window_Command
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * For Creating An Alias
- #--------------------------------------------------------------------------
- alias v_cheats_winmc_mcl_1861544 make_command_list
- #--------------------------------------------------------------------------
- # * Create Command List
- #--------------------------------------------------------------------------
- def make_command_list
- v_cheats_winmc_mcl_1861544()
- add_cheat_command
- end
- #--------------------------------------------------------------------------
- # * Add Main Commands to List
- #--------------------------------------------------------------------------
- def add_cheat_command
- add_command("Cheat Menu", :cheat)
- end
- end
- #==============================================================================
- # ** Scene_Menu
- #------------------------------------------------------------------------------
- # This class performs the menu screen processing.
- #==============================================================================
- class Scene_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- # * Includes Module's Variables With Class
- #--------------------------------------------------------------------------
- include V_Cheats::Specs
- #--------------------------------------------------------------------------
- # * For Creating An Alias
- #--------------------------------------------------------------------------
- alias v_cheats_scenemenu_ccw_13215465 create_command_window
- #--------------------------------------------------------------------------
- # * Create Command Window
- #--------------------------------------------------------------------------
- def create_command_window
- v_cheats_scenemenu_ccw_13215465()
- @command_window.set_handler(:cheat, method(:command_cheat)) if Use_Menu_Command
- end
- #--------------------------------------------------------------------------
- # * [Save] Command
- #--------------------------------------------------------------------------
- def command_cheat
- SceneManager.call(Scene_Cheat)
- end
- end
- #==============================================================================
- # ** Game_System
- #------------------------------------------------------------------------------
- # This class handles system data. It saves the disable state of saving and
- # menus. Instances of this class are referenced by $game_system.
- #==============================================================================
- class Game_System
- #--------------------------------------------------------------------------
- # * Public Instance Variables
- #--------------------------------------------------------------------------
- attr_accessor :cheat_input
- attr_accessor :unlocked_one
- attr_accessor :closing
- attr_accessor :close
- attr_accessor :cheat_option
- attr_accessor :cheat_counter
- attr_accessor :cheat_unlocked
- attr_accessor :newx
- attr_accessor :newy
- attr_accessor :xpos
- attr_accessor :ypos
- #--------------------------------------------------------------------------
- # * For Creating An Alias
- #--------------------------------------------------------------------------
- alias v_cheats_gamesys_init_86132 initialize
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- @cheat_input = ["Blank", "Blank", "Blank", "Blank", "Blank",
- "Blank", "Blank", "Blank", "Blank", "Blank"]
- @unlocked_one = false
- @closing = false
- @close = 0
- @cheat_option = 0
- @cheat_counter = 0
- @cheat_unlocked = ""
- @newx = 0
- @newy = 0
- @xpos = 0
- @ypos = 0
- v_cheats_gamesys_init_86132()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement