LUA скрипт [neverlose] defensive anti-aim resolver

Статус
В этой теме нельзя размещать новые ответы.
Главный модератор
Главный Модератор
Главный Модератор
Статус
Оффлайн
Регистрация
1 Фев 2020
Сообщения
1,305
Реакции
505
code_language.lua:
Expand Collapse Copy
local resolver_data = {}

local function resolver(cmd)
    if not checkbox:get() then
        return
    end

    local localplayer = entity.get_local_player()

    if not localplayer then
        return
    end

    for _, player in pairs(entity.get_players(true)) do
        if not player:is_alive() or player:is_bot() or player:get_index() == localplayer:get_index() then
            goto continue
        end

        local player_id = player:get_index()

        if not resolver_data[player_id] then
            resolver_data[player_id] = {
                previous_eye_angles = {
                    valid = false,
                    x = 0
                },
                last_pitch_delta = 0,
                ticks_without_change = 0
            }
        end

        local data = resolver_data[player_id]

        local anim_state = player:get_anim_state()
        local current_eye_angles = {
            x = anim_state.eye_pitch
        }

        if data.previous_eye_angles.valid then
            local delta_pitch = current_eye_angles.x - data.previous_eye_angles.x

            local pitch_delta_change = math.abs(delta_pitch - data.last_pitch_delta)
            data.last_pitch_delta = delta_pitch

            if math.abs(delta_pitch) <= 1.0 then --@note: delta_pitch = -1   ->   1
                data.ticks_without_change = data.ticks_without_change + 1
            else
                data.ticks_without_change = 0
            end

            if math.abs(delta_pitch) > 15 or (pitch_delta_change > 15 and data.ticks_without_change > 2) then
                local new_pitch = data.previous_eye_angles.x + delta_pitch

                --@note: you can use player.m_flPoseParameter[12] or animstate to force pitch setting
            end
        end

        data.previous_eye_angles.valid = true
        data.previous_eye_angles.x = current_eye_angles.x

        ::continue::
    end
end


events.post_update_clientside_animation:set(function(cmd)
    resolver(cmd)
end)

Если у вас есть какие-либо замечания по поводу моего материала или предложения, пожалуйста, напишите их в теме.
 
Последнее редактирование:
how will you resolve tick invalidation by setting the pitch to previous values?
 
how will you resolve tick invalidation by setting the pitch to previous values?
Поскольку в чите отсутствует возможность принудительного выбора сейф рекорда, в который читу необходимо будет выстрелить, я решил прибегнуть к такому способу.
 
but what ur doing is just viewangles.x = 89;
why in the world woud that hit? record = unvalid means that you cant backtrack to it at all, so what you need to do for resolving defensive is
1. find first tick they stopped breaking lc
2. dont change viewangles till a record where they break lc again
3. hit head
your lua wont do any of that
 
if math.abs(delta_pitch) <= 1.0 then


or (pitch_delta_change > 15 and data.ticks_without_change > 2)
youre comparing pitch deltas... not simulation time or tickbase....

so in your "resolver" if i break lagcomp jitter my pitch up and down and then peek with pitch down, it will shoot the pitch delta of -89 and 89???
also youre not accounting for yaw change, wich is way more important when resolving defensive antiaim, considering most pitches overlap if you switch them 2 ticks in a row "data.ticks_without_change > 2"...
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху Снизу