-- Инициализация таблиц local attackers = { "Ace","Amaru","Ash","Blackbeard","Brava","Buck","Capitao","Deimos", "Dokkaebi","Finka","Flores","Fuze","Glaz","Gridlock","Grim","Hibana", "Iana","IQ","Jackal","Kali","Lion","Maverick","Nokk","Nomad","Osa", "Rauora","Ram","Sens","Sledge","Solid Snake","Striker","Thatcher","Thermite","Twitch","Ying", "Zero","Zofia" } local defenders = { "Alibi","Aruni","Azami","Bandit","Castle","Caveira","Clash","Denari", "Doc","Echo","Ela","Fenrir","Frost","Goyo","Jager","Kaid","Kapkan", "Lesion","Maestro","Melusi","Mira","Mozzie","Mute","Oryx","Pulse", "Rook","Sentry","Skopos","Solis","Smoke","Tachanka","Thorn","Thunderbird", "Tubarao","Valkyrie","Vigil","Wamai","Warden" } local attacker_index = 1 local defender_index = 1 local recoil = { ["Ace"] = {0, 50, 80, -1, 39, 600, -1, 40, 520, -1, 45, 900}, ["Alibi"] = {0, 28, 60, 1, 21, 600, 2, 22, 200, 2, 24, 300, 2, 24, 550, 2, 24, 350}, ["Aruni"] = {0, 30, 10, 2, 19, 1000, 2, 22, 1000, 2, 21, 1000, 2, 21, 1000}, ["Amaru"] = {0, 35, 150, -1, 35, 400, -1, 36, 700, -1, 36, 300, -1, 38, 150, -1, 38, 400, -1, 39, 550, -1, 42, 300, -1, 42, 250, -1, 43, 100}, ["Ash"] = {-1, 27, 150, -1, 25, 250, -1, 26, 350, -1, 26, 1300}, ["Azami"] = {0, 22, 10, -1, 19, 350, -1, 20, 300, -1, 21, 800, -1, 21, 400, -1, 21, 500}, ["Bandit"] = {0, 18, 70, 0, 17, 800, 0, 19, 300, 1, 19, 650}, ["Blackbeard"] = {0, 19, 150, 1, 17, 250, 1, 17, 650, 1, 18, 1050}, ["Brava"] = {0, 28, 150, -1, 26, 400, 0, 29, 1000, -1, 32, 900, 0, 36, 300}, ["Buck"] = {0, 41, 150, 0, 30, 650, 0, 33, 650, -2, 36, 400, -1, 37, 300}, ["Capitao"] = {0, 28, 150, -1, 27, 400, 0, 30, 1000, -1, 33, 900, 0, 37, 300}, ["Castle"] = {0, 23, 30, 0, 10, 250, -1, 10, 200, 0, 10, 400, -1, 10, 700, -1, 10, 1100}, ["Caveira"] = {0, 10, 1000, -2, 9, 450, -1, 9, 450, 0, 10, 600, -1, 9, 800}, ["Clash"] = {0, 21, 70, 0, 15, 200, 0, 15, 300, 0, 15, 1100}, ["Deimos"] = {0, 43, 70, -1, 22, 1200, -1, 25, 700, -1, 26, 1000, -1, 28, 750}, ["Denari"] = {1, 27, 100, 2, 22, 500, 3, 29, 300, 3, 30, 900, 3, 31, 600}, ["Doc"] = {0, 28, 30, -1, 18, 600, 0, 20, 300, -1, 20, 500, -2, 22, 900}, ["Dokkaebi"] = {-1, 23, 50}, ["Echo"] = {0, 31, 30, -1, 19, 600, 0, 23, 300, -1, 23, 1400}, ["Ela"] = {1, 27, 100, 2, 22, 500, 3, 29, 300, 3, 30, 900, 3, 31, 600}, ["Fenrir"] = {0, 18, 70, 0, 17, 800, 0, 19, 300, 1, 19, 650}, ["Finka"] = {0, 48, 50, -1, 32, 400, -1, 35, 500, 0, 35, 500, -1, 36, 500, 0, 38, 500}, ["Flores"] = {0, 38, 80, -1, 29, 350, 0, 31, 300, -1, 33, 200, -1, 35, 1000}, ["Frost"] = {0, 18, 30, 0, 14, 600, 0, 13, 1100, 1, 13, 500, 0, 14, 1300}, ["Fuze"] = {0, 50, 80, -1, 39, 600, -1, 40, 520, -1, 45, 900}, ["Glaz"] = {0, 34, 60, 0, 29, 500, -1, 28, 800}, ["Goyo"] = {0, 32, 60, 0, 26, 250, 0, 29, 150, 0, 28, 300, 0, 29, 600}, ["Gridlock"] = {0, 42, 50, -1, 29, 400, -1, 31, 500, -1, 34, 500, 0, 35, 500, 0, 36, 300}, ["Grim"] = {0, 37, 110, 0, 27, 500, -1, 29, 500, -1, 31, 850, 0, 32, 600}, ["Hibana"] = {0, 42, 40, -1, 35, 600, -1, 36, 300, -2, 37, 500}, ["Iana"] = {0, 45, 60, -1, 28, 700, -1, 29, 400, -1, 32, 500}, ["IQ"] = {0, 37, 110, 0, 27, 500, -1, 29, 500, -1, 31, 850, 0, 32, 600}, ["Jager"] = {0, 26, 60, -1, 19, 300, -1, 19, 1000, -1, 20, 700, -1, 20, 200}, ["Jackal"] = {0, 44, 70, 0, 41, 500, -1, 42, 600, -1, 46, 500, -1, 48, 500}, ["Kaid"] = {0, 27, 60, 1, 15, 300, 1, 16, 800, 1, 18, 1650}, ["Kali"] = {0, 16, 1000, 0, 13, 400}, ["Kapkan"] = {0, 22, 10, -1, 19, 350, -1, 20, 300, -1, 21, 800, -1, 21, 400, -1, 21, 500}, ["Lesion"] = {0, 22, 50, 0, 22, 500, -1, 24, 300, 0, 24, 300, -1, 24, 100, 1, 25, 900}, ["Lion"] = {0, 43, 60, 0, 24, 300, 0, 28, 1700, 0, 33, 2150}, ["Maestro"] = {0, 24, 20, 0, 18, 500, 0, 20, 500, 0, 20, 500, -1, 21, 600, 0, 22, 600, 0, 22, 2600}, ["Maverick"] = {0, 52, 50, -1, 34, 500, -1, 35, 500, -1, 38, 500, -1, 40, 700}, ["Melusi"] = {0, 28, 30, -1, 18, 600, 0, 20, 300, -1, 20, 500, -2, 22, 900}, ["Mira"] = {0, 32, 60, 0, 26, 250, 0, 29, 150, 0, 28, 300, 0, 29, 600}, ["Mozzie"] = {0, 30, 10, 2, 21, 1000, 2, 24, 1000, 2, 23, 1000, 2, 23, 1000}, ["Mute"] = {0, 28, 40, 0, 17, 600, 0, 19, 1000, -1, 21, 700}, ["Nokk"] = {0, 22, 40, 1, 16, 200, 0, 17, 800, 1, 19, 1200}, ["Nomad"] = {0, 45, 60, -1, 28, 700, -1, 29, 400, -1, 32, 500}, ["Oryx"] = {0, 22, 50, 0, 22, 500, -1, 24, 300, 0, 24, 300, -1, 24, 100, 1, 25, 900}, ["Osa"] = {0, 28, 80, 2, 24, 600, 2, 25, 300, 3, 26, 1600}, ["Pulse"] = {0, 23, 30, 0, 10, 250, -1, 10, 200, 0, 10, 400, -1, 10, 700, -1, 10, 1100}, ["Rauora"] = {0, 25, 50, -1, 22, 1500, -1, 28, 800, -1, 27, 2300, -1, 29, 4600}, ["Ram"] = {-1, 45, 50, -1, 43, 600, -1, 46, 1100}, ["Rook"] = {0, 28, 30, -1, 18, 600, 0, 20, 300, -1, 20, 500, -2, 22, 900}, ["Sens"] = {1, 48, 40, 0, 30, 400, 0, 31, 1600, -1, 33, 300, -1, 33, 800, -1, 33, 800}, ["Sentry"] = {0, 26, 50, 0, 15, 300, -1, 16, 300, 0, 18, 400, 0, 18, 400, 0, 18, 400}, ["Skopos"] = {0, 18, 50, 0, 16, 500, -1, 16, 500, 0, 16, 500, -1, 17, 700}, ["Sledge"] = {0, 38, 60, 1, 25, 450, 2, 27, 300, 2, 28, 1500, 2, 30, 300}, ["Smoke"] = {0, 41, 40, 1, 34, 200, 1, 34, 800, 1, 37, 1100, 1, 42, 1100}, ["Solid Snake"] = {0, 64, 80, -1, 52, 600, 0, 53, 200, -1, 54, 650}, ["Solis"] = {0, 19, 40, 0, 17, 600, 0, 18, 1000, 0, 21, 700, 0, 21, 700, 0, 21, 700}, ["Striker"] = {0, 52, 50, -1, 34, 500, -1, 35, 500, -1, 38, 500, -1, 40, 700}, ["Tachanka"] = {0, 20, 20, 1, 7, 300, 1, 7, 200, 0, 8, 400, 1, 8, 500, 2, 8, 1200, 3, 7, 1200, 2, 8, 1200, 2, 8, 600, 2, 8, 1700}, ["Thatcher"] = {0, 38, 80, -1, 29, 350, 0, 31, 300, -1, 33, 200, -1, 35, 1000}, ["Thermite"] = {0, 28, 80, 2, 24, 600, 2, 25, 300, 3, 26, 1600}, ["Thorn"] = {0, 25, 50, 0, 18, 500, 1, 22, 500, 1, 24, 500, 0, 24, 300}, ["Thunderbird"] = {0, 34, 30, -1, 17, 250, 0, 19, 250, -1, 20, 500, -1, 22, 500, -1, 22, 500, 0, 23, 700}, ["Tubarao"] = {0, 31, 20, 0, 18, 500, -1, 20, 500, 0, 20, 500, 0, 21, 500, 0, 22, 300}, ["Twitch"] = {0, 64, 80, -1, 52, 600, 0, 53, 200, -1, 54, 650}, ["Valkyrie"] = {0, 31, 20, 0, 18, 500, -1, 20, 500, 0, 20, 500, 0, 21, 500, 0, 22, 300}, ["Vigil"] = {0, 29, 30, -1, 19, 300, -1, 21, 500, -1, 22, 700, -1, 21, 500, -1, 24, 500}, ["Wamai"] = {0, 24, 40, 0, 16, 300, 0, 16, 400, 1, 18, 1400, 2, 24, 500, 2, 27, 200}, ["Warden"] = {0, 31, 20, 0, 18, 500, -1, 20, 500, 0, 20, 500, 0, 21, 500, 0, 22, 300}, ["Ying"] = {0, 39, 60, -1, 30, 300, -1, 32, 450, 0, 34, 1800, 2, 38, 4700}, ["Zero"] = {0, 51, 40, -1, 41, 200, -1, 43, 700, -1, 46, 350, 0, 48, 500}, ["Zofia"] = {0, 64, 50, 1, 37, 600, 1, 38, 500, -1, 41, 600, 0, 43, 600} } local weaponInfo = {} function getCurrentOperator() if IsKeyLockOn("scrolllock") then return defenders[defender_index] else return attackers[attacker_index] end end function nextOperator() if IsKeyLockOn("scrolllock") then defender_index = (defender_index % #defenders) + 1 else attacker_index = (attacker_index % #attackers) + 1 end end local function centerText(text, width) local len = string.len(text) if len >= width then return text end local left = math.floor((width - len) / 2) local right = width - len - left return string.rep(" ", left) .. text .. string.rep(" ", right) end function drawGrid(list, selected, columns) local PADDING = 2 local maxLen = 0 for i = 1, #list do local len = string.len(list[i]) if len > maxLen then maxLen = len end end local CELL_WIDTH = maxLen + PADDING * 2 local totalWidth = CELL_WIDTH * columns + columns - 1 local border = "+" .. string.rep("-", totalWidth) .. "+\n" local result = border local count = #list -- Отрисовка слева направо, сверху вниз for i = 1, count, columns do result = result .. "|" for c = 0, columns - 1 do local idx = i + c local name = list[idx] if name then if name == selected then local label = "> " .. string.upper(name) .. " <" result = result .. centerText(label, CELL_WIDTH) else result = result .. centerText(name, CELL_WIDTH) end else result = result .. string.rep(" ", CELL_WIDTH) end if c < columns - 1 then result = result .. "|" end end result = result .. "|\n" end return result .. border end local function centerText(text, width) local len = string.len(text) if len >= width then return text end local left = math.floor((width - len) / 2) return string.rep(" ", left) .. text .. string.rep(" ", width - len - left) end function drawVerticalGrid(list, selected_idx, cols) cols = cols or 3 local total = #list local rows = math.ceil(total / cols) local cellWidth = 18 local border = "+" .. string.rep("-", cols * (cellWidth + 1) - 1) .. "+\n" local res = border for r = 1, rows do res = res .. "|" for c = 0, cols - 1 do local idx = r + c * rows if idx <= total then local name = list[idx] local item = (idx == selected_idx) and ("> " .. string.upper(name) .. " <") or name res = res .. centerText(item, cellWidth) .. "|" else res = res .. string.rep(" ", cellWidth) .. "|" end end res = res .. "\n" end return res .. border end function Log() ClearLog() local isDefender = IsKeyLockOn("scrolllock") local list = isDefender and defenders or attackers local idx = isDefender and defender_index or attacker_index local op = list[idx] local gun = weaponInfo[op] or "STANDARD" local modeText = isDefender and "DEFENDERS [SCROLL LOCK: ON]" or "ATTACKERS [SCROLL LOCK: OFF]" OutputLogMessage("========================================================\n") OutputLogMessage(" MODE : %s\n", modeText) OutputLogMessage(" OPERATOR : [%02d/%02d] %s\n", idx, #list, string.upper(op)) OutputLogMessage(" WEAPON : %s\n", gun) OutputLogMessage("========================================================\n") OutputLogMessage(drawVerticalGrid(list, idx, 3)) end function applyRecoil(pattern) local interval = 12 -- Задержка шага в мс for i = 3, #pattern, 3 do local dx = pattern[i - 2] local dy = pattern[i - 1] local duration = pattern[i] local startTime = GetRunningTime() while (GetRunningTime() - startTime) < duration do -- Проверка удержания ЛКМ (1) и ПКМ (3) if not IsMouseButtonPressed(1) or not IsMouseButtonPressed(3) then return end MoveMouseRelative(dx, dy) Sleep(interval) end end end function OnEvent(event, arg) if event == "PROFILE_ACTIVATED" then EnablePrimaryMouseButtonEvents(true) Log() elseif event == "MOUSE_BUTTON_PRESSED" and arg == 3 then -- ПКМ + LCTRL: сменить оператора if IsModifierPressed("lctrl") then nextOperator() Log() end elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 then -- ЛКМ + ПКМ: гашение отдачи if IsMouseButtonPressed(3) then local op = getCurrentOperator() local pattern = recoil[op] if pattern then applyRecoil(pattern) end end end end