JS-скрипт [OT4/OTC4] - Better doubletap speed with indicator

ЧВК EB_LAN
Эксперт
Статус
Оффлайн
Регистрация
26 Янв 2021
Сообщения
1,552
Реакции[?]
519
Поинты[?]
189K
Не обращайте внимание на мою сефл код пасту.

C++:
UI.AddSubTab(["Rage", "SUBTAB_MGR"], "Better Doubletap")
var g_CustomTab = ["Rage", "Better Doubletap", "Better Doubletap"];

var g_EnabledInfoBar = UI.AddCheckbox(g_CustomTab, "Show info")

var g_EnabledReduceRechargeSpeed = UI.AddCheckbox(g_CustomTab, "Reduce Recharge speed")
var g_RechargeDoubletapTime = UI.AddSliderInt(g_CustomTab, "Recharge time", 0, 16)

var g_TickbaseShift = UI.AddSliderInt(g_CustomTab, "Shift amount", 0, 16)
var g_Tolerance = UI.AddSliderInt(g_CustomTab, "Tolerance", 0, 5)
var g_MaxUsrCmdProcessTick = UI.AddSliderInt(g_CustomTab, "Max process ticks", 0, 18)

function tickbasemanipulation()
{
    var g_MaxUsrCmdProcessTick = UI.GetValue(["Rage", "Better Doubletap", "Better Doubletap", "Max process ticks"])
    var g_TickbaseShift = UI.GetValue(["Rage", "Better Doubletap", "Better Doubletap", "Shift amount"])
    var g_Tolerance = UI.GetValue(["Rage", "Better Doubletap", "Better Doubletap", "Tolerance"])

    if (g_MaxUsrCmdProcessTick > 0)
        g_TickbaseShift = Math.max(Math.min(g_TickbaseShift, g_MaxUsrCmdProcessTick), 0)
  
    Exploit.OverrideMaxProcessTicks(g_MaxUsrCmdProcessTick)
    Cheat.ExecuteCommand("sv_maxusrcmdprocessticks " + g_MaxUsrCmdProcessTick)
  
    Exploit.OverrideShift(g_TickbaseShift)
    Exploit.OverrideTolerance(g_Tolerance)
}

Cheat.RegisterCallback("CreateMove", "tickbasemanipulation")

var time, delay, fillbar, shotsfired;

function CanShiftShot(ticks_to_shift)
{
    var me = Entity.GetLocalPlayer();
    var wpn = Entity.GetWeapon(me);

    if (me == null || wpn == null)
        return false;

    var tickbase = Entity.GetProp(me, "CCSPlayer", "m_nTickBase");
    var curtime = Globals.TickInterval() * (tickbase-ticks_to_shift)

    if (curtime < Entity.GetProp(me, "CCSPlayer", "m_flNextAttack"))
        return false;

    if (curtime < Entity.GetProp(wpn, "CBaseCombatWeapon", "m_flNextPrimaryAttack"))
        return false;

    return true;
}

function reducedtrecharge() {
    Exploit[(Exploit.GetCharge() != 1 ? "Enable" : "Disable") + "Recharge"]()

    if (UI.GetValue(g_EnabledReduceRechargeSpeed) && CanShiftShot(UI.GetValue(g_RechargeDoubletapTime)) && Exploit.GetCharge() != 1) {
        Exploit.DisableRecharge();
        Exploit.Recharge()
    }
}

function unloadcustomrecharge() { Exploit.EnableRecharge(); }

Cheat.RegisterCallback("CreateMove", "reducedtrecharge");
Cheat.RegisterCallback("Unload", "unloadcustomrecharge");

function stableinfobar()
{
    var g_Font = Render.GetFont('Verdanab.ttf', 8, true)

    var g_ScreenSize = Render.GetScreenSize()
    var y = g_ScreenSize[1] / 2

    var g_TextColor = [255, 255, 255, 255]

    var g_ChokedCommands = Globals.ChokedCommands();

    var g_ExploitCharged = ""

    if (Exploit.GetCharge() == 1)
        g_ExploitCharged = "True"
    else
        g_ExploitCharged = "False"
  
    if (UI.GetValue(g_EnabledInfoBar))
    {
        Render.String(5, y - 64, 0, "> Tickbase Shift: " + UI.GetValue(g_TickbaseShift) + " <", g_TextColor, g_Font)
        Render.String(5, y - 55, 0, "> Tolerance: " + UI.GetValue(g_Tolerance) + " <", g_TextColor, g_Font)
        Render.String(5, y - 47, 0, "> MaxUsrCmdProcessTicks: " + UI.GetValue(g_MaxUsrCmdProcessTick) + " <", g_TextColor, g_Font)
        Render.String(5, y - 39, 0, "> ChokedCommands: " + g_ChokedCommands + " <", g_TextColor, g_Font)
        Render.String(5, y - 30, 0, "> Recharge Doubletap Time: " + UI.GetValue(g_RechargeDoubletapTime) + " <", g_TextColor, g_Font)
        Render.String(5, y - 21, 0, "> Exploit Charged: " + g_ExploitCharged + " <", g_TextColor, g_Font)
    }
}

Cheat.RegisterCallback("Draw", "stableinfobar")

var recharge = 0
var should_toggle = false;
function toggle_dt()
{
    if (Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer())) == 'r8 revolver')
    {
        if (should_toggle  && recharge + 16 == Globals.Tickcount())
        {
            UI.ToggleHotkey(['Rage','Exploits','Keys','Key assignment','Double tap'])
            should_toggle = false;
        }
    }
}
function on_wpn_fire()
{
    if ((Entity.GetEntityFromUserID(Event.GetInt("userid")) != Entity.GetLocalPlayer())  || Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer())) != 'r8 revolver')
        return;

    recharge = Globals.Tickcount();

    if (UI.GetValue(['Rage','Exploits','Keys','Key assignment','Double tap']))
    {
        UI.ToggleHotkey(['Rage','Exploits','Keys','Key assignment','Double tap'])
        should_toggle = true;
    }
}
Cheat.RegisterCallback('weapon_fire','on_wpn_fire')
Cheat.RegisterCallback('Draw','toggle_dt')
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
24 Окт 2021
Сообщения
100
Реакции[?]
2
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Забаненный
Статус
Оффлайн
Регистрация
24 Окт 2021
Сообщения
100
Реакции[?]
2
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
на речардж что луче всего ставить?
 
Сверху Снизу