JS-скрипт Predicted targeted hitbox (Visual)

Пользователь
Статус
Оффлайн
Регистрация
24 Апр 2018
Сообщения
445
Реакции[?]
86
Поинты[?]
3K
!!!WARNING!!!
ГОВНОКОД



Кто захочет, тот доведет до ума
Пожалуйста, авторизуйтесь для просмотра ссылки.

JavaScript:
UI.AddCheckbox("Predicted targeted hitbox");
Render.FadedCircle = function(x, y, radius, color) {
    const step = color[3] / radius;

    for (var i = 0; i <= radius; i++) {
        Render.FilledCircle(x, y, i, [color[0], color[1], color[2], color[3] - step * i]);
    }
}
function radToDeg(radians) {
    return radians * 180 / Math.PI;
}
var Cache = {
    values: []
};

Cache.InvokeCallback = function(label, state, func, args) {
    if (this.values[label] == null)
        this.values[label] = null;

    if (this.values[label] === state)
        return;

    this.values[label] = state;

    func.apply(null, args);
}
var Targeting = {
    currentData: {target: null, hitbox: 0, last_hitbox: -1},

    hitboxMap: [6, 5, 4, 3, 2],

    weaponId: [
        [2, 3, 4, 30, 32, 36, 61, 63],
        [1, 64],
        [40],
        [9],
        [11, 38]
    ],

    configuration: [
        "GENERAL",
        "PISTOL",
        "HEAVY PISTOL",
        "SCOUT",
        "AWP",
        "AUTOSNIPER"
    ],

    HITBOX: {
        "UNSURE": -1,
        "BODY": 3,
        "HEAD": 0
    }
};

Targeting.FindOptimalTarget = function() {
    const players = Entity.GetEnemies();
    const me = Entity.GetLocalPlayer();

    if (!me || !Entity.IsAlive(me))
        return null;

    const eye_position = Entity.GetEyePosition(me);
    const view_angles = Local.GetViewAngles();

    var data = {fov: 180, id: null};

    for (var i = 0; i < players.length; i++) {
        const e = players[i];

        if (!Entity.IsAlive(e) || Entity.IsDormant(e))
            continue;

        const head_position = Entity.GetHitboxPosition(e, 0);
        const sub = [head_position[0] - eye_position[0], head_position[1] - eye_position[1], head_position[2] - eye_position[2]];
  
        const pitch = -radToDeg(Math.atan2(sub[2], Math.sqrt(sub[0] ** 2 + sub[1] ** 2)));
        const yaw = radToDeg(Math.atan2(sub[1], sub[0]));

        const delta_x = Math.abs(view_angles[0] - pitch);
        const delta_y = Math.abs(view_angles[1] % 360 - yaw % 360) % 360;

        const fov = Math.sqrt(delta_x * delta_x + delta_y * delta_y);

        if (fov < data.fov) {
            data.fov = fov;
            data.id = e;
        }
    }

    return data.id;
}

Targeting.GetNextTargetedHitbox = function(e) {
    if (!e)
        return this.HITBOX.UNSURE;

    const me = Entity.GetLocalPlayer();
    const wpn = Entity.GetWeapon(me);

    if (!me || !wpn)
        return this.HITBOX.UNSURE;

    const eye_position = Entity.GetEyePosition(me);

    const wpn_id = Entity.GetProp(wpn, "CBaseAttributableItem", "m_iItemDefinitionIndex") & 0xFFFF;
    const tab = "GENERAL";

    for (var i = 0; i < this.weaponId.length; i++)
        for (var j = 0; j < this.weaponId[i].length; j++)
            if (this.weaponId[i][j] === wpn_id)
                tab = this.configuration[i+1];

    const prefer_baim = UI.GetValue("Rage", tab, "Accuracy", "Prefer body aim");
    const is_head_aiming = UI.GetValue("Rage", tab, "Targeting", "Hitboxes") & (1 << 0);

    if (prefer_baim)
        return this.HITBOX.BODY;
  
    if (!is_head_aiming)
        return this.HITBOX.BODY;
  
    const head = Trace.Bullet(me, e, eye_position, Entity.GetHitboxPosition(e, 0));
    const stomach = Trace.Bullet(me, e, eye_position, Entity.GetHitboxPosition(e, 3));
    const health = Entity.GetProp(e, "CBasePlayer", "m_iHealth");

    if (!head[2] && this.currentData.last_hitbox === 0)
    {
        if (health < 25)
            return this.HITBOX.BODY;

        return this.HITBOX.HEAD;
    }

    this.currentData.last_hitbox = -1;

    if (health < stomach[1])
    {
        return this.HITBOX.BODY;
    }     

    return this.HITBOX.HEAD;
}
function hkCreateMove() {
    const enabled = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Predicted targeted hitbox");

    if (!enabled)
        return;

    const target = Targeting.FindOptimalTarget();
    const hitbox = Targeting.GetNextTargetedHitbox(target);

    Targeting.currentData.target = target;
    Targeting.currentData.hitbox = hitbox;
}

function hkRagebotFire() {
    const enabled = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Predicted targeted hitbox");

    if (!enabled)
        return;

    const target = Event.GetInt("target_index");

    if (target !== Targeting.currentData.target)
        return;

    Targeting.currentData.last_hitbox = Event.GetInt("hitbox");
}

function hkDraw() {
    const enabled = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Predicted targeted hitbox");

    if (!enabled)
        return;

    const me = Entity.GetLocalPlayer();

    if (!me || !Entity.IsAlive(me))
        return;

    if (!Targeting.currentData.target || !Entity.IsAlive(Targeting.currentData.target) || Targeting.currentData.hitbox < 0)
        return;

    const wts = Render.WorldToScreen(Entity.GetHitboxPosition(Targeting.currentData.target, Targeting.currentData.hitbox));
    const ssize = Render.GetScreenSize();

    if (!wts)
        return;

    if (wts[0] < 0 || wts[0] > ssize[0] || wts[1] < 0 || wts[1] > ssize[1])
        return;

    Render.FadedCircle(wts[0], wts[1], 15, [25, 10, 230, 75]);
}

Cheat.RegisterCallback("CreateMove", "hkCreateMove");
Cheat.RegisterCallback("Draw", "hkDraw");
Cheat.RegisterCallback("ragebot_fire", "hkRagebotFire");
 
Последнее редактирование:
Пользователь
Статус
Оффлайн
Регистрация
24 Апр 2018
Сообщения
445
Реакции[?]
86
Поинты[?]
3K
scam
Начинающий
Статус
Оффлайн
Регистрация
25 Май 2021
Сообщения
17
Реакции[?]
5
Поинты[?]
0
я не понимаю как это работает ( как такая срань как вт попадет именно в это точку) и зачем это нужно? добрые люди, обьясните
 
bytes hvh
Начинающий
Статус
Оффлайн
Регистрация
28 Ноя 2020
Сообщения
133
Реакции[?]
11
Поинты[?]
1K
я не понимаю как это работает ( как такая срань как вт попадет именно в это точку) и зачем это нужно? добрые люди, обьясните
чтобы ты понимал чит стрельнит в какую часть тело или ваще он стрельнит
 
scam
Начинающий
Статус
Оффлайн
Регистрация
25 Май 2021
Сообщения
17
Реакции[?]
5
Поинты[?]
0
чтобы ты понимал чит стрельнит в какую часть тело или ваще он стрельнит
а нахуя? стрельнет, не стрельнет, мне похуй ваще миснет, или тапнет, какая нахуй разница?
 
bytes hvh
Начинающий
Статус
Оффлайн
Регистрация
28 Ноя 2020
Сообщения
133
Реакции[?]
11
Поинты[?]
1K
а нахуя? стрельнет, не стрельнет, мне похуй ваще миснет, или тапнет, какая нахуй разница?
ну я не знаю прикольно выгледит чтоли я не ебу я уже на хвх не играю
 
Забаненный
Статус
Оффлайн
Регистрация
4 Апр 2021
Сообщения
234
Реакции[?]
132
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
откуда калькуляция рейджбота вантапа в скрипте для него?сомневаюсь что чел парсил эти значения.
после импрува рейджбота скрипт должен сдохнуть.

хуита кароч ?
 
Prosto rusik
Участник
Статус
Оффлайн
Регистрация
8 Сен 2019
Сообщения
953
Реакции[?]
261
Поинты[?]
1K
!!!WARNING!!!
ПРИСУТСТВУЕТ ГОВНОКОД



Кто захочет, тот доведет до ума
Пожалуйста, авторизуйтесь для просмотра ссылки.

JavaScript:
UI.AddCheckbox("Predicted targeted hitbox");
Render.FadedCircle = function(x, y, radius, color) {
    const step = color[3] / radius;

    for (var i = 0; i <= radius; i++) {
        Render.FilledCircle(x, y, i, [color[0], color[1], color[2], color[3] - step * i]);
    }
}
function radToDeg(radians) {
    return radians * 180 / Math.PI;
}
var Cache = {
    values: []
};

Cache.InvokeCallback = function(label, state, func, args) {
    if (this.values[label] == null)
        this.values[label] = null;

    if (this.values[label] === state)
        return;

    this.values[label] = state;

    func.apply(null, args);
}
var Targeting = {
    currentData: {target: null, hitbox: 0, last_hitbox: -1},

    hitboxMap: [6, 5, 4, 3, 2],

    weaponId: [
        [2, 3, 4, 30, 32, 36, 61, 63],
        [1, 64],
        [40],
        [9],
        [11, 38]
    ],

    configuration: [
        "GENERAL",
        "PISTOL",
        "HEAVY PISTOL",
        "SCOUT",
        "AWP",
        "AUTOSNIPER"
    ],

    HITBOX: {
        "UNSURE": -1,
        "BODY": 3,
        "HEAD": 0
    }
};

Targeting.FindOptimalTarget = function() {
    const players = Entity.GetEnemies();
    const me = Entity.GetLocalPlayer();

    if (!me || !Entity.IsAlive(me))
        return null;

    const eye_position = Entity.GetEyePosition(me);
    const view_angles = Local.GetViewAngles();

    var data = {fov: 180, id: null};

    for (var i = 0; i < players.length; i++) {
        const e = players[i];

        if (!Entity.IsAlive(e) || Entity.IsDormant(e))
            continue;

        const head_position = Entity.GetHitboxPosition(e, 0);
        const sub = [head_position[0] - eye_position[0], head_position[1] - eye_position[1], head_position[2] - eye_position[2]];
  
        const pitch = -radToDeg(Math.atan2(sub[2], Math.sqrt(sub[0] ** 2 + sub[1] ** 2)));
        const yaw = radToDeg(Math.atan2(sub[1], sub[0]));

        const delta_x = Math.abs(view_angles[0] - pitch);
        const delta_y = Math.abs(view_angles[1] % 360 - yaw % 360) % 360;

        const fov = Math.sqrt(delta_x * delta_x + delta_y * delta_y);

        if (fov < data.fov) {
            data.fov = fov;
            data.id = e;
        }
    }

    return data.id;
}

Targeting.GetNextTargetedHitbox = function(e) {
    if (!e)
        return this.HITBOX.UNSURE;

    const me = Entity.GetLocalPlayer();
    const wpn = Entity.GetWeapon(me);

    if (!me || !wpn)
        return this.HITBOX.UNSURE;

    const eye_position = Entity.GetEyePosition(me);

    const wpn_id = Entity.GetProp(wpn, "CBaseAttributableItem", "m_iItemDefinitionIndex") & 0xFFFF;
    const tab = "GENERAL";

    for (var i = 0; i < this.weaponId.length; i++)
        for (var j = 0; j < this.weaponId[i].length; j++)
            if (this.weaponId[i][j] === wpn_id)
                tab = this.configuration[i+1];

    const prefer_baim = UI.GetValue("Rage", tab, "Accuracy", "Prefer body aim");
    const is_head_aiming = UI.GetValue("Rage", tab, "Targeting", "Hitboxes") & (1 << 0);

    if (prefer_baim)
        return this.HITBOX.BODY;
  
    if (!is_head_aiming)
        return this.HITBOX.BODY;
  
    const head = Trace.Bullet(me, e, eye_position, Entity.GetHitboxPosition(e, 0));
    const stomach = Trace.Bullet(me, e, eye_position, Entity.GetHitboxPosition(e, 3));
    const health = Entity.GetProp(e, "CBasePlayer", "m_iHealth");

    if (!head[2] && this.currentData.last_hitbox === 0)
    {
        if (health < 25)
            return this.HITBOX.BODY;

        return this.HITBOX.HEAD;
    }

    this.currentData.last_hitbox = -1;

    if (health < stomach[1])
    {
        return this.HITBOX.BODY;
    }     

    return this.HITBOX.HEAD;
}
function hkCreateMove() {
    const enabled = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Predicted targeted hitbox");

    if (!enabled)
        return;

    const target = Targeting.FindOptimalTarget();
    const hitbox = Targeting.GetNextTargetedHitbox(target);

    Targeting.currentData.target = target;
    Targeting.currentData.hitbox = hitbox;
}

function hkRagebotFire() {
    const enabled = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Predicted targeted hitbox");

    if (!enabled)
        return;

    const target = Event.GetInt("target_index");

    if (target !== Targeting.currentData.target)
        return;

    Targeting.currentData.last_hitbox = Event.GetInt("hitbox");
}

function hkDraw() {
    const enabled = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Predicted targeted hitbox");

    if (!enabled)
        return;

    const me = Entity.GetLocalPlayer();

    if (!me || !Entity.IsAlive(me))
        return;

    if (!Targeting.currentData.target || !Entity.IsAlive(Targeting.currentData.target) || Targeting.currentData.hitbox < 0)
        return;

    const wts = Render.WorldToScreen(Entity.GetHitboxPosition(Targeting.currentData.target, Targeting.currentData.hitbox));
    const ssize = Render.GetScreenSize();

    if (!wts)
        return;

    if (wts[0] < 0 || wts[0] > ssize[0] || wts[1] < 0 || wts[1] > ssize[1])
        return;

    Render.FadedCircle(wts[0], wts[1], 15, [25, 10, 230, 75]);
}

Cheat.RegisterCallback("CreateMove", "hkCreateMove");
Cheat.RegisterCallback("Draw", "hkDraw");
Cheat.RegisterCallback("ragebot_fire", "hkRagebotFire");
Это типо в какой хитбокс чапалах прилетит?
 
Сверху Снизу