LUA скрипт [nixware] jumpscout (updated for last)

🪐 saturn solutions
Пользователь
Статус
Оффлайн
Регистрация
7 Апр 2019
Сообщения
296
Реакции[?]
34
Поинты[?]
8K
Код:
local astron = {}
astron.jumpscout = ui.add_check_box('Jumpscout', 'jumpscout', false)
astron.jumpscout_hc = ui.add_slider_int('Hitchance in air', 'jumpscout_hc', 0, 100, 35)
astron.jumpscout_da = ui.add_check_box('Disable auto stop', 'jumpscout_da', false)
astron.rage_scout_hitchance = ui.get_slider_int('rage_scout_hitchance')
astron.rage_auto_stop = ui.get_check_box('rage_scout_autostop')
astron.rage_as = ui.get_check_box('rage_scout_autostop'):get_value()
astron.hc_val = ui.get_slider_int('rage_scout_hitchance'):get_value()
astron.flags = se.get_netvar("DT_BasePlayer", "m_fFlags")
function astron.setVisible()
    astron.jumpscout_hc:set_visible(astron.jumpscout:get_value())
    astron.jumpscout_da:set_visible(astron.jumpscout:get_value())
end
function astron.onground(e)
    return bit32.band(e:get_prop_int(astron.flags), 1) == 1
end
function astron.doWork()
    if not astron.jumpscout:get_value() then return end

    if not astron.onground(entitylist.get_local_player()) then
        astron.rage_scout_hitchance:set_value(astron.jumpscout_hc:get_value())
        
        if astron.jumpscout_da:get_value() then
            astron.rage_auto_stop:set_value(false)
        end
    else
        if astron.rage_scout_hitchance:get_value() ~= astron.jumpscout_hc:get_value() then
            astron.hc_val = astron.rage_scout_hitchance:get_value()
        end
        if astron.rage_auto_stop:get_value() ~= false and astron.jumpscout_da:get_value() then
            astron.rage_as = astron.rage_auto_stop:get_value()
        end
        astron.rage_scout_hitchance:set_value(astron.hc_val)
        if astron.jumpscout_da:get_value() then
            astron.rage_auto_stop:set_value(astron.rage_as)
        end
    end
end
function astron.onUnload()
    if not astron.jumpscout:get_value() then return end
    astron.rage_scout_hitchance:set_value(astron.hc_val)
    if astron.jumpscout_da:get_value() then
        astron.rage_auto_stop:set_value(astron.rage_as)
    end
end

client.register_callback("paint", astron.setVisible)
client.register_callback("create_move", astron.doWork)
client.register_callback("unload", astron.onUnload)
 
Сверху Снизу