Advertisement
vindaca510

V's Old School Cheat's v0.2

Jun 26th, 2013
1,648
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 55.27 KB | None | 0 0
  1.  
  2.  
  3. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  4. #                                                                              #
  5. #                                V's Cheat Menu                                #
  6. #                                 Version  0.2                                 #
  7. #                                                                              #
  8. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  9. #                                Written By:  V                                #
  10. #                         Last Edited:   July 14, 2013                         #
  11. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  12. #                              Special Thanks to:                              #
  13. #                                                                              #
  14. #                                  Tsukihime                                   #
  15. #                                   BigEd781                                   #
  16. #                                     D&P3                                     #
  17. #                                   Enelvon                                    #
  18. #                                                                              #
  19. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  20.  
  21.  
  22. #==============================================================================#
  23. #------------------------------------------------------------------------------#
  24. # ** Disclaimer                                                                #
  25. #------------------------------------------------------------------------------#
  26. #                                                                              #
  27. # I do not mind sharing credit for this script if alterations to the script    #
  28. # are made. I am not making this script for commercial uses. If anyone wants   #
  29. # to use this script in one there games just give credit to any and everyone   #
  30. # who took part in creating it.                                                #
  31. #                                                                              #
  32. #------------------------------------------------------------------------------#
  33. # ** How To Use                                                                #
  34. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  35. #                                                                              #
  36. # To access this window use SceneManager.call(Scene_Cheat)                     #
  37. #                                                                              #
  38. #------------------------------------------------------------------------------#
  39. # ** Description                                                               #
  40. #------------------------------------------------------------------------------#
  41. #                                                                              #
  42. #  v0.1                                                                        #
  43. # ~=~=~=~                                                                      #
  44. #                                                                              #
  45. # I wanted to bring back the old school style cheat code input, so this is my  #
  46. # rendition with an RPG twist. In v0.1, there is only a few codes to unlock    #
  47. # and it is not very customizable to the non-scripter. There will be more      #
  48. # codes later and more customizable area to work with.                         #
  49. #                                                                              #
  50. #  v0.2                                                                        #
  51. # ~=~=~=~                                                                      #
  52. #                                                                              #
  53. # I added up to 3 new cheats that turn a assigned switch to true.              #
  54. #                                                                              #
  55. #------------------------------------------------------------------------------#
  56. #==============================================================================#
  57.  
  58.  
  59.  
  60. #==============================================================================
  61. # ** V's Cheat Module
  62. #------------------------------------------------------------------------------
  63. #  This module manages customizable features and methods.
  64. #==============================================================================
  65.    
  66. module V_Cheats
  67.   module Specs
  68. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  69. #                                                                              #
  70. #                           Start Customizable Area.                           #
  71. #                                                                              #
  72. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  73. #                                                                              #
  74. #                      ONLY EDIT AFTER THE EQUALS SYMBOL.                      #
  75. #                                                                              #
  76. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  77.    
  78.   #============================================================================
  79.   #
  80.   #  Menu Cosmetics
  81.   # ****************
  82.   #
  83.   #  ** All Pictures must be imported to the picture file
  84.   #
  85.   #============================================================================
  86.  
  87.     Background       = "StarlitSky"
  88.     Icon             = "Hand"
  89.     Use_Menu_Command = true
  90.    
  91.   #============================================================================
  92.   #  Code Info
  93.   #============================================================================
  94.  
  95.     Codes = { #<---- Do not edit this line
  96.    
  97.    
  98.     0 => {          :name     => "God Mode",
  99.                     :input    => ["U", "D", "U", "D", "L",
  100.                                   "R", "L", "R", "U", "D"]},
  101.  
  102.     1 => {          :name     => "Unlimited Gold",
  103.                     :input    => ["U", "U", "U", "D", "D",
  104.                                   "D", "L", "R", "L", "R"]},
  105.                                  
  106.     2 => {          :name     => "Triple XP",
  107.                     :input    => ["D", "R", "U", "L", "D",
  108.                                   "R", "U", "L", "D", "R"]},
  109.                                  
  110.     3 => {          :name     => "Double Item Drop",
  111.                     :input    => ["D", "D", "U", "U", "D",
  112.                                   "D", "U", "U", "U", "U"]},
  113.                                  
  114.     4 => {          :name     => "No Random Fights",
  115.                     :input    => ["U", "U", "U", "U", "U",
  116.                                   "U", "U", "U", "U", "U"]},
  117.                                  
  118.     5 => {          :name     => "1 Hit K.O.",
  119.                     :input    => ["D", "D", "D", "D", "D",
  120.                                   "D", "D", "D", "D", "D"]},
  121.  
  122.     6 => {          :name     => "Test Switch 1",
  123.                     :switch   => 88,
  124.                     :input    => ["D", "D", "D", "D", "D",
  125.                                   "D", "D", "D", "D", "U"]},
  126.  
  127.     7 => {          :name     => "Test Switch 2",
  128.                     :switch   => 89,
  129.                     :input    => ["D", "D", "D", "D", "D",
  130.                                   "D", "D", "D", "D", "L"]},
  131.  
  132.     8 => {          :name     => "Test Switch 3",
  133.                     :switch   => 90,
  134.                     :input    => ["D", "D", "D", "D", "D",
  135.                                   "D", "D", "D", "D", "R"]},
  136.  
  137.                                    
  138. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  139. #                                                                              #
  140. #                            End Customizable Area.                            #
  141. #                                                                              #
  142. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  143. #                                                                              #
  144. #         DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOUR DOING.         #
  145. #                                                                              #
  146. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180. } #<---- Do not edit this line                            
  181.    
  182.   end
  183. end
  184.    
  185.  
  186.  
  187.  
  188.  
  189.  
  190. #==============================================================================
  191. # ** Window Tip Texts
  192. #------------------------------------------------------------------------------
  193. #  This window displays the party's gold.
  194. #==============================================================================
  195.  
  196. class Window_Enter_Cheat < Window_Base
  197.  
  198.   #--------------------------------------------------------------------------
  199.   # * Includes Module's Variables With Class
  200.   #--------------------------------------------------------------------------
  201.  
  202.   include V_Cheats::Specs
  203.  
  204.   #--------------------------------------------------------------------------
  205.   # * Object Initialization
  206.   #--------------------------------------------------------------------------
  207.  
  208.   def initialize
  209.     super(0, 0, 544, 416)
  210.     refresh
  211.   end
  212.  
  213.   #--------------------------------------------------------------------------
  214.   # * Refresh
  215.   #--------------------------------------------------------------------------
  216.  
  217.   def refresh
  218.     contents.clear
  219.     draw_header unless $game_system.cheat_counter == 10
  220.     draw_input1
  221.     draw_input2
  222.     draw_input3
  223.     draw_input4
  224.     draw_input5
  225.     draw_input6
  226.     draw_input7
  227.     draw_input8
  228.     draw_input9
  229.     draw_input10
  230.   end
  231.  
  232.   #--------------------------------------------------------------------------
  233.   # * Scan Code Inputs
  234.   #--------------------------------------------------------------------------
  235.  
  236.   def scan_code_inputs
  237.     unlocked = false
  238.    
  239.     Codes.each_key do |code|
  240.       if Codes[code][:input] == $game_system.cheat_input
  241.         $game_system.cheat_unlocked = code
  242.         unlocked = true
  243.       end
  244.     end
  245.    
  246.     show_wrong_code unless unlocked
  247.     show_unlocked if unlocked
  248.     unlocked = false
  249.   end
  250.  
  251.   #--------------------------------------------------------------------------
  252.   # * Check if Previously Unlocked
  253.   #--------------------------------------------------------------------------
  254.  
  255.   def check_previously_unlocked
  256.     show_unlocked unless Codes[$game_system.cheat_unlocked][:unlocked]
  257.     show_already_unlocked if Codes[$game_system.cheat_unlocked].has_key?(:unlocked)
  258.   end
  259.  
  260.   #--------------------------------------------------------------------------
  261.   # * Dispose and Reset Inputs
  262.   #--------------------------------------------------------------------------
  263.  
  264.   def dispose_and_reset
  265.     $game_system.cheat_unlocked = 0
  266.     $game_system.close = 0
  267.     reset_inputs
  268.     dispose_inputs
  269.     $game_system.closing = true
  270.     $game_system.unlocked_one = false
  271.   end
  272.  
  273.   #--------------------------------------------------------------------------
  274.   # * Draw Header
  275.   #--------------------------------------------------------------------------
  276.  
  277.   def draw_header
  278.     make_font_bigger
  279.     draw_text(-15, -160, 544, 416, "Enter Code Now", 1)
  280.     make_font_smaller
  281.   end
  282.  
  283.   #--------------------------------------------------------------------------
  284.   # * Show Unlocked
  285.   #--------------------------------------------------------------------------
  286.  
  287.   def show_unlocked
  288.     make_font_bigger
  289.     draw_text(-15, -150, 544, 416, (Codes[$game_system.cheat_unlocked][:name] + " Unlocked!"), 1) unless Codes[$game_system.cheat_unlocked][:unlocked]
  290.     draw_text(-15, -150, 544, 416, "Code Already Entered", 1) if Codes[$game_system.cheat_unlocked][:unlocked]
  291.     make_font_smaller
  292.     $game_system.close += 1
  293.     Codes[$game_system.cheat_unlocked][:toggle] = false unless Codes[$game_system.cheat_unlocked][:unlocked]
  294.     Codes[$game_system.cheat_unlocked][:unlocked] = true unless Codes[$game_system.cheat_unlocked][:unlocked]
  295.     $game_switches[Codes[$game_system.cheat_unlocked][:switch]] = true if Codes[$game_system.cheat_unlocked].has_key?(:switch)
  296.   end
  297.  
  298.   #--------------------------------------------------------------------------
  299.   # * Show Wrong Code
  300.   #--------------------------------------------------------------------------
  301.  
  302.   def show_wrong_code
  303.     make_font_bigger
  304.     draw_text(-15, -150, 544, 416, "Try Again", 1)
  305.     make_font_smaller
  306.     $game_system.close += 1
  307.   end
  308.  
  309.   #--------------------------------------------------------------------------
  310.   # * Draw Input 1
  311.   #--------------------------------------------------------------------------
  312.  
  313.   def draw_input1
  314.    
  315.     if $game_system.cheat_input[0] == "U"
  316.       @input1 = Sprite.new
  317.       @input1.bitmap = Cache.picture("U")
  318.       @input1.x = 5
  319.       @input1.y = 175
  320.     elsif $game_system.cheat_input[0] == "D"
  321.       @input1 = Sprite.new
  322.       @input1.bitmap = Cache.picture("D")
  323.       @input1.x = 5
  324.       @input1.y = 175
  325.     elsif $game_system.cheat_input[0] == "L"
  326.       @input1 = Sprite.new
  327.       @input1.bitmap = Cache.picture("L")
  328.       @input1.x = 5
  329.       @input1.y = 175
  330.     elsif $game_system.cheat_input[0] == "R"
  331.       @input1 = Sprite.new
  332.       @input1.bitmap = Cache.picture("R")
  333.       @input1.x = 5
  334.       @input1.y = 175
  335.     else
  336.       @input1 = Sprite.new
  337.       @input1.bitmap = Cache.picture("Blank")
  338.       @input1.x = 5
  339.       @input1.y = 175
  340.     end
  341.  
  342.   end
  343.      
  344.   #--------------------------------------------------------------------------
  345.   # * Draw Input 2
  346.   #--------------------------------------------------------------------------
  347.  
  348.   def draw_input2
  349.    
  350.     if $game_system.cheat_input[1] == "U"
  351.       @input2 = Sprite.new
  352.       @input2.bitmap = Cache.picture("U")
  353.       @input2.x = 59
  354.       @input2.y = 175
  355.     elsif $game_system.cheat_input[1] == "D"
  356.       @input2 = Sprite.new
  357.       @input2.bitmap = Cache.picture("D")
  358.       @input2.x = 59
  359.       @input2.y = 175
  360.     elsif $game_system.cheat_input[1] == "L"
  361.       @input2 = Sprite.new
  362.       @input2.bitmap = Cache.picture("L")
  363.       @input2.x = 59
  364.       @input2.y = 175
  365.     elsif $game_system.cheat_input[1] == "R"
  366.       @input2 = Sprite.new
  367.       @input2.bitmap = Cache.picture("R")
  368.       @input2.x = 59
  369.       @input2.y = 175
  370.     else
  371.       @input2 = Sprite.new
  372.       @input2.bitmap = Cache.picture("Blank")
  373.       @input2.x = 59
  374.       @input2.y = 175
  375.     end
  376.  
  377.   end
  378.      
  379.   #--------------------------------------------------------------------------
  380.   # * Draw Input 3
  381.   #--------------------------------------------------------------------------
  382.  
  383.   def draw_input3
  384.  
  385.     if $game_system.cheat_input[2] == "U"
  386.       @input3 = Sprite.new
  387.       @input3.bitmap = Cache.picture("U")
  388.       @input3.x = 113
  389.       @input3.y = 175
  390.     elsif $game_system.cheat_input[2] == "D"
  391.       @input3 = Sprite.new
  392.       @input3.bitmap = Cache.picture("D")
  393.       @input3.x = 113
  394.       @input3.y = 175
  395.     elsif $game_system.cheat_input[2] == "L"
  396.       @input3 = Sprite.new
  397.       @input3.bitmap = Cache.picture("L")
  398.       @input3.x = 113
  399.       @input3.y = 175
  400.     elsif $game_system.cheat_input[2] == "R"
  401.       @input3 = Sprite.new
  402.       @input3.bitmap = Cache.picture("R")
  403.       @input3.x = 113
  404.       @input3.y = 175
  405.     else
  406.       @input3 = Sprite.new
  407.       @input3.bitmap = Cache.picture("Blank")
  408.       @input3.x = 113
  409.       @input3.y = 175
  410.     end
  411.    
  412.   end
  413.      
  414.   #--------------------------------------------------------------------------
  415.   # * Draw Input 4
  416.   #--------------------------------------------------------------------------
  417.  
  418.   def draw_input4
  419.  
  420.     if $game_system.cheat_input[3] == "U"
  421.       @input4 = Sprite.new
  422.       @input4.bitmap = Cache.picture("U")
  423.       @input4.x = 167
  424.       @input4.y = 175
  425.     elsif $game_system.cheat_input[3] == "D"
  426.       @input4 = Sprite.new
  427.       @input4.bitmap = Cache.picture("D")
  428.       @input4.x = 167
  429.       @input4.y = 175
  430.     elsif $game_system.cheat_input[3] == "L"
  431.       @input4 = Sprite.new
  432.       @input4.bitmap = Cache.picture("L")
  433.       @input4.x = 167
  434.       @input4.y = 175
  435.     elsif $game_system.cheat_input[3] == "R"
  436.       @input4 = Sprite.new
  437.       @input4.bitmap = Cache.picture("R")
  438.       @input4.x = 167
  439.       @input4.y = 175
  440.     else
  441.       @input4 = Sprite.new
  442.       @input4.bitmap = Cache.picture("Blank")
  443.       @input4.x = 167
  444.       @input4.y = 175
  445.     end
  446.    
  447.   end
  448.      
  449.   #--------------------------------------------------------------------------
  450.   # * Draw Input 5
  451.   #--------------------------------------------------------------------------
  452.  
  453.   def draw_input5
  454.  
  455.     if $game_system.cheat_input[4] == "U"
  456.       @input5 = Sprite.new
  457.       @input5.bitmap = Cache.picture("U")
  458.       @input5.x = 221
  459.       @input5.y = 175
  460.     elsif $game_system.cheat_input[4] == "D"
  461.       @input5 = Sprite.new
  462.       @input5.bitmap = Cache.picture("D")
  463.       @input5.x = 221
  464.       @input5.y = 175
  465.     elsif $game_system.cheat_input[4] == "L"
  466.       @input5 = Sprite.new
  467.       @input5.bitmap = Cache.picture("L")
  468.       @input5.x = 221
  469.       @input5.y = 175
  470.     elsif $game_system.cheat_input[4] == "R"
  471.       @input5 = Sprite.new
  472.       @input5.bitmap = Cache.picture("R")
  473.       @input5.x = 221
  474.       @input5.y = 175
  475.     else
  476.       @input5 = Sprite.new
  477.       @input5.bitmap = Cache.picture("Blank")
  478.       @input5.x = 221
  479.       @input5.y = 175
  480.     end
  481.    
  482.   end
  483.      
  484.   #--------------------------------------------------------------------------
  485.   # * Draw Input 6
  486.   #--------------------------------------------------------------------------
  487.  
  488.   def draw_input6
  489.  
  490.     if $game_system.cheat_input[5] == "U"
  491.       @input6 = Sprite.new
  492.       @input6.bitmap = Cache.picture("U")
  493.       @input6.x = 275
  494.       @input6.y = 175
  495.     elsif $game_system.cheat_input[5] == "D"
  496.       @input6 = Sprite.new
  497.       @input6.bitmap = Cache.picture("D")
  498.       @input6.x = 275
  499.       @input6.y = 175
  500.     elsif $game_system.cheat_input[5] == "L"
  501.       @input6 = Sprite.new
  502.       @input6.bitmap = Cache.picture("L")
  503.       @input6.x = 275
  504.       @input6.y = 175
  505.     elsif $game_system.cheat_input[5] == "R"
  506.       @input6 = Sprite.new
  507.       @input6.bitmap = Cache.picture("R")
  508.       @input6.x = 275
  509.       @input6.y = 175
  510.     else
  511.       @input6 = Sprite.new
  512.       @input6.bitmap = Cache.picture("Blank")
  513.       @input6.x = 275
  514.       @input6.y = 175
  515.     end
  516.    
  517.   end
  518.      
  519.   #--------------------------------------------------------------------------
  520.   # * Draw Input 7
  521.   #--------------------------------------------------------------------------
  522.  
  523.   def draw_input7
  524.      
  525.     if $game_system.cheat_input[6] == "U"
  526.       @input7 = Sprite.new
  527.       @input7.bitmap = Cache.picture("U")
  528.       @input7.x = 329
  529.       @input7.y = 175
  530.     elsif $game_system.cheat_input[6] == "D"
  531.       @input7 = Sprite.new
  532.       @input7.bitmap = Cache.picture("D")
  533.       @input7.x = 329
  534.       @input7.y = 175
  535.     elsif $game_system.cheat_input[6] == "L"
  536.       @input7 = Sprite.new
  537.       @input7.bitmap = Cache.picture("L")
  538.       @input7.x = 329
  539.       @input7.y = 175
  540.     elsif $game_system.cheat_input[6] == "R"
  541.       @input7 = Sprite.new
  542.       @input7.bitmap = Cache.picture("R")
  543.       @input7.x = 329
  544.       @input7.y = 175
  545.     else
  546.       @input7 = Sprite.new
  547.       @input7.bitmap = Cache.picture("Blank")
  548.       @input7.x = 329
  549.       @input7.y = 175
  550.     end
  551.    
  552.   end
  553.      
  554.   #--------------------------------------------------------------------------
  555.   # * Draw Input 8
  556.   #--------------------------------------------------------------------------
  557.  
  558.   def draw_input8
  559.      
  560.     if $game_system.cheat_input[7] == "U"
  561.       @input8 = Sprite.new
  562.       @input8.bitmap = Cache.picture("U")
  563.       @input8.x = 383
  564.       @input8.y = 175
  565.     elsif $game_system.cheat_input[7] == "D"
  566.       @input8 = Sprite.new
  567.       @input8.bitmap = Cache.picture("D")
  568.       @input8.x = 383
  569.       @input8.y = 175
  570.     elsif $game_system.cheat_input[7] == "L"
  571.       @input8 = Sprite.new
  572.       @input8.bitmap = Cache.picture("L")
  573.       @input8.x = 383
  574.       @input8.y = 175
  575.     elsif $game_system.cheat_input[7] == "R"
  576.       @input8 = Sprite.new
  577.       @input8.bitmap = Cache.picture("R")
  578.       @input8.x = 383
  579.       @input8.y = 175
  580.     else
  581.       @input8 = Sprite.new
  582.       @input8.bitmap = Cache.picture("Blank")
  583.       @input8.x = 383
  584.       @input8.y = 175
  585.     end
  586.    
  587.   end
  588.  
  589.   #--------------------------------------------------------------------------
  590.   # * Draw Input 9
  591.   #--------------------------------------------------------------------------
  592.  
  593.   def draw_input9
  594.      
  595.     if $game_system.cheat_input[8] == "U"
  596.       @input9 = Sprite.new
  597.       @input9.bitmap = Cache.picture("U")
  598.       @input9.x = 437
  599.       @input9.y = 175
  600.     elsif $game_system.cheat_input[8] == "D"
  601.       @input9 = Sprite.new
  602.       @input9.bitmap = Cache.picture("D")
  603.       @input9.x = 437
  604.       @input9.y = 175
  605.     elsif $game_system.cheat_input[8] == "L"
  606.       @input9 = Sprite.new
  607.       @input9.bitmap = Cache.picture("L")
  608.       @input9.x = 437
  609.       @input9.y = 175
  610.     elsif $game_system.cheat_input[8] == "R"
  611.       @input9 = Sprite.new
  612.       @input9.bitmap = Cache.picture("R")
  613.       @input9.x = 437
  614.       @input9.y = 175
  615.     else
  616.       @input9 = Sprite.new
  617.       @input9.bitmap = Cache.picture("Blank")
  618.       @input9.x = 437
  619.       @input9.y = 175
  620.     end
  621.    
  622.   end
  623.  
  624.   #--------------------------------------------------------------------------
  625.   # * Draw Input 10
  626.   #--------------------------------------------------------------------------
  627.  
  628.   def draw_input10
  629.      
  630.     if $game_system.cheat_input[9] == "U"
  631.       @input10 = Sprite.new
  632.       @input10.bitmap = Cache.picture("U")
  633.       @input10.x = 491
  634.       @input10.y = 175
  635.     elsif $game_system.cheat_input[9] == "D"
  636.       @input10 = Sprite.new
  637.       @input10.bitmap = Cache.picture("D")
  638.       @input10.x = 491
  639.       @input10.y = 175
  640.     elsif $game_system.cheat_input[9] == "L"
  641.       @input10 = Sprite.new
  642.       @input10.bitmap = Cache.picture("L")
  643.       @input10.x = 491
  644.       @input10.y = 175
  645.     elsif $game_system.cheat_input[9] == "R"
  646.       @input10 = Sprite.new
  647.       @input10.bitmap = Cache.picture("R")
  648.       @input10.x = 491
  649.       @input10.y = 175
  650.     else
  651.       @input10 = Sprite.new
  652.       @input10.bitmap = Cache.picture("Blank")
  653.       @input10.x = 491
  654.       @input10.y = 175
  655.     end
  656.    
  657.   end
  658.      
  659.   #--------------------------------------------------------------------------
  660.   # * Dispose Inputs
  661.   #--------------------------------------------------------------------------
  662.  
  663.   def dispose_inputs
  664.     @input1.dispose
  665.     @input1.bitmap.dispose
  666.     @input2.dispose
  667.     @input2.bitmap.dispose
  668.     @input3.dispose
  669.     @input3.bitmap.dispose
  670.     @input4.dispose
  671.     @input4.bitmap.dispose
  672.     @input5.dispose
  673.     @input5.bitmap.dispose
  674.     @input6.dispose
  675.     @input6.bitmap.dispose
  676.     @input7.dispose
  677.     @input7.bitmap.dispose
  678.     @input8.dispose
  679.     @input8.bitmap.dispose
  680.     @input9.dispose
  681.     @input9.bitmap.dispose
  682.     @input10.dispose
  683.     @input10.bitmap.dispose
  684.   end
  685.  
  686.   #--------------------------------------------------------------------------
  687.   # * Reset Inputs
  688.   #--------------------------------------------------------------------------
  689.  
  690.   def reset_inputs
  691.     $game_system.cheat_counter = 0
  692.     $game_system.cheat_input = ["Blank", "Blank", "Blank", "Blank", "Blank",
  693.       "Blank", "Blank", "Blank", "Blank", "Blank"]
  694.   end
  695.  
  696.   #--------------------------------------------------------------------------
  697.   # * Frame Update
  698.   #--------------------------------------------------------------------------
  699.  
  700.   def update
  701.     super()
  702.     $game_system.close += 1 if $game_system.close != 0 && $game_system.close != 125
  703.     dispose_and_reset if $game_system.close == 125
  704.    
  705.   #--------------------------------------------------------------------------
  706.   # * Update B Trigger
  707.   #--------------------------------------------------------------------------
  708.  
  709.     if Input.trigger?(:B)
  710.       $game_system.closing = true
  711.       dispose_and_reset
  712.  
  713.   #--------------------------------------------------------------------------
  714.   # * Update Up Trigger
  715.   #--------------------------------------------------------------------------
  716.  
  717.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 0
  718.       dispose_inputs
  719.       $game_system.cheat_input[0] = "U"
  720.       $game_system.cheat_counter += 1
  721.       refresh
  722.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 1
  723.       dispose_inputs
  724.       $game_system.cheat_input[1] = "U"
  725.       $game_system.cheat_counter += 1
  726.       refresh
  727.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 2
  728.       dispose_inputs
  729.       $game_system.cheat_input[2] = "U"
  730.       $game_system.cheat_counter += 1
  731.       refresh
  732.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 3
  733.       dispose_inputs
  734.       $game_system.cheat_input[3] = "U"
  735.       $game_system.cheat_counter += 1
  736.       refresh
  737.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 4
  738.       dispose_inputs
  739.       $game_system.cheat_input[4] = "U"
  740.       $game_system.cheat_counter += 1
  741.       refresh
  742.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 5
  743.       dispose_inputs
  744.       $game_system.cheat_input[5] = "U"
  745.       $game_system.cheat_counter += 1
  746.       refresh
  747.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 6
  748.       dispose_inputs
  749.       $game_system.cheat_input[6] = "U"
  750.       $game_system.cheat_counter += 1
  751.       refresh
  752.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 7
  753.       dispose_inputs
  754.       $game_system.cheat_input[7] = "U"
  755.       $game_system.cheat_counter += 1
  756.       refresh
  757.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 8
  758.       dispose_inputs
  759.       $game_system.cheat_input[8] = "U"
  760.       $game_system.cheat_counter += 1
  761.       refresh
  762.     elsif Input.trigger?(:UP) && $game_system.cheat_counter == 9
  763.       dispose_inputs
  764.       $game_system.cheat_input[9] = "U"
  765.       $game_system.cheat_counter += 1
  766.       refresh
  767.       scan_code_inputs
  768.  
  769.   #--------------------------------------------------------------------------
  770.   # * Update Down Trigger
  771.   #--------------------------------------------------------------------------
  772.  
  773.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 0
  774.       dispose_inputs
  775.       $game_system.cheat_input[0] = "D"
  776.       $game_system.cheat_counter += 1
  777.       refresh
  778.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 1
  779.       dispose_inputs
  780.       $game_system.cheat_input[1] = "D"
  781.       $game_system.cheat_counter += 1
  782.       refresh
  783.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 2
  784.       dispose_inputs
  785.       $game_system.cheat_input[2] = "D"
  786.       $game_system.cheat_counter += 1
  787.       refresh
  788.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 3
  789.       dispose_inputs
  790.       $game_system.cheat_input[3] = "D"
  791.       $game_system.cheat_counter += 1
  792.       refresh
  793.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 4
  794.       dispose_inputs
  795.       $game_system.cheat_input[4] = "D"
  796.       $game_system.cheat_counter += 1
  797.       refresh
  798.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 5
  799.       dispose_inputs
  800.       $game_system.cheat_input[5] = "D"
  801.       $game_system.cheat_counter += 1
  802.       refresh
  803.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 6
  804.       dispose_inputs
  805.       $game_system.cheat_input[6] = "D"
  806.       $game_system.cheat_counter += 1
  807.       refresh
  808.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 7
  809.       dispose_inputs
  810.       $game_system.cheat_input[7] = "D"
  811.       $game_system.cheat_counter += 1
  812.       refresh
  813.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 8
  814.       dispose_inputs
  815.       $game_system.cheat_input[8] = "D"
  816.       $game_system.cheat_counter += 1
  817.       refresh
  818.     elsif Input.trigger?(:DOWN) && $game_system.cheat_counter == 9
  819.       dispose_inputs
  820.       $game_system.cheat_input[9] = "D"
  821.       $game_system.cheat_counter += 1
  822.       refresh
  823.       scan_code_inputs
  824.  
  825.   #--------------------------------------------------------------------------
  826.   # * Update Left Trigger
  827.   #--------------------------------------------------------------------------
  828.  
  829.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 0
  830.       dispose_inputs
  831.       $game_system.cheat_input[0] = "L"
  832.       $game_system.cheat_counter += 1
  833.       refresh
  834.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 1
  835.       dispose_inputs
  836.       $game_system.cheat_input[1] = "L"
  837.       $game_system.cheat_counter += 1
  838.       refresh
  839.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 2
  840.       dispose_inputs
  841.       $game_system.cheat_input[2] = "L"
  842.       $game_system.cheat_counter += 1
  843.       refresh
  844.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 3
  845.       dispose_inputs
  846.       $game_system.cheat_input[3] = "L"
  847.       $game_system.cheat_counter += 1
  848.       refresh
  849.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 4
  850.       dispose_inputs
  851.       $game_system.cheat_input[4] = "L"
  852.       $game_system.cheat_counter += 1
  853.       refresh
  854.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 5
  855.       dispose_inputs
  856.       $game_system.cheat_input[5] = "L"
  857.       $game_system.cheat_counter += 1
  858.       refresh
  859.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 6
  860.       dispose_inputs
  861.       $game_system.cheat_input[6] = "L"
  862.       $game_system.cheat_counter += 1
  863.       refresh
  864.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 7
  865.       dispose_inputs
  866.       $game_system.cheat_input[7] = "L"
  867.       $game_system.cheat_counter += 1
  868.       refresh
  869.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 8
  870.       dispose_inputs
  871.       $game_system.cheat_input[8] = "L"
  872.       $game_system.cheat_counter += 1
  873.       refresh
  874.     elsif Input.trigger?(:LEFT) && $game_system.cheat_counter == 9
  875.       dispose_inputs
  876.       $game_system.cheat_input[9] = "L"
  877.       $game_system.cheat_counter += 1
  878.       refresh
  879.       scan_code_inputs
  880.  
  881.   #--------------------------------------------------------------------------
  882.   # * Update Right Trigger
  883.   #--------------------------------------------------------------------------
  884.  
  885.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 0
  886.       dispose_inputs
  887.       $game_system.cheat_input[0] = "R"
  888.       $game_system.cheat_counter += 1
  889.       refresh
  890.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 1
  891.       dispose_inputs
  892.       $game_system.cheat_input[1] = "R"
  893.       $game_system.cheat_counter += 1
  894.       refresh
  895.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 2
  896.       dispose_inputs
  897.       $game_system.cheat_input[2] = "R"
  898.       $game_system.cheat_counter += 1
  899.       refresh
  900.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 3
  901.       dispose_inputs
  902.       $game_system.cheat_input[3] = "R"
  903.       $game_system.cheat_counter += 1
  904.       refresh
  905.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 4
  906.       dispose_inputs
  907.       $game_system.cheat_input[4] = "R"
  908.       $game_system.cheat_counter += 1
  909.       refresh
  910.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 5
  911.       dispose_inputs
  912.       $game_system.cheat_input[5] = "R"
  913.       $game_system.cheat_counter += 1
  914.       refresh
  915.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 6
  916.       dispose_inputs
  917.       $game_system.cheat_input[6] = "R"
  918.       $game_system.cheat_counter += 1
  919.       refresh
  920.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 7
  921.       dispose_inputs
  922.       $game_system.cheat_input[7] = "R"
  923.       $game_system.cheat_counter += 1
  924.       refresh
  925.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 8
  926.       dispose_inputs
  927.       $game_system.cheat_input[8] = "R"
  928.       $game_system.cheat_counter += 1
  929.       refresh
  930.     elsif Input.trigger?(:RIGHT) && $game_system.cheat_counter == 9
  931.       dispose_inputs
  932.       $game_system.cheat_input[9] = "R"
  933.       $game_system.cheat_counter += 1
  934.       refresh
  935.       scan_code_inputs
  936.     end
  937.    
  938.   end
  939.  
  940. end
  941.  
  942.  
  943.  
  944.  
  945. #==============================================================================
  946. # ** Window Cheat Select
  947. #------------------------------------------------------------------------------
  948. #  This window displays the icon for the cheat menu.
  949. #==============================================================================
  950.  
  951. class Window_Cheat_Select < Window_Base
  952.  
  953.   #--------------------------------------------------------------------------
  954.   # * Includes Module's Variables With Class
  955.   #--------------------------------------------------------------------------
  956.  
  957.   include V_Cheats::Specs
  958.  
  959.   #--------------------------------------------------------------------------
  960.   # * Object Initialization
  961.   #--------------------------------------------------------------------------
  962.  
  963.   def initialize
  964.     super(0, 0, 544, 416)
  965.     refresh
  966.   end
  967.  
  968.   #--------------------------------------------------------------------------
  969.   # * Refresh
  970.   #--------------------------------------------------------------------------
  971.  
  972.   def refresh
  973.     contents.clear
  974.     draw_cheat_select
  975.   end
  976.  
  977.   #--------------------------------------------------------------------------
  978.   # * Draw Selector Background
  979.   #--------------------------------------------------------------------------
  980.  
  981.   def draw_cheat_select
  982.     @cheat_select = Sprite.new
  983.     @cheat_select.bitmap = Cache.picture(Icon)
  984.     @cheat_select.x = 60
  985.     @cheat_select.y = 55 + $game_system.newy
  986.     @cheat_select.opacity = 180
  987.     @cheat_select.visible = true  
  988.   end
  989.  
  990.   #--------------------------------------------------------------------------
  991.   # * Frame Update
  992.   #--------------------------------------------------------------------------
  993.  
  994.   def update
  995.     super()
  996.    
  997.     if Input.trigger?(:UP) && $game_system.cheat_option == 0
  998.       self.y += (40 + ((Codes.size - 1) * 30))
  999.       $game_system.newy += (40 + ((Codes.size - 1) * 30))
  1000.       $game_system.cheat_option = Codes.size
  1001.       @cheat_select.dispose
  1002.       @cheat_select.bitmap.dispose
  1003.       RPG::SE.new("Push", 80, 150).play
  1004.       refresh
  1005.     elsif Input.trigger?(:UP) && $game_system.cheat_option > 0
  1006.       self.y -= 30 unless $game_system.cheat_option == 1
  1007.       self.y -= 40 if $game_system.cheat_option == 1
  1008.       $game_system.newy -= 30 unless $game_system.cheat_option == 1
  1009.       $game_system.newy -= 40 if $game_system.cheat_option == 1
  1010.       $game_system.cheat_option -= 1
  1011.       @cheat_select.dispose
  1012.       @cheat_select.bitmap.dispose
  1013.       RPG::SE.new("Push", 80, 150).play
  1014.       refresh
  1015.     elsif Input.trigger?(:DOWN) && $game_system.cheat_option == Codes.size
  1016.       self.y = 0
  1017.       $game_system.newy = 0
  1018.       $game_system.cheat_option = 0
  1019.       @cheat_select.dispose
  1020.       @cheat_select.bitmap.dispose
  1021.       RPG::SE.new("Push", 80, 150).play
  1022.       refresh
  1023.     elsif Input.trigger?(:DOWN) && $game_system.cheat_option < Codes.size
  1024.       self.y += 30 unless $game_system.cheat_option == 0
  1025.       self.y += 40 if $game_system.cheat_option == 0
  1026.       $game_system.newy += 30 unless $game_system.cheat_option == 0
  1027.       $game_system.newy += 40 if $game_system.cheat_option == 0
  1028.       $game_system.cheat_option += 1
  1029.       @cheat_select.dispose
  1030.       @cheat_select.bitmap.dispose
  1031.       RPG::SE.new("Push", 80, 150).play
  1032.       refresh
  1033.     elsif Input.trigger?(:C) && $game_system.cheat_option == 0
  1034.       @cheat_select.dispose
  1035.       @cheat_select.bitmap.dispose
  1036.     elsif Input.trigger?(:B)
  1037.       @cheat_select.dispose
  1038.       @cheat_select.bitmap.dispose
  1039.     end
  1040.    
  1041.   end
  1042.  
  1043. end
  1044.  
  1045.  
  1046.  
  1047.  
  1048. #==============================================================================
  1049. # ** Window Cheat
  1050. #------------------------------------------------------------------------------
  1051. #  This window displays the cheats.
  1052. #==============================================================================
  1053.  
  1054. class Window_Cheat < Window_Base
  1055.  
  1056.   #--------------------------------------------------------------------------
  1057.   # * Includes Module's Variables With Class
  1058.   #--------------------------------------------------------------------------
  1059.  
  1060.   include V_Cheats::Specs
  1061.  
  1062.   #--------------------------------------------------------------------------
  1063.   # * Object Initialization
  1064.   #--------------------------------------------------------------------------
  1065.  
  1066.   def initialize
  1067.     super(0, 0, 544, (Codes.size * 64) + 150)
  1068.     refresh
  1069.   end
  1070.  
  1071.   #--------------------------------------------------------------------------
  1072.   # * Refresh
  1073.   #--------------------------------------------------------------------------
  1074.  
  1075.   def refresh
  1076.     contents.clear
  1077.     draw_cheat_list
  1078.     draw_toggles
  1079.   end
  1080.  
  1081.   #--------------------------------------------------------------------------
  1082.   # * Draw Cheat List
  1083.   #--------------------------------------------------------------------------
  1084.  
  1085.   def draw_cheat_list
  1086.     draw_text(0, 0, 544, 50, "Cheat Menu", 1)
  1087.     contents.fill_rect(0, 65, 520, 2, line_color)
  1088.     draw_text(75, -110 + x, 544, 416, "Enter Cheat", 0)
  1089.     x = 0
  1090.  
  1091.     Codes.each_key do |code|
  1092.       make_font_smaller
  1093.       draw_text(75, -70 + x, 544, 416, Codes[code][:name], 0) if Codes[code][:unlocked]
  1094.       draw_text(75, -70 + x, 544, 416, "????", 0) unless Codes[code][:unlocked]
  1095.       make_font_bigger
  1096.       x += 30
  1097.     end
  1098.    
  1099.   end
  1100.  
  1101.   #--------------------------------------------------------------------------
  1102.   # * Draw Toggles
  1103.   #--------------------------------------------------------------------------
  1104.  
  1105.   def draw_toggles
  1106.     y = 0
  1107.     Codes.each_key do |code|
  1108.       make_font_smaller
  1109.       draw_text(-150, -70 + y, 544, 416, "ON", 2) if Codes[code][:toggle] && Codes[code][:unlocked]
  1110.       draw_text(-150, -70 + y, 544, 416, "OFF", 2) if Codes[code][:toggle] == false && Codes[code][:unlocked]
  1111.       make_font_bigger
  1112.       y += 30
  1113.     end
  1114.    
  1115.   end
  1116.  
  1117.   #--------------------------------------------------------------------------
  1118.   # * Get Color of Horizontal Line
  1119.   #--------------------------------------------------------------------------
  1120.  
  1121.   def line_color
  1122.     color = normal_color
  1123.     color.alpha = 48
  1124.     color
  1125.   end
  1126.  
  1127.   #--------------------------------------------------------------------------
  1128.   # * Toggle Code
  1129.   #--------------------------------------------------------------------------
  1130.  
  1131.   def toggle_code
  1132.  
  1133.     case
  1134.       when Codes[$game_system.cheat_option - 1][:toggle]
  1135.         Codes[$game_system.cheat_option - 1][:toggle] = false
  1136.       when Codes[$game_system.cheat_option - 1][:toggle] == false
  1137.         Codes[$game_system.cheat_option - 1][:toggle] = true
  1138.     end
  1139.      
  1140.   end
  1141.  
  1142.   #--------------------------------------------------------------------------
  1143.   # * Frame Update
  1144.   #--------------------------------------------------------------------------
  1145.  
  1146.   def update
  1147.     super()
  1148.    
  1149.     if Input.trigger?(:UP)
  1150.       refresh
  1151.     elsif Input.trigger?(:DOWN)
  1152.       refresh
  1153.     elsif Input.trigger?(:LEFT)
  1154.       toggle_code
  1155.       RPG::SE.new("Cursor1", 80, 150).play
  1156.       refresh
  1157.     elsif Input.trigger?(:RIGHT)
  1158.       toggle_code
  1159.       RPG::SE.new("Cursor1", 80, 150).play
  1160.       refresh
  1161.     elsif Input.trigger?(:C) && $game_system.cheat_option != 0
  1162.       toggle_code
  1163.       RPG::SE.new("Cursor1", 80, 150).play
  1164.       refresh
  1165.     elsif Input.trigger?(:C) && $game_system.cheat_option == 0
  1166.       SceneManager.call(Scene_Enter_Cheat)
  1167.       RPG::SE.new("Cursor1", 80, 150).play
  1168.       $game_system.cheat_option = 0
  1169.     end
  1170.    
  1171.   end
  1172.  
  1173. end
  1174.  
  1175.  
  1176.  
  1177.  
  1178. #==============================================================================
  1179. # ** Scene Enter Cheat
  1180. #------------------------------------------------------------------------------
  1181. #  This class performs Enter Cheat screen processing.
  1182. #==============================================================================
  1183.  
  1184. class Scene_Enter_Cheat < Scene_MenuBase
  1185.  
  1186.   #--------------------------------------------------------------------------
  1187.   # * Includes Module's Variables With Class
  1188.   #--------------------------------------------------------------------------
  1189.  
  1190.   include V_Cheats::Specs
  1191.  
  1192.   #--------------------------------------------------------------------------
  1193.   # * Start Processing
  1194.   #--------------------------------------------------------------------------
  1195.  
  1196.   def start
  1197.     super
  1198.     draw_input_window
  1199.  
  1200.   #--------------------------------------------------------------------------
  1201.   # * Background Processing
  1202.   #--------------------------------------------------------------------------
  1203.    
  1204.     @cheat_input_bg = Sprite.new
  1205.     @cheat_input_bg.bitmap = Cache.picture(Background)
  1206.     @cheat_input_bg.x = 0
  1207.     @cheat_input_bg.y = 0
  1208.     @cheat_input_bg.zoom_x = ( Graphics.width.to_f / 544 )
  1209.     @cheat_input_bg.zoom_y = ( Graphics.height.to_f / 416 )
  1210.     @cheat_input_bg.opacity = 180
  1211.     @cheat_input_bg.visible = true  
  1212.  
  1213.   end
  1214.  
  1215.   #--------------------------------------------------------------------------
  1216.   # * Draw Input Window
  1217.   #--------------------------------------------------------------------------
  1218.  
  1219.   def draw_input_window
  1220.     @cheat_window = Window_Enter_Cheat.new
  1221.     @cheat_window.opacity = 0
  1222.   end
  1223.  
  1224.   #--------------------------------------------------------------------------
  1225.   # * Frame Update
  1226.   #--------------------------------------------------------------------------
  1227.  
  1228.   def update
  1229.     super()
  1230.    
  1231.     if Input.trigger?(:B) || $game_system.closing
  1232.       $game_system.closing = false
  1233.       $game_system.newy = 0
  1234.       RPG::SE.new("Cancel1", 80, 130).play
  1235.       return_scene
  1236.     end
  1237.  
  1238.   end
  1239.  
  1240. end
  1241.  
  1242.  
  1243.  
  1244.  
  1245. #==============================================================================
  1246. # ** Scene Cheat
  1247. #------------------------------------------------------------------------------
  1248. #  This class performs Cheat screen processing.
  1249. #==============================================================================
  1250.  
  1251. class Scene_Cheat < Scene_MenuBase
  1252.  
  1253.   #--------------------------------------------------------------------------
  1254.   # * Includes Module's Variables With Class
  1255.   #--------------------------------------------------------------------------
  1256.  
  1257.   include V_Cheats::Specs
  1258.  
  1259.   #--------------------------------------------------------------------------
  1260.   # * Start Processing
  1261.   #--------------------------------------------------------------------------
  1262.  
  1263.   def start
  1264.     super
  1265.     create_cheat_window
  1266.     create_cheat_select_window
  1267.  
  1268.   #--------------------------------------------------------------------------
  1269.   # * Background Processing
  1270.   #--------------------------------------------------------------------------
  1271.    
  1272.     @cheat_bg = Sprite.new
  1273.     @cheat_bg.bitmap = Cache.picture(Background)
  1274.     @cheat_bg.x = 0
  1275.     @cheat_bg.y = 0
  1276.     @cheat_bg.zoom_x = ( Graphics.width.to_f / 544 )
  1277.     @cheat_bg.zoom_y = ( Graphics.height.to_f / 416 )
  1278.     @cheat_bg.opacity = 180
  1279.     @cheat_bg.visible = true  
  1280.  
  1281.   end
  1282.  
  1283.   #--------------------------------------------------------------------------
  1284.   # * Create Cheat Window
  1285.   #--------------------------------------------------------------------------
  1286.  
  1287.   def create_cheat_window
  1288.     @cheat_window = Window_Cheat.new
  1289.     @cheat_window.opacity = 0
  1290.   end
  1291.  
  1292.   #--------------------------------------------------------------------------
  1293.   # * Create Cheat Toggle Window
  1294.   #--------------------------------------------------------------------------
  1295.  
  1296.   def create_cheat_select_window
  1297.     @cheat_toggle_window = Window_Cheat_Select.new
  1298.     @cheat_toggle_window.opacity = 0
  1299.   end
  1300.  
  1301.   #--------------------------------------------------------------------------
  1302.   # * Frame Update
  1303.   #--------------------------------------------------------------------------
  1304.  
  1305.   def update
  1306.     super()
  1307.    
  1308.     if Input.trigger?(:B)
  1309.       $game_system.newy = 0
  1310.       $game_system.cheat_option = 0
  1311.       RPG::SE.new("Cancel1", 80, 130).play
  1312.       return_scene
  1313.     end
  1314.  
  1315.   end
  1316.  
  1317. end
  1318.  
  1319.  
  1320.  
  1321.  
  1322. #==============================================================================
  1323. # ** Game_Battler
  1324. #------------------------------------------------------------------------------
  1325. #  A battler class with methods for sprites and actions added. This class
  1326. # is used as a super class of the Game_Actor class and Game_Enemy class.
  1327. #==============================================================================
  1328.  
  1329. class Game_Battler < Game_BattlerBase
  1330.  
  1331.   #--------------------------------------------------------------------------
  1332.   # * Includes Module's Variables With Class
  1333.   #--------------------------------------------------------------------------
  1334.  
  1335.   include V_Cheats::Specs
  1336.  
  1337.   #--------------------------------------------------------------------------
  1338.   # * Calculate Damage
  1339.   #--------------------------------------------------------------------------
  1340.  
  1341.   def make_damage_value(user, item)
  1342.     value = item.damage.eval(user, self, $game_variables)
  1343.     value *= item_element_rate(user, item)
  1344.     value *= pdr if item.physical?
  1345.     value *= mdr if item.magical?
  1346.     value *= rec if item.damage.recover?
  1347.     value = apply_critical(value) if @result.critical
  1348.     value = apply_variance(value, item.damage.variance)
  1349.     value = apply_guard(value)
  1350.     value = 99999 if user.actor?
  1351.     @result.make_damage(value.to_i, item)
  1352.   end
  1353.  
  1354. end
  1355.  
  1356.  
  1357.  
  1358.  
  1359. #==============================================================================
  1360. # ** Game_Player
  1361. #------------------------------------------------------------------------------
  1362. #  This class handles the player. It includes event starting determinants and
  1363. # map scrolling functions. The instance of this class is referenced by
  1364. # $game_player.
  1365. #==============================================================================
  1366.  
  1367. class Game_Player < Game_Character
  1368.  
  1369.   #--------------------------------------------------------------------------
  1370.   # * Includes Module's Variables With Class
  1371.   #--------------------------------------------------------------------------
  1372.  
  1373.   include V_Cheats::Specs
  1374.  
  1375.   #--------------------------------------------------------------------------
  1376.   # * Execute Encounter Processing
  1377.   #--------------------------------------------------------------------------
  1378.   def encounter
  1379.     return false if $game_map.interpreter.running?
  1380.     return false if $game_system.encounter_disabled && Codes[4][:toggle] == false
  1381.     return false if Codes[4][:toggle]
  1382.     return false if @encounter_count > 0
  1383.     make_encounter_count
  1384.     troop_id = make_encounter_troop_id
  1385.     return false unless $data_troops[troop_id]
  1386.     BattleManager.setup(troop_id)
  1387.     BattleManager.on_encounter
  1388.     return true
  1389.   end
  1390.  
  1391. end
  1392.  
  1393.  
  1394.  
  1395.  
  1396. #==============================================================================
  1397. # ** BattleManager
  1398. #------------------------------------------------------------------------------
  1399. #  This module manages battle progress.
  1400. #==============================================================================
  1401.  
  1402. module BattleManager
  1403.  
  1404.   #--------------------------------------------------------------------------
  1405.   # * Includes Module's Variables With Class
  1406.   #--------------------------------------------------------------------------
  1407.  
  1408.   include V_Cheats::Specs
  1409.  
  1410.   #--------------------------------------------------------------------------
  1411.   # * Dropped Item Acquisition and Display
  1412.   #--------------------------------------------------------------------------
  1413.  
  1414.   def self.gain_drop_items
  1415.    
  1416.     $game_troop.make_drop_items.each do |item|
  1417.       $game_party.gain_item(item, 1) unless Codes[3]
  1418.       $game_party.gain_item(item, 2) if Codes[3]
  1419.       $game_message.add(sprintf(Vocab::ObtainItem, item.name)) unless Codes[3]
  1420.       $game_message.add(sprintf(Vocab::ObtainItem, (item.name + " x2"))) if Codes[3]
  1421.     end
  1422.    
  1423.     wait_for_message
  1424.   end
  1425.  
  1426.   #--------------------------------------------------------------------------
  1427.   # * EXP Acquisition and Level Up Display
  1428.   #--------------------------------------------------------------------------
  1429.  
  1430.   def self.gain_exp
  1431.    
  1432.     $game_party.all_members.each do |actor|
  1433.       actor.gain_exp($game_troop.exp_total) unless Codes[2][:toggle]
  1434.       actor.gain_exp($game_troop.exp_total * 3) if Codes[2][:toggle]
  1435.     end
  1436.    
  1437.     wait_for_message
  1438.   end
  1439.  
  1440.   #--------------------------------------------------------------------------
  1441.   # * Display EXP Earned
  1442.   #--------------------------------------------------------------------------
  1443.   def self.display_exp
  1444.    
  1445.     if $game_troop.exp_total > 0
  1446.       text = sprintf(Vocab::ObtainExp, $game_troop.exp_total) unless Codes[2][:toggle]
  1447.       text = sprintf(Vocab::ObtainExp, ($game_troop.exp_total * 3)) if Codes[2][:toggle]
  1448.       $game_message.add('\.' + text)
  1449.     end
  1450.    
  1451.   end
  1452.  
  1453. end
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459. #==============================================================================
  1460. # ** Window_Base
  1461. #------------------------------------------------------------------------------
  1462. #  This is a super class of all windows within the game.
  1463. #==============================================================================
  1464.  
  1465. class Window_Base < Window
  1466.  
  1467.   #--------------------------------------------------------------------------
  1468.   # * Includes Module's Variables With Class
  1469.   #--------------------------------------------------------------------------
  1470.  
  1471.   include V_Cheats::Specs
  1472.  
  1473.   #--------------------------------------------------------------------------
  1474.   # * For Creating An Alias
  1475.   #--------------------------------------------------------------------------
  1476.  
  1477.   alias v_cheats_winbase_update_57463                                  update
  1478.  
  1479.   #--------------------------------------------------------------------------
  1480.   # * Frame Update
  1481.   #--------------------------------------------------------------------------
  1482.  
  1483.   def update
  1484.     super    
  1485.    
  1486.     if Codes[0][:toggle]
  1487.      
  1488.       $game_party.members.each do |party|
  1489.        
  1490.         if party.hp < party.mhp
  1491.           party.hp = party.mhp
  1492.         elsif party.mp < party.mmp
  1493.           party.mp = party.mmp
  1494.         elsif party.tp && party.tp < 100
  1495.           party.tp = 100
  1496.         end
  1497.        
  1498.       end
  1499.      
  1500.     end
  1501.    
  1502.     $game_party.gain_gold($game_party.max_gold) if Codes[1][:toggle]
  1503.      
  1504.     v_cheats_winbase_update_57463()
  1505.   end
  1506.  
  1507. end
  1508.  
  1509.  
  1510.  
  1511.  
  1512. #==============================================================================
  1513. # ** Window_MenuCommand
  1514. #------------------------------------------------------------------------------
  1515. #  This command window appears on the menu screen.
  1516. #==============================================================================
  1517.  
  1518. class Window_MenuCommand < Window_Command
  1519.  
  1520.   #--------------------------------------------------------------------------
  1521.   # * Includes Module's Variables With Class
  1522.   #--------------------------------------------------------------------------
  1523.  
  1524.   include V_Cheats::Specs
  1525.  
  1526.   #--------------------------------------------------------------------------
  1527.   # * For Creating An Alias
  1528.   #--------------------------------------------------------------------------
  1529.  
  1530.   alias v_cheats_winmc_mcl_1861544                          make_command_list
  1531.  
  1532.   #--------------------------------------------------------------------------
  1533.   # * Create Command List
  1534.   #--------------------------------------------------------------------------
  1535.  
  1536.   def make_command_list
  1537.     v_cheats_winmc_mcl_1861544()
  1538.     add_cheat_command
  1539.   end
  1540.  
  1541.   #--------------------------------------------------------------------------
  1542.   # * Add Main Commands to List
  1543.   #--------------------------------------------------------------------------
  1544.  
  1545.   def add_cheat_command
  1546.     add_command("Cheat Menu", :cheat)
  1547.   end
  1548.  
  1549. end
  1550.  
  1551.  
  1552.  
  1553.  
  1554. #==============================================================================
  1555. # ** Scene_Menu
  1556. #------------------------------------------------------------------------------
  1557. #  This class performs the menu screen processing.
  1558. #==============================================================================
  1559.  
  1560. class Scene_Menu < Scene_MenuBase
  1561.  
  1562.   #--------------------------------------------------------------------------
  1563.   # * Includes Module's Variables With Class
  1564.   #--------------------------------------------------------------------------
  1565.  
  1566.   include V_Cheats::Specs
  1567.  
  1568.   #--------------------------------------------------------------------------
  1569.   # * For Creating An Alias
  1570.   #--------------------------------------------------------------------------
  1571.  
  1572.   alias v_cheats_scenemenu_ccw_13215465                 create_command_window
  1573.  
  1574.   #--------------------------------------------------------------------------
  1575.   # * Create Command Window
  1576.   #--------------------------------------------------------------------------
  1577.  
  1578.   def create_command_window
  1579.     v_cheats_scenemenu_ccw_13215465()
  1580.     @command_window.set_handler(:cheat,    method(:command_cheat)) if Use_Menu_Command
  1581.   end
  1582.  
  1583.   #--------------------------------------------------------------------------
  1584.   # * [Save] Command
  1585.   #--------------------------------------------------------------------------
  1586.   def command_cheat
  1587.     SceneManager.call(Scene_Cheat)
  1588.   end
  1589.  
  1590. end
  1591.  
  1592.  
  1593.  
  1594.  
  1595. #==============================================================================
  1596. # ** Game_System
  1597. #------------------------------------------------------------------------------
  1598. #  This class handles system data. It saves the disable state of saving and
  1599. # menus. Instances of this class are referenced by $game_system.
  1600. #==============================================================================
  1601.  
  1602. class Game_System
  1603.  
  1604.   #--------------------------------------------------------------------------
  1605.   # * Public Instance Variables
  1606.   #--------------------------------------------------------------------------
  1607.  
  1608.   attr_accessor :cheat_input
  1609.   attr_accessor :unlocked_one
  1610.   attr_accessor :closing
  1611.   attr_accessor :close
  1612.   attr_accessor :cheat_option
  1613.   attr_accessor :cheat_counter
  1614.   attr_accessor :cheat_unlocked
  1615.   attr_accessor :newx
  1616.   attr_accessor :newy
  1617.   attr_accessor :xpos
  1618.   attr_accessor :ypos
  1619.  
  1620.  
  1621.   #--------------------------------------------------------------------------
  1622.   # * For Creating An Alias
  1623.   #--------------------------------------------------------------------------
  1624.  
  1625.   alias v_cheats_gamesys_init_86132                                  initialize
  1626.  
  1627.   #--------------------------------------------------------------------------
  1628.   # * Object Initialization
  1629.   #--------------------------------------------------------------------------
  1630.  
  1631.   def initialize
  1632.     @cheat_input          = ["Blank", "Blank", "Blank", "Blank", "Blank",
  1633.                               "Blank", "Blank", "Blank", "Blank", "Blank"]
  1634.     @unlocked_one         = false
  1635.     @closing              = false
  1636.     @close                = 0
  1637.     @cheat_option         = 0
  1638.     @cheat_counter        = 0
  1639.     @cheat_unlocked       = ""
  1640.     @newx                 = 0
  1641.     @newy                 = 0
  1642.     @xpos                 = 0
  1643.     @ypos                 = 0
  1644.     v_cheats_gamesys_init_86132()
  1645.   end
  1646.  
  1647. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement