LUA скрипт Анимбрикер на фатал суперкрутой с щиткодом

Начинающий
Статус
Оффлайн
Регистрация
12 Мар 2020
Сообщения
30
Реакции[?]
3
Поинты[?]
0
кароче луашка пошла по рукам и я не вижу смысла оставлять это всё так
луашка - мусорный код в котором корса (данжерос на фатал паста) постыдился названия даже поменять
ты просто капсом выделил слова и все..
 

Вложения

  • 1.7 KB Просмотры: 280
Участник
Статус
Оффлайн
Регистрация
4 Мар 2021
Сообщения
898
Реакции[?]
179
Поинты[?]
93K
lua:
local function vtable_thunk(_type, index)
    local ffitype = ffi.typeof(_type)
    return function (class, ...)
        local this = ffi.cast("void***", class)
        return ffi.cast(ffitype, this[0][index])(this, ...)
    end
end
ffi.cdef[[

    struct pose_parameters_t
    {
        char pad[8];
        float m_flStart;
        float m_flEnd;
        float m_flState;
    };
]]
-- Example
local VClientEntityList = utils.find_interface("client.dll", "VClientEntityList003")
local GetClientEntityFN = vtable_thunk("void*(__thiscall*)(void*, int)", 3)

local animation_breakers = {}
animation_breakers.collected_cache = {}

local studio_hdr_offset = 0x2950
local allanimstate_offset = 0x9960
local landing_offset = 0x109


local pose_parameter_pattern = "55 8B EC 8B 45 08 57 8B F9 8B 4F 04 85 C9 75 15"
get_pose_parameters = ffi.cast("struct pose_parameters_t*(__thiscall* )(void*, int)", utils.find_pattern("client.dll", pose_parameter_pattern))


local leg_movement = gui.get_config_item("Rage>Anti-Aim>Desync>Leg Slide")
local dt = gui.get_config_item("rage>aimbot>aimbot>double tap")
local two = false
local land = false
local once = false


local time = 10
local time2 = 2


function SetPose(self_pointer, layer, start_value, end_value)
    local new_player_pointer = ffi.cast("unsigned int", self_pointer)
    local NULL = 0x0
    if new_player_pointer == NULL then
        return false
    end
    local studio_hdr = ffi.cast("void**", new_player_pointer + studio_hdr_offset)[0]

    if not studio_hdr or studio_hdr == NULL then
        return false
    end
  
    local pose_parameters = get_pose_parameters(studio_hdr, layer)
    if not pose_parameters or pose_parameters == NULL then
        return false
    end
    
    if animation_breakers.collected_cache[layer] == nil then
        animation_breakers.collected_cache[layer] = {}

        animation_breakers.collected_cache[layer].m_flStart = pose_parameters.m_flStart
        animation_breakers.collected_cache[layer].m_flEnd = pose_parameters.m_flEnd
        animation_breakers.collected_cache[layer].m_flState = pose_parameters.m_flState

        animation_breakers.collected_cache[layer].is_applied = false
        return true
    end
    
    if start_value ~= nil and not animation_breakers.collected_cache[layer].is_applied then
        pose_parameters.m_flStart = start_value
        pose_parameters.m_flEnd = end_value

        pose_parameters.m_flState = (pose_parameters.m_flStart + pose_parameters.m_flEnd) / 2
        animation_breakers.collected_cache[layer].is_applied = true

        return true
    end
    if animation_breakers.collected_cache[layer].is_applied then
        pose_parameters.m_flStart = animation_breakers.collected_cache[layer].m_flStart
        pose_parameters.m_flEnd = animation_breakers.collected_cache[layer].m_flEnd
        pose_parameters.m_flState = animation_breakers.collected_cache[layer].m_flState

        animation_breakers.collected_cache[layer].is_applied = false
        return true
    end
    return false
end






function on_create_move(cmd)


    local self_index = engine.get_local_player()
    local local_player = GetClientEntityFN(VClientEntityList, self_index)
    local NULL = 0x0
    
    if not local_player or local_player == NULL then
        return
    end

    local local_player_address = ffi.cast("unsigned int", local_player)
    if not local_player_address or local_player_address == NULL then
        return
    end

    local animstate_offset = allanimstate_offset
    local animstate = ffi.cast("void**", local_player_address + animstate_offset)[0]

    if not animstate or animstate == NULL then
        return
    end

    animstate = ffi.cast("unsigned int", animstate)
    if not animstate or animstate == 0x0 then
        return
    end
    
    local animation_on_landing = ffi.cast("bool*", animstate + landing_offset)[0]
    
    if not landing_offset or landing_offset == NULL then
        return
    end

    local addons_direction = 3
    if addons_direction >= 1 then
        SetPose(local_player, 6, 0.9, 1)
    end


    if(land == true) then
        if(time>0) then
            SetPose(local_player, 12, 0.999, 1)
            time = time - global_vars.frametime*10
        else
            land = false
            once = false
            time2 = 2
        end
        if(dt:get_bool() == true) then
            time2 = 4
        end

    end


    if addons_direction >= 2 then
        if animation_on_landing == true and bit.band(cmd:get_buttons(), 2) == 0 then
            time2 = time2 - global_vars.frametime*10

            if(once == false and time2 < 0) then
                time = 10
                land = true
                once = true
            end
        end
    end

    if addons_direction >= 3 then
        leg_movement:set_int(cmd:get_command_number() % 3 == 0 and 0 or 1)
        SetPose(local_player, 0, -180, -179)
    end

end







function on_setup_move(cmd)
    local self_index = engine.get_local_player()
    local local_player = GetClientEntityFN(VClientEntityList, self_index)
    local NULL = 0x0
    
    if not local_player or local_player == NULL then
        return
    end

    local pose_parameters_cache = animation_breakers.collected_cache

    for key, cache in pairs(pose_parameters_cache) do
        SetPose(local_player, key)
    end

end
тупо взял два офсета добавил и типа свая
корса инженеринг систем
если че это у меня на компе валялась с 22 ещё
 
Дизайнер
Статус
Оффлайн
Регистрация
18 Авг 2017
Сообщения
1,924
Реакции[?]
2,245
Поинты[?]
146K
Товары в продаже
1
lua:
local function vtable_thunk(_type, index)
    local ffitype = ffi.typeof(_type)
    return function (class, ...)
        local this = ffi.cast("void***", class)
        return ffi.cast(ffitype, this[0][index])(this, ...)
    end
end
ffi.cdef[[

    struct pose_parameters_t
    {
        char pad[8];
        float m_flStart;
        float m_flEnd;
        float m_flState;
    };
]]
-- Example
local VClientEntityList = utils.find_interface("client.dll", "VClientEntityList003")
local GetClientEntityFN = vtable_thunk("void*(__thiscall*)(void*, int)", 3)

local animation_breakers = {}
animation_breakers.collected_cache = {}

local studio_hdr_offset = 0x2950
local allanimstate_offset = 0x9960
local landing_offset = 0x109


local pose_parameter_pattern = "55 8B EC 8B 45 08 57 8B F9 8B 4F 04 85 C9 75 15"
get_pose_parameters = ffi.cast("struct pose_parameters_t*(__thiscall* )(void*, int)", utils.find_pattern("client.dll", pose_parameter_pattern))


local leg_movement = gui.get_config_item("Rage>Anti-Aim>Desync>Leg Slide")
local dt = gui.get_config_item("rage>aimbot>aimbot>double tap")
local two = false
local land = false
local once = false


local time = 10
local time2 = 2


function SetPose(self_pointer, layer, start_value, end_value)
    local new_player_pointer = ffi.cast("unsigned int", self_pointer)
    local NULL = 0x0
    if new_player_pointer == NULL then
        return false
    end
    local studio_hdr = ffi.cast("void**", new_player_pointer + studio_hdr_offset)[0]

    if not studio_hdr or studio_hdr == NULL then
        return false
    end
 
    local pose_parameters = get_pose_parameters(studio_hdr, layer)
    if not pose_parameters or pose_parameters == NULL then
        return false
    end
   
    if animation_breakers.collected_cache[layer] == nil then
        animation_breakers.collected_cache[layer] = {}

        animation_breakers.collected_cache[layer].m_flStart = pose_parameters.m_flStart
        animation_breakers.collected_cache[layer].m_flEnd = pose_parameters.m_flEnd
        animation_breakers.collected_cache[layer].m_flState = pose_parameters.m_flState

        animation_breakers.collected_cache[layer].is_applied = false
        return true
    end
   
    if start_value ~= nil and not animation_breakers.collected_cache[layer].is_applied then
        pose_parameters.m_flStart = start_value
        pose_parameters.m_flEnd = end_value

        pose_parameters.m_flState = (pose_parameters.m_flStart + pose_parameters.m_flEnd) / 2
        animation_breakers.collected_cache[layer].is_applied = true

        return true
    end
    if animation_breakers.collected_cache[layer].is_applied then
        pose_parameters.m_flStart = animation_breakers.collected_cache[layer].m_flStart
        pose_parameters.m_flEnd = animation_breakers.collected_cache[layer].m_flEnd
        pose_parameters.m_flState = animation_breakers.collected_cache[layer].m_flState

        animation_breakers.collected_cache[layer].is_applied = false
        return true
    end
    return false
end






function on_create_move(cmd)


    local self_index = engine.get_local_player()
    local local_player = GetClientEntityFN(VClientEntityList, self_index)
    local NULL = 0x0
   
    if not local_player or local_player == NULL then
        return
    end

    local local_player_address = ffi.cast("unsigned int", local_player)
    if not local_player_address or local_player_address == NULL then
        return
    end

    local animstate_offset = allanimstate_offset
    local animstate = ffi.cast("void**", local_player_address + animstate_offset)[0]

    if not animstate or animstate == NULL then
        return
    end

    animstate = ffi.cast("unsigned int", animstate)
    if not animstate or animstate == 0x0 then
        return
    end
   
    local animation_on_landing = ffi.cast("bool*", animstate + landing_offset)[0]
   
    if not landing_offset or landing_offset == NULL then
        return
    end

    local addons_direction = 3
    if addons_direction >= 1 then
        SetPose(local_player, 6, 0.9, 1)
    end


    if(land == true) then
        if(time>0) then
            SetPose(local_player, 12, 0.999, 1)
            time = time - global_vars.frametime*10
        else
            land = false
            once = false
            time2 = 2
        end
        if(dt:get_bool() == true) then
            time2 = 4
        end

    end


    if addons_direction >= 2 then
        if animation_on_landing == true and bit.band(cmd:get_buttons(), 2) == 0 then
            time2 = time2 - global_vars.frametime*10

            if(once == false and time2 < 0) then
                time = 10
                land = true
                once = true
            end
        end
    end

    if addons_direction >= 3 then
        leg_movement:set_int(cmd:get_command_number() % 3 == 0 and 0 or 1)
        SetPose(local_player, 0, -180, -179)
    end

end







function on_setup_move(cmd)
    local self_index = engine.get_local_player()
    local local_player = GetClientEntityFN(VClientEntityList, self_index)
    local NULL = 0x0
   
    if not local_player or local_player == NULL then
        return
    end

    local pose_parameters_cache = animation_breakers.collected_cache

    for key, cache in pairs(pose_parameters_cache) do
        SetPose(local_player, key)
    end

end
тупо взял два офсета добавил и типа свая
корса инженеринг систем
если че это у меня на компе валялась с 22 ещё
кто тебя спрашивал
 
Участник
Статус
Оффлайн
Регистрация
4 Мар 2021
Сообщения
898
Реакции[?]
179
Поинты[?]
93K
Начинающий
Статус
Оффлайн
Регистрация
19 Июл 2022
Сообщения
118
Реакции[?]
26
Поинты[?]
11K
кароче луашка пошла по рукам и я не вижу смысла оставлять это всё так
луашка - мусорный код в котором корса (данжерос на фатал паста) постыдился названия даже поменять
ты просто капсом выделил слова и все..
а можно как то это переписать, чтобы оно не меняло анимации других игроков?
 
Сверху Снизу