Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##---------------------------------------------------------------------------
- ##---------------------------------------------------------------------------
- ##RPG Maker VX Ace's Concole commands
- ## author: ZEkA10000
- ##---------------------------------------------------------------------------
- ##---------------------------------------------------------------------------
- ##
- ## Как пользоваться
- ##
- ## @> Запусти игру в режиме тестирования
- ## @> Нажми "Ё"
- ## @> Вводи команды
- ##
- ## Подсказка: Введи >help, чтобы увидеть список доступных команд
- ## Подсказка: Введи >help <команда>, чтобы узнать как пользоваться командой.
- ##
- ## TAB - Переключение между языками
- ##
- ##
- ## Внимание:
- ## Данный скрипт может создать конфликтные ситуации у установленных ранее скриптов
- ## Устанавливайте этот скрипт на свой страх и риск.
- ##
- ##---------------------------------------------------------------------------
- ##---------------------------------------------------------------------------
- $extended_debug_options = true #Расширенное меню в Scene Debug
- $font_size2x = true #Большой шрифт
- $console_background = "Titles1/11111" #Задний фон для консоли (nil для прозрачного фона)
- $input_for_somebody = ["", 0, false] #Переменная для консоли. НЕ ТРОГАТЬ
- $skip_titile = true #Пропуск титульного экрана
- #Примеры
- # $console_background = "Titile1/Background1"
- # $console_background = "Pictures/Picture1"
- $keys = Win32API.new("user32", 'GetAsyncKeyState', 'p','i')
- FindWindow = Win32API.new('user32' , 'FindWindow' , 'pp' ,'i')
- ShowWindow = Win32API.new('user32' , 'ShowWindow' , 'pp' ,'i')
- SetWindowPos = Win32API.new('user32' , 'SetWindowPos' , 'iiiiiii' ,'i')
- HWND = FindWindow.call('RGSS Player', 0)
- #check Khas' Awesome Light Effects
- $timer = [0, 50]
- class Scene_Title < Scene_Base
- #--------------------------------------------------------------------------
- # * Start Processing
- #--------------------------------------------------------------------------
- def start
- super
- SceneManager.clear
- Graphics.freeze
- create_background if !$skip_titile
- create_foreground if !$skip_titile
- create_command_window
- play_title_music
- command_new_game if $skip_titile
- end
- def dispose_background
- if !$skip_titile
- @sprite1.bitmap.dispose
- @sprite1.dispose
- @sprite2.bitmap.dispose
- @sprite2.dispose
- end
- end
- def dispose_foreground
- if !$skip_titile
- @foreground_sprite.bitmap.dispose
- @foreground_sprite.dispose
- end
- end
- end
- class Text_Encoding
- 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№¤¦ "
- CP1251 = [nil,
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, #1-10
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, #11-20
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, #21-30
- nil, ' ', '!', '"', '#', '$', '%', '&', "'", '(', #31-40
- ')', '*', '+', ',', '-', '.', '/', '0', "1", '2', #41-50
- '3', '4', '5', '6', '7', '8', '9', ':', ";", '<', #51-60
- '=', '>', '?', '@', 'A', 'B', 'C', 'D', "E", 'F', #61-70
- 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', "O", 'P', #71-80
- 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', "Y", 'Z', #81-90
- '[', nil, ']', '^', '_', '`', 'a', 'b', "c", 'd', #91-100
- 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', "m", 'n', #101-110
- 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', "w", 'x', #111-120
- 'y', 'z', '{', '|', '}', '~', nil, 'Ђ', "Ѓ", '‚', #121-130
- 'ѓ', '„', '…', '†', '‡', '€', '‰', 'Љ', "‹", 'Њ', #131-140
- 'Ќ', 'Ћ', 'Џ', 'ђ', 'ђ', '’', '“', '”', "•", '–', #141-150
- '—', nil, '™', 'љ', '›', 'њ', 'ќ', 'ћ', "џ", ' ', #151-160
- 'Ў', 'ў', 'Ј', '¤', 'Ґ', '¦', '§', 'Ё', "©", 'Є', #161-170
- '«', '¬', '-', '®', 'Ї', '°', '±', 'І', "і", 'ґ', #171-180
- 'µ', '¶', '·', 'ё', '№', 'є', '»', 'ј', "Ѕ", 'ѕ', #181-190
- 'ї', 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ж', "З", 'И', #191-200
- 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', "С", 'Т', #201-210
- 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ъ', 'Ы', "Ь", #211-220
- 'Э', 'Ю', 'Я', 'а', 'б', 'в', 'г', 'д', 'е', "ж", #221-230
- 'з', 'и', 'й', 'к', 'л', 'м', 'н', 'о', 'п', "р", #231-240
- 'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', "ъ", #241-250
- 'ы', 'ь', 'э', 'ю', 'я'] #251-255
- end
- # ==============
- # Модификация стандартного класса String
- # НЕ ИЗМЕНЯТЬ
- # ==============
- class String
- $char_array = ["а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н",
- "о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь",
- "э","ю","я"]
- $char_big = ["А","Б","В","Г","Д","Е","Ё","Ж","З","И","Й","К","Л","М","Н",
- "О","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ъ","Ы","Ь",
- "Э","Ю","Я"]
- alias rus_upcase upcase
- def upcase
- temp = ""
- self.each_char do |c|
- if $char_array.include?(c)
- temp += $char_big[$char_array.index(c)]
- else
- temp += c
- end
- end
- temp.rus_upcase
- end
- alias rus_dncase downcase
- def downcase
- temp = ""
- self.each_char do |c|
- if $char_big.include?(c)
- temp += $char_array[$char_big.index(c)]
- else
- temp += c
- end
- end
- temp.rus_dncase
- end
- alias rus_swcase swapcase
- def swapcase
- temp = ""
- self.each_char do |c|
- if $char_big.include?(c)
- temp += $char_array[$char_big.index(c)]
- elsif $char_array.include?(c)
- temp += $char_big[$char_array.index(c)]
- else
- temp += c
- end
- end
- temp.rus_swcase
- end
- alias rus_caplize capitalize
- def capitalize
- temp = ""
- if $char_array.include?(self[0])
- temp += $char_big[$char_array.index(self[0])]
- end
- self.each_char do |c|
- if $char_array.index(c) != nil
- next if $char_big[$char_array.index(c)] == temp[0]
- end
- if $char_big.include?(c)
- temp += $char_array[$char_big.index(c)]
- else
- temp += c
- end
- end
- temp.rus_caplize
- end
- end
- class Game_CharacterBase
- attr_accessor :move_speed # movement speed
- end
- $bgm_files = Array.new(1)
- file_index = 0
- Dir.foreach("Audio/BGM/") do |x|
- index = 0
- y = x.bytes.to_a
- while index < x.size
- y[index] = Text_Encoding::CP1251[y[index]]
- index += 1
- end
- file_index += 1
- x = y.join
- $bgm_files[file_index] = x
- end
- $bgm_files.delete(".")
- $bgm_files.delete("..")
- $bgm_files.delete(nil)
- ##---------------------------------------------------------------------------
- ## Array of files from BGS folder
- ##---------------------------------------------------------------------------
- $bgs_files = Array.new(1)
- file_index = 0
- Dir.foreach("Audio/BGS/") do |x|
- index = 0
- y = x.bytes.to_a
- while index < x.size
- y[index] = Text_Encoding::CP1251[y[index]]
- index += 1
- end
- file_index += 1
- x = y.join
- $bgs_files[file_index] = x
- end
- $bgs_files.delete(".")
- $bgs_files.delete("..")
- $bgs_files.delete(nil)
- ##---------------------------------------------------------------------------
- ## Array of files from ME folder
- ##---------------------------------------------------------------------------
- $me_files = Array.new(1)
- file_index = 0
- Dir.foreach("Audio/ME/") do |x|
- index = 0
- y = x.bytes.to_a
- while index < x.size
- y[index] = Text_Encoding::CP1251[y[index]]
- index += 1
- end
- file_index += 1
- x = y.join
- $me_files[file_index] = x
- end
- $me_files.delete(".")
- $me_files.delete("..")
- $me_files.delete(nil)
- ##---------------------------------------------------------------------------
- ## Array of files from SE folder
- ##---------------------------------------------------------------------------
- $se_files = Array.new(1)
- file_index = 0
- Dir.foreach("Audio/SE/") do |x|
- index = 0
- y = x.bytes.to_a
- while index < x.size
- y[index] = Text_Encoding::CP1251[y[index]]
- index += 1
- end
- file_index += 1
- x = y.join
- $se_files[file_index] = x
- end
- $se_files.delete(".")
- $se_files.delete("..")
- $se_files.delete(nil)
- ##---------------------------------------------------------------------------
- ## Array of files from RTP BGM folder
- ##---------------------------------------------------------------------------
- $rtpbgm_files = ["Airship", "Battle1", "Battle2", "Battle3", "Battle4",
- "Battle5", "Battle6", "Battle7", "Battle8", "Battle9",
- "Dungeon1", "Dungeon2", "Dungeon3", "Dungeon4", "Dungeon5",
- "Dungeon6", "Dungeon7", "Dungeon8", "Dungeon9", "Field1",
- "Field2", "Field3", "Field4", "Scene1", "Scene2",
- "Scene3", "Scene4", "Scene5", "Scene6", "Theme1",
- "Theme2", "Theme3", "Theme4", "Theme5", "Town1",
- "Town2", "Town3", "Town4", "Town5", "Town6",
- "Town7"]
- ##---------------------------------------------------------------------------
- ## Array of files from RTP BGS folder
- ##---------------------------------------------------------------------------
- $rtpbgs_files = ["Clock", "Darkness", "Drips", "Fire", "Quake", "Rain",
- "River", "Rain", "River", "Sea", "Storm", "Wind"]
- ##---------------------------------------------------------------------------
- ## Array of files from RTP ME folder
- ##---------------------------------------------------------------------------
- $rtpme_files = ["Fanfare1", "Fanfare2", "Fanfare3", "Gag", "Gameover1",
- "Gameover2", "Inn", "Item", "Mystery", "Organ",
- "Shock", "Victory1", "Victory2"]
- ##---------------------------------------------------------------------------
- ## Array of files from RTP SE folder
- ##---------------------------------------------------------------------------
- $rtpse_files = ["Absorb1", "Absorb2", "Applause1", "Applause2",
- "Attack1", "Attack2", "Attack3", "Autodor",
- "Barrier", "Battle1", "Battle2", "Battle3",
- "Bell1", "Bell2", "Bell3", "Bite",
- "Blind", "Blow1", "Blow2", "Blow3",
- "Blow4", "Blow5", "Blow6", "Blow7",
- "Blow8", "Book1", "Book2", "Bow1",
- "Bow2", "Bow3", "Bow4", "Chicken",
- "Chime1", "Chime2", "Close1", "Close2",
- "Close3", "Coin", "Collapse1", "Collapse2",
- "Collapse3", "Collapse4", "Confuse", "Cow",
- "Crash", "Crossbow", "Crow", "Cry1",
- "Cry2", "Cursor1", "Cursor2", "Damage1",
- "Damage2", "Damage3", "Damage4", "Damage5",
- "Darkness1", "Darkness2", "Darkness3", "Darkness4",
- "Darkness5", "Darkness6", "Darkness7", "Darkness8",
- "Decision1", "Decision2", "Decision3", "Devil1",
- "Devil2", "Devil3", "Disappointment", "Dive",
- "Dog", "Down1", "Down2", "Down3",
- "Down4", "Earth1", "Earth2", "Earth3",
- "Earth4", "Earth5", "Earth6", "Earth7",
- "Earth8", "Earth9", "Equip1", "Equip2",
- "Equip3", "Evasion1", "Evasion2", "Explosion1",
- "Explosion2", "Explosion3", "Explosion4", "Explosion5",
- "Explosion6", "Explosion7", "Fall", "Fire1",
- "Fire2", "Fire3", "Fire4", "Fire5",
- "Fire6", "Fire7", "Fire8", "Fire9",
- "Flash1", "Flash2", "Flash3", "Fog1",
- "Fog2", "Frog", "Gun1", "Gun2",
- "Hammer", "Heal1", "Heal2", "Heal3",
- "Heal4", "Heal5", "Heal6", "Heal7",
- "Horse", "Ice1", "Ice2", "Ice3",
- "Ice4", "Ice5", "Ice6", "Ice7",
- "Ice8", "Ice9", "Ice10", "Ice11",
- "Item1", "Item2", "Item3", "Jump1",
- "Jump2", "Key", "Knock", "Laser",
- "Load", "Machine", "Magic1", "Magic2",
- "Magic3", "Magic4", "Magic5", "Magic6",
- "Magic7", "Miss", "Monster1", "Monster2",
- "Monster3", "Monster4", "Monster5", "Monster6",
- "Monster7", "Move", "Noise", "Open1",
- "Open2", "Open3", "Open4", "Open5",
- "Paralyze1", "Paralyze2", "Paralyze3", "Parry",
- "Phone", "Poison", "Pollen", "Powerup",
- "Push", "Raise1", "Raise2", "Raise3",
- "Recovery", "Reflection", "Resonance", "Run",
- "Saint", "Saint2", "Saint3", "Saint4",
- "Saint5", "Saint6", "Saint7", "Saint8",
- "Saint9", "Sand", "Save", "Scream",
- "Sheep", "Shop", "Shot1", "Shot2",
- "Shot3", "Silence", "Skill1", "Skill2",
- "Skill3", "Slash1", "Slash2", "Slash3",
- "Slash4", "Slash5", "Slash6", "Slash7",
- "Slash8", "Slash9", "Slash10", "Slash11",
- "Slash12", "Sleep", "Sound1", "Sound2",
- "Sound3", "Stare", "Starlight", "Switch1",
- "Switch2", "Switch3", "Sword1", "Sword2",
- "Sword3", "Sword4", "Sword5", "Teleport",
- "Thunder1", "Thunder2", "Thunder3", "Thunder4",
- "Thunder5", "Thunder6", "Thunder7", "Thunder8",
- "Thunder9", "Thunder10", "Thunder11", "Thunder12",
- "Twine", "Up1", "Up2", "Up3",
- "Up4", "Water1", "Water2", "Water3",
- "Water4", "Water5", "Water6", "Wind1",
- "Wind2", "Wind3", "Wind4", "Wind5",
- "Wind6", "Wind7", "Wind8", "Wind9",
- "Wind10", "Wind11", "Wolf"]
- $all_bgm = $bgm_files + $rtpbgm_files
- $all_bgs = $bgs_files + $rtpbgs_files
- $all_se = $se_files + $rtpse_files
- $all_me = $me_files + $rtpme_files
- ##---------------------------------------------------------------------------
- ## Auto launch
- ##---------------------------------------------------------------------------
- class Game_Event < Game_Character
- def start
- if $cin != true
- return if empty?
- @starting = true
- lock if trigger_in?([0,1,2])
- end
- end
- end
- class Game_Picture
- def rotation(rotate)
- @angle = rotate
- end
- end
- class Sprite_Timer < Sprite
- def update_position
- self.x = (Graphics.width - self.bitmap.width) / 2
- self.y = 0
- self.z = 200
- end
- end
- class Scene_Debug < Scene_MenuBase
- def help_text
- if $extended_debug_options == true
- if @left_window.mode == :switch
- "C (Enter) : ВКЛ / ВЫКЛ"
- else
- "< : -1 | Shift + < : -5\n" +
- "> : +1 | Shift + > : +5\n" +
- "L : -10 | Shift + L : -50\n" +
- "R : +10 | Shift + R : +50"
- end
- else
- if @left_window.mode == :switch
- "C (Enter) : ВКЛ / ВЫКЛ"
- else
- "< (Влево) : -1\n" +
- "> (Вправо) : +1\n" +
- "L (Pageup) : -10\n" +
- "R (Pagedown) : +10"
- end
- end
- end
- end
- class Window_DebugRight < Window_Selectable
- #--------------------------------------------------------------------------
- # * Update During Variable Mode
- #--------------------------------------------------------------------------
- def update_variable_mode
- return unless $game_variables[current_id].is_a?(Numeric)
- value = $game_variables[current_id]
- if $extended_debug_options
- value += 1 if Input.repeat?(:RIGHT)
- value += 4 if Input.repeat?(:RIGHT) and Input.press?(:SHIFT)
- value -= 1 if Input.repeat?(:LEFT)
- value -= 4 if Input.repeat?(:LEFT) and Input.press?(:SHIFT)
- value += 10 if Input.repeat?(:R)
- value += 40 if Input.repeat?(:R) and Input.press?(:SHIFT)
- value -= 10 if Input.repeat?(:L)
- value -= 40 if Input.repeat?(:L) and Input.press?(:SHIFT)
- else
- value += 1 if Input.repeat?(:RIGHT)
- value -= 1 if Input.repeat?(:LEFT)
- value += 10 if Input.repeat?(:R)
- value -= 10 if Input.repeat?(:L)
- end
- if $game_variables[current_id] != value
- $game_variables[current_id] = value
- Sound.play_cursor
- redraw_current_item
- end
- end
- end
- class Game_Player < Game_Character
- def move_by_input
- return if !movable?
- $game_player.moveto(-1, -1) if $cin
- if $keys.call(0xC0) < 0
- if $TEST == true
- $debug_x_y = [$game_player.x, $game_player.y] if !$cin
- $game_system.menu_disabled = true
- $cin = true
- end
- end
- Console_Commands.other_scripts if $scripts != true
- Console_Commands.reset if $reseted_switches != true
- Console_Commands.input_debug_command if $cin == true
- Console_Commands.coord_find if $TEST == true
- if Input.press?(:F6) == true
- $coord = false
- Graphics.wait(10)
- Console_Commands.coord_find
- end
- unless $debug == true
- return if $game_map.interpreter.running?
- case Input.dir8
- when 2,4,6,8; move_straight(Input.dir4)
- when 1 ; move_diagonal_straight(4, 2)
- when 3 ; move_diagonal_straight(6, 2)
- when 7 ; move_diagonal_straight(4, 8)
- when 9 ; move_diagonal_straight(6, 8)
- end
- end
- end
- def move_diagonal_straight(x,y)
- move_diagonal(x, y)
- return if moving?
- move_straight(x, false) ; move_straight(y, false)
- end
- end
- class Scene_Map < Scene_Base
- def update
- super
- $game_map.update(true)
- $game_player.update
- $game_timer.update
- @spriteset.update
- update_scene if scene_change_ok?
- end
- end
- class Scene_Base
- def update
- update_basic
- if $TEST
- if $keys.call(0x72) < 0
- SceneManager.call(Scene_Save) if SceneManager.scene_is?(Scene_Save) == false
- elsif $keys.call(0x73) < 0
- SceneManager.call(Scene_Load) if SceneManager.scene_is?(Scene_Load) == false
- end
- end
- end
- end
- $imported = {} if $imported.nil?
- class Game_Actor < Game_Battler
- attr_accessor :name # Name
- attr_accessor :nickname # Nickname
- attr_accessor :character_name # character graphic filename
- attr_accessor :character_index # character graphic index
- attr_accessor :face_name # face graphic filename
- attr_accessor :face_index # face graphic index
- attr_accessor :class_id # class ID
- attr_accessor :level # level
- def param_max(param_id)
- #MHP & MMP
- return ($imported["YEA-AdjustLimits"] == true ? 999999999 : 9999) if [0, 1].include?(param_id)
- # ATK & DEF & MAT & MDF & LUK & AGI
- return ($imported["YEA-AdjustLimits"] == true ? 9999 : 999) if (2..7).include?(param_id)
- return super
- end
- end
- class Console_Commands
- def self.other_scripts
- if $game_map.methods.include?(:lantern) != false
- $khas_effect = true
- en = "Enabled"
- else
- $khas_effect = false
- en = "Disabled"
- end
- puts "Use Khas' Awesome Light Effects => #{en}"
- $scripts = true
- end
- def self.reset
- $saved = false
- $scripts == false
- $game_system.menu_disabled = false if $game_system != nil
- $coord = false
- $debug = false
- $text_nulrd = false
- $input_RUS = false
- $cin = false
- $inrput_no_command = false
- $capslock = false
- $reseted_switches = true
- end
- def self.output
- output_array_min = 0
- output_array_max = $output.size
- while output_array_min <= output_array_max
- Debug_Text.draw_word($output[output_array_min], 2, 2 + (20 * output_array_min)) if $output[output_array_min] != nil
- output_array_min += 1
- end
- end
- def self.coord_find
- unless $coord == true
- $coordinate_player = Sprite.new
- $coordinate_player.bitmap = Bitmap.new(140, 100)
- $coord = true
- end
- if $coordinate_player.bitmap.disposed?
- $coordinate_player = Sprite.new
- $coordinate_player.bitmap = Bitmap.new(140, 100)
- end
- my_color = Color.new(200, 200, 200)
- $coordinate_player.bitmap.fill_rect(0, 0, 120, 20, my_color)
- ox = $game_player.x.to_s
- oy = $game_player.y.to_s
- $coordinate_player.bitmap.font = Font.new("VL Gothic", 16)
- coor_info = "X#{ox} Y#{oy} | Map:#{$game_map.map_id}"
- $coordinate_player.bitmap.draw_text(0, 0, 120, 20, coor_info, 1)
- end
- def self.error
- commands_list = [">HELP", ">MENU", ">EXIT", ">ITEMS", ">MOVE", ">WEAPONS",
- ">SWITCH", ">SW", ">TIMER", ">VARIABLE", ">VAR", ">ARMORS",
- ">SKILLS", ">ACTOR", ">HEAL", ">ENEMY", ">WINDOW", ">GOLD",
- ">BGM", ">TONE", ">KHAS", ">SCREEN", ">CLEAR", ">COMMONEVENT",
- ">CE", ">MAP", ">FONT"]
- if commands_list.include?($error) == true
- error_str = ">HELP #{$error.delete('>')}"
- error_str = ">HELP" if $error == ">HELP"
- end
- if $font_size2x
- $output[0] = "Не правильна введена команда."
- $output[1] = "Введите #{error_str}, "
- $output[2] = " чтобы узнать подробности"
- else
- $output[0] = "Не правильна введена команда."
- $output[1] = "Введите #{error_str}, чтобы узнать подробности"
- end
- Console_Commands.output
- end
- def self.plus_symbol
- $input_text_index += 1 if $input_text_index < 40
- end
- def self.nul_text
- $input_text = "> "
- $input_text_index = 1
- $text_nulrd = true
- end
- def self.update_bg
- if $console_background == nil
- $debug_zone.bitmap = Bitmap.new(640, 480)
- else
- begin
- $debug_zone.bitmap = Bitmap.new("Graphics/#{$console_background}")
- w = 0
- h = 0
- while h < 500
- while w < 700
- $debug_zone.bitmap.set_pixel(w,h,$color_input)
- w += 2
- end
- w % 2 == 0 ? w = 1 : w = 0
- h += 1
- end
- rescue
- $debug_zone.bitmap = Bitmap.new(640, 480)
- $debug_zone.bitmap.fill_rect(0, 0, 640, Graphics.height - 20 * ($font_size2x ? 1: 0.5), $color_console)
- end
- end
- end
- def self.exit
- $input_for_somebody = ["", 0, false]
- Debug_Text.clear_bitmap
- Console_Commands.nul_text
- Console_Commands.reset
- $game_player.moveto($debug_x_y[0], $debug_x_y[1])
- $debug_zone.bitmap.clear if $debug_zone.bitmap.disposed? == false
- $reseted_switches = false
- end
- def self.input_debug_command
- unless $debug == true
- $actor_params = [$game_actors[1].param_max(0), $game_actors[1].param_max(1),
- $game_actors[1].param_max(2), $game_actors[1].param_max(3),
- $game_actors[1].param_max(4), $game_actors[1].param_max(5),
- $game_actors[1].param_max(6), $game_actors[1].param_max(7)]
- color = Color.new(1, 1, 1)
- $color_input = Color.new(0, 0, 0)
- $color_console = Color.new(20, 20, 20)
- $debug_zone = Sprite.new
- Console_Commands.update_bg
- $debug = true
- Console_Commands.nul_text if $text_nulrd != true
- vert = 0
- horz = 1
- text_x = 0
- size_x = Graphics.width
- text_y = Graphics.height - 22
- size_y = 30
- $debug_zone.bitmap.fill_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100, $color_input)
- $map_event_priority_type = Array.new
- a = 0
- end
- letter = ""
- if $keys.call(0x41) < 0
- $input_RUS == true ? letter = "Ф" : letter = "A"
- elsif $keys.call(0x42) < 0 #b
- $input_RUS == true ? letter = "И" : letter = "B"
- elsif $keys.call(0x43) < 0 #c
- $input_RUS == true ? letter = "С" : letter = "C"
- elsif $keys.call(0x44) < 0 #d
- $input_RUS == true ? letter = "В" : letter = "D"
- elsif $keys.call(0x45) < 0 #e
- $input_RUS == true ? letter = "У" : letter = "E"
- elsif $keys.call(0x46) < 0 #f
- $input_RUS == true ? letter = "А" : letter = "F"
- elsif $keys.call(0x47) < 0 #g
- $input_RUS == true ? letter = "П" : letter = "G"
- elsif $keys.call(0x48) < 0 #h
- $input_RUS == true ? letter = "Р" : letter = "H"
- elsif $keys.call(0x49) < 0 #i
- $input_RUS == true ? letter = "Ш" : letter = "I"
- elsif $keys.call(0x4a) < 0 #j
- $input_RUS == true ? letter = "О" : letter = "J"
- elsif $keys.call(0x4b) < 0 #k
- $input_RUS == true ? letter = "Л" : letter = "K"
- elsif $keys.call(0x4c) < 0 #l
- $input_RUS == true ? letter = "Д" : letter = "L"
- elsif $keys.call(0x4d) < 0 #m
- $input_RUS == true ? letter = "Ь" : letter = "M"
- elsif $keys.call(0x4e) < 0 #n
- $input_RUS == true ? letter = "Т" : letter = "N"
- elsif $keys.call(0x4f) < 0 #o
- $input_RUS == true ? letter = "Щ" : letter = "O"
- elsif $keys.call(0x50) < 0 #p
- $input_RUS == true ? letter = "З" : letter = "P"
- elsif $keys.call(0x51) < 0 #q
- $input_RUS == true ? letter = "Й" : letter = "Q"
- elsif $keys.call(0x52) < 0 #r
- $input_RUS == true ? letter = "К" : letter = "R"
- elsif $keys.call(0x53) < 0 #s
- $input_RUS == true ? letter = "Ы" : letter = "S"
- elsif $keys.call(0x54) < 0 #t
- $input_RUS == true ? letter = "Е" : letter = "T"
- elsif $keys.call(0x55) < 0 #u
- $input_RUS == true ? letter = "Г" : letter = "U"
- elsif $keys.call(0x56) < 0 #v
- $input_RUS == true ? letter = "М" : letter = "V"
- elsif $keys.call(0x57) < 0 #w
- $input_RUS == true ? letter = "Ц" : letter = "W"
- elsif $keys.call(0x58) < 0 #x
- $input_RUS == true ? letter = "Ч" : letter = "X"
- elsif $keys.call(0x59) < 0 #y
- $input_RUS == true ? letter = "Н" : letter = "Y"
- elsif $keys.call(0x5a) < 0 #z
- $input_RUS == true ? letter = "Я" : letter = "Z"
- elsif $keys.call(0xDB) < 0 #RUS x
- letter = "Х" if $input_RUS == true
- elsif $keys.call(0xDD) < 0 #RUS ъ
- letter = "Ъ" if $input_RUS == true
- elsif $keys.call(0xBA) < 0 #RUS ж
- letter = "Ж" if $input_RUS == true
- elsif $keys.call(0xC0) < 0 #RUS ё
- letter = "Ё" if $input_RUS == true
- elsif $keys.call(0xDE) < 0 #RUS э
- letter = "Э" if $input_RUS == true
- elsif $keys.call(0xBC) < 0 #RUS б
- letter = "Б" if $input_RUS == true
- elsif $keys.call(0xBE) < 0 #RUS ю
- letter = "Ю" if $input_RUS == true
- elsif $keys.call(0xBD) < 0 #- _
- Input.press?(:A) ? letter = "_" : letter = "-"
- elsif $keys.call(0x60) < 0 or $keys.call(0x30) < 0 #0
- Input.press?(:A) ? letter = ")" : letter = "0"
- elsif $keys.call(0x61) < 0 or $keys.call(0x31) < 0 #1
- Input.press?(:A) ? letter = "!" : letter = "1"
- elsif $keys.call(0x62) < 0 or $keys.call(0x32) < 0 #2
- letter = "2"
- elsif $keys.call(0x63) < 0 or $keys.call(0x33) < 0 #3
- letter = "3"
- elsif $keys.call(0x64) < 0 or $keys.call(0x34) < 0 #4
- letter = "4"
- elsif $keys.call(0x65) < 0 or $keys.call(0x35) < 0 #5
- letter = "5"
- elsif $keys.call(0x66) < 0 or $keys.call(0x36) < 0 #6
- letter = "6"
- elsif $keys.call(0x67) < 0 or $keys.call(0x37) < 0 #7
- letter = "7"
- elsif $keys.call(0x68) < 0 or $keys.call(0x38) < 0 #8
- letter = "8"
- elsif $keys.call(0x69) < 0 or $keys.call(0x39) < 0 #9
- letter = "9"
- elsif $keys.call(0x20) < 0 #Пробел
- letter = " "
- elsif $keys.call(0x1B) < 0 #ESC
- ShowWindow.call(HWND, 1)
- Console_Commands.exit
- elsif $keys.call(0x09) < 0 #TAB
- $input_RUS = !$input_RUS
- elsif $keys.call(0x0D) < 0 #Готово
- if $inrput_no_command == false
- Console_Commands.update_bg
- $copy_input = $input_text
- $debug_zone.bitmap.fill_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100, $color_input)
- Debug_Text.clear_bitmap
- $input_text[$input_text_index] = " " if $input_text[$input_text_index] == "|"
- if $enemy != nil
- $enemy.dispose if $enemy.disposed? == false
- end
- Console_Commands.input_command
- else
- Console_Commands.input_command
- Console_Commands.nul_text
- $debug_zone.bitmap.clear_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100)
- $debug_zone.bitmap.fill_rect(0, Graphics.height - 20 * ($font_size2x ? 1: 0.5), 640, 100, $color_input)
- end
- elsif $keys.call(0x08) < 0 #backspace
- $input_text[$input_text_index] = " "
- $input_text_index -= 1 if $input_text_index > 1
- Console_Commands.make_hint
- end
- if $reseted_switches == true
- Debug_Text.clear_text
- coords = [2 * 2, (Graphics.height - 16) * 2 + 14]
- coords = [2, Graphics.height - 16] if $font_size2x
- Debug_Text.draw_word($input_text, coords[0], coords[1])
- coords = [(Graphics.width - 48) * 2 + 40, (Graphics.height - 36) * 2 + 36]
- coords = [Graphics.width - 48, Graphics.height - 36] if $font_size2x
- Debug_Text.draw_word("RUS", coords[0], coords[1]) if $input_RUS == true
- Debug_Text.draw_word("eng", coords[0], coords[1]) if $input_RUS != true
- end
- $input_text[$input_text_index] = "|" if $timer[0] < $timer[1] / 2
- $input_text[$input_text_index] = " " if $timer[0] > $timer[1] / 2
- $timer[0] = 0 if $timer[0] > $timer[1]
- $timer[0] += 1
- if letter != ""
- $input_text[$input_text_index] = letter if $input_text_index <= 40
- Console_Commands.make_hint
- Console_Commands.plus_symbol
- loop do
- if ($keys.call(0x41) < 0 or $keys.call(0x42) < 0 or $keys.call(0x43) < 0 or
- $keys.call(0x44) < 0 or $keys.call(0x45) < 0 or $keys.call(0x46) < 0 or
- $keys.call(0x47) < 0 or $keys.call(0x48) < 0 or $keys.call(0x49) < 0 or
- $keys.call(0x4a) < 0 or $keys.call(0x4b) < 0 or $keys.call(0x4c) < 0 or
- $keys.call(0x4d) < 0 or $keys.call(0x4e) < 0 or $keys.call(0x4f) < 0 or
- $keys.call(0x50) < 0 or $keys.call(0x51) < 0 or $keys.call(0x52) < 0 or
- $keys.call(0x53) < 0 or $keys.call(0x54) < 0 or $keys.call(0x55) < 0 or
- $keys.call(0x56) < 0 or $keys.call(0x57) < 0 or $keys.call(0x58) < 0 or
- $keys.call(0x59) < 0 or $keys.call(0x5a) < 0 or $keys.call(0xDB) < 0 or
- $keys.call(0xDD) < 0 or $keys.call(0xBA) < 0 or $keys.call(0xC0) < 0 or
- $keys.call(0xDE) < 0 or $keys.call(0xBC) < 0 or $keys.call(0xBE) < 0 or
- $keys.call(0xBD) < 0 or $keys.call(0x60) < 0 or $keys.call(0x30) < 0 or
- $keys.call(0x61) < 0 or $keys.call(0x31) < 0 or $keys.call(0x62) < 0 or
- $keys.call(0x32) < 0 or $keys.call(0x63) < 0 or $keys.call(0x33) < 0 or
- $keys.call(0x64) < 0 or $keys.call(0x34) < 0 or $keys.call(0x65) < 0 or
- $keys.call(0x35) < 0 or $keys.call(0x66) < 0 or $keys.call(0x36) < 0 or
- $keys.call(0x67) < 0 or $keys.call(0x37) < 0 or $keys.call(0x68) < 0 or
- $keys.call(0x38) < 0 or $keys.call(0x69) < 0 or $keys.call(0x39) < 0 or
- $keys.call(0x20) < 0 or $keys.call(0x1B) < 0 or $keys.call(0x09) < 0 or
- $keys.call(0x0D) < 0 or Input.press?(:up) or Input.press?(:down))
- Graphics.wait(1)
- Graphics.update
- else
- break
- end
- end
- end
- end
- def self.make_hint
- text = $input_text
- #~ text += "_" if $keys.call(0x20) < 0
- text = text.split(" ")
- commands = [">HELP", ">MENU", ">EXIT", ">ITEMS", ">MOVE", ">WEAPONS",
- ">SWITCH", ">SW", ">TIMER", ">VARIABLE", ">VAR", ">ARMORS",
- ">SKILLS", ">ACTOR", ">HEAL", ">ENEMY", ">WINDOW", ">GOLD",
- ">BGM", ">TONE", ">KHAS", ">SCREEN", ">CLEAR", ">COMMONEVENT",
- ">CE", ">MAP", ">FONT"]
- com_options = {
- ">HELP" => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">MENU" => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">EXIT" => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">MOVE" => ["", "ID КАРТЫ", "X", "Y", "ПОВОРОТ", "", "", "", "", "", "", ""],
- ">WEAPONS" => ["", "GIVE|LOSE|LOST|ERASE|LIST", "ID", "КОЛИЧЕСТВО", "", "", "", "", "", "", ""],
- ">ARMORS" => ["", "GIVE|LOSE|LOST|ERASE|LIST", "ID", "КОЛИЧЕСТВО", "", "", "", "", "", "", ""],
- ">ITEMS" => ["", "GIVE|LOSE|LOST|ERASE|LIST", "ID", "КОЛИЧЕСТВО", "", "", "", "", "", "", ""],
- ">SWITCH" => ["", "ID", "TRUE|FALSE", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">SW" => ["", "ID", "TRUE|FALSE", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">TIMER" => ["", "START|ADD|STOP", "секунды", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">VARIABLE"=> ["", "ID", "значение", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">VAR" => ["", "ID", "значение", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">SKILLS" => ["", "LEARN|FORGET|LIST", "ACTOR|ALL", "ID", "ID", "", "", "", "", "", "", "", "", "", ""],
- ">ACTOR" => ["", "EDIT|ADD|REMOVE|LIST", "ID", "ID", "", "", "", "", "", "", "", "", "", "", ""],
- ">HEAL" => ["", "ACTOR|PARTY", "HP|MP|TP|ALL", "ID", "ID", "", "", "", "", "", "", "", "", "", ""],
- ">ENEMY" => ["", "EDIT|SUMMON_BATTLE|SB|LIST|SHOW|INFO", "ID", "ID", "", "", "", "", "", "", "", "", "", "", ""],
- ">WINDOW" => ["", "HIDE|RESIZE|RESIZE_GAME", "X", "Y", "X", "Y", "", "", "", "", "", "", "", "", ""],
- ">GOLD" => ["", "GIVE|LOSE", "количество", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">BGM" => ["", "LIST|PLAY|OFF|STOP", "значение", "значение", "", "", "", "", "", "", "", "", "", "", ""],
- ">TONE" => ["", "SET|CHANGE", "<КРАСНЫЙ>", "<ЗЕЛЕНЫЙ>", "<СИНИЙ>", "<НАСЫЩЕННОСТЬ>", "<ОЖИДАНИЕ>", "", "", "", "", "", "", "", ""],
- ">KHAS" => ["", "LIGHTS", "<КРАСНЫЙ>", "<ЗЕЛЕНЫЙ>", "<СИНИЙ>", "<ПРОЗРАЧНОСТЬ>", "", "", "", "", "", "", "", "", ""],
- ">SCREEN" => ["", "SHOW|HIDE|SIZE", "", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">CLEAR" => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">COMMONEVENT" => ["", "ID", "", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">CE" => ["", "ID", "", "", "", "", "", "", "", "", "", "", "", "", ""],
- ">MAP" => ["", "TROOP|INFO|EVENT|EVENTS|LIST", "значение1", "значение2", "", "", "", "", "", "", "", "", "", "", ""],
- ">FONT" => ["", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]}
- sum_size = ((text.join("_").size - 2) * 18)
- y_pos = 380 * ($font_size2x ? 1 : 2) + ($font_size2x ? 0 : 10)
- Debug_Text.clear_hint
- if text.size > 1
- Debug_Text.set_color(105, 255, 246)
- if text[0] != ">" and $input_for_somebody[2] == false
- temp = com_options[text[0]][text.size-1].split("|")
- temp.each do |c|
- if y_pos > 340
- if text[text.size-1][0..-1] == c[0...text[text.size-1].size]
- Debug_Text.draw_word(c, sum_size, y_pos)
- y_pos -= 20
- end
- end
- end
- end
- else
- commands.sort.each do |c|
- if y_pos > 340
- if text[text.size-1][0..-1] == c[0...text[text.size-1].size]
- Debug_Text.set_color(105, 255, 246)
- Debug_Text.draw_word(c, 4, y_pos)
- y_pos -= 20
- end
- end
- end
- end
- end
- def self.input_command
- command = $copy_input.split(" ")
- $output = Array.new(1)
- $error = command[0]
- #---------------------------------------------------------------------------
- #command >редактирование
- #---------------------------------------------------------------------------
- if $input_for_somebody[2]
- error = ""
- error2 = ""
- help_used = false
- if $input_for_somebody[0] == ">ENEMY"
- i = $input_for_somebody[1]
- if command[1] != nil
- case command[0]
- when ">NAME"; command.shift ; $data_enemies[i].name = command.join(" ").capitalize
- when ">EXP"; $data_enemies[i].exp = command[1].to_i
- when ">GOLD"; $data_enemies[i].gold = command[1].to_i
- when ">BATTLER"; $data_enemies[i].battler_name = command[1] if File.exist?("Graphics/Battlers/#{command[1]}")
- when ">HUE"; $data_enemies[i].battler_hue = command[1].to_i
- when ">MHP"; $data_enemies[i].params[0] = command[1].to_i
- when ">MMP"; $data_enemies[i].params[1] = command[1].to_i
- when ">ATK"; $data_enemies[i].params[2] = command[1].to_i
- when ">DEF"; $data_enemies[i].params[3] = command[1].to_i
- when ">MAT"; $data_enemies[i].params[4] = command[1].to_i
- when ">MDF"; $data_enemies[i].params[5] = command[1].to_i
- when ">LUK"; $data_enemies[i].params[6] = command[1].to_i
- when ">AGI"; $data_enemies[i].params[7] = command[1].to_i
- when ">HELP"; help_used = true
- end
- end
- if help_used
- $output = [" ----=== ПОДСКАЗКИ ===---- ", " "," >name", " >class",
- " >lvl >level", " >maxlvl >mlvl", " >minlvl >llvl ",
- " >MHP", " >MMP", " >ATK", " >DEF", " >MAT", " >MDF",
- " >LUK", " >AGI", " >DONE", "", "#{error}", "#{error2}"]
- else
- $output = [" ----=== ИЗМЕНЕНИЕ ГЕРОЯ ===---- ", " ",
- " Имя #{$data_enemies[i].name}",
- " Получаемый опыт #{$data_enemies[i].exp}",
- " Получаемые деньги #{$data_enemies[i].gold}",
- " Графика #{$data_enemies[i].battler_name}",
- " Оттенок #{$data_enemies[i].battler_hue}",
- " Здоровье #{$data_enemies[i].params[0]}",
- " Магия #{$data_enemies[i].params[1]}",
- " Атака #{$data_enemies[i].params[2]}",
- " Защита #{$data_enemies[i].params[3]}",
- " Магическая атака #{$data_enemies[i].params[4]}",
- " Магическая защита #{$data_enemies[i].params[5]}",
- " Ловкость #{$data_enemies[i].params[6]}",
- " Удача #{$data_enemies[i].params[7]}",
- "", "#{error}", "#{error2}"]
- end
- elsif $input_for_somebody[0] == ">ACTOR"
- if command[0] == ">HELP"
- help = []
- if command[1] != nil
- case command[1]
- when "NAME"; help = [" !Переименовать героя", " >NAME <имя>"]
- when "CLASS"; help = [" !изменить класс герою", " >NAME <ID>"]
- when "LVL", "LEVEL"; help = [" !изменить уровень герою", " >LVL <уровень> / >LEVEL <уровень>"]
- when "MLVL", "MAXLVL"; help = [" !изменить максимальный уровень герою", " >MLVL <уровень> / >MAXLVL <уровень>"]
- when "LLVL", "MINLVL"; help = [" !изменить минимальный уровень герою", " >LLVL <уровень> / >MINLVL <уровень>"]
- when ">MHP", ">MMP", ">ATK", ">DEF", ">MAT", ">MDF", ">LUK", ">AGI"
- help = [" !изменить характеристики герою", " #{command[1]} <значение> [!]"]
- when ">DONE", ">END"; help = [" !завершить изменение героя", ""]
- end
- else
- help_used = true
- help = ["для подробностей введи >help <команда>" , ""]
- help = ["для подробностей введи", ">help <команда>"] if $font_size2x
- end
- error = help[0]
- error2 = help[1]
- end
- if command[1] != nil
- case command[0]
- when ">NAME"; command.shift; $game_actors[$input_for_somebody[1]].name = command.join(" ").capitalize
- when ">DONE"; $input_for_somebody = ["", 0, false]; Console_Commands.nul_text; Debug_Text.clear_text
- when ">CLASS"; $game_actors[$input_for_somebody[1]].class_id = command[1].to_i
- 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)
- when ">MAXLVL", ">MLVL"
- $data_actors[$input_for_somebody[1]].max_level = command[1].to_i
- $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
- when ">MINLVL", ">LLVL"
- $data_actors[$input_for_somebody[1]].initial_level = command[1].to_i
- $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
- when ">MHP", ">MMP", ">ATK", ">DEF", ">MAT", ">MDF", ">LUK", ">AGI";
- params = [">MHP", ">MMP", ">ATK", ">DEF", ">MAT", ">MDF", ">AGI", ">LUK"]
- i = $input_for_somebody[1]
- par_id = params.index(command[0])
- lvl = $game_actors[$input_for_somebody[1]].level
- if command[2] != nil
- if command[2] == "!"
- ($data_actors[$input_for_somebody[1]].initial_level..$data_actors[$input_for_somebody[1]].max_level).each do |lv|
- $data_classes[$game_actors[i].class_id].params[par_id, lv] = command[1].to_i
- end
- end
- else
- $data_classes[$game_actors[i].class_id].params[par_id, lvl] = command[1].to_i
- end
- end
- end
- if help_used
- $output = [" ----=== ПОДСКАЗКИ ===---- ", " "," >name", " >class",
- " >lvl >level", " >maxlvl >mlvl", " >minlvl >llvl ",
- " >MHP", " >MMP", " >ATK", " >DEF", " >MAT", " >MDF",
- " >LUK", " >AGI", " >DONE", "", "#{error}", "#{error2}"]
- else
- $output = [" ----=== ИЗМЕНЕНИЕ ГЕРОЯ ===---- ", " ",
- " Имя #{$game_actors[$input_for_somebody[1]].name}",
- " Класс #{$game_actors[$input_for_somebody[1]].class_id} #{$data_classes[$data_actors[$input_for_somebody[1]].class_id].name}",
- " Уровень МИН/МАКС #{$data_actors[$input_for_somebody[1]].initial_level}/#{$data_actors[$input_for_somebody[1]].max_level}",
- " Текущий уровень #{$game_actors[$input_for_somebody[1]].level}",
- " Здоровье #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[0, $game_actors[$input_for_somebody[1]].level]}",
- " Магия #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[1, $game_actors[$input_for_somebody[1]].level]}",
- " Атака #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[2, $game_actors[$input_for_somebody[1]].level]}",
- " Защита #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[3, $game_actors[$input_for_somebody[1]].level]}",
- " Магическая атака #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[4, $game_actors[$input_for_somebody[1]].level]}",
- " Магическая защита #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[5, $game_actors[$input_for_somebody[1]].level]}",
- " Ловкость #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[6, $game_actors[$input_for_somebody[1]].level]}",
- " Удача #{$data_classes[$game_actors[$input_for_somebody[1]].class.id].params[7, $game_actors[$input_for_somebody[1]].level]}",
- "", "", "#{error}", "#{error2}"]
- end
- end
- Console_Commands.output
- Console_Commands.nul_text
- else
- case command[0]
- #---------------------------------------------------------------------------
- #command >help
- #---------------------------------------------------------------------------
- when ">HELP"
- $error = command[0]
- if command[1] != nil
- $output = [" -------------------------------- ", " -------===== ПОМОЩЬ =====------- ",
- " -------------------------------- "]
- case command[1]
- when "MOVE"
- if $font_size2x
- $output += [" Переход на другую локацию: ", ' >move <id> <x> <y> <dir>',
- '', ' id - номер карты', ' x, y - координаты', ' Начало отсчета координат идет с',
- ' левого верхнего угла карты', '', 'dir - направление игрока',
- ' 2 - вниз, 4 - влево', '6 - вправо, 8 - вверх']
- else
- $output += [" Переход на другую локацию: ", ' >move <id> <x> <y> <dir>', '',
- ' id - номер карты, x, y - координаты', ' Начало отсчета координат идет с левого верхнего угла карты',
- ' dir - направление игрока: ',' 2 - вниз, 4 - влево, 6 - вправо, 8 - вверх']
- end
- when "KHAS"
- if $khas_effect == true
- if $font_size2x
- $output += [" Изменение освещения используя ", ' Khas Awesome Lights Effects ', ' ', " Применение:",
- ' >khas lights <t> <r> <g> <b> <o>', ' t - время в кадрах',
- ' r g b - цвет по схеме RGB', ' o - прозрачность освещения']
- else
- $output += [" Изменение освещения используя скрипт Khas Awesome Lights Effects",
- ' ', " Применение:", ' >khas lights <t> <r> <g> <b> <o>', ' t - время в кадрах',
- ' r g b - цвет по схеме RGB', ' o - прозрачность освещения']
- end
- else
- $output = ["Khas Awesome Light Effects <не установлен>"]
- $output = ["Khas Awesome Light Effects", "<не установлен>"] if $font_size2x
- end
- when "ITEMS", "WEAPONS", "ARMORS"
- words = {"ITEMS" => ["ВЕЩАМИ", "ПРЕДМЕТОВ", "ПРЕДМЕТ"], "WEAPONS" => ["ОРУЖИЕМ", "ОРУЖИЯ", "ОРУЖИЕ"], "ARMORS" => ["БРОНЁЙ", "БРОНИ", "БРОНЮ"]}
- if $font_size2x
- $output += [" Манипуляция #{words[command[1]][0]}", " -Показать список #{words[command[1]][1]}",
- " >#{command[1]} list <ID 1> <ID 2>", " -Получить #{words[command[1]][2]}",
- " >#{command[1]} give <ID> <Count> ", ' -"Потерять" ' + words[command[1]][2],
- " >#{command[1]} lose <ID> <Count> ", " lose может быть заменен на: lost, erase", ' ',
- " id - номер #{words[command[1]][2]} в базе данных ", ' Count - количество', ' ']
- else
- $output += [" Манипуляция #{words[command[1]][0]}",
- " >#{command[1]} list <ID 1> <ID 2> - Показать список #{words[command[1]][1]}",
- " >#{command[1]} give <ID> <Count> - Получить #{words[command[1]][2]}",
- ' >' + command[1] + ' lose <ID> <Count> - "Потерять" ' + words[command[1]][2],
- " lose может быть заменен на: lost, erase", ' ',
- " id - номер #{words[command[1]][2]} в базе данных ", ' Count - количество', ' ']
- end
- when "CLEAR", "MENU", "EXIT", "FONT"
- words = {"CLEAR" => " Очистить консоль", "MENU" => " Выход в меню", "EXIT" => " Закрыть игру", "FONT" => "Переключить размер шрифта"}
- $output += [words[command[1]], " >#{command[1]}"]
- when "SKILLS"
- if $font_size2x
- $output += [" Манипуляция навыками", " -Изучить навык", " >skills learn actor <aID> <sID> ",
- " -Забыть навык", " >skills forget actor <aID> <sID>", " -Список навыков",
- " >skills list <ID 1> <ID 2>", ' ', ' actor <aID> может быть заменен на',
- ' all. в этом случае будут навык ', ' изучать все герои в команде', ' ']
- else
- $output += [" Манипуляция навыками", " >skills learn actor <aID> <sID> - Изучить навык",
- " >skills forget actor <aID> <sID> - Забыть навык", " >skills list <ID 1> <ID 2> - Список навыков", ' ',
- ' actor <aID> может быть заменен на all. в этом случае будут навык ', ' изучать все герои в команде', ' ']
- end
- when "ACTOR"
- if $font_size2x
- $output += [" Манипуляция героями", " -Показать список героев",
- " >actor list <ID 1> <ID 2>", " -Добавить героя в команду",
- " >actor add <ID>", ' -Убрать героя из команды', ' >actor remove <ID>',
- ' -Переименовать героя', ' >actor rename <ID> <Имя>',
- ' -Изменить характеристики героя', ' >actor edit <ID> ', ' ']
- else
- $output += [" Манипуляция героями", " >actor list <ID 1> <ID 2> - Показать список героев",
- " >actor add <ID> - Добавить героя в команду",' >actor remove <ID> - Убрать героя из команды',
- ' >actor rename <ID> <Имя> - Переименовать героя',' >actor edit <ID> -Изменить характеристики героя', ' ']
- end
- when "TONE"
- if $font_size2x
- $output += [" Изменить оттенок экрана", " -Изменить оттнеок.",
- " >tone set <r> <g> <b> <c> <w>" " ", ' r g b - цвет по схеме RGB',
- ' c - контраст (0 - 255)', ' w - ожидание в кадрах', ' ']
- else
- $output += [" Изменить оттенок экрана", " >tone change <r> <g> <b> <c> <w> - Изменить оттнеок.",
- " ", ' r g b - цвет по схеме RGB',
- ' c - контраст (0 - 255)', ' w - ожидание в кадрах', ' ']
- end
- when "ENEMY"
- if $font_size2x
- $output += [" Манипуляция врагами", " -Показать список врагов", " >enemy list <ID 1> <ID 2>",
- ' -Переименовать врага', ' >enemy rename <ID> <Имя> ', ' -Вызвать битву. ',
- ' >enemy <summon_battle|sb> <tID> ', ' <esc> <cont> ', ' tID => номер группы врагов', " ESC => Шанс побега (1/0) ", " CONT => играть после поражения (1/0)",
- ' ', " -Полностью изменить врага", " >enemy edit <ID> "]
- else
- $output += [" Манипуляция врагами",
- " >enemy list <ID 1> <ID 2> - Показать список врагов",
- ' >enemy rename <ID> <Имя> - Переименовать врага',
- ' >enemy <summon_battle|sb> <tID> <esc> <cont> - Вызвать битву.',
- ' ', ' tID => номер группы врагов', " ESC => Шанс побега (1/0) ",
- " CONT => играть после поражения (1/0)", ' ', " >enemy edit <ID> -Полностью изменить врага"]
- end
- when "GOLD"
- if $font_size2x
- $output += [" Манипуляция деньгами", " -Получить деньги", " >gold give <Количество> ",
- " -Потерять деньги", " >gold lost <Количество>", ' ']
- else
- $output += [" Манипуляция деньгами", " >gold give <Количество> - Получить деньги",
- " >gold lost <Количество> - Потерять деньги", ' ']
- end
- when "BGM"
- if $font_size2x
- $output += [" Действия с фоновой музыкой", " -Воспроизвести мелодию", " >bgm play <номер из списка>",
- " -Остановить мелодию ", " >bgm <off|stop> *msec* ", " -Показать список мелодий",
- " >bgm list <ID1> <ID2>"]
- else
- $output += [" Действия с фоновой музыкой", " >bgm play <номер из списка> - Воспроизвести мелодию",
- " >bgm <off|stop> *msec* - Остановить мелодию", " >bgm list <ID1> <ID2> - Показать список мелодий"]
- end
- when "TIMER"
- if $font_size2x
- $output += [" Управление таймером", " -Запустить таймер", " >timer start <sec>" ,
- ' -Остановить таймер', ' >timer stop', ' -Добавить времени к таймеру',
- ' >timer add <sec>']
- else
- $output += [" Управление таймером", " >timer start <sec> - Запустить таймер" ,
- ' >timer stop - Остановить таймер', ' >timer add <sec> - Добавить времени к таймеру']
- end
- when "SCREEN"
- $output += [">screen show - Просветление экрана",">screen hide | Затемление экрана"]
- when "COMMONEVENT"
- $output += [" Вызвать общее событие 1 раз", " >commonevent <ID>"]
- when "WINDOW"
- if $font_size2x
- $output += [" Манипуляция окном", " -скрыть окно",
- " >window hide", " Оно будет активно, но его не ", " будет на панели задач ",
- " -изменить размер (растянуть)", " >window resize <x> <y> <sx> <sy>",
- " x, y - местоположение окна", " sx, sy - размер экрана в пикселях",
- " -изменить размер игры", " >window resize_game <sx> <sy>", ' ']
- else
- $output += [" Манипуляция окном", " >window hide - скрыть окно",
- " Оно будет активно, но его не ", " будет на панели задач ",
- " >window resize <x> <y> <sx> <sy> -изменить размер (растянуть окно)",
- " x, y - местоположение окна", " sx, sy - размер экрана в пикселях",
- " >window resize_game <sx> <sy> - изменить размер игры", ' ']
- end
- when"HEAL"
- if $font_size2x
- $output += [" Восстановление партии", " >heal <actor|party> <hp|mp|tp> ", " <ID1> <ID2>", " "]
- else
- $output += [" Восстановление партии", " >heal <actor|party> <hp|mp|tp> <ID1> <ID2>", " "]
- end
- when "SWITCH", "SW"
- $output += [" Действия с переключателями", " >switch <ID> <положение>", " ",
- ' >switch имеет синоним >sw', ' >switch принимает true|ON|false|OFF']
- when "VARIABLE", "VAR"
- $output += [" Действия с переменными", " >variable <ID> <число>", " ",
- '>variable имеет синоним >var', '>variable принимает только числа']
- when "HELP"
- $output += ["Зачем ты ввел эту команду?", 'Смотри >help']
- when "MAP"
- if $font_size2x
- $output += ["Информация о вашем местоположении",
- " -Показать список локаций", " >map list <ID 1> <ID 2>", ' - Показать координаты события',
- ' >map event <ID>', ' -Показать скрытые события ', ' (заменяет текстуру событиям без',
- ' графики)', ' >map events show', ' -Перейти к событию ',
- ' >map events <id> tp|teleport', ' -Подробная информация о карте', ' >map info',
- ' -Вывести список случайных столкновений',' >map troop show']
- else
- $output += [" Информация о вашем местоположении",
- " >map list <ID 1> <ID 2> - Показать список локаций", ' >map event <ID> - Показать координаты события',
- ' >map events show - Показать скрытые события ', ' (заменяет текстуру событиям без графики)',
- ' >map events <id> tp|teleport - Перейти к событию ', ' >map info - Подробная информация о карте',
- ' >map troop show - Вывести список случайных столкновений']
- end
- end
- $output += [" -------------------------------- ", " -------===== ПОМОЩЬ =====------- ",
- " -------------------------------- "]
- else
- if $font_size2x
- $output = [" -------------------------------- ", " ----==== Список команд =====---- ",
- " -------------------------------- ", '>move / >items / ',
- '>weapons / >armors / >skills / ', '>actor / >enemy / >gold / ',
- '>bgm / >map / >menu / ', '>exit / >tone / >screen / ',
- '>window / >commonevent / >heal / ', '>switch / >sw / >help /',
- '>timer / >variable / >var /', '>khas /','',
- 'Чтобы узнать больше подробностей,', 'введите ">help <команда>"',
- " -------------------------------- ", " ----==== Список команд =====---- ",
- " -------------------------------- "]
- else
- $output = [" -------------------------------- ", " ----==== Список команд =====---- ",
- " -------------------------------- ", '>move - перемещение игрока',
- '>items - действия с вещами', '>weapons - действия с оружием',
- '>armors - действия с бронёй', '>skills - действия с навыками',
- '>actor - действия над героями', '>enemy - действия над врагами',
- '>gold - действия над валютой', '>bgm - действия над музыкой',
- '>map - действия над картами', '>menu - выход в меню',
- '>exit - закрыть игру', '>tone - оттенок экрана',
- '>screen - манипуляция над видимостью в игре', '>window - манипуляция над окном игры',
- '>commonevent - запуск общего события', '>heal - восстановление героев',
- '>switch / >sw - переключатели', '>help - список команд / помощь по командам',
- '>timer - манипуляция над таймером', '>variable / >var - переменные',
- '>khas - действия со скриптами из Khas Avesome Light Effects', '',
- 'Чтобы узнать больше подробностей, введите ">help <команда>"',
- " -------------------------------- ", " ----==== Список команд =====---- ",
- " -------------------------------- "]
- end
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >menu
- #---------------------------------------------------------------------------
- when ">MENU"; SceneManager.goto(Scene_Title)
- #---------------------------------------------------------------------------
- #command >font
- #---------------------------------------------------------------------------
- when ">FONT"; $font_size2x = !$font_size2x; Console_Commands.nul_text
- #---------------------------------------------------------------------------
- #command >exit
- #---------------------------------------------------------------------------
- when ">EXIT"; SceneManager.exit
- #---------------------------------------------------------------------------
- #command >move
- #---------------------------------------------------------------------------
- when ">MOVE"
- if command.size < 5
- Console_Commands.error
- else
- map_file = sprintf("Map%03d.rvdata2", command[1].to_i)
- if File.exist?("Data/#{map_file}") == false
- $output[0] = "Данной локации не существует."
- else
- $game_temp.fade_type = 0
- dir = command[4].to_i
- dir = $game_player.direction if ![2,4,6,8].include?(command[4].to_i)
- $output = ["Перемещение на карту #{command[1]}", "по координатам Х:#{command[2]} Y:#{command[3]}."]
- Console_Commands.output
- Graphics.wait(60)
- Console_Commands.exit
- $game_player.reserve_transfer(command[1].to_i, command[2].to_i, command[3].to_i, dir)
- end
- end
- Console_Commands.output if $reseted_switches != false
- #---------------------------------------------------------------------------
- #command >items
- #---------------------------------------------------------------------------
- when ">WEAPONS", ">ARMORS", ">ITEMS"
- items = {">WEAPONS"=>$data_weapons, ">ITEMS"=>$data_items, ">ARMORS"=>$data_armors}
- cuttert_category = items[command[0]]
- case command[1]
- when "GIVE", "LOSE", "LOST", "ERASE"
- if command[2] != nil
- amount = 1
- amount = command[3].to_i if command[3] != nil
- action = ["Добавлено", "Удалено"]
- $game_party.gain_item(cuttert_category[command[2].to_i], amount) if command[1] == "GIVE"
- $game_party.lose_item(cuttert_category[command[2].to_i], amount) if command[1] == "LOSE"
- $output[0] = "#{action[command[1] == "GIVE" ? 0 : 1]}:"
- $output[1] = cuttert_category[command[2].to_i].name.to_s
- $output[2] = "в количестве #{amount}шт. "
- else
- Console_Commands.error
- end
- when "LIST"
- command[2] == nil ? i = 1 : i = command[2].to_i
- command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
- index = 0
- $output[0] = "--==Список предметов с #{i} по #{j}==--"
- while i <= j
- if cuttert_category[i] == nil
- item = "<none>" if cuttert_category[i] == nil
- else
- item = cuttert_category[i].name
- item = "<без имени> " if cuttert_category[i].name == ""
- space = sprintf("%-3d", i)
- end
- index += 1
- $output[i] = "#{space}#{item}"
- i += 1
- end
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >switch
- #---------------------------------------------------------------------------
- when ">SWITCH", ">SW"
- if command[1] != nil
- if command[2] == "TRUE" or command[2] == "ON"
- $game_switches[command[1].to_i] = true
- $output[0] = "Переключатель №#{command[1].to_i} включен."
- elsif command[2] == "FALSE" or command[2] == "OFF"
- $game_switches[command[1].to_i] = false
- $output[0] = "Переключатель №#{command[1].to_i} выключен."
- else
- $output[0] = "Переключатель №#{command[1].to_i} => #{$game_switches[command[1].to_i]}"
- end
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >timer
- #---------------------------------------------------------------------------
- when ">TIMER"
- if command[1] == "START"
- if command[2] != nil
- $output[0] = "Таймер запущен"
- Console_Commands.output
- Graphics.wait(60)
- $game_timer.start(command[2].to_i * Graphics.frame_rate)
- Console_Commands.exit
- else
- Console_Commands.error
- end
- elsif command[1] == "ADD"
- if command[2] != nil
- a = $game_timer.sec
- $game_timer.stop
- sec = $game_timer.sec + command[2].to_i
- $output[0] = "Добавлено #{command[2]} секунд"
- Console_Commands.output
- Graphics.wait(60)
- $game_timer.start(sec * Graphics.frame_rate)
- Console_Commands.exit
- else
- Console_Commands.error
- end
- elsif command[1] == "STOP"
- $output[0] = "Таймер остановлен"
- Console_Commands.output
- $game_timer.stop
- else
- Console_Commands.error
- end
- #---------------------------------------------------------------------------
- #command >variable
- #---------------------------------------------------------------------------
- when ">VARIABLE", ">VAR"
- if command[1] != nil
- if command[2] != nil
- $game_variables[command[1].to_i] = command[2].to_i
- $output[0] = "Переменная №#{command[1].to_i} теперь равна #{$game_variables[command[1].to_i]}"
- else
- $output[0] = "Переменная №#{command[1].to_i} равна #{$game_variables[command[1].to_i]}"
- end
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >skills
- #---------------------------------------------------------------------------
- when ">SKILLS"
- if command[1] == "LEARN"
- if command[2] == "ACTOR" and command[3] != nil and command[4] != nil
- $game_actors[command[3].to_i].learn_skill(command[4].to_i)
- $output[0] = $game_actors[command[3].to_i].name.to_s + " изучает навык " + $data_skills[command[4].to_i].name.to_s
- $output[1] = ' '
- elsif command[2] == "ALL" and command[3] != nil
- $game_party.members.each { |actor| actor.learn_skill(command[3].to_i) }
- $output[0] = "Все изучили навык " + $data_skills[command[3].to_i].name.to_s
- $output[1] = ' '
- else
- Console_Commands.error
- end
- elsif command[1] == "FORGET"
- if command[2] == "ACTOR" and command[3] != nil and command[4] != nil
- $game_actors[command[3].to_i].forget_skill(command[4].to_i)
- $output[0] = $game_actors[command[3].to_i].name.to_s + " забывает навык " + $data_skills[command[4].to_i].name.to_s
- elsif command[2] == "ALL" and command[3] != nil
- $game_party.members.each { |actor| actor.forget_skill(command[3].to_i) }
- $output[0] = "Все забыли навык " + $data_skills[command[3].to_i].name.to_s
- else
- Console_Commands.error
- end
- elsif command[1] == "LIST"
- command[2] == nil ? i = 1 : i = command[2].to_i
- command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
- index = 0
- $output[0] = "Список навыков с #{i} по #{j}"
- while i <= j
- if $data_skills[i] == nil
- item = "<none>" if $data_skills[i] == nil
- else
- item = $data_skills[i].name
- item = "<без имени> " if $data_skills[i].name == ""
- space = sprintf("%-3d", i)
- end
- index += 1
- $output[i] = "#{space}#{item}"
- i += 1
- end
- Console_Commands.output
- else
- Console_Commands.error
- end
- Console_Commands.output if command[1] != "LIST"
- #---------------------------------------------------------------------------
- #command >actor
- #---------------------------------------------------------------------------
- when ">ACTOR"
- if command[1] == "EDIT" and command[2] != nil #ID героя
- $input_for_somebody[2] = true
- $input_for_somebody[1] = command[2].to_i
- $input_for_somebody[0] = command[0]
- Console_Commands.input_command
- elsif command[1] == "ADD" and command[2] != nil
- $game_party.add_actor(command[2].to_i)
- $output[0] = "#{$game_actors[command[2].to_i]} присоединяется в команду"
- elsif command[1] == "REMOVE" and command[2] != nil
- $game_party.remove_actor(command[2].to_i)
- $output[0] = "#{$game_actors[command[2].to_i]} покидает команду"
- elsif command[1] == "LIST"
- command[2] == nil ? i = 1 : i = command[2].to_i
- command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
- $output[0] = "ID Имя ЛВЛ МиЛВЛ МаЛВЛ MHP MMP ATK DEF MAT MDF AGI LUK"
- out_int = 1
- while i <= j
- if $game_actors[i] == nil
- $output[out_int] = "#{sprintf("%-3d", i)}<Персонажа нет в базе данных>"
- else
- id = sprintf("%-3d", i)
- #--------------
- name = sprintf("%-10s",$game_actors[i].name)
- name = name[0..8] + "~" if name.size > 10
- name = "<без имени>" if name == ""
- #--------------
- current_lvl = sprintf("%-4d", $game_actors[i].level)
- #--------------
- minlvl = sprintf("%-4d", $data_actors[i].initial_level)
- #--------------
- maxlvl = sprintf("%-4d", $data_actors[i].max_level)
- #--------------
- states = ""
- (0..7).each do |x|
- hp = $data_classes[$game_actors[i].class_id].params[x, $game_actors[i].level]
- thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
- states += sprintf("%-5s", thp)
- end
- $output[out_int] = "#{id}#{outputname} #{current_lvl}#{minlvl}#{maxlvl}#{states}"
- end
- out_int += 1
- i+=1
- end
- puts ' '
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >heal
- #---------------------------------------------------------------------------
- when ">HEAL" #command
- if command[1] == "ACTOR"
- if ["HP", "MP", "TP", "ALL"].include?(command[2])
- command[3] == nil ? Console_Commands.error : one = command[3].to_i
- command[4] == nil ? two = one : two = command[4].to_i
- out_int = 0
- (one..two).each do |x|
- $game_party.members[x].hp = 99999999 if ["HP", "ALL"].inclunde?(command[2])
- $game_party.members[x].mp = 99999999 if ["MP", "ALL"].inclunde?(command[2])
- $game_party.members[x].tp = 99999999 if ["TP", "ALL"].inclunde?(command[2])
- Audio.se_play("Audio/SE/Absorb2") if ["HP", "ALL"].inclunde?(command[2])
- Audio.se_play("Audio/SE/Barrier") if ["MP", "ALL"].inclunde?(command[2])
- Audio.se_play("Audio/SE/Collapse3") if ["TP", "ALL"].inclunde?(command[2])
- $output[out_int] = "#{$game_party.members[x].name} #{command[2] == "ALL" ? "полностью восстанавливается!" : "восстанавливает #{command[2]}!"}"
- out_int += 1
- end
- else
- Console_Commands.error
- end
- elsif command[1] == "PARTY"
- if ["HP", "MP", "TP", "ALL"].include?(command[2])
- $game_party.all_members.each do |x|
- x.hp = 99999999 if ["HP", "ALL"].inclunde?(command[2])
- x.mp = 99999999 if ["MP", "ALL"].inclunde?(command[2])
- x.tp = 99999999 if ["TP", "ALL"].inclunde?(command[2])
- end
- $output[0] = "Команда #{command[2] == "ALL" ? "полностью восстанавливается!" : "восстанавливает #{command[2]}!"}"
- Audio.se_play("Audio/SE/Absorb2") if ["HP", "ALL"].inclunde?(command[2])
- Audio.se_play("Audio/SE/Barrier") if ["MP", "ALL"].inclunde?(command[2])
- Audio.se_play("Audio/SE/Collapse3") if ["TP", "ALL"].inclunde?(command[2])
- else
- Console_Commands.error
- end
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >enemy
- #---------------------------------------------------------------------------
- when ">ENEMY" #command
- if command[1] == "EDIT" and command[2] != nil
- $input_for_somebody[2] = true
- $input_for_somebody[1] = command[2].to_i
- $input_for_somebody[0] = command[0]
- Console_Commands.input_command
- elsif (command[1] == "SUMMON_BATTLE" or command[1] == "SB") and command[2] != nil
- troop_id = command[2].to_i
- esc = false if command[3] == nil or command[3] == "0"#Can Escape?
- esc = true if command[3] == "1"
- cont = false if command[4] == nil or command[4] == "0"#Continue?
- cont = true if command[4] == "1" #Continue?
- BattleManager.setup(troop_id, esc, cont)
- $game_player.make_encounter_count
- SceneManager.call(Scene_Battle)
- Console_Commands.nul_text
- $debug_zone.bitmap.clear
- $reseted_switches = false
- elsif command[1] == "LIST"
- command[2] == nil ? i = 1 : i = command[2].to_i
- command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
- $output[0] = "ID NAME MHP MMP ATK DEF MAT MDF AGI LUK"
- out_int = 1
- (i..j).each do |id|
- if $data_enemies[i] == nil
- $output[out_int] = sprintf("%-4sn/a", i.to_s)
- else
- temp_text = ""
- temp_text += sprintf("%-4d", id)
- name = $data_enemies[id].name
- 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)
- temp_text += name
- (0..7).each do |par|
- hp = $data_enemies[id].params[par]
- thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
- temp_text += sprintf("%-4s", thp)
- end
- hp = $data_enemies[id].exp
- thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
- temp_text += sprintf("%-4s", thp)
- hp = $data_enemies[id].gold
- thp = (hp / 1000000 != 0 ? "#{hp/1000000}m": (hp / 1000 != 0 ? "#{hp / 1000}k": "#{hp}"))
- temp_text += sprintf("%-4s", thp)
- p temp_text
- $output.push(temp_text)
- end
- out_int +=1
- end
- elsif command[1] == "SHOW" or command[1] == "INFO"
- if command[2].to_i != 0
- $enemy = Sprite.new
- $enemy.bitmap = Bitmap.new("Graphics/Battlers/" + $data_enemies[command[2].to_i].battler_name )
- $enemy.x = 360
- $enemy.y = 280
- $enemy.ox = $enemy.bitmap.width / 2
- $enemy.oy = $enemy.bitmap.height
- x = 20
- y = 90
- Debug_Text.draw_word("Имя: " + $data_enemies[command[2].to_i].name, x, y)
- (0..7).each do |par|
- Debug_Text.draw_word(" #{Vocab.param(par)}: #{$data_enemies[command[2].to_i].params[par]}", x, y + 20 + (20 * par))
- end
- Debug_Text.draw_word(" #{Vocab.currency_unit}: #{$data_enemies[command[2].to_i].gold}", x, y + 180)
- Debug_Text.draw_word(" EXP: #{$data_enemies[command[2].to_i].exp}", x, y + 200)
- (0..2).each do |item|
- name = "Ничего"
- item_id = $data_enemies[command[2].to_i].drop_items[item].data_id
- kind_id = $data_enemies[command[2].to_i].drop_items[item].kind
- denominator = $data_enemies[command[2].to_i].drop_items[item].denominator
- name = $data_items[item_id].name if kind_id == 1
- name = $data_weapons[item_id].name if kind_id == 2
- name = $data_armors[item_id].name if kind_id == 3
- Debug_Text.draw_word(" Дроп #{item +1}: #{name} | 1 к #{denominator}", x, y + 220 + (20 * item))
- end
- end
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command /window
- #---------------------------------------------------------------------------
- when ">WINDOW"
- if command[1] == "HIDE"
- ShowWindow.call(HWND, 0)
- elsif command[1] == "RESIZE" and command[2] != nil and command[3] != nil and command[4] != nil and command[5] != nil
- SetWindowPos.call(HWND, -2, command[2].to_i, command[3].to_i, command[4].to_i, command[5].to_i, 0)
- elsif command[1] == "RESIZE_GAME" and command[2] != nil and command[3] != nil
- Graphics.resize_screen(command[2].to_i, command[3].to_i)
- else
- Console_Commands.error
- end
- #---------------------------------------------------------------------------
- #command >gold
- #---------------------------------------------------------------------------
- when ">GOLD"
- if command[1] == "GIVE" and command[2] != nil
- $game_party.gain_gold(command[2].to_i)
- $output = ["Команда получает " + command[2].to_s + " #{Vocab.currency_unit[0]}.", "Сейчас имеется #{$game_party.gold} #{Vocab.currency_unit[0]}."]
- elsif command[1] == "LOSE" and command[2] != nil
- $game_party.lose_gold(command[2].to_i)
- $output = ["Команда теряет " + command[2].to_s + " #{Vocab.currency_unit[0]}.", "Сейчас имеется #{$game_party.gold} #{Vocab.currency_unit[0]}."]
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >tone
- #---------------------------------------------------------------------------
- when ">BGM"
- if command[1] == "LIST"
- command[2] == nil ? i = 1 : i = command[2].to_i
- command[3] == nil ? j = i + ($font_size2x ? 16 : 37) : j = command[3].to_i
- index = 0
- $output[0] = "Список музыки с #{i} по #{j}"
- output_inyeger = 1
- while i <= j
- if $all_bgm[i] == nil
- item = "<none>" if $all_bgm[i] == nil
- else
- item = "#{sprintf("%-4s",i)}#{$all_bgm[i] == "" ? "n/a":$all_bgm[i]}"
- end
- index += 1
- $output[output_inyeger] = item
- output_inyeger += 1
- i += 1
- end
- elsif command[1] == "PLAY"
- if command[2] != nil
- if $all_bgm[command[2].to_i] == nil
- command[2] = -1
- $output[0] = "Данной музыки нет в списке"
- $output[1] = "Музыка сменена на #{$all_bgm[command[2].to_i]}"
- Audio.bgm_play("#{RTP_path}Audio/BGM/#{$all_bgm[command[2].to_i]}")
- else
- Audio.bgm_play("Audio/BGM/#{$all_bgm[command[2].to_i]}") if File.exist?("Audio/BGM/#{$all_bgm[command[2].to_i]}")
- Audio.bgm_play("Audio/BGM/#{$all_bgm[command[2].to_i]}") if $rtpbgm_files.include?($all_bgm[command[2].to_i])
- $output[0] = "Музыка сменена на #{$all_bgm[command[2].to_i]}"
- end
- else
- Console_Commands.error
- end
- elsif command[1] == "OFF" or command[1] == "STOP"
- if command[2] == nil
- Audio.bgm_stop
- $output[0] = "Музыка выключена"
- else
- Audio.bgm_fade(command[2].to_i)
- sec = command[2].to_i / 1000.0
- index = sec.to_s.index(".")
- $output[0] = "Музыка выключится через #{sec.to_s[0..(index + 1)]} секунд"
- if sec > 300
- min = sec / 60.0
- $output[0] = "Музыка выключится через #{min.to_s[0..(index + 1)]} минут"
- end
- end
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >tone
- #---------------------------------------------------------------------------
- when ">TONE"
- 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
- $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)
- else
- Console_Commands.error
- end
- #---------------------------------------------------------------------------
- #command >screen
- #---------------------------------------------------------------------------
- when ">KHAS"
- if $khas_effect == true
- if command[1] == "LIGHTS"
- if command[2] != nil and command[3] != nil and command[4] != nil and command[5] != nil
- if command[6].to_i != nil
- a = [command[2].to_i, command[3].to_i, command[4].to_i, command[5].to_i]
- s = $game_map.effect_surface
- s.change_color(a[0],a[1],a[2],a[3],command[6].to_i)
- else
- s.change_color(a[0],a[1],a[2],a[3])
- end
- $output[0] = "Измененяем освещение"
- else
- Console_Commands.error
- end
- else
- Console_Commands.error
- end
- else
- if $font_size2x
- $output = ["Khas Awesome Light Effects", " не установлен!"]
- else
- $output = ["Khas Awesome Light Effects не установлен!"]
- end
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >screen
- #---------------------------------------------------------------------------
- when ">SCREEN"
- $error = command[0]
- if command[1] == "SHOW"
- Graphics.fadein(command[2].to_i) if command[2] != nil
- Graphics.fadein(1) if command[2] == nil
- elsif command[1] == "HIDE"
- Graphics.fadeout(command[2].to_i) if command[2] != nil
- Graphics.fadeout(1) if command[2] == nil
- elsif command[1] == "SIZE"
- setCursorPos = Win32API.new('user32', 'SetCursorPos' , 'iiiiiii' ,'i')
- getCursorXY = Win32API.new("user32", 'GetCursorPos' , 'P' , "V")
- result = "0"*8
- getCursorXY.call(result)
- $mouse_x, $mouse_y = result.unpack("LL")
- setCursorPos.call(9999,9999,0,0,0,0, 0)
- window = "0"*8 #
- getCursorXY.call(window)
- $win_x, $win_y = window.unpack("LL")
- $output[0] = "Твоё разрешение экрана " + ($win_x + 1).to_s + "x" + ($win_y + 1).to_s
- setCursorPos.call($mouse_x,$mouse_y,0,0,0,0, 0)
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #command >clear
- #---------------------------------------------------------------------------
- when ">CLEAR"; Debug_Text.clear_bitmap
- #---------------------------------------------------------------------------
- #command >commonevent
- #---------------------------------------------------------------------------
- when ">COMMONEVENT", "CE"
- if command[1] == nil
- Console_Commands.error
- else
- Console_Commands.exit
- $game_temp.reserve_common_event(command[1].to_i)
- end
- #---------------------------------------------------------------------------
- #command >map
- #---------------------------------------------------------------------------
- when ">MAP"
- if command[1] == "TROOP"
- if command[2] == "SHOW"
- out_int = 0
- max = (Graphics.height - 35) / 18
- while out_int < max
- if $game_map.encounter_list[out_int] == nil
- $output[out_int] = "#{out_int + 1} <none>"
- else
- $output[out_int] = "#{out_int + 1} #{$data_troops[$game_map.encounter_list[out_int].troop_id.to_i].name}"
- end
- out_int += 1
- puts out_int
- end
- else
- Console_Commands.error
- end
- elsif command[1] == "INFO"
- a = $game_map.map_id
- if $game_map.encounter_list[0].nil? == true
- encounters = "<none>"
- else
- encounters = Array.new
- var1 = 0
- new_arr = $game_map.encounter_list
- while new_arr[var1.to_i] != nil
- encounters[var1.to_i] = $data_troops[new_arr[var1.to_i].troop_id.to_i].name
- var1 += 1
- end
- end
- if $game_map.parallax_name == ""
- parall = "<none>"
- else
- parall = $game_map.parallax_name
- end
- $game_map.disable_dash? == true ? run = "Да" : run = "Нет"
- $game_map.loop_vertical? == true ? vert = "ВКЛ" : vert = "ВЫКЛ"
- $game_map.loop_horizontal? == true ? hor = "ВКЛ" : hor = "ВЫКЛ"
- $output = ["Имя карты", " #{$data_mapinfos[a].name}", "ID карты #{a}", "Размеры карты #{$game_map.width}x#{$game_map.height}",
- "Событий на этой карте #{$game_map.events.size}","Случайные столкновения?", " #{encounters}", "Имя файла для параллакса", " #{parall}",
- "Бег отключён? #{run}", "Вертикальная прокрутка? #{vert}", "Горизонтальная прокрутка? #{hor}", "Регион на котором ты стоишь #{$game_player.region_id}",
- "Тэг территории на котором ты стоишь #{$game_player.terrain_tag}"]
- elsif command[1] == "EVENT"
- if command[2] == nil
- tile_num = $game_map.width * $game_map.height
- num1 = 0
- num2 = 1
- while num1 != tile_num
- if $game_map.events[num1.to_i] != nil
- event_num = sprintf("%-3d", num2)
- ev_x = $game_map.events[num1.to_i].x
- ev_y = $game_map.events[num1.to_i].y
- ox = sprintf("%-4d", ev_x)
- oy = sprintf("%-4d", ev_x)
- $output[num1 - 1] = event_num.to_s + " X:" + ox.to_s + " Y:" + oy.to_s
- num2 +=1
- end
- num1 +=1
- end
- else
- $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
- end
- elsif command[1] == "EVENTS"
- if command[2] == "SHOW"
- $map_events_show = Array.new(300)
- events = Array.new(300)
- a = 1
- b = $game_map.width * $game_map.height
- while a <= b
- unless $game_map.events[a].nil?
- if $game_map.events[a].character_name == ""
- $game_map.events[a].set_graphic('!Flame',5)
- events[a] = 'edited'
- else
- events[a] = 'nope'
- end
- else
- events[a] = '_'
- end
- a+=1
- end
- $map_events_show[$game_map.map_id] = events
- Console_Commands.exit
- elsif command[2] == "SHOW_ARRIVE"
- print $map_events_show[$game_map.map_id]
- elsif command[2] != nil
- if command[3] == "TP" or command[3] == "TELEPORT"
- $game_temp.fade_type = 2
- $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)
- end
- end
- elsif command[1] == "LIST"
- command[2] == nil ? a = 1 : i = command[2].to_i
- command[3] == nil ? j = a + ($font_size2x ? 16 : 37) : j = command[3].to_i
- $output[0] = 'ID Имя карты'
- while a <= j
- map_file = sprintf("Map%03d.rvdata2", a)
- if File.exist?("Data/#{map_file}") == false
- b = sprintf("%-9d", a)
- $output[a] = b.to_s + '<none> '
- else
- id = sprintf("%-5d", a)
- name_map = $data_mapinfos[a].name
- $output[a] = "#{id}#{name_map}"
- end
- a+=1
- end
- else
- Console_Commands.error
- end
- Console_Commands.output
- #---------------------------------------------------------------------------
- #Конец
- #---------------------------------------------------------------------------
- else
- $error = ">HELP"
- Console_Commands.error
- end
- end
- end
- end
- class Debug_Text
- @color = nil
- def self.set_color(r, g, b)
- @color = Color.new(r, g, b)
- end
- def self.clear_text
- create_text_bitmap if $words == nil
- if $words.bitmap.disposed? == false
- $words.bitmap.clear_rect(0, Graphics.height - 20, Graphics.width, 90)
- end
- end
- def self.clear_bitmap
- create_text_bitmap if $words == nil
- $words = nil
- end
- def self.clear_hint
- $words.bitmap.clear_rect(0, Graphics.height - 68, Graphics.width - 120, 48)
- end
- def self.create_text_bitmap
- $words = Sprite.new
- $words.bitmap = Bitmap.new(Graphics.width, Graphics.height)
- $words.z = 100
- Graphics.update
- end
- def self.draw_word(word, x, y)
- (0...word.size).each do |l|
- draw_letter(word[l].upcase, x + (16 * l), y)
- end
- @color = nil
- end
- def self.fill_rects(*arr)
- create_text_bitmap if $words.bitmap.disposed?
- black = Color.new(0, 0, 0)
- arr.each do |a|
- $words.bitmap.fill_rect(a[0]/2+1, a[1]/2+1, a[2]/2, a[3]/2, black) if !$font_size2x
- $words.bitmap.fill_rect(a[0]+2, a[1]+2, a[2], a[3], black) if $font_size2x
- end
- arr.each do |a|
- color = Color.new(255, 255, 255)
- color = a[4] if a[4] != nil
- color = @color if @color != nil
- $words.bitmap.fill_rect(a[0]/2, a[1]/2, a[2]/2, a[3]/2, color) if !$font_size2x
- $words.bitmap.fill_rect(a[0], a[1], a[2], a[3], color) if $font_size2x
- end
- end
- def self.draw_icon(name, x, y)
- a = name.split(", ")
- i = 0
- while a[i] != nil
- p a[i]
- case a[i].upcase
- when "HP", "MP", "ATK", "DEF", "MAT", "MDF", "AGI", "LUK"; draw_letter(a[i], x + (i * 16),y)
- when "_"; draw_letter(" ", x + (i * 16),y)
- end
- i += 1
- end
- end
- def self.draw_letter(letter, x, y)
- create_text_bitmap if $words == nil
- case letter
- 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])
- 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])
- 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])
- 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])
- when "E", "Е", "е"; fill_rects([x, y, 4, 14], [x, y, 14, 2], [x, y+12, 14, 2], [x, y+6, 12, 2])
- when "F"; fill_rects([x, y, 14, 2], [x, y, 4, 14], [x, y+6, 12, 2])
- 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])
- when "H", "Н", "н"; fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+4, y+6, 6, 2])
- when "I"; fill_rects([x+2, y, 12, 2], [x+2, y+12, 12, 2], [x+6, y, 4, 14])
- when "J"; fill_rects([x+10, y, 4, 12], [x, y+10, 4, 2], [x+2, y+12, 10, 2])
- 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])
- when "L"; fill_rects([x, y+12, 12, 2], [x, y, 4, 14])
- 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])
- 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])
- 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])
- when "P", "Р", "р"; fill_rects([x, y, 4, 14], [x, y, 12, 2], [x, y+8, 12, 2], [x+10, y+2, 4, 6])
- 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])
- 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])
- 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])
- when "T", "Т", "т"; fill_rects([x+2, y, 12, 2], [x+6, y, 4, 14])
- when "U"; fill_rects([x, y, 4, 12], [x+10, y, 4, 12], [x+2, y+12, 10, 2])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- when "Г", "г"; fill_rects([x, y, 12, 2], [x, y, 4, 14])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- when "П", "п"; fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+4, y, 6, 2])
- 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])
- 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])
- when "Ц", "ц"; fill_rects([x, y, 4, 14], [x+8, y, 4, 14], [x, y+12, 14, 2], [x+10, y+12, 4, 4])
- when "Ч", "ч"; fill_rects([x, y, 4, 6], [x+10, y, 4, 14], [x+2, y+6, 10, 2])
- when "Ш", "ш"; fill_rects([x, y, 4, 14], [x+10, y, 4, 14], [x+6, y, 2, 14], [x, y+12, 14, 2])
- 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])
- 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])
- 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])
- when "Ь", "ь"; fill_rects([x, y+4, 12, 2], [x, y+12, 12, 2], [x, y, 4, 14], [x+10, y+6, 4, 6])
- 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])
- 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])
- 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])
- 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])
- when "1"; fill_rects([x+6, y, 4, 14], [x+4, y+2, 2, 2], [x+2, y+12, 12, 2])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- 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])
- when "+"; fill_rects([x+6, y+2, 4, 10], [x+2, y+6, 10, 2])
- when "-"; fill_rects([x+2, y+6, 10, 2])
- when "_"; fill_rects([x+2, y+12, 10, 2])
- when "|"; fill_rects([x+6, y, 4, 14])
- when "="; fill_rects([x, y+4, 14, 2], [x, y+8, 14, 2])
- 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])
- 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])
- 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])
- when "!"; fill_rects([x+4, y, 6, 6], [x+4, y, 4, 10], [x+4, y+12, 4, 2])
- when ":"; fill_rects([x+4, y+2, 4, 4], [x+4, y+8, 4, 4])
- 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])
- when "."; fill_rects([x+4, y+10, 4, 4])
- when ","; fill_rects([x+4, y+10, 4, 4], [x+2, y+14, 4, 2])
- 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])
- 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])
- #~
- 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])
- 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])
- 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)])
- 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])
- 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)])
- 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])
- 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)])
- 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])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement