Advertisement
ZEkA10000

Debug Console RPG Maker VX Ace.

Nov 6th, 2019
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 111.92 KB | None | 0 0
  1. ##---------------------------------------------------------------------------
  2. ##---------------------------------------------------------------------------
  3. ##RPG Maker VX Ace's Concole commands
  4. ## author: ZEkA10000
  5. ##---------------------------------------------------------------------------  
  6. ##---------------------------------------------------------------------------
  7. ##
  8. ## Как пользоваться
  9. ##
  10. ## @> Запусти игру в режиме тестирования
  11. ## @> Нажми "Ё"
  12. ## @> Вводи команды
  13. ##  
  14. ## Подсказка: Введи >help, чтобы увидеть список доступных команд
  15. ## Подсказка: Введи >help <команда>, чтобы узнать как пользоваться командой.
  16. ##
  17. ## TAB   - Переключение между языками
  18. ##
  19. ##
  20. ## Внимание:
  21. ## Данный скрипт может создать конфликтные ситуации у установленных ранее скриптов
  22. ## Устанавливайте этот скрипт на свой страх и риск.
  23. ##
  24. ##---------------------------------------------------------------------------
  25. ##---------------------------------------------------------------------------
  26.  
  27. $extended_debug_options = true        #Расширенное меню в Scene Debug
  28. $font_size2x = true                   #Большой шрифт
  29. $console_background = "Titles1/11111" #Задний фон для консоли (nil для прозрачного фона)
  30. $input_for_somebody = ["", 0, false]  #Переменная для консоли. НЕ ТРОГАТЬ
  31. $skip_titile = true                   #Пропуск титульного экрана
  32. #Примеры
  33. #     $console_background = "Titile1/Background1"
  34. #     $console_background = "Pictures/Picture1"
  35.  
  36. $keys = Win32API.new("user32", 'GetAsyncKeyState', 'p','i')  
  37. FindWindow    = Win32API.new('user32'         , 'FindWindow'   , 'pp'      ,'i')
  38. ShowWindow    = Win32API.new('user32'         , 'ShowWindow'   , 'pp'      ,'i')
  39. SetWindowPos  = Win32API.new('user32'         , 'SetWindowPos' , 'iiiiiii' ,'i')
  40. HWND = FindWindow.call('RGSS Player', 0)
  41.  
  42. #check Khas' Awesome Light Effects
  43. $timer = [0, 50]
  44.  
  45.  
  46. class Scene_Title < Scene_Base
  47.   #--------------------------------------------------------------------------
  48.   # * Start Processing
  49.   #--------------------------------------------------------------------------
  50.   def start
  51.     super
  52.     SceneManager.clear
  53.     Graphics.freeze
  54.     create_background if !$skip_titile
  55.     create_foreground if !$skip_titile
  56.     create_command_window
  57.     play_title_music
  58.     command_new_game if $skip_titile
  59.   end
  60.   def dispose_background
  61.     if !$skip_titile
  62.       @sprite1.bitmap.dispose
  63.       @sprite1.dispose
  64.       @sprite2.bitmap.dispose
  65.       @sprite2.dispose
  66.     end
  67.   end
  68.   def dispose_foreground
  69.     if !$skip_titile
  70.       @foreground_sprite.bitmap.dispose
  71.       @foreground_sprite.dispose
  72.     end
  73.   end
  74. end
  75. class Text_Encoding
  76.   CP866  = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\a\b\t\n\v\f\r\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\e\u001C\u001D\u001E\u001F !\"\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007FАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп---¦+¦¦¬¬¦¦¬---¬L+T+-+¦¦Lг¦T¦=+¦¦TTLL-г++----¦¦-рстуфхцчшщъыьэюяЁёЄєЇїЎў°•·v№¤¦ "
  77.   CP1251 = [nil,
  78.             nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, #1-10
  79.             nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, #11-20
  80.             nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, #21-30
  81.             nil, ' ', '!', '"', '#', '$', '%', '&', "'", '(', #31-40
  82.             ')', '*', '+', ',', '-', '.', '/', '0', "1", '2', #41-50
  83.             '3', '4', '5', '6', '7', '8', '9', ':', ";", '<', #51-60
  84.             '=', '>', '?', '@', 'A', 'B', 'C', 'D', "E", 'F', #61-70
  85.             'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', "O", 'P', #71-80
  86.             'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', "Y", 'Z', #81-90
  87.             '[', nil, ']', '^', '_', '`', 'a', 'b', "c", 'd', #91-100
  88.             'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', "m", 'n', #101-110
  89.             'o', 'p', 'q', 'r', 's', 't', 'u', 'v', "w", 'x', #111-120
  90.             'y', 'z', '{', '|', '}', '~', nil, 'Ђ', "Ѓ", '‚', #121-130
  91.             'ѓ', '„', '…', '†', '‡', '€', '‰', 'Љ', "‹", 'Њ', #131-140
  92.             'Ќ', 'Ћ', 'Џ', 'ђ', 'ђ', '’', '“', '”', "•", '–', #141-150
  93.             '—', nil, '™', 'љ', '›', 'њ', 'ќ', 'ћ', "џ", ' ', #151-160
  94.             'Ў', 'ў', 'Ј', '¤', 'Ґ', '¦', '§', 'Ё', "©", 'Є', #161-170
  95.             '«', '¬', '-', '®', 'Ї', '°', '±', 'І', "і", 'ґ', #171-180
  96.             'µ', '¶', '·', 'ё', '№', 'є', '»', 'ј', "Ѕ", 'ѕ', #181-190
  97.             'ї', 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ж', "З", 'И', #191-200
  98.             'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', "С", 'Т', #201-210
  99.             'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ъ', 'Ы', "Ь", #211-220
  100.             'Э', 'Ю', 'Я', 'а', 'б', 'в', 'г', 'д', 'е', "ж", #221-230
  101.             'з', 'и', 'й', 'к', 'л', 'м', 'н', 'о', 'п', "р", #231-240
  102.             'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', "ъ", #241-250
  103.             'ы', 'ь', 'э', 'ю', 'я']                          #251-255
  104. end
  105.  
  106. # ==============
  107. # Модификация стандартного класса String
  108. # НЕ ИЗМЕНЯТЬ
  109. # ==============
  110. class String
  111.   $char_array = ["а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н",
  112.                  "о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь",
  113.                  "э","ю","я"]
  114.   $char_big   = ["А","Б","В","Г","Д","Е","Ё","Ж","З","И","Й","К","Л","М","Н",
  115.                  "О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ъ","Ы","Ь",
  116.                  "Э","Ю","Я"]
  117.   alias rus_upcase upcase
  118.   def upcase
  119.     temp = ""
  120.     self.each_char do |c|
  121.       if $char_array.include?(c)
  122.         temp += $char_big[$char_array.index(c)]
  123.       else
  124.         temp += c
  125.       end
  126.     end
  127.     temp.rus_upcase
  128.   end
  129.   alias rus_dncase downcase  
  130.   def downcase  
  131.     temp = ""
  132.     self.each_char do |c|
  133.       if $char_big.include?(c)
  134.         temp += $char_array[$char_big.index(c)]
  135.       else
  136.         temp += c
  137.       end
  138.     end
  139.     temp.rus_dncase
  140.   end
  141.   alias rus_swcase swapcase  
  142.   def swapcase  
  143.     temp = ""
  144.     self.each_char do |c|
  145.       if $char_big.include?(c)
  146.         temp += $char_array[$char_big.index(c)]
  147.       elsif $char_array.include?(c)
  148.         temp += $char_big[$char_array.index(c)]
  149.       else
  150.         temp += c
  151.       end
  152.     end
  153.     temp.rus_swcase
  154.   end
  155.   alias rus_caplize capitalize  
  156.   def capitalize  
  157.     temp = ""
  158.     if $char_array.include?(self[0])
  159.       temp += $char_big[$char_array.index(self[0])]
  160.     end
  161.     self.each_char do |c|
  162.       if $char_array.index(c) != nil
  163.         next if $char_big[$char_array.index(c)] == temp[0]
  164.       end
  165.       if $char_big.include?(c)
  166.         temp += $char_array[$char_big.index(c)]
  167.       else
  168.         temp += c
  169.       end
  170.     end
  171.     temp.rus_caplize
  172.   end
  173. end
  174.  
  175. class Game_CharacterBase
  176.   attr_accessor   :move_speed               # movement speed
  177. end
  178. $bgm_files = Array.new(1)
  179. file_index = 0
  180. Dir.foreach("Audio/BGM/") do |x|                  
  181.   index = 0
  182.   y = x.bytes.to_a
  183.   while index < x.size
  184.     y[index] = Text_Encoding::CP1251[y[index]]
  185.     index += 1
  186.   end
  187.   file_index += 1
  188.   x = y.join
  189.   $bgm_files[file_index] = x
  190. end
  191. $bgm_files.delete(".")
  192. $bgm_files.delete("..")
  193. $bgm_files.delete(nil)
  194.  
  195. ##---------------------------------------------------------------------------
  196. ## Array of files from BGS folder
  197. ##---------------------------------------------------------------------------
  198. $bgs_files = Array.new(1)
  199. file_index = 0
  200. Dir.foreach("Audio/BGS/") do |x|                  
  201.   index = 0
  202.   y = x.bytes.to_a
  203.   while index < x.size
  204.     y[index] = Text_Encoding::CP1251[y[index]]
  205.     index += 1
  206.   end
  207.   file_index += 1
  208.   x = y.join
  209.   $bgs_files[file_index] = x
  210. end
  211. $bgs_files.delete(".")
  212. $bgs_files.delete("..")
  213. $bgs_files.delete(nil)
  214.  
  215. ##---------------------------------------------------------------------------
  216. ## Array of files from ME folder
  217. ##---------------------------------------------------------------------------
  218. $me_files = Array.new(1)
  219. file_index = 0
  220. Dir.foreach("Audio/ME/") do |x|                  
  221.   index = 0
  222.   y = x.bytes.to_a
  223.   while index < x.size
  224.     y[index] = Text_Encoding::CP1251[y[index]]
  225.     index += 1
  226.   end
  227.   file_index += 1
  228.   x = y.join
  229.   $me_files[file_index] = x
  230. end
  231. $me_files.delete(".")
  232. $me_files.delete("..")
  233. $me_files.delete(nil)
  234. ##---------------------------------------------------------------------------
  235. ## Array of files from SE folder
  236. ##---------------------------------------------------------------------------
  237. $se_files = Array.new(1)
  238. file_index = 0
  239. Dir.foreach("Audio/SE/") do |x|                  
  240.   index = 0
  241.   y = x.bytes.to_a
  242.   while index < x.size
  243.     y[index] = Text_Encoding::CP1251[y[index]]
  244.     index += 1
  245.   end
  246.   file_index += 1
  247.   x = y.join
  248.   $se_files[file_index] = x
  249. end
  250. $se_files.delete(".")
  251. $se_files.delete("..")
  252. $se_files.delete(nil)
  253.  
  254.  ##---------------------------------------------------------------------------
  255.  ## Array of files from RTP BGM folder
  256.  ##---------------------------------------------------------------------------
  257.  $rtpbgm_files = ["Airship",  "Battle1",  "Battle2",  "Battle3",  "Battle4",
  258.                    "Battle5",  "Battle6",  "Battle7",  "Battle8",  "Battle9",
  259.                   "Dungeon1", "Dungeon2", "Dungeon3", "Dungeon4", "Dungeon5",
  260.                   "Dungeon6", "Dungeon7", "Dungeon8", "Dungeon9", "Field1",
  261.                   "Field2",   "Field3",   "Field4",   "Scene1",   "Scene2",
  262.                   "Scene3",   "Scene4",   "Scene5",   "Scene6",   "Theme1",  
  263.                   "Theme2",   "Theme3",   "Theme4",   "Theme5",   "Town1",    
  264.                   "Town2",    "Town3",    "Town4",    "Town5",    "Town6",
  265.                   "Town7"]
  266.  ##---------------------------------------------------------------------------
  267.  ## Array of files from RTP BGS folder
  268.  ##---------------------------------------------------------------------------
  269.  $rtpbgs_files = ["Clock", "Darkness", "Drips", "Fire", "Quake", "Rain",
  270.                   "River", "Rain",     "River", "Sea",  "Storm", "Wind"]
  271.  ##---------------------------------------------------------------------------
  272.  ## Array of files from RTP ME folder
  273.  ##---------------------------------------------------------------------------
  274.  $rtpme_files  = ["Fanfare1",  "Fanfare2", "Fanfare3", "Gag",     "Gameover1",
  275.                   "Gameover2", "Inn",      "Item",     "Mystery", "Organ",
  276.                   "Shock",     "Victory1", "Victory2"]
  277.  ##---------------------------------------------------------------------------
  278.  ## Array of files from RTP SE folder
  279.  ##---------------------------------------------------------------------------
  280.  $rtpse_files  = ["Absorb1",    "Absorb2",     "Applause1", "Applause2",
  281.                   "Attack1",    "Attack2",     "Attack3",   "Autodor",
  282.                   "Barrier",    "Battle1",     "Battle2",   "Battle3",
  283.                   "Bell1",      "Bell2",       "Bell3",     "Bite",
  284.                   "Blind",      "Blow1",       "Blow2",     "Blow3",
  285.                   "Blow4",      "Blow5",       "Blow6",     "Blow7",
  286.                   "Blow8",      "Book1",       "Book2",     "Bow1",
  287.                   "Bow2",       "Bow3",        "Bow4",      "Chicken",
  288.                   "Chime1",     "Chime2",      "Close1",    "Close2",
  289.                   "Close3",     "Coin",        "Collapse1", "Collapse2",  
  290.                   "Collapse3",  "Collapse4",   "Confuse",   "Cow",
  291.                   "Crash",      "Crossbow",    "Crow",      "Cry1",
  292.                   "Cry2",       "Cursor1",     "Cursor2",   "Damage1",
  293.                   "Damage2",    "Damage3",     "Damage4",   "Damage5",  
  294.                   "Darkness1",  "Darkness2",   "Darkness3", "Darkness4",
  295.                   "Darkness5",  "Darkness6",   "Darkness7", "Darkness8",  
  296.                   "Decision1",  "Decision2",   "Decision3", "Devil1",    
  297.                   "Devil2",     "Devil3",      "Disappointment", "Dive",
  298.                   "Dog",        "Down1",       "Down2",     "Down3",
  299.                   "Down4",      "Earth1",      "Earth2",    "Earth3",
  300.                   "Earth4",     "Earth5",      "Earth6",    "Earth7",
  301.                   "Earth8",     "Earth9",      "Equip1",    "Equip2",
  302.                   "Equip3",     "Evasion1",    "Evasion2",  "Explosion1",
  303.                   "Explosion2", "Explosion3",  "Explosion4", "Explosion5",
  304.                   "Explosion6", "Explosion7",  "Fall",      "Fire1",
  305.                   "Fire2",      "Fire3",       "Fire4",     "Fire5",
  306.                   "Fire6",      "Fire7",       "Fire8",     "Fire9",
  307.                   "Flash1",     "Flash2",      "Flash3",    "Fog1",
  308.                   "Fog2",       "Frog",        "Gun1",      "Gun2",
  309.                   "Hammer",     "Heal1",       "Heal2",     "Heal3",
  310.                   "Heal4",      "Heal5",       "Heal6",     "Heal7",
  311.                   "Horse",      "Ice1",        "Ice2",      "Ice3",
  312.                   "Ice4",       "Ice5",        "Ice6",      "Ice7",
  313.                   "Ice8",       "Ice9",        "Ice10",     "Ice11",
  314.                   "Item1",      "Item2",       "Item3",     "Jump1",
  315.                   "Jump2",      "Key",         "Knock",     "Laser",
  316.                   "Load",       "Machine",     "Magic1",    "Magic2",
  317.                   "Magic3",     "Magic4",      "Magic5",    "Magic6",
  318.                   "Magic7",     "Miss",        "Monster1",  "Monster2",
  319.                   "Monster3",   "Monster4",    "Monster5",  "Monster6",
  320.                   "Monster7",   "Move",        "Noise",     "Open1",
  321.                   "Open2",      "Open3",       "Open4",     "Open5",
  322.                   "Paralyze1",  "Paralyze2",   "Paralyze3", "Parry",
  323.                   "Phone",      "Poison",      "Pollen",    "Powerup",
  324.                   "Push",       "Raise1",      "Raise2",    "Raise3",
  325.                   "Recovery",   "Reflection",  "Resonance", "Run",
  326.                   "Saint",      "Saint2",      "Saint3",    "Saint4",
  327.                   "Saint5",     "Saint6",      "Saint7",    "Saint8",
  328.                   "Saint9",     "Sand",        "Save",      "Scream",
  329.                   "Sheep",      "Shop",        "Shot1",     "Shot2",
  330.                   "Shot3",      "Silence",     "Skill1",    "Skill2",
  331.                   "Skill3",     "Slash1",      "Slash2",    "Slash3",
  332.                   "Slash4",     "Slash5",      "Slash6",    "Slash7",
  333.                   "Slash8",     "Slash9",      "Slash10",   "Slash11",
  334.                   "Slash12",    "Sleep",       "Sound1",    "Sound2",
  335.                   "Sound3",     "Stare",       "Starlight", "Switch1",
  336.                   "Switch2",    "Switch3",     "Sword1",    "Sword2",
  337.                   "Sword3",     "Sword4",      "Sword5",    "Teleport",
  338.                   "Thunder1",   "Thunder2",    "Thunder3",  "Thunder4",
  339.                   "Thunder5",   "Thunder6",    "Thunder7",  "Thunder8",
  340.                   "Thunder9",   "Thunder10",   "Thunder11", "Thunder12",
  341.                   "Twine",      "Up1",         "Up2",       "Up3",
  342.                   "Up4",        "Water1",      "Water2",    "Water3",
  343.                   "Water4",     "Water5",      "Water6",    "Wind1",
  344.                   "Wind2",      "Wind3",       "Wind4",     "Wind5",
  345.                   "Wind6",      "Wind7",       "Wind8",     "Wind9",
  346.                   "Wind10",     "Wind11",      "Wolf"]
  347.  
  348.  
  349. $all_bgm = $bgm_files + $rtpbgm_files
  350. $all_bgs = $bgs_files + $rtpbgs_files
  351. $all_se  = $se_files + $rtpse_files
  352. $all_me  = $me_files + $rtpme_files
  353. ##---------------------------------------------------------------------------
  354. ## Auto launch
  355. ##---------------------------------------------------------------------------
  356. class Game_Event < Game_Character
  357.   def start
  358.     if $cin != true
  359.       return if empty?
  360.       @starting = true
  361.       lock if trigger_in?([0,1,2])
  362.     end
  363.   end
  364. end
  365.  
  366. class Game_Picture
  367.   def rotation(rotate)
  368.     @angle = rotate
  369.   end
  370. end
  371.  
  372. class Sprite_Timer < Sprite
  373.   def update_position
  374.     self.x = (Graphics.width - self.bitmap.width) / 2
  375.     self.y = 0
  376.     self.z = 200
  377.   end
  378. end
  379. class Scene_Debug < Scene_MenuBase
  380.   def help_text
  381.     if $extended_debug_options == true
  382.       if @left_window.mode == :switch
  383.         "C (Enter) : ВКЛ / ВЫКЛ"
  384.       else
  385.         "< : -1  | Shift + < : -5\n" +
  386.         "> : +1  | Shift + > : +5\n" +
  387.         "L  : -10 | Shift + L  : -50\n" +
  388.         "R  : +10 | Shift + R  : +50"
  389.       end
  390.     else
  391.       if @left_window.mode == :switch
  392.         "C (Enter) : ВКЛ / ВЫКЛ"
  393.       else
  394.         "< (Влево)    :  -1\n" +
  395.         "> (Вправо)   :  +1\n" +
  396.         "L (Pageup)   : -10\n" +
  397.         "R (Pagedown) : +10"
  398.       end
  399.     end
  400.   end
  401. end
  402.  
  403. class Window_DebugRight < Window_Selectable
  404.   #--------------------------------------------------------------------------
  405.   # * Update During Variable Mode
  406.   #--------------------------------------------------------------------------
  407.   def update_variable_mode
  408.     return unless $game_variables[current_id].is_a?(Numeric)
  409.     value = $game_variables[current_id]
  410.     if $extended_debug_options
  411.       value += 1 if Input.repeat?(:RIGHT)
  412.       value += 4 if Input.repeat?(:RIGHT) and Input.press?(:SHIFT)
  413.       value -= 1 if Input.repeat?(:LEFT)
  414.       value -= 4 if Input.repeat?(:LEFT) and Input.press?(:SHIFT)
  415.       value += 10 if Input.repeat?(:R)
  416.       value += 40 if Input.repeat?(:R) and Input.press?(:SHIFT)
  417.       value -= 10 if Input.repeat?(:L)
  418.       value -= 40 if Input.repeat?(:L) and Input.press?(:SHIFT)
  419.     else
  420.       value += 1 if Input.repeat?(:RIGHT)
  421.       value -= 1 if Input.repeat?(:LEFT)
  422.       value += 10 if Input.repeat?(:R)
  423.       value -= 10 if Input.repeat?(:L)
  424.     end
  425.     if $game_variables[current_id] != value
  426.       $game_variables[current_id] = value
  427.       Sound.play_cursor
  428.       redraw_current_item
  429.     end
  430.   end
  431. end
  432.  
  433. class Game_Player < Game_Character  
  434.   def move_by_input
  435.     return if !movable?
  436.       $game_player.moveto(-1, -1) if $cin
  437.       if $keys.call(0xC0) < 0
  438.         if $TEST == true
  439.           $debug_x_y = [$game_player.x, $game_player.y] if !$cin
  440.           $game_system.menu_disabled = true
  441.           $cin = true
  442.         end
  443.       end
  444.       Console_Commands.other_scripts       if $scripts != true
  445.       Console_Commands.reset               if $reseted_switches != true
  446.       Console_Commands.input_debug_command if $cin == true
  447.       Console_Commands.coord_find          if $TEST == true
  448.       if Input.press?(:F6) == true
  449.         $coord = false
  450.         Graphics.wait(10)
  451.         Console_Commands.coord_find
  452.       end
  453.       unless $debug == true
  454.         return if $game_map.interpreter.running?
  455.         case Input.dir8
  456.           when 2,4,6,8; move_straight(Input.dir4)
  457.           when 1 ;  move_diagonal_straight(4, 2)
  458.           when 3 ;  move_diagonal_straight(6, 2)
  459.           when 7 ;  move_diagonal_straight(4, 8)
  460.           when 9 ;  move_diagonal_straight(6, 8)
  461.         end
  462.       end
  463.     end
  464.     def move_diagonal_straight(x,y)
  465.       move_diagonal(x, y)
  466.       return if moving?
  467.       move_straight(x, false) ; move_straight(y, false)
  468.   end
  469. end
  470.  
  471. class Scene_Map < Scene_Base
  472.   def update
  473.     super
  474.     $game_map.update(true)
  475.     $game_player.update
  476.     $game_timer.update
  477.     @spriteset.update
  478.     update_scene if scene_change_ok?
  479.    
  480.   end
  481. end
  482. class Scene_Base
  483.   def update
  484.     update_basic
  485.     if $TEST
  486.       if $keys.call(0x72) < 0
  487.         SceneManager.call(Scene_Save) if SceneManager.scene_is?(Scene_Save) == false
  488.       elsif $keys.call(0x73) < 0
  489.         SceneManager.call(Scene_Load) if SceneManager.scene_is?(Scene_Load) == false
  490.       end
  491.     end
  492.   end
  493. end
  494.  
  495. $imported = {} if $imported.nil?
  496.  
  497. class Game_Actor < Game_Battler
  498.   attr_accessor :name                     # Name
  499.   attr_accessor :nickname                 # Nickname
  500.   attr_accessor :character_name           # character graphic filename
  501.   attr_accessor :character_index          # character graphic index
  502.   attr_accessor :face_name                # face graphic filename
  503.   attr_accessor :face_index               # face graphic index
  504.   attr_accessor :class_id                 # class ID
  505.   attr_accessor :level                    # level
  506.   def param_max(param_id)
  507.     #MHP & MMP
  508.     return ($imported["YEA-AdjustLimits"] == true ? 999999999 : 9999) if [0, 1].include?(param_id)
  509.     # ATK & DEF & MAT & MDF & LUK & AGI
  510.     return ($imported["YEA-AdjustLimits"] == true ? 9999 : 999)  if (2..7).include?(param_id)
  511.     return super
  512.   end
  513. end
  514.  
  515.  
  516. class Console_Commands
  517.   def self.other_scripts
  518.     if $game_map.methods.include?(:lantern) != false
  519.       $khas_effect = true
  520.       en = "Enabled"
  521.     else
  522.       $khas_effect = false
  523.       en = "Disabled"
  524.     end
  525.     puts "Use Khas' Awesome Light Effects => #{en}"
  526.     $scripts = true
  527.   end
  528.   def self.reset
  529.     $saved = false
  530.     $scripts == false
  531.     $game_system.menu_disabled = false if $game_system != nil
  532.     $coord = false
  533.     $debug = false
  534.     $text_nulrd = false
  535.     $input_RUS = false
  536.     $cin = false
  537.     $inrput_no_command = false
  538.     $capslock = false
  539.     $reseted_switches = true
  540.   end
  541.   def self.output
  542.     output_array_min = 0
  543.     output_array_max = $output.size
  544.    
  545.     while output_array_min <= output_array_max
  546.       Debug_Text.draw_word($output[output_array_min], 2, 2 + (20 * output_array_min)) if $output[output_array_min] != nil
  547.       output_array_min += 1
  548.     end
  549.   end
  550.   def self.coord_find
  551.     unless $coord == true
  552.       $coordinate_player = Sprite.new
  553.       $coordinate_player.bitmap = Bitmap.new(140, 100)
  554.       $coord = true
  555.     end
  556.     if $coordinate_player.bitmap.disposed?
  557.       $coordinate_player = Sprite.new
  558.       $coordinate_player.bitmap = Bitmap.new(140, 100)
  559.     end
  560.     my_color = Color.new(200, 200, 200)
  561.     $coordinate_player.bitmap.fill_rect(0, 0, 120, 20, my_color)
  562.     ox = $game_player.x.to_s
  563.     oy = $game_player.y.to_s
  564.     $coordinate_player.bitmap.font = Font.new("VL Gothic", 16)
  565.     coor_info = "X#{ox} Y#{oy} | Map:#{$game_map.map_id}"
  566.     $coordinate_player.bitmap.draw_text(0, 0, 120, 20, coor_info, 1)
  567.   end
  568.  
  569.   def self.error
  570.     commands_list = [">HELP", ">MENU", ">EXIT", ">ITEMS", ">MOVE", ">WEAPONS",
  571.                 ">SWITCH", ">SW", ">TIMER", ">VARIABLE", ">VAR", ">ARMORS",
  572.                 ">SKILLS", ">ACTOR", ">HEAL", ">ENEMY", ">WINDOW", ">GOLD",
  573.                 ">BGM", ">TONE", ">KHAS", ">SCREEN", ">CLEAR", ">COMMONEVENT",
  574.                 ">CE", ">MAP", ">FONT"]
  575.     if commands_list.include?($error) == true
  576.       error_str = ">HELP #{$error.delete('>')}"
  577.       error_str = ">HELP" if $error == ">HELP"
  578.     end
  579.     if $font_size2x
  580.       $output[0] = "Не правильна введена команда."
  581.       $output[1] = "Введите #{error_str}, "
  582.       $output[2] = "        чтобы узнать подробности"
  583.     else
  584.       $output[0] = "Не правильна введена команда."
  585.       $output[1] = "Введите #{error_str}, чтобы узнать подробности"
  586.     end
  587.     Console_Commands.output
  588.   end
  589.   def self.plus_symbol
  590.     $input_text_index += 1 if $input_text_index < 40
  591.   end
  592.   def self.nul_text
  593.     $input_text = ">                                       "
  594.     $input_text_index = 1
  595.     $text_nulrd = true
  596.   end
  597.   def self.update_bg
  598.     if $console_background == nil
  599.       $debug_zone.bitmap = Bitmap.new(640, 480)
  600.     else
  601.       begin
  602.         $debug_zone.bitmap = Bitmap.new("Graphics/#{$console_background}")
  603.         w = 0
  604.         h = 0
  605.         while h < 500
  606.           while w < 700
  607.             $debug_zone.bitmap.set_pixel(w,h,$color_input)
  608.             w += 2
  609.           end
  610.           w % 2 == 0 ? w = 1 : w = 0
  611.           h += 1
  612.         end      
  613.       rescue
  614.         $debug_zone.bitmap = Bitmap.new(640, 480)
  615.         $debug_zone.bitmap.fill_rect(0, 0, 640, Graphics.height - 20 * ($font_size2x ? 1: 0.5), $color_console)
  616.       end
  617.     end
  618.   end
  619.   def self.exit
  620.     $input_for_somebody = ["", 0, false]
  621.     Debug_Text.clear_bitmap
  622.     Console_Commands.nul_text
  623.     Console_Commands.reset
  624.     $game_player.moveto($debug_x_y[0], $debug_x_y[1])
  625.     $debug_zone.bitmap.clear if $debug_zone.bitmap.disposed? == false
  626.     $reseted_switches = false
  627.   end
  628.   def self.input_debug_command
  629.     unless $debug == true
  630.       $actor_params = [$game_actors[1].param_max(0), $game_actors[1].param_max(1),
  631.                        $game_actors[1].param_max(2), $game_actors[1].param_max(3),
  632.                        $game_actors[1].param_max(4), $game_actors[1].param_max(5),
  633.                        $game_actors[1].param_max(6), $game_actors[1].param_max(7)]
  634.       color = Color.new(1, 1, 1)
  635.       $color_input = Color.new(0, 0, 0)
  636.       $color_console = Color.new(20, 20, 20)
  637.       $debug_zone = Sprite.new
  638.       Console_Commands.update_bg
  639.       $debug = true
  640.       Console_Commands.nul_text if $text_nulrd != true
  641.       vert = 0
  642.       horz = 1
  643.       text_x = 0
  644.       size_x = Graphics.width
  645.       text_y = Graphics.height - 22
  646.       size_y = 30
  647.       $debug_zone.bitmap.fill_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100, $color_input)
  648.       $map_event_priority_type = Array.new
  649.       a = 0
  650.     end
  651.     letter = ""
  652.     if $keys.call(0x41) < 0
  653.       $input_RUS == true ? letter = "Ф" : letter = "A"
  654.     elsif $keys.call(0x42) < 0 #b
  655.       $input_RUS == true ? letter = "И" : letter = "B"  
  656.     elsif $keys.call(0x43) < 0 #c
  657.       $input_RUS == true ? letter = "С" : letter = "C"
  658.     elsif $keys.call(0x44) < 0 #d
  659.       $input_RUS == true ? letter = "В" : letter = "D"  
  660.     elsif $keys.call(0x45) < 0 #e
  661.       $input_RUS == true ? letter = "У" : letter = "E"
  662.     elsif $keys.call(0x46) < 0 #f
  663.       $input_RUS == true ? letter = "А" : letter = "F"
  664.     elsif $keys.call(0x47) < 0 #g
  665.       $input_RUS == true ? letter = "П" : letter = "G"    
  666.     elsif $keys.call(0x48) < 0 #h
  667.       $input_RUS == true ? letter = "Р" : letter = "H"    
  668.     elsif $keys.call(0x49) < 0 #i
  669.       $input_RUS == true ? letter = "Ш" : letter = "I"
  670.     elsif $keys.call(0x4a) < 0 #j
  671.       $input_RUS == true ? letter = "О" : letter = "J"
  672.     elsif $keys.call(0x4b) < 0 #k
  673.       $input_RUS == true ? letter = "Л" : letter = "K"
  674.     elsif $keys.call(0x4c) < 0 #l
  675.       $input_RUS == true ? letter = "Д" : letter = "L"  
  676.     elsif $keys.call(0x4d) < 0 #m
  677.       $input_RUS == true ? letter = "Ь" : letter = "M"
  678.     elsif $keys.call(0x4e) < 0 #n
  679.       $input_RUS == true ? letter = "Т" : letter = "N"  
  680.     elsif $keys.call(0x4f) < 0 #o
  681.       $input_RUS == true ? letter = "Щ" : letter = "O"
  682.     elsif $keys.call(0x50) < 0 #p
  683.       $input_RUS == true ? letter = "З" : letter = "P"  
  684.     elsif $keys.call(0x51) < 0 #q
  685.       $input_RUS == true ? letter = "Й" : letter = "Q"  
  686.     elsif $keys.call(0x52) < 0 #r
  687.       $input_RUS == true ? letter = "К" : letter = "R"  
  688.     elsif $keys.call(0x53) < 0 #s
  689.       $input_RUS == true ? letter = "Ы" : letter = "S"
  690.     elsif $keys.call(0x54) < 0 #t
  691.       $input_RUS == true ? letter = "Е" : letter = "T"  
  692.     elsif $keys.call(0x55) < 0 #u
  693.       $input_RUS == true ? letter = "Г" : letter = "U"  
  694.     elsif $keys.call(0x56) < 0 #v
  695.       $input_RUS == true ? letter = "М" : letter = "V"
  696.     elsif $keys.call(0x57) < 0 #w
  697.       $input_RUS == true ? letter = "Ц" : letter = "W"
  698.     elsif $keys.call(0x58) < 0 #x
  699.       $input_RUS == true ? letter = "Ч" : letter = "X"
  700.     elsif $keys.call(0x59) < 0 #y
  701.       $input_RUS == true ? letter = "Н" : letter = "Y"      
  702.     elsif $keys.call(0x5a) < 0 #z
  703.       $input_RUS == true ? letter = "Я" : letter = "Z"
  704.     elsif $keys.call(0xDB) < 0 #RUS x
  705.       letter = "Х" if $input_RUS == true
  706.     elsif $keys.call(0xDD) < 0 #RUS ъ
  707.       letter = "Ъ" if $input_RUS == true
  708.     elsif $keys.call(0xBA) < 0 #RUS ж
  709.       letter = "Ж" if $input_RUS == true
  710.     elsif $keys.call(0xC0) < 0 #RUS ё
  711.       letter = "Ё" if $input_RUS == true
  712.     elsif $keys.call(0xDE) < 0 #RUS э
  713.       letter = "Э" if $input_RUS == true
  714.     elsif $keys.call(0xBC) < 0 #RUS б
  715.       letter = "Б" if $input_RUS == true
  716.     elsif $keys.call(0xBE) < 0 #RUS ю
  717.       letter = "Ю" if $input_RUS == true
  718.     elsif $keys.call(0xBD) < 0 #- _
  719.       Input.press?(:A) ? letter = "_" : letter = "-"
  720.     elsif $keys.call(0x60) < 0 or $keys.call(0x30) < 0 #0
  721.       Input.press?(:A) ? letter = ")" : letter = "0"
  722.     elsif $keys.call(0x61) < 0 or $keys.call(0x31) < 0 #1
  723.       Input.press?(:A) ? letter = "!" : letter = "1"
  724.     elsif $keys.call(0x62) < 0 or $keys.call(0x32) < 0 #2
  725.       letter = "2"
  726.     elsif $keys.call(0x63) < 0 or $keys.call(0x33) < 0 #3
  727.       letter = "3"
  728.     elsif $keys.call(0x64) < 0 or $keys.call(0x34) < 0 #4
  729.       letter = "4"
  730.     elsif $keys.call(0x65) < 0 or $keys.call(0x35) < 0 #5
  731.       letter = "5"
  732.     elsif $keys.call(0x66) < 0 or $keys.call(0x36) < 0 #6
  733.       letter = "6"
  734.     elsif $keys.call(0x67) < 0 or $keys.call(0x37) < 0 #7
  735.       letter = "7"
  736.     elsif $keys.call(0x68) < 0 or $keys.call(0x38) < 0 #8
  737.       letter = "8"
  738.     elsif $keys.call(0x69) < 0 or $keys.call(0x39) < 0 #9
  739.       letter = "9"
  740.     elsif $keys.call(0x20) < 0 #Пробел
  741.       letter = " "
  742.     elsif $keys.call(0x1B) < 0 #ESC
  743.             ShowWindow.call(HWND, 1)
  744.       Console_Commands.exit
  745.     elsif $keys.call(0x09) < 0 #TAB
  746.       $input_RUS = !$input_RUS
  747.     elsif $keys.call(0x0D) < 0 #Готово
  748.       if $inrput_no_command == false
  749.         Console_Commands.update_bg
  750.         $copy_input = $input_text
  751.         $debug_zone.bitmap.fill_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100, $color_input)
  752.         Debug_Text.clear_bitmap
  753.         $input_text[$input_text_index] = " " if $input_text[$input_text_index] == "|"
  754.         if $enemy != nil
  755.           $enemy.dispose if $enemy.disposed? == false
  756.         end
  757.         Console_Commands.input_command
  758.       else
  759.         Console_Commands.input_command
  760.         Console_Commands.nul_text
  761.         $debug_zone.bitmap.clear_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100)
  762.         $debug_zone.bitmap.fill_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100, $color_input)
  763.       end
  764.     elsif $keys.call(0x08) < 0 #backspace
  765.       $input_text[$input_text_index] = " "
  766.       $input_text_index -= 1 if $input_text_index > 1
  767.       Console_Commands.make_hint
  768.     end
  769.    
  770.     if $reseted_switches == true
  771.       Debug_Text.clear_text
  772.       coords = [2 * 2, (Graphics.height - 16) * 2 + 14]
  773.       coords = [2, Graphics.height - 16] if $font_size2x
  774.       Debug_Text.draw_word($input_text, coords[0], coords[1])
  775.       coords = [(Graphics.width - 48) * 2 + 40, (Graphics.height - 36) * 2 + 36]
  776.       coords = [Graphics.width - 48, Graphics.height - 36] if $font_size2x
  777.       Debug_Text.draw_word("RUS", coords[0], coords[1]) if $input_RUS == true
  778.       Debug_Text.draw_word("eng", coords[0], coords[1]) if $input_RUS != true
  779.     end
  780.     $input_text[$input_text_index] = "|" if $timer[0] < $timer[1] / 2
  781.     $input_text[$input_text_index] = " " if $timer[0] > $timer[1] / 2
  782.     $timer[0] = 0 if $timer[0] > $timer[1]
  783.     $timer[0] += 1
  784.     if letter != ""
  785.         $input_text[$input_text_index] = letter if $input_text_index <= 40
  786.         Console_Commands.make_hint
  787.         Console_Commands.plus_symbol
  788.         loop do
  789.         if ($keys.call(0x41) < 0 or $keys.call(0x42) < 0 or $keys.call(0x43) < 0 or
  790.             $keys.call(0x44) < 0 or $keys.call(0x45) < 0 or $keys.call(0x46) < 0 or
  791.             $keys.call(0x47) < 0 or $keys.call(0x48) < 0 or $keys.call(0x49) < 0 or
  792.             $keys.call(0x4a) < 0 or $keys.call(0x4b) < 0 or $keys.call(0x4c) < 0 or
  793.             $keys.call(0x4d) < 0 or $keys.call(0x4e) < 0 or $keys.call(0x4f) < 0 or
  794.             $keys.call(0x50) < 0 or $keys.call(0x51) < 0 or $keys.call(0x52) < 0 or
  795.             $keys.call(0x53) < 0 or $keys.call(0x54) < 0 or $keys.call(0x55) < 0 or
  796.             $keys.call(0x56) < 0 or $keys.call(0x57) < 0 or $keys.call(0x58) < 0 or
  797.             $keys.call(0x59) < 0 or $keys.call(0x5a) < 0 or $keys.call(0xDB) < 0 or
  798.             $keys.call(0xDD) < 0 or $keys.call(0xBA) < 0 or $keys.call(0xC0) < 0 or
  799.             $keys.call(0xDE) < 0 or $keys.call(0xBC) < 0 or $keys.call(0xBE) < 0 or
  800.             $keys.call(0xBD) < 0 or $keys.call(0x60) < 0 or $keys.call(0x30) < 0 or
  801.             $keys.call(0x61) < 0 or $keys.call(0x31) < 0 or $keys.call(0x62) < 0 or
  802.             $keys.call(0x32) < 0 or $keys.call(0x63) < 0 or $keys.call(0x33) < 0 or
  803.             $keys.call(0x64) < 0 or $keys.call(0x34) < 0 or $keys.call(0x65) < 0 or
  804.             $keys.call(0x35) < 0 or $keys.call(0x66) < 0 or $keys.call(0x36) < 0 or
  805.             $keys.call(0x67) < 0 or $keys.call(0x37) < 0 or $keys.call(0x68) < 0 or
  806.             $keys.call(0x38) < 0 or $keys.call(0x69) < 0 or $keys.call(0x39) < 0 or
  807.             $keys.call(0x20) < 0 or $keys.call(0x1B) < 0 or $keys.call(0x09) < 0 or
  808.             $keys.call(0x0D) < 0 or Input.press?(:up) or Input.press?(:down))
  809.           Graphics.wait(1)
  810.           Graphics.update
  811.         else
  812.           break
  813.         end
  814.       end
  815.     end
  816.    
  817.   end
  818.   def self.make_hint
  819.     text = $input_text
  820. #~     text += "_" if $keys.call(0x20) < 0
  821.     text = text.split(" ")
  822.     commands = [">HELP", ">MENU", ">EXIT", ">ITEMS", ">MOVE", ">WEAPONS",
  823.                 ">SWITCH", ">SW", ">TIMER", ">VARIABLE", ">VAR", ">ARMORS",
  824.                 ">SKILLS", ">ACTOR", ">HEAL", ">ENEMY", ">WINDOW", ">GOLD",
  825.                 ">BGM", ">TONE", ">KHAS", ">SCREEN", ">CLEAR", ">COMMONEVENT",
  826.                 ">CE", ">MAP", ">FONT"]
  827.    
  828.     com_options = {
  829.       ">HELP"    => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
  830.       ">MENU"    => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
  831.       ">EXIT"    => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
  832.       ">MOVE"    => ["", "ID КАРТЫ", "X", "Y", "ПОВОРОТ", "", "", "", "", "", "", ""],
  833.       ">WEAPONS" => ["", "GIVE|LOSE|LOST|ERASE|LIST", "ID", "КОЛИЧЕСТВО", "", "", "", "", "", "", ""],
  834.       ">ARMORS"  => ["", "GIVE|LOSE|LOST|ERASE|LIST", "ID", "КОЛИЧЕСТВО", "", "", "", "", "", "", ""],
  835.       ">ITEMS"   => ["", "GIVE|LOSE|LOST|ERASE|LIST", "ID", "КОЛИЧЕСТВО", "", "", "", "", "", "", ""],
  836.       ">SWITCH"  => ["", "ID", "TRUE|FALSE", "", "", "", "", "", "", "", "", "", "", "", ""],
  837.       ">SW"      => ["", "ID", "TRUE|FALSE", "", "", "", "", "", "", "", "", "", "", "", ""],
  838.       ">TIMER"   => ["", "START|ADD|STOP", "секунды", "", "", "", "", "", "", "", "", "", "", "", ""],
  839.       ">VARIABLE"=> ["", "ID", "значение", "", "", "", "", "", "", "", "", "", "", "", ""],
  840.       ">VAR"     => ["", "ID", "значение", "", "", "", "", "", "", "", "", "", "", "", ""],
  841.       ">SKILLS"  => ["", "LEARN|FORGET|LIST", "ACTOR|ALL", "ID", "ID", "", "", "", "", "", "", "", "", "", ""],
  842.       ">ACTOR"   => ["", "EDIT|ADD|REMOVE|LIST", "ID", "ID", "", "", "", "", "", "", "", "", "", "", ""],
  843.       ">HEAL"    => ["", "ACTOR|PARTY", "HP|MP|TP|ALL", "ID", "ID", "", "", "", "", "", "", "", "", "", ""],
  844.       ">ENEMY"   => ["", "EDIT|SUMMON_BATTLE|SB|LIST|SHOW|INFO", "ID", "ID", "", "", "", "", "", "", "", "", "", "", ""],
  845.       ">WINDOW"  => ["", "HIDE|RESIZE|RESIZE_GAME", "X", "Y", "X", "Y", "", "", "", "", "", "", "", "", ""],
  846.       ">GOLD"    => ["", "GIVE|LOSE", "количество", "", "", "", "", "", "", "", "", "", "", "", ""],
  847.       ">BGM"     => ["", "LIST|PLAY|OFF|STOP", "значение", "значение", "", "", "", "", "", "", "", "", "", "", ""],
  848.       ">TONE"    => ["", "SET|CHANGE", "<КРАСНЫЙ>", "<ЗЕЛЕНЫЙ>", "<СИНИЙ>", "<НАСЫЩЕННОСТЬ>", "<ОЖИДАНИЕ>", "", "", "", "", "", "", "", ""],
  849.       ">KHAS"    => ["", "LIGHTS", "<КРАСНЫЙ>", "<ЗЕЛЕНЫЙ>", "<СИНИЙ>", "<ПРОЗРАЧНОСТЬ>", "", "", "", "", "", "", "", "", ""],
  850.       ">SCREEN"  => ["", "SHOW|HIDE|SIZE", "", "", "", "", "", "", "", "", "", "", "", "", ""],
  851.       ">CLEAR"   => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
  852.       ">COMMONEVENT" => ["", "ID", "", "", "", "", "", "", "", "", "", "", "", "", ""],
  853.       ">CE"      => ["", "ID", "", "", "", "", "", "", "", "", "", "", "", "", ""],
  854.       ">MAP"     => ["", "TROOP|INFO|EVENT|EVENTS|LIST", "значение1", "значение2", "", "", "", "", "", "", "", "", "", "", ""],
  855.       ">FONT"    => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]}
  856.      
  857.     sum_size = ((text.join("_").size - 2) * 18)
  858.    
  859.     y_pos = 380 * ($font_size2x ? 1 : 2) + ($font_size2x ? 0 : 10)
  860.     Debug_Text.clear_hint
  861.     if text.size > 1
  862.       Debug_Text.set_color(105, 255, 246)
  863.       if text[0] != ">" and $input_for_somebody[2] == false
  864.         temp = com_options[text[0]][text.size-1].split("|")
  865.         temp.each do |c|
  866.           if y_pos > 340
  867.             if text[text.size-1][0..-1] == c[0...text[text.size-1].size]
  868.               Debug_Text.draw_word(c, sum_size, y_pos)
  869.               y_pos -= 20
  870.             end
  871.           end
  872.         end
  873.       end      
  874.     else
  875.       commands.sort.each do |c|
  876.         if y_pos > 340
  877.           if text[text.size-1][0..-1] == c[0...text[text.size-1].size]
  878.             Debug_Text.set_color(105, 255, 246)
  879.             Debug_Text.draw_word(c, 4, y_pos)
  880.             y_pos -= 20
  881.           end
  882.         end
  883.       end
  884.     end
  885.     end
  886.   def self.input_command
  887.     command = $copy_input.split(" ")
  888.     $output = Array.new(1)
  889.     $error = command[0]
  890.     #---------------------------------------------------------------------------
  891.     #command >редактирование
  892.     #---------------------------------------------------------------------------
  893.     if $input_for_somebody[2]
  894.       error = ""
  895.       error2 = ""
  896.       help_used = false
  897.       if    $input_for_somebody[0] == ">ENEMY"
  898.         i = $input_for_somebody[1]
  899.         if command[1] != nil
  900.           case command[0]
  901.             when ">NAME";    command.shift ; $data_enemies[i].name = command.join(" ").capitalize
  902.             when ">EXP";     $data_enemies[i].exp = command[1].to_i
  903.             when ">GOLD";    $data_enemies[i].gold = command[1].to_i
  904.             when ">BATTLER"; $data_enemies[i].battler_name = command[1] if File.exist?("Graphics/Battlers/#{command[1]}")
  905.             when ">HUE";     $data_enemies[i].battler_hue = command[1].to_i
  906.             when ">MHP";     $data_enemies[i].params[0] = command[1].to_i
  907.             when ">MMP";     $data_enemies[i].params[1] = command[1].to_i
  908.             when ">ATK";     $data_enemies[i].params[2] = command[1].to_i
  909.             when ">DEF";     $data_enemies[i].params[3] = command[1].to_i
  910.             when ">MAT";     $data_enemies[i].params[4] = command[1].to_i
  911.             when ">MDF";     $data_enemies[i].params[5] = command[1].to_i
  912.             when ">LUK";     $data_enemies[i].params[6] = command[1].to_i
  913.             when ">AGI";     $data_enemies[i].params[7] = command[1].to_i
  914.             when ">HELP";    help_used = true
  915.           end
  916.         end
  917.        
  918.         if help_used
  919.           $output = [" ----=== ПОДСКАЗКИ ===---- ", " "," >name", " >class",
  920.                      " >lvl >level", " >maxlvl >mlvl", " >minlvl >llvl ",
  921.                      " >MHP", " >MMP", " >ATK", " >DEF", " >MAT", " >MDF",
  922.                      " >LUK", " >AGI", " >DONE", "", "#{error}", "#{error2}"]
  923.         else
  924.           $output = [" ----=== ИЗМЕНЕНИЕ ГЕРОЯ ===---- ", " ",
  925.                      " Имя               #{$data_enemies[i].name}",
  926.                      " Получаемый опыт   #{$data_enemies[i].exp}",
  927.                      " Получаемые деньги #{$data_enemies[i].gold}",
  928.                      " Графика           #{$data_enemies[i].battler_name}",
  929.                      " Оттенок           #{$data_enemies[i].battler_hue}",
  930.                      " Здоровье          #{$data_enemies[i].params[0]}",
  931.                      " Магия             #{$data_enemies[i].params[1]}",
  932.                      " Атака             #{$data_enemies[i].params[2]}",
  933.                      " Защита            #{$data_enemies[i].params[3]}",
  934.                      " Магическая атака  #{$data_enemies[i].params[4]}",
  935.                      " Магическая защита #{$data_enemies[i].params[5]}",
  936.                      " Ловкость          #{$data_enemies[i].params[6]}",
  937.                      " Удача             #{$data_enemies[i].params[7]}",
  938.                      "", "#{error}", "#{error2}"]
  939.         end
  940.       elsif $input_for_somebody[0] == ">ACTOR"
  941.         if command[0] == ">HELP"
  942.           help = []
  943.           if command[1] != nil
  944.             case command[1]
  945.               when "NAME";           help = [" !Переименовать героя", "  >NAME <имя>"]
  946.               when "CLASS";          help = [" !изменить класс герою", "  >NAME <ID>"]
  947.               when "LVL", "LEVEL";   help = [" !изменить уровень герою", "  >LVL <уровень> / >LEVEL <уровень>"]
  948.               when "MLVL", "MAXLVL"; help = [" !изменить максимальный уровень герою", "  >MLVL <уровень> / >MAXLVL <уровень>"]
  949.               when "LLVL", "MINLVL"; help = [" !изменить минимальный уровень герою", "  >LLVL <уровень> / >MINLVL <уровень>"]
  950.               when ">MHP", ">MMP", ">ATK", ">DEF", ">MAT", ">MDF", ">LUK", ">AGI"
  951.                 help = [" !изменить характеристики герою", "  #{command[1]} <значение> [!]"]
  952.               when ">DONE", ">END";  help = [" !завершить изменение героя", ""]
  953.             end
  954.           else
  955.             help_used = true
  956.             help = ["для подробностей введи >help <команда>" , ""]
  957.             help = ["для подробностей введи", ">help <команда>"] if $font_size2x
  958.           end
  959.           error = help[0]
  960.           error2 = help[1]
  961.                 end
  962.         if command[1] != nil
  963.           case command[0]
  964.             when ">NAME"; command.shift; $game_actors[$input_for_somebody[1]].name = command.join(" ").capitalize
  965.             when ">DONE"; $input_for_somebody = ["", 0, false]; Console_Commands.nul_text; Debug_Text.clear_text
  966.             when ">CLASS"; $game_actors[$input_for_somebody[1]].class_id = command[1].to_i
  967.             when ">LVL", ">LEVEL"; $game_actors[$input_for_somebody[1]].change_level(command[1].to_i, false) if ($data_actors[$input_for_somebody[1]].initial_level..$data_actors[$input_for_somebody[1]].max_level).include?(command[1].to_i)
  968.             when ">MAXLVL", ">MLVL"
  969.               $data_actors[$input_for_somebody[1]].max_level = command[1].to_i
  970.               $game_actors[$input_for_somebody[1]].change_level(command[1].to_i, false) if command[1].to_i < $game_actors[$input_for_somebody[1]].level
  971.             when ">MINLVL", ">LLVL"
  972.               $data_actors[$input_for_somebody[1]].initial_level = command[1].to_i
  973.               $game_actors[$input_for_somebody[1]].change_level(command[1].to_i, false) if command[1].to_i > $game_actors[$input_for_somebody[1]].level
  974.             when ">MHP", ">MMP", ">ATK", ">DEF", ">MAT", ">MDF", ">LUK", ">AGI";
  975.               params = [">MHP", ">MMP", ">ATK", ">DEF", ">MAT", ">MDF", ">AGI", ">LUK"]
  976.               i = $input_for_somebody[1]
  977.               par_id = params.index(command[0])
  978.               lvl = $game_actors[$input_for_somebody[1]].level
  979.               if command[2] != nil
  980.                 if command[2] == "!"
  981.                   ($data_actors[$input_for_somebody[1]].initial_level..$data_actors[$input_for_somebody[1]].max_level).each do |lv|
  982.                     $data_classes[$game_actors[i].class_id].params[par_id, lv] = command[1].to_i
  983.                   end
  984.                 end
  985.               else
  986.                 $data_classes[$game_actors[i].class_id].params[par_id, lvl] = command[1].to_i
  987.               end
  988.           end
  989.         end
  990.         if help_used
  991.           $output = [" ----=== ПОДСКАЗКИ ===---- ", " "," >name", " >class",
  992.                      " >lvl >level", " >maxlvl >mlvl", " >minlvl >llvl ",
  993.                      " >MHP", " >MMP", " >ATK", " >DEF", " >MAT", " >MDF",
  994.                      " >LUK", " >AGI", " >DONE", "", "#{error}", "#{error2}"]
  995.         else
  996.           $output = [" ----=== ИЗМЕНЕНИЕ ГЕРОЯ ===---- ", " ",
  997.                      " Имя               #{$game_actors[$input_for_somebody[1]].name}",
  998.                      " Класс             #{$game_actors[$input_for_somebody[1]].class_id} #{$data_classes[$data_actors[$input_for_somebody[1]].class_id].name}",
  999.                      " Уровень МИН/МАКС  #{$data_actors[$input_for_somebody[1]].initial_level}/#{$data_actors[$input_for_somebody[1]].max_level}",
  1000.                      " Текущий уровень   #{$game_actors[$input_for_somebody[1]].level}",
  1001.                      " Здоровье          #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[0, $game_actors[$input_for_somebody[1]].level]}",
  1002.                      " Магия             #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[1, $game_actors[$input_for_somebody[1]].level]}",
  1003.                      " Атака             #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[2, $game_actors[$input_for_somebody[1]].level]}",
  1004.                      " Защита            #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[3, $game_actors[$input_for_somebody[1]].level]}",
  1005.                      " Магическая атака  #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[4, $game_actors[$input_for_somebody[1]].level]}",
  1006.                      " Магическая защита #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[5, $game_actors[$input_for_somebody[1]].level]}",
  1007.                      " Ловкость          #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[6, $game_actors[$input_for_somebody[1]].level]}",
  1008.                      " Удача             #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[7, $game_actors[$input_for_somebody[1]].level]}",
  1009.                      "", "", "#{error}", "#{error2}"]
  1010.         end
  1011.       end    
  1012.       Console_Commands.output
  1013.       Console_Commands.nul_text
  1014.     else
  1015.       case command[0]
  1016.       #---------------------------------------------------------------------------
  1017.       #command >help  
  1018.       #---------------------------------------------------------------------------
  1019.         when ">HELP"
  1020.           $error = command[0]
  1021.           if command[1] != nil
  1022.             $output = [" -------------------------------- ", " -------===== ПОМОЩЬ =====------- ",
  1023.                        " -------------------------------- "]
  1024.             case command[1]
  1025.               when "MOVE"
  1026.                 if $font_size2x
  1027.                   $output += [" Переход на другую локацию: ", '  >move <id> <x> <y> <dir>',
  1028.                               '', ' id - номер карты', ' x, y - координаты', '  Начало отсчета координат идет с',
  1029.                               ' левого верхнего угла карты', '', 'dir - направление игрока',
  1030.                               ' 2 - вниз, 4 - влево', '6 - вправо, 8 - вверх']
  1031.                 else
  1032.                   $output += [" Переход на другую локацию: ", '  >move <id> <x> <y> <dir>', '',
  1033.                               '  id - номер карты, x, y - координаты', '   Начало отсчета координат идет с левого верхнего угла карты',
  1034.                               '  dir - направление игрока: ','   2 - вниз, 4 - влево, 6 - вправо, 8 - вверх']
  1035.                 end          
  1036.               when "KHAS"
  1037.                 if $khas_effect == true
  1038.                   if $font_size2x
  1039.                     $output += [" Изменение освещения используя    ", ' Khas Awesome Lights Effects      ', ' ', " Применение:",
  1040.                                 ' >khas lights <t> <r> <g> <b> <o>',  ' t - время в кадрах',
  1041.                                 ' r g b - цвет по схеме RGB',         ' o - прозрачность освещения']
  1042.                   else
  1043.                     $output += [" Изменение освещения используя скрипт Khas Awesome Lights Effects",
  1044.                                 ' ', "  Применение:", '   >khas lights <t> <r> <g> <b> <o>',  ' t - время в кадрах',
  1045.                                 ' r g b - цвет по схеме RGB', ' o - прозрачность освещения']
  1046.                   end
  1047.                 else
  1048.                   $output = ["Khas Awesome Light Effects <не установлен>"]
  1049.                   $output = ["Khas Awesome Light Effects", "<не установлен>"] if $font_size2x
  1050.                 end
  1051.               when "ITEMS", "WEAPONS", "ARMORS"
  1052.                 words = {"ITEMS" => ["ВЕЩАМИ", "ПРЕДМЕТОВ", "ПРЕДМЕТ"], "WEAPONS" => ["ОРУЖИЕМ", "ОРУЖИЯ", "ОРУЖИЕ"], "ARMORS" => ["БРОНЁЙ", "БРОНИ", "БРОНЮ"]}
  1053.                 if $font_size2x
  1054.                   $output += [" Манипуляция #{words[command[1]][0]}", " -Показать список #{words[command[1]][1]}",
  1055.                               "  >#{command[1]} list <ID 1> <ID 2>", " -Получить #{words[command[1]][2]}",
  1056.                               "  >#{command[1]} give <ID> <Count> ", ' -"Потерять" ' + words[command[1]][2],
  1057.                               "  >#{command[1]} lose <ID> <Count> ", "   lose может быть заменен на: lost, erase", ' ',
  1058.                               "   id - номер #{words[command[1]][2]} в базе данных ", '   Count - количество', ' ']
  1059.                 else
  1060.                   $output += [" Манипуляция #{words[command[1]][0]}",
  1061.                               "  >#{command[1]} list <ID 1> <ID 2> - Показать список #{words[command[1]][1]}",
  1062.                               "  >#{command[1]} give <ID> <Count> - Получить #{words[command[1]][2]}",
  1063.                               '  >' + command[1] + ' lose <ID> <Count> - "Потерять" ' + words[command[1]][2],
  1064.                               "   lose может быть заменен на: lost, erase", ' ',
  1065.                               "   id - номер #{words[command[1]][2]} в базе данных ", '   Count - количество', ' ']
  1066.                 end
  1067.               when "CLEAR", "MENU", "EXIT", "FONT"
  1068.                 words = {"CLEAR" => " Очистить консоль", "MENU" => " Выход в меню", "EXIT" => " Закрыть игру", "FONT" => "Переключить размер шрифта"}
  1069.                 $output += [words[command[1]], " >#{command[1]}"]
  1070.               when "SKILLS"
  1071.                 if $font_size2x
  1072.                   $output += [" Манипуляция навыками", " -Изучить навык", "  >skills learn actor <aID> <sID> ",
  1073.                               " -Забыть навык", "  >skills forget actor <aID> <sID>", " -Список навыков",
  1074.                               "  >skills list <ID 1> <ID 2>", ' ', ' actor <aID> может быть заменен на',
  1075.                               ' all. в этом случае будут навык ', ' изучать все герои в команде', ' ']
  1076.                 else
  1077.                   $output += [" Манипуляция навыками", "  >skills learn actor <aID> <sID> - Изучить навык",
  1078.                               "  >skills forget actor <aID> <sID> - Забыть навык", "  >skills list <ID 1> <ID 2> - Список навыков", ' ',
  1079.                               ' actor <aID> может быть заменен на all. в этом случае будут навык ', ' изучать все герои в команде', ' ']
  1080.                 end
  1081.               when "ACTOR"
  1082.                 if $font_size2x
  1083.                   $output += [" Манипуляция героями", " -Показать список героев",
  1084.                               "  >actor list <ID 1> <ID 2>", " -Добавить героя в команду",
  1085.                               "  >actor add <ID>", ' -Убрать героя из команды', '  >actor remove <ID>',
  1086.                               ' -Переименовать героя', '  >actor rename <ID> <Имя>',
  1087.                               ' -Изменить характеристики героя', '  >actor edit <ID> ', ' ']
  1088.                 else
  1089.                   $output += [" Манипуляция героями", "  >actor list <ID 1> <ID 2> - Показать список героев",
  1090.                               "  >actor add <ID> - Добавить героя в команду",'  >actor remove <ID> - Убрать героя из команды',
  1091.                               '  >actor rename <ID> <Имя> - Переименовать героя','  >actor edit <ID> -Изменить характеристики героя', ' ']
  1092.                 end
  1093.               when "TONE"
  1094.                 if $font_size2x
  1095.                   $output += [" Изменить оттенок экрана", " -Изменить оттнеок.",
  1096.                              "  >tone set <r> <g> <b> <c> <w>" " ", ' r g b - цвет по схеме RGB',
  1097.                              ' c - контраст (0 - 255)', ' w - ожидание в кадрах', ' ']
  1098.                 else
  1099.                   $output += [" Изменить оттенок экрана", "  >tone change <r> <g> <b> <c> <w> - Изменить оттнеок.",
  1100.                              " ", ' r g b - цвет по схеме RGB',
  1101.                              ' c - контраст (0 - 255)', ' w - ожидание в кадрах', ' ']
  1102.                 end
  1103.               when "ENEMY"
  1104.                 if $font_size2x
  1105.                   $output += [" Манипуляция врагами", " -Показать список врагов", "  >enemy list <ID 1> <ID 2>",
  1106.                               ' -Переименовать врага', '  >enemy rename <ID> <Имя> ', ' -Вызвать битву. ',
  1107.                               '  >enemy <summon_battle|sb> <tID> ', '                     <esc> <cont> ', ' tID => номер группы врагов', " ESC => Шанс побега (1/0)     ", " CONT => играть после поражения (1/0)",
  1108.                               ' ', " -Полностью изменить врага", "  >enemy edit <ID>  "]
  1109.                 else
  1110.                   $output += [" Манипуляция врагами",
  1111.                               "  >enemy list <ID 1> <ID 2> - Показать список врагов",
  1112.                               '  >enemy rename <ID> <Имя> - Переименовать врага',
  1113.                               '  >enemy <summon_battle|sb> <tID> <esc> <cont> - Вызвать битву.',
  1114.                               ' ', ' tID => номер группы врагов', " ESC => Шанс побега (1/0)     ",
  1115.                               " CONT => играть после поражения (1/0)", ' ', "  >enemy edit <ID> -Полностью изменить врага"]
  1116.                 end
  1117.               when "GOLD"
  1118.                 if $font_size2x
  1119.                   $output += [" Манипуляция деньгами", " -Получить деньги", "  >gold give <Количество> ",
  1120.                               " -Потерять деньги", "  >gold lost <Количество>", ' ']
  1121.                 else
  1122.                   $output += [" Манипуляция деньгами", "  >gold give <Количество> - Получить деньги",
  1123.                               "  >gold lost <Количество> - Потерять деньги", ' ']
  1124.                 end                
  1125.               when "BGM"
  1126.                 if $font_size2x
  1127.                   $output += [" Действия с фоновой музыкой", " -Воспроизвести мелодию", "  >bgm play <номер из списка>",
  1128.                               " -Остановить мелодию   ", "  >bgm <off|stop> *msec* ", " -Показать список мелодий",
  1129.                               "  >bgm list <ID1> <ID2>"]
  1130.                 else
  1131.                   $output += [" Действия с фоновой музыкой", "  >bgm play <номер из списка> - Воспроизвести мелодию",
  1132.                               "  >bgm <off|stop> *msec* - Остановить мелодию", "  >bgm list <ID1> <ID2> - Показать список мелодий"]
  1133.                 end
  1134.               when "TIMER"
  1135.                 if $font_size2x
  1136.                   $output += [" Управление таймером", " -Запустить таймер", "  >timer start <sec>" ,
  1137.                               ' -Остановить таймер', '  >timer stop', ' -Добавить времени к таймеру',
  1138.                               '  >timer add <sec>']        
  1139.                 else
  1140.                   $output += [" Управление таймером", "  >timer start <sec> - Запустить таймер" ,
  1141.                               '  >timer stop - Остановить таймер', '  >timer add <sec> - Добавить времени к таймеру']  
  1142.                 end
  1143.               when "SCREEN"
  1144.                 $output += [">screen show - Просветление экрана",">screen hide | Затемление экрана"]
  1145.               when "COMMONEVENT"
  1146.                 $output += [" Вызвать общее событие 1 раз", "  >commonevent <ID>"]
  1147.               when "WINDOW"
  1148.                 if $font_size2x
  1149.                   $output += [" Манипуляция окном", " -скрыть окно",
  1150.                               "  >window hide", " Оно будет активно, но его не ", " будет на панели задач  ",
  1151.                               " -изменить размер (растянуть)", "  >window resize <x> <y> <sx> <sy>",
  1152.                               " x, y - местоположение окна", " sx, sy - размер экрана в пикселях",
  1153.                               " -изменить размер игры", "  >window resize_game <sx> <sy>", ' ']
  1154.                 else
  1155.                   $output += [" Манипуляция окном", "  >window hide - скрыть окно",
  1156.                               "   Оно будет активно, но его не ", "   будет на панели задач  ",
  1157.                               "  >window resize <x> <y> <sx> <sy> -изменить размер (растянуть окно)",
  1158.                               "   x, y - местоположение окна", "   sx, sy - размер экрана в пикселях",
  1159.                               "  >window resize_game <sx> <sy> - изменить размер игры", ' ']
  1160.                 end
  1161.               when"HEAL"
  1162.                 if $font_size2x
  1163.                   $output += [" Восстановление партии", " >heal <actor|party> <hp|mp|tp> ", "                       <ID1> <ID2>", " "]
  1164.                 else
  1165.                   $output += [" Восстановление партии", " >heal <actor|party> <hp|mp|tp> <ID1> <ID2>", " "]
  1166.                 end
  1167.               when "SWITCH", "SW"
  1168.                 $output += [" Действия с переключателями", "  >switch <ID> <положение>", " ",
  1169.                             ' >switch имеет синоним >sw', ' >switch принимает true|ON|false|OFF']
  1170.               when "VARIABLE", "VAR"
  1171.                 $output += [" Действия с переменными", " >variable <ID> <число>", " ",
  1172.                             '>variable имеет синоним >var', '>variable принимает только числа']
  1173.               when "HELP"
  1174.                 $output += ["Зачем ты ввел эту команду?", 'Смотри >help']
  1175.               when "MAP"
  1176.                 if $font_size2x
  1177.                   $output += ["Информация о вашем местоположении",
  1178.                          " -Показать список локаций", "  >map list <ID 1> <ID 2>", ' - Показать координаты события',
  1179.                          '  >map event <ID>', ' -Показать скрытые события ', '  (заменяет текстуру событиям без',
  1180.                          '                          графики)', '  >map events show', ' -Перейти к событию ',
  1181.                          '  >map events <id> tp|teleport', ' -Подробная информация о карте', '  >map info',
  1182.                          ' -Вывести список случайных столкновений','  >map troop show']
  1183.                 else
  1184.                   $output += [" Информация о вашем местоположении",
  1185.                          "  >map list <ID 1> <ID 2> - Показать список локаций", '  >map event <ID> - Показать координаты события',
  1186.                          '  >map events show - Показать скрытые события ', '   (заменяет текстуру событиям без графики)',
  1187.                          '  >map events <id> tp|teleport - Перейти к событию ', '  >map info - Подробная информация о карте',
  1188.                          '  >map troop show - Вывести список случайных столкновений']
  1189.                 end
  1190.             end
  1191.             $output += [" -------------------------------- ", " -------===== ПОМОЩЬ =====------- ",
  1192.                        " -------------------------------- "]
  1193.           else
  1194.             if $font_size2x
  1195.               $output = [" -------------------------------- ", " ----==== Список команд =====---- ",
  1196.                          " -------------------------------- ", '>move    / >items  / ',
  1197.                          '>weapons / >armors / >skills / ',    '>actor   / >enemy  / >gold   / ',
  1198.                          '>bgm     / >map    / >menu   / ',    '>exit    / >tone   / >screen / ',
  1199.                          '>window  / >commonevent / >heal / ', '>switch  / >sw     / >help   /',
  1200.                          '>timer   / >variable / >var  /',     '>khas /','',
  1201.                          'Чтобы узнать больше подробностей,',  'введите ">help <команда>"',
  1202.                          " -------------------------------- ", " ----==== Список команд =====---- ",
  1203.                          " -------------------------------- "]
  1204.             else
  1205.               $output = [" -------------------------------- ", " ----==== Список команд =====---- ",
  1206.                          " -------------------------------- ", '>move   - перемещение игрока',
  1207.                          '>items  - действия с вещами', '>weapons - действия с оружием',
  1208.                          '>armors - действия с бронёй', '>skills - действия с навыками',
  1209.                          '>actor  - действия над героями', '>enemy  - действия над врагами',
  1210.                          '>gold   - действия над валютой', '>bgm    - действия над музыкой',
  1211.                          '>map    - действия над картами', '>menu   - выход в меню',
  1212.                          '>exit   - закрыть игру', '>tone   - оттенок экрана',
  1213.                          '>screen - манипуляция над видимостью в игре', '>window - манипуляция над окном игры',
  1214.                          '>commonevent - запуск общего события', '>heal   - восстановление героев',
  1215.                          '>switch / >sw - переключатели', '>help   - список команд / помощь по командам',
  1216.                          '>timer  - манипуляция над таймером', '>variable / >var - переменные',
  1217.                          '>khas   - действия со скриптами из Khas Avesome Light Effects', '',
  1218.                          'Чтобы узнать больше подробностей, введите ">help <команда>"',
  1219.                          " -------------------------------- ", " ----==== Список команд =====---- ",
  1220.                          " -------------------------------- "]
  1221.             end
  1222.           end
  1223.           Console_Commands.output
  1224.         #---------------------------------------------------------------------------
  1225.         #command >menu
  1226.         #---------------------------------------------------------------------------      
  1227.         when ">MENU"; SceneManager.goto(Scene_Title)
  1228.         #---------------------------------------------------------------------------
  1229.         #command >font
  1230.         #---------------------------------------------------------------------------      
  1231.         when ">FONT"; $font_size2x = !$font_size2x; Console_Commands.nul_text
  1232.         #---------------------------------------------------------------------------
  1233.         #command >exit
  1234.         #---------------------------------------------------------------------------      
  1235.         when ">EXIT"; SceneManager.exit
  1236.         #---------------------------------------------------------------------------
  1237.         #command >move
  1238.         #---------------------------------------------------------------------------      
  1239.         when ">MOVE"
  1240.           if command.size < 5
  1241.             Console_Commands.error
  1242.           else
  1243.             map_file = sprintf("Map%03d.rvdata2", command[1].to_i)
  1244.             if File.exist?("Data/#{map_file}") == false
  1245.               $output[0] = "Данной локации не существует."
  1246.             else
  1247.               $game_temp.fade_type = 0
  1248.               dir = command[4].to_i
  1249.               dir = $game_player.direction if ![2,4,6,8].include?(command[4].to_i)
  1250.               $output = ["Перемещение на карту #{command[1]}", "по координатам Х:#{command[2]} Y:#{command[3]}."]
  1251.               Console_Commands.output
  1252.               Graphics.wait(60)
  1253.               Console_Commands.exit
  1254.               $game_player.reserve_transfer(command[1].to_i, command[2].to_i, command[3].to_i, dir)
  1255.             end
  1256.           end
  1257.           Console_Commands.output if $reseted_switches != false
  1258.         #---------------------------------------------------------------------------
  1259.         #command >items
  1260.         #---------------------------------------------------------------------------      
  1261.         when ">WEAPONS", ">ARMORS", ">ITEMS"
  1262.           items = {">WEAPONS"=>$data_weapons, ">ITEMS"=>$data_items, ">ARMORS"=>$data_armors}
  1263.           cuttert_category = items[command[0]]
  1264.           case command[1]
  1265.             when "GIVE", "LOSE", "LOST", "ERASE"
  1266.               if command[2] != nil
  1267.                 amount = 1
  1268.                 amount = command[3].to_i if command[3] != nil
  1269.                 action = ["Добавлено", "Удалено"]
  1270.                 $game_party.gain_item(cuttert_category[command[2].to_i], amount) if command[1] == "GIVE"
  1271.                 $game_party.lose_item(cuttert_category[command[2].to_i], amount) if command[1] == "LOSE"
  1272.                 $output[0] = "#{action[command[1] == "GIVE" ? 0 : 1]}:"
  1273.                 $output[1] = cuttert_category[command[2].to_i].name.to_s
  1274.                 $output[2] = "в количестве #{amount}шт. "
  1275.               else
  1276.                 Console_Commands.error
  1277.               end
  1278.             when "LIST"
  1279.               command[2] == nil ? i = 1 : i = command[2].to_i
  1280.               command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
  1281.               index = 0
  1282.               $output[0] = "--==Список предметов с #{i} по #{j}==--"
  1283.               while i <= j
  1284.                 if cuttert_category[i] == nil
  1285.                   item = "<none>"  if cuttert_category[i] == nil
  1286.                 else
  1287.                   item = cuttert_category[i].name
  1288.                   item = "<без имени> " if cuttert_category[i].name == ""
  1289.                   space = sprintf("%-3d", i)
  1290.                 end
  1291.                 index += 1
  1292.                 $output[i] = "#{space}#{item}"
  1293.                 i += 1
  1294.               end
  1295.           else
  1296.             Console_Commands.error
  1297.           end
  1298.           Console_Commands.output
  1299.         #---------------------------------------------------------------------------
  1300.         #command >switch
  1301.         #---------------------------------------------------------------------------      
  1302.         when ">SWITCH", ">SW"
  1303.           if command[1] != nil
  1304.             if    command[2] == "TRUE"  or command[2] == "ON"
  1305.               $game_switches[command[1].to_i] = true
  1306.               $output[0] = "Переключатель №#{command[1].to_i} включен."
  1307.             elsif command[2] == "FALSE" or command[2] == "OFF"
  1308.               $game_switches[command[1].to_i] = false
  1309.               $output[0] = "Переключатель №#{command[1].to_i} выключен."
  1310.             else
  1311.               $output[0] = "Переключатель №#{command[1].to_i} => #{$game_switches[command[1].to_i]}"
  1312.             end
  1313.           else
  1314.             Console_Commands.error
  1315.           end
  1316.           Console_Commands.output
  1317.         #---------------------------------------------------------------------------
  1318.         #command >timer
  1319.         #---------------------------------------------------------------------------      
  1320.         when ">TIMER"
  1321.           if    command[1] == "START"
  1322.             if command[2] != nil
  1323.               $output[0] = "Таймер запущен"
  1324.               Console_Commands.output
  1325.               Graphics.wait(60)
  1326.               $game_timer.start(command[2].to_i * Graphics.frame_rate)
  1327.               Console_Commands.exit
  1328.             else
  1329.               Console_Commands.error
  1330.             end
  1331.           elsif  command[1] == "ADD"
  1332.             if command[2] != nil
  1333.               a = $game_timer.sec
  1334.               $game_timer.stop
  1335.               sec = $game_timer.sec + command[2].to_i
  1336.               $output[0] = "Добавлено #{command[2]} секунд"
  1337.               Console_Commands.output
  1338.               Graphics.wait(60)
  1339.               $game_timer.start(sec * Graphics.frame_rate)
  1340.               Console_Commands.exit
  1341.             else
  1342.               Console_Commands.error
  1343.             end
  1344.           elsif command[1] == "STOP"
  1345.             $output[0] = "Таймер остановлен"
  1346.             Console_Commands.output
  1347.             $game_timer.stop
  1348.           else
  1349.             Console_Commands.error
  1350.           end
  1351.         #---------------------------------------------------------------------------
  1352.         #command >variable
  1353.         #---------------------------------------------------------------------------      
  1354.         when ">VARIABLE", ">VAR"
  1355.           if command[1] != nil
  1356.             if    command[2] != nil
  1357.               $game_variables[command[1].to_i] = command[2].to_i
  1358.               $output[0] = "Переменная №#{command[1].to_i} теперь равна #{$game_variables[command[1].to_i]}"
  1359.             else
  1360.               $output[0] = "Переменная №#{command[1].to_i} равна #{$game_variables[command[1].to_i]}"
  1361.             end
  1362.           else
  1363.             Console_Commands.error
  1364.           end
  1365.           Console_Commands.output
  1366.         #---------------------------------------------------------------------------
  1367.         #command >skills
  1368.         #---------------------------------------------------------------------------      
  1369.         when ">SKILLS"
  1370.           if command[1] == "LEARN"
  1371.             if command[2] == "ACTOR" and  command[3] != nil and command[4] != nil
  1372.               $game_actors[command[3].to_i].learn_skill(command[4].to_i)
  1373.               $output[0] = $game_actors[command[3].to_i].name.to_s + " изучает навык " + $data_skills[command[4].to_i].name.to_s
  1374.               $output[1] = ' '
  1375.             elsif command[2] == "ALL" and command[3] != nil
  1376.               $game_party.members.each { |actor| actor.learn_skill(command[3].to_i) }
  1377.               $output[0] = "Все изучили навык " + $data_skills[command[3].to_i].name.to_s
  1378.               $output[1] = ' '
  1379.             else
  1380.               Console_Commands.error
  1381.             end
  1382.           elsif command[1] == "FORGET"
  1383.             if command[2] == "ACTOR" and command[3] != nil and command[4] != nil
  1384.               $game_actors[command[3].to_i].forget_skill(command[4].to_i)
  1385.               $output[0] = $game_actors[command[3].to_i].name.to_s + " забывает навык " + $data_skills[command[4].to_i].name.to_s
  1386.             elsif command[2] == "ALL" and command[3] != nil
  1387.               $game_party.members.each { |actor| actor.forget_skill(command[3].to_i) }
  1388.               $output[0] = "Все забыли навык " + $data_skills[command[3].to_i].name.to_s
  1389.             else
  1390.               Console_Commands.error
  1391.             end
  1392.           elsif command[1] == "LIST"
  1393.             command[2] == nil ? i = 1 : i = command[2].to_i
  1394.             command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
  1395.             index = 0
  1396.             $output[0] = "Список навыков с #{i} по #{j}"
  1397.             while i <= j
  1398.               if $data_skills[i] == nil
  1399.                 item = "<none>"  if $data_skills[i] == nil
  1400.               else
  1401.                 item = $data_skills[i].name
  1402.                 item = "<без имени> " if $data_skills[i].name == ""
  1403.                 space = sprintf("%-3d", i)
  1404.               end
  1405.               index += 1
  1406.               $output[i] = "#{space}#{item}"
  1407.               i += 1
  1408.             end
  1409.             Console_Commands.output
  1410.           else
  1411.             Console_Commands.error
  1412.           end
  1413.           Console_Commands.output if command[1] != "LIST"
  1414.         #---------------------------------------------------------------------------
  1415.         #command >actor
  1416.         #---------------------------------------------------------------------------      
  1417.         when ">ACTOR"
  1418.           if    command[1] == "EDIT" and command[2] != nil #ID героя
  1419.             $input_for_somebody[2] = true
  1420.             $input_for_somebody[1] = command[2].to_i
  1421.             $input_for_somebody[0] = command[0]
  1422.             Console_Commands.input_command
  1423.           elsif command[1] == "ADD" and command[2] != nil
  1424.             $game_party.add_actor(command[2].to_i)
  1425.             $output[0] = "#{$game_actors[command[2].to_i]} присоединяется в команду"
  1426.           elsif command[1] == "REMOVE" and command[2] != nil
  1427.             $game_party.remove_actor(command[2].to_i)
  1428.             $output[0] = "#{$game_actors[command[2].to_i]} покидает команду"
  1429.           elsif command[1] == "LIST"
  1430.             command[2] == nil ? i = 1 : i = command[2].to_i
  1431.             command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
  1432.             $output[0] = "ID  Имя         ЛВЛ МиЛВЛ МаЛВЛ MHP  MMP  ATK  DEF  MAT  MDF  AGI  LUK"
  1433.             out_int = 1
  1434.             while i <= j
  1435.               if $game_actors[i] == nil
  1436.                 $output[out_int] = "#{sprintf("%-3d", i)}<Персонажа нет в базе данных>"
  1437.               else
  1438.                                 id = sprintf("%-3d", i)
  1439.                 #--------------
  1440.                 name = sprintf("%-10s",$game_actors[i].name)
  1441.                 name = name[0..8] + "~" if name.size > 10
  1442.                 name = "<без имени>" if name == ""
  1443.                 #--------------
  1444.                                 current_lvl = sprintf("%-4d", $game_actors[i].level)
  1445.                 #--------------
  1446.                                 minlvl = sprintf("%-4d", $data_actors[i].initial_level)
  1447.                 #--------------
  1448.                                 maxlvl = sprintf("%-4d", $data_actors[i].max_level)
  1449.                 #--------------
  1450.                                 states = ""
  1451.                                 (0..7).each do |x|
  1452.                                   hp = $data_classes[$game_actors[i].class_id].params[x, $game_actors[i].level]
  1453.                                     thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
  1454.                                     states += sprintf("%-5s", thp)
  1455.                                 end
  1456.                 $output[out_int] = "#{id}#{outputname} #{current_lvl}#{minlvl}#{maxlvl}#{states}"
  1457.               end
  1458.                             out_int += 1
  1459.               i+=1
  1460.             end
  1461.             puts ' '
  1462.           else
  1463.             Console_Commands.error
  1464.           end
  1465.           Console_Commands.output
  1466.         #---------------------------------------------------------------------------
  1467.         #command >heal
  1468.         #---------------------------------------------------------------------------
  1469.         when ">HEAL" #command
  1470.           if command[1]    == "ACTOR"
  1471.             if ["HP", "MP", "TP", "ALL"].include?(command[2])
  1472.               command[3] == nil ? Console_Commands.error : one = command[3].to_i
  1473.               command[4] == nil ? two = one              : two = command[4].to_i
  1474.               out_int = 0
  1475.               (one..two).each do |x|
  1476.                 $game_party.members[x].hp = 99999999 if ["HP", "ALL"].inclunde?(command[2])
  1477.                 $game_party.members[x].mp = 99999999 if ["MP", "ALL"].inclunde?(command[2])
  1478.                 $game_party.members[x].tp = 99999999 if ["TP", "ALL"].inclunde?(command[2])
  1479.                                 Audio.se_play("Audio/SE/Absorb2")    if ["HP", "ALL"].inclunde?(command[2])
  1480.                                 Audio.se_play("Audio/SE/Barrier")    if ["MP", "ALL"].inclunde?(command[2])
  1481.                                 Audio.se_play("Audio/SE/Collapse3")  if ["TP", "ALL"].inclunde?(command[2])
  1482.                 $output[out_int] = "#{$game_party.members[x].name} #{command[2] == "ALL" ? "полностью восстанавливается!" : "восстанавливает #{command[2]}!"}"
  1483.                 out_int += 1
  1484.               end
  1485.                         else
  1486.                             Console_Commands.error
  1487.             end    
  1488.           elsif command[1] == "PARTY"
  1489.             if ["HP", "MP", "TP", "ALL"].include?(command[2])
  1490.               $game_party.all_members.each do |x|
  1491.                 x.hp = 99999999 if ["HP", "ALL"].inclunde?(command[2])
  1492.                 x.mp = 99999999 if ["MP", "ALL"].inclunde?(command[2])
  1493.                 x.tp = 99999999 if ["TP", "ALL"].inclunde?(command[2])
  1494.               end
  1495.               $output[0] = "Команда #{command[2] == "ALL" ? "полностью восстанавливается!" : "восстанавливает #{command[2]}!"}"
  1496.                             Audio.se_play("Audio/SE/Absorb2")    if ["HP", "ALL"].inclunde?(command[2])
  1497.                             Audio.se_play("Audio/SE/Barrier")    if ["MP", "ALL"].inclunde?(command[2])
  1498.                             Audio.se_play("Audio/SE/Collapse3")  if ["TP", "ALL"].inclunde?(command[2])
  1499.                         else
  1500.                             Console_Commands.error
  1501.                         end
  1502.           else
  1503.             Console_Commands.error
  1504.           end
  1505.           Console_Commands.output
  1506.         #---------------------------------------------------------------------------
  1507.         #command >enemy
  1508.         #---------------------------------------------------------------------------      
  1509.         when ">ENEMY" #command
  1510.           if command[1] == "EDIT" and command[2] != nil
  1511.             $input_for_somebody[2] = true
  1512.             $input_for_somebody[1] = command[2].to_i
  1513.             $input_for_somebody[0] = command[0]
  1514.             Console_Commands.input_command
  1515.           elsif (command[1] == "SUMMON_BATTLE" or command[1] == "SB") and command[2] != nil
  1516.             troop_id = command[2].to_i
  1517.             esc = false if command[3] == nil or command[3] == "0"#Can Escape?
  1518.             esc = true if command[3] == "1"
  1519.             cont = false if command[4] == nil or command[4] == "0"#Continue?
  1520.             cont = true if command[4] == "1" #Continue?
  1521.             BattleManager.setup(troop_id, esc, cont)
  1522.             $game_player.make_encounter_count
  1523.             SceneManager.call(Scene_Battle)
  1524.             Console_Commands.nul_text
  1525.             $debug_zone.bitmap.clear
  1526.             $reseted_switches = false
  1527.           elsif command[1] == "LIST"
  1528.             command[2] == nil ? i = 1 : i = command[2].to_i
  1529.             command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
  1530.             $output[0] = "ID  NAME  MHP MMP ATK DEF MAT MDF AGI LUK"
  1531.             out_int = 1
  1532.             (i..j).each do |id|
  1533.               if $data_enemies[i] == nil
  1534.                                 $output[out_int] = sprintf("%-4sn/a", i.to_s)
  1535.               else
  1536.                 temp_text = ""
  1537.                 temp_text += sprintf("%-4d", id)
  1538.                                 name = $data_enemies[id].name
  1539.                                 name = $data_enemies[id].name.size > 5 ? "#{$data_enemies[id].name[0...4]}~ " : sprintf("%-6s", $data_enemies[id].name != "" ? $data_enemies[id].name : n/a)
  1540.                                 temp_text += name
  1541.                 (0..7).each do |par|
  1542.                                     hp = $data_enemies[id].params[par]
  1543.                                     thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
  1544.                   temp_text   += sprintf("%-4s", thp)
  1545.                 end
  1546.                                 hp = $data_enemies[id].exp
  1547.                                 thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
  1548.                 temp_text   += sprintf("%-4s", thp)
  1549.                
  1550.                 hp = $data_enemies[id].gold
  1551.                                 thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
  1552.                 temp_text   += sprintf("%-4s", thp)
  1553.                  
  1554.                 p temp_text
  1555.                
  1556.                 $output.push(temp_text)
  1557.               end
  1558.                             out_int +=1
  1559.             end
  1560.           elsif command[1] == "SHOW" or command[1] == "INFO"
  1561.             if command[2].to_i != 0
  1562.               $enemy = Sprite.new
  1563.               $enemy.bitmap = Bitmap.new("Graphics/Battlers/" + $data_enemies[command[2].to_i].battler_name )
  1564.               $enemy.x = 360
  1565.               $enemy.y = 280
  1566.               $enemy.ox = $enemy.bitmap.width / 2
  1567.               $enemy.oy = $enemy.bitmap.height
  1568.               x = 20
  1569.               y = 90
  1570.               Debug_Text.draw_word("Имя: " + $data_enemies[command[2].to_i].name, x, y)
  1571.               (0..7).each do |par|
  1572.                 Debug_Text.draw_word(" #{Vocab.param(par)}: #{$data_enemies[command[2].to_i].params[par]}", x, y + 20 + (20 * par))
  1573.               end
  1574.               Debug_Text.draw_word(" #{Vocab.currency_unit}: #{$data_enemies[command[2].to_i].gold}", x, y + 180)
  1575.               Debug_Text.draw_word(" EXP: #{$data_enemies[command[2].to_i].exp}", x, y + 200)
  1576.              
  1577.               (0..2).each do |item|
  1578.                 name = "Ничего"
  1579.                 item_id = $data_enemies[command[2].to_i].drop_items[item].data_id
  1580.                 kind_id = $data_enemies[command[2].to_i].drop_items[item].kind
  1581.                 denominator = $data_enemies[command[2].to_i].drop_items[item].denominator
  1582.                
  1583.                 name = $data_items[item_id].name if kind_id == 1
  1584.                 name = $data_weapons[item_id].name if kind_id == 2
  1585.                 name = $data_armors[item_id].name if kind_id == 3
  1586.                
  1587.                 Debug_Text.draw_word(" Дроп #{item +1}: #{name} | 1 к #{denominator}", x, y + 220 + (20 * item))  
  1588.               end
  1589.              
  1590.             end
  1591.  
  1592.           else
  1593.             Console_Commands.error
  1594.           end
  1595.           Console_Commands.output
  1596.         #---------------------------------------------------------------------------
  1597.         #command /window
  1598.         #---------------------------------------------------------------------------  
  1599.         when ">WINDOW"
  1600.           if command[1] == "HIDE"
  1601.             ShowWindow.call(HWND, 0)
  1602.           elsif command[1] == "RESIZE" and command[2] != nil and command[3] != nil and command[4] != nil and command[5] != nil
  1603.             SetWindowPos.call(HWND, -2, command[2].to_i, command[3].to_i, command[4].to_i, command[5].to_i, 0)
  1604.           elsif command[1] == "RESIZE_GAME" and command[2] != nil and command[3] != nil
  1605.             Graphics.resize_screen(command[2].to_i, command[3].to_i)
  1606.           else
  1607.             Console_Commands.error
  1608.           end
  1609.         #---------------------------------------------------------------------------
  1610.         #command >gold
  1611.         #---------------------------------------------------------------------------
  1612.         when ">GOLD"
  1613.           if command[1] == "GIVE" and command[2] != nil
  1614.             $game_party.gain_gold(command[2].to_i)
  1615.             $output = ["Команда получает " + command[2].to_s + " #{Vocab.currency_unit[0]}.", "Сейчас имеется #{$game_party.gold} #{Vocab.currency_unit[0]}."]
  1616.           elsif command[1] == "LOSE" and command[2] != nil
  1617.             $game_party.lose_gold(command[2].to_i)
  1618.             $output = ["Команда теряет " + command[2].to_s + " #{Vocab.currency_unit[0]}.", "Сейчас имеется #{$game_party.gold} #{Vocab.currency_unit[0]}."]
  1619.           else
  1620.             Console_Commands.error
  1621.           end    
  1622.           Console_Commands.output
  1623.         #---------------------------------------------------------------------------
  1624.         #command >tone
  1625.         #---------------------------------------------------------------------------
  1626.         when ">BGM"
  1627.           if command[1] == "LIST"
  1628.             command[2] == nil ? i = 1 : i = command[2].to_i
  1629.             command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
  1630.             index = 0
  1631.             $output[0] = "Список музыки с #{i} по #{j}"
  1632.             output_inyeger = 1
  1633.             while i <= j
  1634.               if $all_bgm[i] == nil
  1635.                 item = "<none>"  if $all_bgm[i] == nil
  1636.               else
  1637.                                 item = "#{sprintf("%-4s",i)}#{$all_bgm[i] == "" ? "n/a":$all_bgm[i]}"
  1638.               end
  1639.                             index += 1
  1640.               $output[output_inyeger] = item
  1641.               output_inyeger += 1
  1642.               i += 1
  1643.             end
  1644.           elsif command[1] == "PLAY"
  1645.             if command[2] != nil
  1646.               if $all_bgm[command[2].to_i] == nil
  1647.                 command[2] = -1
  1648.                 $output[0] = "Данной музыки нет в списке"
  1649.                 $output[1] = "Музыка сменена на #{$all_bgm[command[2].to_i]}"
  1650.                 Audio.bgm_play("#{RTP_path}Audio/BGM/#{$all_bgm[command[2].to_i]}")
  1651.               else
  1652.                 Audio.bgm_play("Audio/BGM/#{$all_bgm[command[2].to_i]}") if File.exist?("Audio/BGM/#{$all_bgm[command[2].to_i]}")
  1653.                 Audio.bgm_play("Audio/BGM/#{$all_bgm[command[2].to_i]}") if $rtpbgm_files.include?($all_bgm[command[2].to_i])
  1654.                 $output[0] = "Музыка сменена на #{$all_bgm[command[2].to_i]}"
  1655.               end
  1656.             else
  1657.               Console_Commands.error
  1658.             end
  1659.           elsif command[1] == "OFF" or command[1] == "STOP"
  1660.             if command[2] == nil
  1661.               Audio.bgm_stop
  1662.               $output[0] = "Музыка выключена"
  1663.             else
  1664.               Audio.bgm_fade(command[2].to_i)
  1665.               sec = command[2].to_i / 1000.0
  1666.               index = sec.to_s.index(".")
  1667.               $output[0] = "Музыка выключится через #{sec.to_s[0..(index + 1)]} секунд"
  1668.               if sec > 300
  1669.                 min = sec / 60.0
  1670.                 $output[0] = "Музыка выключится через #{min.to_s[0..(index + 1)]} минут"
  1671.               end
  1672.             end
  1673.           else
  1674.             Console_Commands.error
  1675.           end
  1676.           Console_Commands.output
  1677.         #---------------------------------------------------------------------------
  1678.         #command >tone
  1679.         #---------------------------------------------------------------------------
  1680.         when ">TONE"
  1681.           if ["SET", "CHANGE"].include?(command[1]) and command[2] != nil and command[3] != nil and command[4] != nil and command[5] != nil and command[6] != nil
  1682.             $game_map.screen.start_tone_change(Tone.new(command[2].to_i, command[3].to_i, command[4].to_i, command[5].to_i), command[6].to_i)
  1683.           else
  1684.             Console_Commands.error
  1685.           end    
  1686.         #---------------------------------------------------------------------------
  1687.         #command >screen
  1688.         #---------------------------------------------------------------------------
  1689.         when ">KHAS"
  1690.           if $khas_effect == true
  1691.             if command[1] == "LIGHTS"
  1692.               if command[2] != nil and command[3] != nil and command[4] != nil and command[5] != nil
  1693.                 if command[6].to_i != nil
  1694.                   a = [command[2].to_i, command[3].to_i, command[4].to_i, command[5].to_i]
  1695.                   s = $game_map.effect_surface
  1696.                   s.change_color(a[0],a[1],a[2],a[3],command[6].to_i)
  1697.                 else
  1698.                   s.change_color(a[0],a[1],a[2],a[3])
  1699.                 end  
  1700.                 $output[0] = "Измененяем освещение"
  1701.               else    
  1702.                 Console_Commands.error
  1703.               end
  1704.             else
  1705.               Console_Commands.error
  1706.             end  
  1707.           else
  1708.                       if $font_size2x
  1709.                             $output = ["Khas Awesome Light Effects", "                    не установлен!"]
  1710.                         else
  1711.                           $output = ["Khas Awesome Light Effects не установлен!"]
  1712.                         end
  1713.                        
  1714.           end    
  1715.                     Console_Commands.output
  1716.         #---------------------------------------------------------------------------
  1717.         #command >screen
  1718.         #---------------------------------------------------------------------------
  1719.         when ">SCREEN"
  1720.           $error = command[0]
  1721.           if command[1] == "SHOW"
  1722.             Graphics.fadein(command[2].to_i) if command[2] != nil
  1723.             Graphics.fadein(1)               if command[2] == nil
  1724.           elsif command[1] == "HIDE"
  1725.                         Graphics.fadeout(command[2].to_i) if command[2] != nil
  1726.             Graphics.fadeout(1)               if command[2] == nil
  1727.           elsif command[1] == "SIZE"
  1728.             setCursorPos  = Win32API.new('user32', 'SetCursorPos' , 'iiiiiii' ,'i')
  1729.             getCursorXY   = Win32API.new("user32", 'GetCursorPos' , 'P'       , "V")
  1730.             result = "0"*8
  1731.             getCursorXY.call(result)
  1732.             $mouse_x, $mouse_y = result.unpack("LL")
  1733.             setCursorPos.call(9999,9999,0,0,0,0, 0)
  1734.             window = "0"*8 #
  1735.             getCursorXY.call(window)
  1736.             $win_x, $win_y = window.unpack("LL")
  1737.             $output[0] = "Твоё разрешение экрана " + ($win_x + 1).to_s + "x" + ($win_y + 1).to_s
  1738.             setCursorPos.call($mouse_x,$mouse_y,0,0,0,0, 0)
  1739.           else
  1740.             Console_Commands.error
  1741.           end
  1742.           Console_Commands.output
  1743.         #---------------------------------------------------------------------------
  1744.         #command >clear
  1745.         #---------------------------------------------------------------------------
  1746.         when ">CLEAR"; Debug_Text.clear_bitmap
  1747.         #---------------------------------------------------------------------------
  1748.         #command >commonevent
  1749.         #---------------------------------------------------------------------------
  1750.         when ">COMMONEVENT", "CE"
  1751.           if command[1] == nil
  1752.             Console_Commands.error
  1753.           else
  1754.             Console_Commands.exit
  1755.             $game_temp.reserve_common_event(command[1].to_i)
  1756.           end
  1757.         #---------------------------------------------------------------------------
  1758.         #command >map
  1759.         #---------------------------------------------------------------------------
  1760.         when ">MAP"
  1761.           if command[1] == "TROOP"
  1762.             if command[2] == "SHOW"
  1763.               out_int = 0
  1764.               max =  (Graphics.height - 35) / 18
  1765.               while out_int < max
  1766.                 if $game_map.encounter_list[out_int] == nil
  1767.                   $output[out_int] = "#{out_int + 1} <none>"
  1768.                 else
  1769.                   $output[out_int] = "#{out_int + 1} #{$data_troops[$game_map.encounter_list[out_int].troop_id.to_i].name}"
  1770.                 end
  1771.                 out_int += 1
  1772.                 puts out_int
  1773.               end
  1774.             else
  1775.               Console_Commands.error
  1776.             end
  1777.           elsif command[1] == "INFO"
  1778.             a = $game_map.map_id
  1779.             if $game_map.encounter_list[0].nil? == true
  1780.               encounters = "<none>"
  1781.             else
  1782.               encounters = Array.new
  1783.               var1 = 0
  1784.               new_arr = $game_map.encounter_list
  1785.               while new_arr[var1.to_i] != nil
  1786.                 encounters[var1.to_i] = $data_troops[new_arr[var1.to_i].troop_id.to_i].name
  1787.                 var1 += 1
  1788.               end
  1789.             end
  1790.             if $game_map.parallax_name == ""
  1791.               parall = "<none>"
  1792.             else
  1793.               parall = $game_map.parallax_name
  1794.             end
  1795.             $game_map.disable_dash? == true ? run = "Да" : run = "Нет"
  1796.             $game_map.loop_vertical? == true ? vert = "ВКЛ" : vert = "ВЫКЛ"
  1797.             $game_map.loop_horizontal? == true ? hor = "ВКЛ" : hor = "ВЫКЛ"
  1798.             $output = ["Имя карты", "  #{$data_mapinfos[a].name}", "ID карты                   #{a}", "Размеры карты              #{$game_map.width}x#{$game_map.height}",
  1799.                        "Событий на этой карте      #{$game_map.events.size}","Случайные столкновения?", "  #{encounters}", "Имя файла для параллакса", "  #{parall}",
  1800.                                              "Бег отключён?              #{run}", "Вертикальная прокрутка?    #{vert}", "Горизонтальная прокрутка?  #{hor}", "Регион на котором ты стоишь #{$game_player.region_id}",
  1801.                                              "Тэг территории на котором ты стоишь #{$game_player.terrain_tag}"]
  1802.           elsif command[1] == "EVENT"
  1803.             if command[2] == nil
  1804.               tile_num = $game_map.width * $game_map.height
  1805.               num1 = 0
  1806.               num2 = 1
  1807.               while num1 != tile_num
  1808.                 if $game_map.events[num1.to_i] != nil
  1809.                   event_num = sprintf("%-3d", num2)
  1810.                   ev_x = $game_map.events[num1.to_i].x
  1811.                   ev_y = $game_map.events[num1.to_i].y
  1812.                     ox = sprintf("%-4d", ev_x)
  1813.                                     oy = sprintf("%-4d", ev_x)
  1814.                   $output[num1 - 1] = event_num.to_s + " X:" + ox.to_s + " Y:" + oy.to_s
  1815.                   num2 +=1
  1816.                 end
  1817.                 num1 +=1
  1818.               end
  1819.             else
  1820.               $output[0] = command[2].to_s + " X:" + $game_map.events[command[2].to_i].x.to_s + " Y:" + $game_map.events[command[2].to_i].y.to_s
  1821.             end
  1822.           elsif command[1] == "EVENTS"
  1823.             if command[2] == "SHOW"
  1824.               $map_events_show = Array.new(300)
  1825.               events = Array.new(300)
  1826.               a = 1
  1827.               b = $game_map.width * $game_map.height
  1828.               while a <= b
  1829.                 unless $game_map.events[a].nil?
  1830.                   if $game_map.events[a].character_name == ""
  1831.                     $game_map.events[a].set_graphic('!Flame',5)
  1832.                     events[a] = 'edited'
  1833.                   else
  1834.                     events[a] = 'nope'
  1835.                   end
  1836.                 else
  1837.                   events[a] = '_'
  1838.                 end
  1839.                 a+=1
  1840.               end
  1841.               $map_events_show[$game_map.map_id] = events
  1842.               Console_Commands.exit
  1843.             elsif command[2] == "SHOW_ARRIVE"
  1844.               print $map_events_show[$game_map.map_id]
  1845.             elsif command[2] != nil
  1846.               if command[3] == "TP" or command[3] == "TELEPORT"
  1847.                 $game_temp.fade_type = 2
  1848.                 $game_player.reserve_transfer($game_map.map_id, $game_map.events[command[2].to_i].x, $game_map.events[command[2].to_i].y, 2)
  1849.               end
  1850.             end
  1851.           elsif command[1] == "LIST"
  1852.             command[2] == nil ? a = 1 : i = command[2].to_i
  1853.             command[3] == nil ? j = a + ($font_size2x ? 16 : 37) : j = command[3].to_i
  1854.             $output[0] = 'ID  Имя карты'
  1855.             while a <= j
  1856.               map_file = sprintf("Map%03d.rvdata2", a)
  1857.               if File.exist?("Data/#{map_file}") == false
  1858.                                 b = sprintf("%-9d", a)
  1859.                 $output[a] = b.to_s + '<none>  '
  1860.               else
  1861.                                 id = sprintf("%-5d", a)
  1862.                 name_map = $data_mapinfos[a].name
  1863.                 $output[a] = "#{id}#{name_map}"
  1864.               end
  1865.               a+=1
  1866.             end
  1867.           else
  1868.             Console_Commands.error
  1869.           end
  1870.           Console_Commands.output
  1871.         #---------------------------------------------------------------------------
  1872.         #Конец
  1873.         #---------------------------------------------------------------------------  
  1874.         else
  1875.           $error = ">HELP"
  1876.           Console_Commands.error
  1877.         end  
  1878.       end
  1879.   end
  1880. end
  1881.  
  1882. class Debug_Text
  1883.   @color = nil
  1884.   def self.set_color(r, g, b)
  1885.     @color = Color.new(r, g, b)
  1886.   end
  1887.   def self.clear_text
  1888.     create_text_bitmap if $words == nil
  1889.     if  $words.bitmap.disposed? == false
  1890.       $words.bitmap.clear_rect(0, Graphics.height - 20, Graphics.width, 90)
  1891.     end
  1892.   end
  1893.   def self.clear_bitmap
  1894.     create_text_bitmap if $words == nil
  1895.     $words = nil
  1896.   end
  1897.   def self.clear_hint
  1898.     $words.bitmap.clear_rect(0, Graphics.height - 68, Graphics.width - 120, 48)
  1899.   end
  1900.  
  1901.  
  1902.   def self.create_text_bitmap
  1903.     $words = Sprite.new
  1904.     $words.bitmap = Bitmap.new(Graphics.width, Graphics.height)
  1905.     $words.z = 100
  1906.     Graphics.update
  1907.   end
  1908.  
  1909.   def self.draw_word(word, x, y)
  1910.     (0...word.size).each do |l|
  1911.       draw_letter(word[l].upcase, x + (16 * l), y)
  1912.     end
  1913.     @color = nil
  1914.   end
  1915.  
  1916.   def self.fill_rects(*arr)
  1917.     create_text_bitmap if  $words.bitmap.disposed?
  1918.     black = Color.new(0, 0, 0)
  1919.     arr.each do |a|
  1920.       $words.bitmap.fill_rect(a[0]/2+1, a[1]/2+1, a[2]/2, a[3]/2, black) if !$font_size2x
  1921.       $words.bitmap.fill_rect(a[0]+2, a[1]+2, a[2], a[3], black) if $font_size2x
  1922.     end
  1923.     arr.each do |a|
  1924.       color = Color.new(255, 255, 255)
  1925.       color = a[4] if a[4] != nil
  1926.       color = @color if @color != nil
  1927.       $words.bitmap.fill_rect(a[0]/2, a[1]/2, a[2]/2, a[3]/2, color) if !$font_size2x
  1928.       $words.bitmap.fill_rect(a[0], a[1], a[2], a[3], color) if $font_size2x
  1929.     end
  1930.   end
  1931.  
  1932.   def self.draw_icon(name, x, y)
  1933.     a = name.split(", ")
  1934.     i = 0
  1935.     while a[i] != nil
  1936.       p a[i]
  1937.       case a[i].upcase
  1938.       when "HP", "MP", "ATK", "DEF", "MAT", "MDF", "AGI", "LUK"; draw_letter(a[i], x + (i * 16),y)
  1939.       when "_"; draw_letter(" ", x + (i * 16),y)
  1940.       end
  1941.       i += 1
  1942.     end
  1943.   end
  1944.   def self.draw_letter(letter, x, y)
  1945.     create_text_bitmap if $words == nil
  1946.     case letter
  1947.       when "A", "А", "а";  fill_rects([x+4, y, 6, 2], [x+2, y+2, 4, 2], [x+8, y+2, 4, 2], [x, y+4, 4, 10], [x+10, y+4, 4, 10], [x+4, y+8, 6, 2])
  1948.     when "B", "В", "в";  fill_rects([x, y, 12, 2], [x, y+6, 12, 2], [x, y+12, 12, 2], [x, y, 4, 14], [x+10, y+2, 4, 4], [x+10, y+8, 4, 4])
  1949.     when "C", "С", "с";  fill_rects([x+4, y, 8, 2], [x+2, y+2, 4, 2], [x+10, y+2, 4, 2], [x, y+4, 4, 6], [x+4, y+12, 8, 2], [x+2, y+10, 4, 2], [x+10, y+10, 4, 2])
  1950.     when "D";       fill_rects([x, y, 4, 14], [x, y, 10, 2], [x+8, y+2, 4, 2], [x+10, y+4, 4, 6], [x+8, y+10, 4, 2], [x, y+12, 10, 2])
  1951.     when "E", "Е", "е";  fill_rects([x, y, 4, 14], [x, y, 14, 2], [x, y+12, 14, 2], [x, y+6, 12, 2])
  1952.     when "F";       fill_rects([x, y, 14, 2], [x, y, 4, 14], [x, y+6, 12, 2])
  1953.     when "G";       fill_rects([x+4, y, 10, 2], [x+2, y+2, 4, 2], [x, y+4, 4, 6], [x+2, y+10, 4, 2], [x+4, y+12, 10, 2], [x+10, y+6, 4, 6], [x+8, y+6, 2, 2])
  1954.     when "H", "Н", "н";  fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+4, y+6, 6, 2])
  1955.     when "I";       fill_rects([x+2, y, 12, 2], [x+2, y+12, 12, 2], [x+6, y, 4, 14])
  1956.     when "J";       fill_rects([x+10, y, 4, 12], [x, y+10, 4, 2], [x+2, y+12, 10, 2])
  1957.     when "K", "К", "к";  fill_rects([x, y, 4, 14], [x+10, y, 4, 2], [x+8, y+2, 4, 2], [x+6, y+4, 4, 2], [x+4, y+6, 4, 2], [x+4, y+8, 6, 2], [x+6, y+10, 6, 2], [x+8, y+12, 6, 2])
  1958.     when "L";       fill_rects([x, y+12, 12, 2], [x, y, 4, 14])
  1959.     when "M", "М", "м";  fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+4, y+2, 2, 4], [x+8, y+2, 2, 4], [x+6, y+4, 2, 6])
  1960.     when "N";       fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+4, y+2, 2, 4], [x+6, y+4, 2, 4], [x+8, y+6, 2, 4])
  1961.     when "O", "О", "о";  fill_rects([x+2, y, 10, 2], [x+2, y+12, 10, 2], [x, y+2, 4, 10], [x+10, y+2, 4, 10])
  1962.     when "P", "Р", "р";  fill_rects([x, y, 4, 14], [x, y, 12, 2], [x, y+8, 12, 2], [x+10, y+2, 4, 6])
  1963.     when "Q";       fill_rects([x+2, y, 10, 2], [x, y+2, 4, 10], [x+10, y+2, 4, 8], [x+2, y+12, 8, 2], [x+2, y+12, 8, 2], [x+8, y+8, 4, 4], [x+6, y+8, 2, 2], [x+12, y+12, 2, 2])
  1964.     when "R";       fill_rects([x, y, 4, 14], [x, y, 12, 2], [x+10, y+2, 4, 6], [x+8, y+6, 6, 2], [x, y+8, 10, 2], [x+6, y+10, 6, 2], [x+8, y+12, 6, 2])
  1965.     when "S";       fill_rects([x+2, y, 10, 2], [x+2, y+6, 10, 2], [x+2, y+12, 10, 2], [x, y+2, 4, 4], [x+10, y+8, 4, 4])
  1966.     when "T", "Т", "т";  fill_rects([x+2, y, 12, 2], [x+6, y, 4, 14])  
  1967.     when "U";       fill_rects([x, y, 4, 12], [x+10, y, 4, 12], [x+2, y+12, 10, 2])
  1968.     when "V";       fill_rects([x, y, 4, 8], [x+10, y, 4, 8], [x, y+6, 6, 2], [x+8, y+6, 6, 2], [x+2, y+8, 10, 2], [x+4, y+10, 6, 2], [x+6, y+12, 2, 2])
  1969.     when "W";       fill_rects([x, y, 4, 12], [x+10, y, 4, 12], [x+2, y+12, 2, 2], [x+10, y+12, 2, 2], [x+4, y+8, 2, 4], [x+8, y+8, 2, 4], [x+6, y, 2, 10])
  1970.     when "X", "Х", "х";  fill_rects([x, y, 4, 4], [x+10, y, 4, 4], [x, y+10, 4, 4], [x+10, y+10, 4, 4], [x+2, y+4, 4, 2], [x+8, y+4, 4, 2], [x+2, y+8, 4, 2], [x+8, y+8, 4, 2], [x+4, y+6, 6, 2])
  1971.     when "Y";       fill_rects([x+2, y, 4, 6], [x+10, y, 4, 6], [x+6, y+8, 4, 6], [x+4, y+6, 8, 2])
  1972.     when "Z";       fill_rects([x, y, 14, 2], [x, y+12, 14, 2], [x+8, y+2, 6, 2], [x+6, y+4, 6, 2], [x+4, y+6, 6, 2], [x+2, y+8, 6, 2], [x, y+10, 6, 2])
  1973.      
  1974.     when "Б", "б";  fill_rects([x, y, 12, 2], [x, y+6, 12, 2], [x, y+12, 12, 2], [x, y, 4, 14], [x+10, y+8, 4, 4])
  1975.     when "Г", "г";  fill_rects([x, y, 12, 2], [x, y, 4, 14])
  1976.     when "Д", "д";  fill_rects([x+4, y, 10, 2], [x+4, y, 2, 8], [x+10, y, 4, 14], [x+2, y+8, 4, 4], [x, y+12, 4, 4], [x+12, y+12, 4, 4], [x, y+12, 14, 2])
  1977.     when "Ё", "ё";  fill_rects([x+2, y, 4, 2], [x+8, y, 4, 2], [x, y+4, 14, 2], [x, y+8, 12, 2], [x, y+12, 14, 2], [x, y+4, 4, 10])
  1978.     when "Ж", "ж";  fill_rects([x, y, 4, 4], [x, y+10, 4, 4], [x+10, y, 4, 4], [x+10, y+10, 4, 4], [x+2, y+4, 2, 2], [x+10, y+4, 2, 2], [x+2, y+8, 2, 2], [x+10, y+8, 2, 2], [x+4, y+6, 6, 2], [x+6, y, 2, 14])
  1979.     when "З", "з";  fill_rects([x+2, y, 10, 2], [x, y+2, 4, 2], [x, y+10, 4, 2], [x+10, y+2, 4, 4], [x+10, y+8, 4, 4], [x+4, y+6, 8, 2], [x+2, y+12, 10, 2])
  1980.     when "И", "и";  fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+8, y+4, 2, 4], [x+6, y+6, 2, 4], [x+4, y+8, 2, 4])
  1981.     when "Й", "й";  fill_rects([x+2, y, 10, 2], [x, y+4, 4, 10], [x+10, y+4, 4, 10], [x+8, y+6, 2, 4], [x+6, y+8, 2, 4], [x+4, y+10, 2, 4])
  1982.     when "Л", "л";  fill_rects([x+4, y, 10, 2], [x+4, y, 2, 12], [x+2, y+8, 4, 4], [x, y+10, 4, 4], [x+10, y, 4, 14])
  1983.     when "П", "п";  fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+4, y, 6, 2])
  1984.     when "У", "у";  fill_rects([x, y, 4, 6],  [x+10, y, 4, 12],  [x+2, y+6, 10, 2], [x+2, y+12, 10, 2], [x, y+10, 4, 2])
  1985.     when "Ф", "ф";  fill_rects([x, y+4, 4, 6], [x+10, y+4, 4, 6], [x+2, y+2, 10, 2], [x+2, y+10, 10, 2], [x+6, y, 2, 14])
  1986.     when "Ц", "ц";  fill_rects([x, y, 4, 14], [x+8, y, 4, 14], [x, y+12, 14, 2], [x+10, y+12, 4, 4])
  1987.     when "Ч", "ч";  fill_rects([x, y, 4, 6],  [x+10, y, 4, 14],  [x+2, y+6, 10, 2])
  1988.     when "Ш", "ш";  fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+6, y, 2, 14], [x, y+12, 14, 2])
  1989.     when "Щ", "щ";  fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+6, y, 2, 14], [x, y+12, 14, 2], [x+12, y+12, 4, 4])
  1990.     when "Ъ", "ъ";  fill_rects([x, y, 6, 2], [x+2, y, 4, 14], [x+2, y+4, 10, 2], [x+2, y+12, 10, 2], [x+10, y+6, 4, 6])
  1991.     when "Ы", "ы";  fill_rects([x, y, 4, 14], [x, y+4, 8, 2],  [x, y+12, 8, 2], [x+6, y+6, 4, 6], [x+10, y, 4, 6], [x+12, y+6, 2, 6], [x+10, y+12, 4, 2])
  1992.     when "Ь", "ь";  fill_rects([x, y+4, 12, 2], [x, y+12, 12, 2], [x, y, 4, 14], [x+10, y+6, 4, 6])
  1993.     when "Э", "э";  fill_rects([x+2, y, 8, 2], [x, y+2, 4, 2], [x+8, y+2, 4, 2], [x+2, y+6, 12, 2], [x+10, y+4, 4, 6], [x+2, y+12, 8, 2], [x, y+10, 4, 2], [x+8, y+10, 4, 2])
  1994.     when "Ю", "ю";  fill_rects([x, y, 2, 14], [x+6, y, 6, 2], [x, y+6, 6, 2], [x+6, y+12, 6, 2], [x+4, y+2, 4, 10], [x+10, y+2, 4, 10])
  1995.     when "Я", "я";  fill_rects([x+2, y, 12, 2], [x, y+2, 4, 6], [x, y+6, 6, 2], [x+10, y, 4, 14], [x+4, y+8, 6, 2], [x+2, y+10, 4, 2], [x, y+12, 6, 2])
  1996.      
  1997.     when "0";       fill_rects([x+4, y, 6, 2], [x+2, y+2, 2, 2], [x+8, y+2, 4, 2], [x, y+4, 4, 6], [x+10, y+4, 4, 6], [x+2, y+10, 4, 2], [x+10, y+10, 2, 2], [x+4, y+12, 6, 2])
  1998.     when "1";       fill_rects([x+6, y, 4, 14], [x+4, y+2, 2, 2], [x+2, y+12, 12, 2])
  1999.     when "2";       fill_rects([x+2, y, 10, 2], [x, y+2, 4, 2], [x+10, y+2, 4, 2], [x+8, y+4, 6, 2], [x+4, y+6, 8, 2], [x+2, y+8, 8, 2], [x, y+10, 6, 2], [x, y+12, 14, 2])
  2000.     when "3";       fill_rects([x+2, y, 12, 2], [x+8, y+2, 4, 2], [x+6, y+4, 4, 2], [x+4, y+6, 8, 2], [x, y+10, 4, 2], [x+10, y+8, 4, 4], [x+2, y+12, 10, 2])
  2001.     when "4";       fill_rects([x+6, y, 6, 2], [x+4, y+2, 6, 2], [x+8, y, 4, 14], [x+2, y+4, 4, 2], [x, y+6, 4, 2], [x, y+8, 14, 2])
  2002.     when "5";       fill_rects([x, y, 12, 2], [x, y, 4, 6], [x, y+4, 12, 2], [x+10, y+6, 4, 6], [x+2, y+12, 10, 2], [x, y+10, 4, 2])
  2003.     when "6";       fill_rects([x+4, y, 8, 2], [x+2, y+2, 4, 2], [x, y+4, 4, 8], [x, y+6, 12, 2], [x+10, y+8, 4, 4], [x+2, y+12, 10, 2])
  2004.     when "7";       fill_rects([x, y, 4, 4], [x+10, y, 4, 4], [x+4, y+8, 4, 6], [x+4, y, 6, 2], [x+8, y+4, 4, 2], [x+6, y+6, 4, 2])
  2005.     when "8";       fill_rects([x+2, y, 8, 2], [x+10, y+2, 2, 4], [x, y+2, 4, 4], [x+2, y+4, 4, 4], [x+6, y+6, 4, 4], [x+10, y+8, 4, 4], [x, y+8, 2, 4], [x+2, y+12, 10, 2])
  2006.     when "9";       fill_rects([x+2, y, 10, 2], [x, y+2, 4, 4], [x+10, y+2, 4, 8], [x+2, y+6, 10, 2], [x+2, y+12, 8, 2], [x+8, y+10, 4, 2], [x+10, y+8, 4, 2])
  2007.     when "<";       fill_rects([x+8, y, 4, 2], [x+6, y+2, 4, 2], [x+4, y+4, 4, 2], [x+2, y+6, 4, 2], [x+4, y+8, 4, 2], [x+6, y+10, 4, 2], [x+8, y+12, 4, 2])
  2008.     when ">";       fill_rects([x+2, y, 4, 2], [x+4, y+2, 4, 2], [x+6, y+4, 4, 2], [x+8, y+6, 4, 2], [x+6, y+8, 4, 2], [x+4, y+10, 4, 2], [x+2, y+12, 4, 2])
  2009.     when "+";       fill_rects([x+6, y+2, 4, 10], [x+2, y+6, 10, 2])
  2010.     when "-";       fill_rects([x+2, y+6, 10, 2])
  2011.     when "_";       fill_rects([x+2, y+12, 10, 2])
  2012.     when "|";       fill_rects([x+6, y, 4, 14])
  2013.     when "=";       fill_rects([x, y+4, 14, 2], [x, y+8, 14, 2])
  2014.     when "(";       fill_rects([x+8, y, 4, 2], [x+6, y+2, 4, 2], [x+4, y+4, 4, 6], [x+6, y+10, 4, 2], [x+8, y+12, 4, 2])
  2015.     when ")";       fill_rects([x+2, y, 4, 2], [x+4, y+2, 4, 2], [x+6, y+4, 4, 6], [x+4, y+10, 4, 2], [x+2, y+12, 4, 2])
  2016.     when "?";       fill_rects([x, y+2, 4, 4], [x+2, y, 10, 4], [x+10, y+2, 4, 4], [x+8, y+6, 4, 2], [x+4, y+8, 6, 2], [x+4, y+12, 6, 2])
  2017.     when "!";       fill_rects([x+4, y, 6, 6], [x+4, y, 4, 10], [x+4, y+12, 4, 2])
  2018.     when ":";       fill_rects([x+4, y+2, 4, 4], [x+4, y+8, 4, 4])
  2019.     when "/";       fill_rects([x, y+12, 2, 2],[x+2, y+10, 2, 2], [x+4, y+8, 2, 2], [x+6, y+6, 2, 2], [x+8, y+4, 2, 2], [x+10, y+2, 2, 2], [x+12, y, 2, 2])
  2020.     when ".";       fill_rects([x+4, y+10, 4, 4])
  2021.     when ",";       fill_rects([x+4, y+10, 4, 4], [x+2, y+14, 4, 2])
  2022.     when "~";       fill_rects([x, y+6, 2, 2], [x+2, y+4, 6, 2], [x+4, y+6, 6, 2], [x+6, y+8, 6, 2], [x+12, y+6, 2, 2])
  2023.     when "$";       fill_rects([x+6, y, 2, 14], [x+2, y+2, 10, 2], [x+2, y+6, 10, 2], [x, y+10, 12, 2],[x, y+4, 4, 2],[x+10, y+8, 4, 2])
  2024. #~        
  2025.     when "HP";      fill_rects([x+2, y, 4, 10, Color.new(255, 0, 0)], [x+8, y, 4, 10, Color.new(255, 0, 0)], [x, y+2, 14, 6, Color.new(255, 0, 0)], [x+4, y+8, 6, 4, Color.new(255, 0, 0)], [x+6, y+12, 2, 2, Color.new(255, 0, 0)], [x+2, y+2, 2, 2])
  2026.     when "MP";      fill_rects([x+2, y, 10, 2], [x+4, y+2, 6, 12, Color.new(0, 148, 255)], [x+2, y+6, 10, 8, Color.new(0, 148, 255)], [x, y+8, 14, 4, Color.new(0, 148, 255)], [x+2, y+8, 2, 2], [x+6, y+2, 2, 2])
  2027.     when "ATK";     fill_rects([x+10, y, 4, 4, Color.new(128, 128, 128)], [x+8, y+2, 4, 4, Color.new(128, 128, 128)], [x+6, y+4, 4, 4, Color.new(128, 128, 128)], [x+4, y+6, 4, 4, Color.new(128, 128, 128)], [x+10, y, 2, 2], [x+8, y+2, 2, 2], [x+6, y+4, 2, 2], [x+4, y+6, 2, 2], [x, y+10, 4, 4, Color.new(127, 51, 0)], [x+2, y+4, 2, 6, Color.new(63, 63, 63)], [x+4, y+10, 6, 2, Color.new(63, 63, 63)])
  2028.     when "DEF";     fill_rects([x+2, y+2, 10, 8, Color.new(128, 128, 128)], [x+4, y+8, 6, 4, Color.new(128, 128, 128)], [x+4, y, 6, 2, Color.new(63, 63, 63)], [x, y+2, 4, 2, Color.new(63, 63, 63)], [x+10, y+2, 4, 2, Color.new(63, 63, 63)], [x, y+2, 2, 6, Color.new(63, 63, 63)], [x+12, y+2, 2, 6, Color.new(63, 63, 63)], [x+2, y+8, 2, 2, Color.new(63, 63, 63)], [x+4, y+10, 2, 2, Color.new(63, 63, 63)], [x+6, y+12, 2, 2, Color.new(63, 63, 63)], [x+8, y+10, 2, 2, Color.new(63, 63, 63)], [x+10, y+8, 2, 2, Color.new(63, 63, 63)], [x+4, y+2, 2, 4])
  2029.     when "MAT";     fill_rects([x+12, y, 2, 2],[x+4, y+2, 2, 2],[x+10, y+8, 2, 2],[x, y+12, 2, 2, Color.new(216, 86, 0)], [x+2, y+10, 2, 2, Color.new(216, 86, 0)], [x+4, y+8, 2, 2, Color.new(216, 86, 0)], [x+6, y+6, 2, 2, Color.new(216, 86, 0)], [x+8, y+4, 2, 2, Color.new(216, 86, 0)], [x+8, y, 2, 2, Color.new(216, 86, 0)], [x+6, y, 2, 2, Color.new(127, 51, 0)], [x+10, y+2, 2, 2, Color.new(127, 51, 0)], [x+8, y+6, 2, 2, Color.new(127, 51, 0)], [x+6, y+8, 2, 2, Color.new(127, 51, 0)], [x+4, y+10, 2, 2, Color.new(127, 51, 0)], [x+2, y+12, 2, 2, Color.new(127, 51, 0)])
  2030.     when "MDF";     fill_rects([x+2, y+2, 10, 8, Color.new(255, 0, 220)], [x+4, y+8, 6, 4, Color.new(255, 0, 220)], [x+4, y, 6, 2, Color.new(120, 0, 175)], [x, y+2, 4, 2, Color.new(120, 0, 175)], [x+10, y+2, 4, 2, Color.new(120, 0, 175)], [x, y+2, 2, 6, Color.new(120, 0, 175)], [x+12, y+2, 2, 6, Color.new(120, 0, 175)], [x+2, y+8, 2, 2, Color.new(120, 0, 175)], [x+4, y+10, 2, 2, Color.new(120, 0, 175)], [x+6, y+12, 2, 2, Color.new(120, 0, 175)], [x+8, y+10, 2, 2, Color.new(120, 0, 175)], [x+10, y+8, 2, 2, Color.new(120, 0, 175)], [x+4, y+2, 2, 4])
  2031.     when "LUK";     fill_rects([x, y, 6, 2, Color.new(255, 216, 0)], [x+8, y, 6, 2, Color.new(255, 216, 0)], [x+4, y+12, 6, 2, Color.new(255, 216, 0)], [x+2, y+10, 10, 2, Color.new(255, 216, 0)], [x+2, y, 4, 4, Color.new(255, 216, 0)], [x+8, y, 4, 4, Color.new(255, 216, 0)], [x, y+4, 4, 6, Color.new(255, 216, 0)], [x+10, y+4, 4, 6, Color.new(255, 216, 0)])
  2032.     when "AGI";     fill_rects([x+8, y, 2, 10, Color.new(128, 128, 128)], [x+6, y+2, 6, 2, Color.new(128, 128, 128)], [x+4, y+6, 10, 2, Color.new(128, 128, 128)], [x+6, y+10, 2, 4, Color.new(128, 128, 128)], [x+10, y+10, 2, 4, Color.new(128, 128, 128)], [x, y+2, 4, 2], [x, y+10, 4, 2], [x, y+6, 2, 2])
  2033.     end
  2034.   end
  2035. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement