Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

LUA скрипт [Source | SPIRT] Clantag Builder

  • Автор темы Автор темы DarkLuny
  • Дата начала Дата начала
?
Забаненный
Забаненный
Статус
Оффлайн
Регистрация
31 Дек 2018
Сообщения
441
Реакции
211
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Credit Best Scripter: @prince1337
1636109361034.png

Код:
Expand Collapse Copy
-- @script: Tag Builder
-- @creator: prince#0001

-- @note: items data
local menu = {}
local items = {}

items.min_count = 0
items.max_count = 40


menu.index = Menu.SliderInt("General", "Index", 0, items.min_count, items.max_count)
menu.index:SetVisible(false)

menu.get_index = function()
    return menu.index:Get()
end

menu.set_index = function(int)
    return menu.index:Set(int)
end


items.error = function()
    Cheat.AddNotify("Limit", ("Min. items: %i\nMax. items: %i\n\nItems count: %i"):format(items.min_count, items.max_count, menu.get_index()))
end


-- @note: items.menu = array | here saved all textbox's
items.menu = {}

items.add = function()
    if menu.get_index() >= items.max_count then
        items.error()
        return
    end

    menu.set_index(menu.get_index() + 1)

    table.insert(items.menu, Menu.TextBox("Tag Builder", ("[%s] Text"):format(menu.get_index()), 60, ""))
end

items.remove = function()
    if menu.get_index() <= items.min_count then
        items.error()
        return
    end

    Menu.DestroyItem(items.menu[menu.get_index()])
    table.remove(items.menu, menu.get_index())

    menu.set_index(menu.get_index() - 1)
end


menu.speed = Menu.SliderInt("General", "Speed", 30, 0, 100)

menu.add = Menu.Button("Tag Builder", "Add", items.add)
menu.remove = Menu.Button("Tag Builder", "Remove", items.remove)


for load_index = 1, menu.get_index() do
    table.insert(items.menu, Menu.TextBox("Tag Builder", ("[%s] Text"):format(load_index), 60, ""))
end


local clantag = {}

clantag.ffi = ffi.cast('int(__fastcall*)(const char*, const char*)', Utils.PatternScan('engine.dll', '53 56 57 8B DA 8B F9 FF 15'))
clantag.last = nil

clantag.set = function(tag)
    if tag == clantag.last then
        return
    end

    clantag.ffi(tag, tag)
    clantag.last = tag
end


clantag.build = function()
    local ret = {}

    for i = 1, #items.menu do
        table.insert(ret, items.menu[i]:Get())
    end

    return ret
end


-- @note: pasted from neverlose docs examples
clantag.draw = function()
    if not EngineClient.IsConnected() then
        return
    end

    local net_channel_info = EngineClient.GetNetChannelInfo()

    if not net_channel_info then
        return
    end

    local tag = clantag.build()
    local speed = menu.speed:Get()

    local latency = net_channel_info:GetLatency(0) / GlobalVars.interval_per_tick
    local tickcount_pred = GlobalVars.tickcount + latency
    local iter = #tag > 1 and math.floor(math.fmod(tickcount_pred / speed, #tag)) + 1 or #tag

    clantag.set(tag[iter])
end

clantag.destroy = function()
    clantag.set("")
end


Cheat.RegisterCallback("draw", clantag.draw)
Cheat.RegisterCallback("destroy", clantag.destroy)
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Назад
Сверху Снизу