Декомпиляция скриптов

FYP

Известный
Автор темы
Администратор
1,763
5,904
GVWUrNJ.png
eNo5cSj.png


Общая тема для просьб о помощи в декомпиляциии и декриптованиии скриптов, плагинов и приложений.
Запрещено просить о декомпиляции/декриптовании софта, выставленного на продажу на нашем сайте.

Рекомендации:
  1. Сначала воспользуйтесь поиском по теме и по форуму, возможно его в декомпилированном виде или с исходным кодом уже выкладывали у нас на сайте.
  2. Попытайтесь декомпилировать самостоятельно: CLEO - декриптор, декомпилятор; AHK - распаковщик .exe; LuaJIT - декомпилятор1, декомпилятор2.
  3. Просить о декомпиляции .asi, .sf, .dll, .exe почти бесполезно, часто такие просьбы остаются без ответа и вряд ли вам это что-то даст. Можете попробовать сами, IDA Pro или Ghidra к вашим услугам.
    • Это не касается .exe, которые являются скомпилированными AutoHotKey-скриптами (.ahk).
  4. Добавьте название скрипта к сообщению, если оно известно - это поможет другим пользователям найти его с помощью поиска.
  5. Сообщения по типу "спасибо, помог" по правилам форума считаются флудом и скорее всего будут удалены. Если вам помогли, вы можете нажать кнопку Мне нравится под ответом - это даст понять, что ответ верный.
 
Последнее редактирование:

kuboni

Потрачен
154
2
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Pls
 

Вложения

  • PIZZA.luac
    9.4 KB · Просмотры: 2

0x73616D

Активный
140
42
CLEO:
{$CLEO .cs}
{$USE ini}

nop
0C6A: 22@  = create_custom_thread_at_label -5655
allocate_memory 4@ = allocate_memory_size 64
allocate_memory 5@ = allocate_memory_size 64
allocate_memory 16@ = allocate_memory_size 64

:Noname_34
wait 50
  SAMP.Available
goto_if_false @Noname_34
0B34: samp register_client_command "sd" to_label -4078
0B34: samp register_client_command "sdpos" to_label -2497
0B34: samp register_client_command "sdhelp" to_label -3451
0B34: samp register_client_command "sdping" to_label -2733
0B34: samp register_client_command "sdtping" to_label -3143
0B34: samp register_client_command "sdtpingmode" to_label -3293
0B34: samp register_client_command "sdfps" to_label -2871
0B34: samp register_client_command "sdzone" to_label -2587
0B34: samp register_client_command "sdxyz" to_label -3007
0B34: samp register_client_command "sdflags" to_label -2567
0B34: samp register_client_command "sdsize" to_label -2547
0B34: samp register_client_command "sdalign" to_label @Noname_2407
0B34: samp register_client_command "limitfps" to_label @Noname_2359
chatmsg "{F7F694}statDisplay mod. Use {FF4800}/sdhelp {F7F694}to see commands" color
if
  does_file_exist "CLEO\statDisplaySettings.ini"
goto_if_false @Noname_1199
21@ = 0
  read_string_from_ini_file 16@ = read_string_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "font_name"
  read_int_from_ini_file 12@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "x"
  read_int_from_ini_file 13@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "y"
  read_int_from_ini_file 17@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "switch"
  read_int_from_ini_file 15@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "ping"
cleo_call -4274 3 21@ 0 15@ 21@
  read_int_from_ini_file 15@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "fps"
cleo_call -4274 3 21@ 1 15@ 21@
  read_int_from_ini_file 15@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "location"
cleo_call -4274 3 21@ 2 15@ 21@
  read_int_from_ini_file 15@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "xyz"
cleo_call -4274 3 21@ 6 15@ 21@
  read_int_from_ini_file 15@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "targetPing"
cleo_call -4274 3 21@ 7 15@ 21@
  read_int_from_ini_file 15@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "targetPingMode"
cleo_call -4274 3 21@ 8 15@ 21@
  read_int_from_ini_file 18@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "font_size"
  read_int_from_ini_file 19@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "font_flags"
  read_int_from_ini_file 20@ = read_int_from_ini_file "CLEO\statDisplaySettings.ini" section "Settings" key "alignment"
goto @Noname_1293

:Noname_1199
chatmsg "{F7F694}CLEO\statDisplaySettings.ini {FF4800}not found. {F7F694}The mod won't work" color
goto @Noname_2347

:Noname_1293
0@ = Render.CreateFont(16@, 18@, 19@)

:Noname_1307
wait 0
if
  17@ == 1
goto_if_false @Noname_2340
set_lvar_int_to_lvar_int 14@ = 13@
if
cleo_call -4239 2 21@ 3
goto_if_false @Noname_1385
cleo_call -4773 2 12@ 13@ 12@ 13@

:Noname_1385
if
cleo_call -4239 2 21@ 4
goto_if_false @Noname_1467
if
cleo_call -4968 1 18@ 18@
goto_if_false @Noname_1467
cleo_call -4518 4 0@ 16@ 18@ 19@ 0@
wait 100

:Noname_1467
if
cleo_call -4239 2 21@ 5
goto_if_false @Noname_1549
if
cleo_call -5289 1 19@ 19@
goto_if_false @Noname_1549
cleo_call -4518 4 0@ 16@ 18@ 19@ 0@
wait 100

:Noname_1549
if
cleo_call -4239 2 21@ 2
goto_if_false @Noname_1644
Actor.StorePos($PLAYER_ACTOR, 6@, 7@, 8@)
get_name_of_zone 6@ 7@ 8@ nameA_to s$93
get_text_label_string 5@ = text_label_string s$93
cleo_call -4377 7 0@ 18@ 5@ 12@ 14@ -1 20@ 14@

:Noname_1644
if
cleo_call -4239 2 21@ 0
goto_if_false @Noname_1738
1@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
1@ = SAMP.GetPlayerPing(1@)
string_format 4@ = string_format "Ping: %d" 1@
cleo_call -4377 7 0@ 18@ 4@ 12@ 14@ -1 20@ 14@

:Noname_1738
if
cleo_call -4239 2 21@ 1
goto_if_false @Noname_1871
9@ += 1
if
cleo_call -4545 1 11@ 11@
goto_if_false @Noname_1820
set_lvar_int_to_lvar_int 10@ = 9@
10@ *= 2
9@ = 0

:Noname_1820
string_format 4@ = string_format "Fps: %d" 10@
cleo_call -4377 7 0@ 18@ 4@ 12@ 14@ -1 20@ 14@

:Noname_1871
if
cleo_call -4239 2 21@ 6
goto_if_false @Noname_1984
Actor.StorePos($PLAYER_ACTOR, 6@, 7@, 8@)
string_format 4@ = string_format "X:%0.1f Y:%0.1f Z:%0.1f" 6@ 7@ 8@
cleo_call -4377 7 0@ 18@ 4@ 12@ 14@ -1 20@ 14@

:Noname_1984
if
  SAMP.IsCursorActive
goto_if_false @Noname_2085
0B5E: get_cursor_pos 23@ 24@
0B5F: convert_window_screen_coords 23@ 24@ to_game_screen_coords 23@ 24@
string_format 4@ = string_format "Mouse X:%.0f Y:%.0f" 23@ 24@
cleo_call -4377 7 0@ 18@ 4@ 12@ 14@ -1 20@ 14@

:Noname_2085
if
cleo_call -4239 2 21@ 7
goto_if_false @Noname_2340
if
  get_char_player_is_targeting 1@ = player $PLAYER_CHAR
goto_if_false @Noname_2340
if
cleo_call -4239 2 21@ 8
goto_if_false @Noname_2265
Actor.StorePos(1@, 6@, 7@, 8@)
8@ -= 1.0
SAMP.Convert3DCoordsToScreen(6@, 7@, 8@, 6@, 7@)
1@ = SAMP.GetSAMPPlayerIDByActorHandle(1@)
1@ = SAMP.GetPlayerPing(1@)
string_format 4@ = string_format "%d" 1@
cleo_call -4377 7 0@ 18@ 4@ 6@ 7@ -1 1 7@
goto @Noname_2340

:Noname_2265
1@ = SAMP.GetSAMPPlayerIDByActorHandle(1@)
1@ = SAMP.GetPlayerPing(1@)
string_format 4@ = string_format "Target ping: %d" 1@
cleo_call -4377 7 0@ 18@ 4@ 12@ 14@ -1 20@ 14@

:Noname_2340
goto @Noname_1307

:Noname_2347
wait 5000
goto @Noname_2347

:Noname_2359
  SAMP.IsCommandTyped(23@)
if
  scan_string 25@  = scan_string 23@ format "%d"24@
goto_if_false @Noname_2405
write_memory 12677196 size 1 value 24@ virtual_protect 0

:Noname_2405
SAMP.CmdRet

:Noname_2407
20@ += 1
if
  20@ > 2
goto_if_false @Noname_2439
20@ = 0

:Noname_2439
  write_int_to_ini_file 20@ to_ini_file "CLEO\statDisp" section

Lua:
script_author("ollydbg //Jose Samp")
script_url("www.youtube.com/JoseSampMods/videos")

slot0 = {}
slot4, slot2 = pcall(require, "vkeys")

assert(slot1, "vkeys load error")

slot3 = getWorkingDirectory() .. "\\config\\macros\\lista_macros.txt"
slot4 = require("inicfg")
slot5 = "\\macros\\macros"
slot7 = {
    Settings = {
        cmd = "macros"
    }
}

slot4.save(slot4.load(slot7, slot5), slot5)

slot7 = {
    save = function (slot0, slot1)
        if doesFileExist(slot1) then
            os.remove(slot1)
        end

        if type(slot0) ~= "table" then
            return
        end

        slot2 = io.open(slot1, "a+")

        slot2:write(encodeJson(slot0))
        slot2:close()
    end,
    load = function (slot0)
        if doesFileExist(slot0) then
            slot1 = io.open(slot0, "r")

            slot1:close()

            return decodeJson(slot1:read("*a"))
        end
    end
}

if not doesDirectoryExist(getWorkingDirectory() .. "\\config") then
    createDirectory(getWorkingDirectory() .. "\\config")
end

if not doesFileExist(slot3) then
    slot7.save(slot0, slot3)
else
    slot0 = slot7.load(slot3)
end

function slot8()
    slot0 = ""

    for slot4 = 0, 255, 1 do
        if wasKeyPressed(slot4) and slot4 ~= 91 and slot4 ~= 92 then
            slot0 = slot4
        end
    end

    return slot0
end

function slot9()
    wait(200)

    slot0, slot1 = nil

    while true do
        wait(0)
        printString("Presiona la tecla #1 a establecer", 100)

        if uv0() ~= "" then
            slot0 = slot2

            break
        end
    end

    while true do
        wait(0)
        printString("Presiona la tecla #2 a establecer", 100)

        if uv0() ~= "" then
            slot1 = slot2

            break
        end
    end

    return slot0, slot1
end

function slot10(slot0)
    for slot4, slot5 in ipairs(uv0) do
        if slot4 == tonumber(slot0) then
            return slot4
        end
    end
end

function slot11(slot0)
    for slot5 = 1, #slot1, 1 do
        if #slot1:sub(1, -slot5) < 80 then
            return slot6
        end
    end
end

function slot12()
    for slot4, slot5 in ipairs(uv0) do
        if slot5.tecla1 ~= nil then
            slot0 = "Tecla\tComando\n" .. "[" .. slot4 .. "] " .. uv2.id_to_name(slot5.tecla1) .. " + " .. uv2.id_to_name(slot5.tecla2) .. "\t" .. (#slot5.comando < 20 and slot5.comando or uv1(slot5.comando)) .. "\n"
        end
    end

    sampShowDialog(312, "Macros", slot0 .. "+ Agregar nuevo", "Seleccionar", "Cancelar", 5)

    while sampIsDialogActive() do
        wait(0)

        slot1, slot2, slot3, slot4 = sampHasDialogRespond(312)

        if slot1 and slot2 == 1 then
            for slot8 = 0, sampGetListboxItemsCount(), 1 do
                if slot2 == 1 and slot3 == slot8 then
                    if sampGetListboxItemText(slot8):find("+ Agregar nuevo") then
                        add()

                        break
                    elseif slot2 == 1 and slot3 == slot8 then
                        selected = uv3(sampGetListboxItemText(slot3):match("%[(%d+)%]"))

                        sampShowDialog(877, "Macros > #" .. selected, "Cambiar teclas\nCambiar comando\nEliminar", "Seleccionar", "Cancelar", 2)

                        while sampIsDialogActive() do
                            wait(0)

                            slot10, slot11, slot12, slot13 = sampHasDialogRespond(877)

                            if slot10 and slot11 == 1 then
                                if slot12 == 0 then
                                    uv0[selected].tecla1, uv0[selected].tecla2 = uv4()

                                    uv5.save(uv0, uv6)
                                    wait(35)
                                    uv7()
                                elseif slot12 == 1 then
                                    sampShowDialog(65, "Cambiar comando > #" .. selected, "Ingresa el texto que quieras", "Aceptar", "Cancelar", 1)

                                    while sampIsDialogActive() do
                                        wait(0)

                                        slot14, slot15, slot16, slot17 = sampHasDialogRespond(65)

                                        if slot14 and slot15 == 1 and #slot17 > 0 then
                                            uv0[selected].comando = slot17

                                            uv5.save(uv0, uv6)
                                            wait(35)
                                            uv7()
                                        end
                                    end
                                elseif slot12 == 2 then
                                    addOneOffSound(0, 0, 0, 1052)
                                    table.remove(uv0, selected)
                                    uv5.save(uv0, uv6)
                                    wait(35)
                                    uv7()
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end

function slot13()
    if not doesDirectoryExist(getGameDirectory() .. "\\data\\saves\\") then
        createDirectory(getGameDirectory() .. "\\data\\saves\\")
    end

    if not doesFileExist(getGameDirectory() .. "\\data\\saves\\macros.txt") then
        slot1 = io.open(slot0, "a+")

        slot1:write(encodeJson({
            0
        }))
        slot1:close()
    end

    slot1 = io.open(slot0, "r")

    slot1:close()

    if decodeJson(slot1:read("*a"))[1] < 1 then
        os.remove(slot0)
        sampAddChatMessage("[{BAFF00}Macros.luac{E3E3E3}]» Cargado correctamente. [ {BAFF00}By {00B5FF}José Samp {E3E3E3}] [ {BAFF00}/" .. uv0.Settings.cmd .. "{E3E3E3}]", 4293125091.0)
        sampAddChatMessage("Mensaje 1 de 1", -1)

        slot2[1] = slot2[1] + 1
        slot3 = io.open(slot0, "a+")

        slot3:write(encodeJson(slot2))
        slot3:close()
    end
end

function add()
    sampShowDialog(65, "Agregar comando", "Ingresa el texto que quieras", "Aceptar", "Cancelar", 1)

    while sampIsDialogActive() do
        wait(0)

        slot0, slot1, slot2, slot3 = sampHasDialogRespond(65)

        if slot0 and slot1 == 1 and #slot3 > 0 then
            slot8.tecla1, slot8.tecla2 = uv0()
            slot8 = {
                comando = slot3
            }

            table.insert(uv1, slot8)
            uv2.save(uv1, uv3)
            wait(1000)
            uv4()
        end
    end
end

function main()
    repeat
        wait(0)
    until isSampAvailable()

    if not doesFileExist(getWorkingDirectory() .. "/Macros_by_Jose.luac") then
        printStringNow("No cambies el nombre de Macros_by_Jose.luac", 60000)
        thisScript():unload()
    end

    lua_thread.create(function ()
        repeat
            wait(0)
        until isCharStopped(PLAYER_PED)

        uv0()
    end)
    sampRegisterChatCommand(uv1.Settings.cmd, function ()
        lua_thread.create(function ()
            uv0()
        end)
    end)

    while true do
        wait(0)

        for slot3, slot4 in ipairs(uv3) do
            if isKeyDown(slot4.tecla1) and wasKeyPressed(slot4.tecla2) and not sampIsCursorActive() and not isSampfuncsConsoleActive() then
                sampProcessChatInput(slot4.comando)
            end
        end
    end
end

Lua:
script_name("PizzaBot")
script_authors("by_k0lenval")
script_version("0.2b")
script_dependencies()

local var_0_0 = require("vkeys")
local var_0_1 = require("memory")
local var_0_2 = require("lib.samp.events")
local var_0_3
local var_0_4
local var_0_5
local var_0_6
local var_0_7

function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then
        return
    end

    while not isSampAvailable() do
        wait(0)
    end

    sampAddChatMessage(string.format("{00AAFF}%s {FFFF00}\xF3\xF1\xEF\xE5\xF8\xED\xEE \xE7\xE0\xE3\xF0\xF3\xE6\xE5\xED. \xCA\xEE\xEC\xE0\xED\xE4\xE0 \xE0\xEA\xF2\xE8\xE2\xE0\xF6\xE8\xE8 - {FF4400}/pizb", thisScript().name), 16776960)
    sampRegisterChatCommand("pizb", cmd_bot)

    while true do
        wait(0)

        if var_0_3 and isPlayerPlaying(playerHandle) and sampGetPlayerIdByCharHandle(PLAYER_PED) then
            if var_0_4 == -1 then
                if isCharInAnyCar(PLAYER_PED) == false then
                    BeginToPoint(1751, 2216, 10.84, 0.6, true, false, true, false)

                    var_0_6 = 0
                else
                    setGameKeyState(15, 255)
                    wait(200)
                end
            end

            if var_0_4 == 0 and var_0_6 ~= 0 and isCharInAnyCar(PLAYER_PED) then
                var_0_4 = InCarGo(var_0_6, var_0_4)
            end

            if var_0_4 == 1 and isCharInAnyCar(PLAYER_PED) == false then
                local var_1_0 = 0
                local var_1_1 = 0
                local var_1_2 = 0

                if var_0_6 == 2030 then
                    var_1_0, var_1_1, var_1_2 = 2031.56, 987.18, 10.35
                end

                if var_0_6 == 2600 then
                    var_1_0, var_1_1, var_1_2 = 2599.83, 1058.92, 10.35
                end

                if var_0_6 == 2320 then
                    var_1_0, var_1_1, var_1_2 = 2326.42, 2420.32, 10.35
                end

                if var_0_6 == 2345 then
                    var_1_0, var_1_1, var_1_2 = 2350.04, 2406.56, 10.35
                end

                if var_0_6 == 2534 then
                    var_1_0, var_1_1, var_1_2 = 2536.94, 2135.69, 10.82
                end

                if var_0_6 == -53 then
                    var_1_0, var_1_1, var_1_2 = -61.68, 1207.61, 18.9
                end

                if var_0_6 == -85 then
                    var_1_0, var_1_1, var_1_2 = -86.58, 102.05, 3.12
                end

                if var_0_6 == -86 then
                    var_1_0, var_1_1, var_1_2 = -103.62, -311.71, 1.43
                end

                if var_1_0 ~= 0 then
                    BeginToPoint(var_1_0, var_1_1, var_1_2, 0.8, true, false, false, true)
                end
            end

            if var_0_4 == 2 and isCharInAnyCar(PLAYER_PED) then
                var_0_4 = InCarGo(var_0_6, var_0_4)
            end
        end
    end
end

function InCarGo(arg_2_0, arg_2_1)
    local var_2_0 = io.open("moonloader\\PathPizBot\\" .. arg_2_0 .. ".txt", "r+")
    local var_2_1 = {}

    if var_2_0 == nil then
        return arg_2_1
    end

    if var_2_0 then
        for iter_2_0 in var_2_0:lines() do
            table.insert(var_2_1, iter_2_0)
        end
    end

    if arg_2_1 == 2 then
        var_2_1 = ReverseTable(var_2_1)
    end

    if var_2_1 then
        for iter_2_1, iter_2_2 in pairs(var_2_1) do
            local var_2_2 = storeCarCharIsInNoSave(PLAYER_PED)

            var_0_7 = var_2_2

            local var_2_3 = os.time()

            if var_0_3 == false then
                break
            end

            local var_2_4, var_2_5, var_2_6, var_2_7 = iter_2_2:match("{(.*)}:{(.*)}:{(.*)}:{(.*)}")

            if var_2_4 and var_2_5 and var_2_6 and var_2_7 then
                repeat
                    wait(0)

                    if isCharInAnyCar(PLAYER_PED) then
                        if tonumber(var_2_7) == 1 and getCarSpeed(var_2_2) < 32.4 then
                            setGameKeyState(14, -128)
                            setGameKeyState(1, -128)
                        end

                        setCarEngineOn(var_2_2, true)

                        if iter_2_1 % 2 > 0 then
                            if getCarSpeed(var_2_2) <= 1 and os.time() - var_2_3 > 3 then
                                for iter_2_3 = 0, 170 do
                                    wait(0)
                                    setGameKeyState(14, 128)
                                end

                                var_2_3 = os.time()
                            end

                            local var_2_8, var_2_9, var_2_10 = getCarCoordinates(var_2_2)
                            local var_2_11 = getDistanceBetweenCoords3d(var_2_4, var_2_5, var_2_10, var_2_8, var_2_9, var_2_10)

                            if var_2_11 > 3 and var_2_11 < 8 and os.time() - var_2_3 > 3 then
                                setCharCoordinates(PLAYER_PED, var_2_4, var_2_5, getGroundZFor3dCoord(var_2_4, var_2_5, var_2_10))
                            end

                            turning_mechanism(tonumber(var_2_4), tonumber(var_2_5), var_2_8, var_2_9, var_2_2)

                            if getCarSpeed(var_2_2) < var_2_6 + 2 then
                                press_gas()
                            else
                                press_brake()
                            end
                        else
                            break
                        end
                    end
                until locateCharInCar2d(PLAYER_PED, tonumber(var_2_4), tonumber(var_2_5), 5, 5, false) or var_0_3 == false
            end
        end

        if arg_2_1 == 2 then
            arg_2_1 = -1
        elseif arg_2_1 == 0 then
            arg_2_1 = 1
        end
    end

    return arg_2_1
end

function EnterCarExist()
    while true do
        wait(0)

        if var_0_3 and isCharInAnyCar(PLAYER_PED) == false and (var_0_4 == 0 or var_0_4 == 2) then
            repeat
                wait(100)

                BoolFind, Car, Lock = FuncFindCar(var_0_7)

                if BoolFind then
                    local var_3_0, var_3_1, var_3_2 = getCarCoordinates(Car)

                    BeginToPoint(var_3_0, var_3_1, var_3_2, 2, true, true, false, false, Lock)
                else
                    print("\xCD\xE5 \xED\xE0\xE9\xE4\xE5\xED \xE1\xE0\xE9\xEA")
                end
            until isCharInAnyCar(PLAYER_PED) or var_0_3 == false

            if isCharInAnyCar(PLAYER_PED) and doesVehicleExist(Car) and getCarDoorLockStatus(Car) == 0 then
                wait(1000)
                sampSendChat("/jlock")
                setCharCanBeKnockedOffBike(PLAYER_PED, true)
            end
        end
    end
end

function ReverseTable(arg_4_0)
    local var_4_0 = {}
    local var_4_1 = #arg_4_0

    for iter_4_0, iter_4_1 in ipairs(arg_4_0) do
        var_4_0[var_4_1 + 1 - iter_4_0] = iter_4_1
    end

    return var_4_0
end

function turning_mechanism(arg_5_0, arg_5_1, arg_5_2, arg_5_3, arg_5_4)
    local var_5_0 = math.rad(getHeadingFromVector2d(arg_5_0 - arg_5_2, arg_5_1 - arg_5_3) + math.abs(getCarHeading(arg_5_4) - 360))
    local var_5_1 = getHeadingFromVector2d(math.deg(math.sin(var_5_0)), math.deg(math.cos(var_5_0)))

    if var_5_1 > 180 and var_5_1 < 355 then
        setGameKeyState(0, -128)
    elseif var_5_1 > 5 and var_5_1 <= 180 then
        setGameKeyState(0, 128)
    else
        setGameKeyState(0, 0)
    end
end

function press_gas()
    writeMemory(12006520, 1, 255, false)
end

function press_brake()
    writeMemory(12006500, 1, 255, false)
end

function FuncFindCar(arg_8_0)
    local var_8_0 = getAllVehicles()
    local var_8_1 = {}
    local var_8_2 = false
    local var_8_3 = 0
    local var_8_4 = false

    for iter_8_0, iter_8_1 in pairs(var_8_0) do
        if doesVehicleExist(iter_8_1) and getNameOfVehicleModel(getCarModel(iter_8_1)) == "PIZZABO" and getDriverOfCar(iter_8_1) == -1 and getCarDoorLockStatus(iter_8_1) == 0 or doesVehicleExist(iter_8_1) and getNameOfVehicleModel(getCarModel(iter_8_1)) == "PIZZABO" and getDriverOfCar(iter_8_1) == -1 and arg_8_0 == iter_8_1 then
            local var_8_5, var_8_6, var_8_7 = getCharCoordinates(PLAYER_PED)
            local var_8_8, var_8_9, var_8_10 = getCarCoordinates(iter_8_1)
            local var_8_11 = getDistanceBetweenCoords3d(var_8_5, var_8_6, var_8_7, var_8_8, var_8_9, var_8_10)

            if var_8_1[1] == nil then
                var_8_1 = {
                    iter_8_1,
                    var_8_11
                }
            elseif var_8_11 < var_8_1[2] then
                var_8_1 = {
                    iter_8_1,
                    var_8_11
                }
            end
        end
    end

    if var_8_1[1] ~= nil and var_8_1[2] < 80 then
        if arg_8_0 == var_8_1[1] then
            var_8_4 = true
        end

        var_8_2 = true
    end

    return var_8_2, var_8_1[1], var_8_4
end

function BeginToPoint(arg_9_0, arg_9_1, arg_9_2, arg_9_3, arg_9_4, arg_9_5, arg_9_6, arg_9_7, arg_9_8)
    local var_9_0 = os.time()
    local var_9_1, var_9_2, var_9_3 = getCharCoordinates(PLAYER_PED)
    local var_9_4 = getDistanceBetweenCoords3d(arg_9_0, arg_9_1, arg_9_2, var_9_1, var_9_2, var_9_3)
    local var_9_5 = math.ceil(getCharHeading(PLAYER_PED))
    local var_9_6 = math.ceil(getHeadingFromVector2d(arg_9_0 - var_9_1, arg_9_1 - var_9_2))
    local var_9_7 = var_9_5
    local var_9_8 = var_9_5
    local var_9_9 = 0

    for iter_9_0 = 0, 180 do
        var_9_9 = var_9_9 + 1
        var_9_7 = var_9_7 + 1
        var_9_8 = var_9_8 - 1

        if var_9_7 > 360 then
            var_9_7 = 0
        end

        if var_9_8 < 0 then
            var_9_8 = 360
        end

        if var_9_7 == var_9_6 or var_9_8 == var_9_6 then
            break
        end
    end

    if var_9_7 == var_9_6 then
        for iter_9_1 = 0, var_9_9, math.random(3, 5) do
            if arg_9_7 and arg_9_3 < var_9_4 then
                setGameKeyState(1, -255)
            elseif arg_9_7 == false then
                setGameKeyState(1, -255)
            end

            wait(0)

            if var_0_3 then
                setCameraPositionUnfixed(-0.3, math.rad(var_9_5 + iter_9_1 + 270))
            end
        end
    else
        for iter_9_2 = 0, var_9_9, math.random(3, 5) do
            if arg_9_7 and arg_9_3 < var_9_4 then
                setGameKeyState(1, -255)
            elseif arg_9_7 == false then
                setGameKeyState(1, -255)
            end

            wait(0)

            if var_0_3 then
                setCameraPositionUnfixed(-0.3, math.rad(var_9_5 - iter_9_2 + 270))
            end
        end
    end

    repeat
        wait(0)

        local var_9_10 = true
        local var_9_11 = true
        local var_9_12 = true
        local var_9_13 = true
        local var_9_14, var_9_15, var_9_16 = getCharCoordinates(PLAYER_PED)
        local var_9_17 = math.rad(getHeadingFromVector2d(arg_9_0 - var_9_14, arg_9_1 - var_9_15))
        local var_9_18 = getDistanceBetweenCoords3d(arg_9_0, arg_9_1, arg_9_2, var_9_14, var_9_15, arg_9_2)

        if arg_9_6 and var_0_4 == 0 then
            break
        end

        if arg_9_5 and arg_9_8 and var_9_18 < 2 and doesVehicleExist(var_0_7) and getCarDoorLockStatus(var_0_7) == 2 then
            sampSendChat("/jlock")

            arg_9_8 = false
        end

        if arg_9_5 and var_9_18 < arg_9_3 then
            repeat
                setGameKeyState(15, 255)
                wait(800)
            until isCharInAnyCar(PLAYER_PED) or os.time() - var_9_0 > 8 or var_0_3 == false

            break
        end

        if arg_9_7 and var_0_4 == 2 then
            break
        end

        if var_9_18 > 1.5 then
            for iter_9_3 = -0.5, 0.7, 0.2 do
                local var_9_19 = var_9_14 + 0.4 * math.cos(var_9_17 + 0.2 + 0)
                local var_9_20 = var_9_15 + 0.4 * math.sin(var_9_17 + 0.2 + 0)
                local var_9_21 = var_9_14 + 1.5 * math.cos(var_9_17 + 1.35)
                local var_9_22 = var_9_15 + 1.5 * math.sin(var_9_17 + 1.35)
                local var_9_23 = isLineOfSightClear(var_9_19, var_9_20, var_9_16 + iter_9_3, var_9_21, var_9_22, var_9_16 + iter_9_3, true, true, true, true, false)
                local var_9_24 = var_9_14 + 0.4 * math.cos(var_9_17 + 3 + 0)
                local var_9_25 = var_9_15 + 0.4 * math.sin(var_9_17 + 3 + 0)
                local var_9_26 = var_9_14 + 1.5 * math.cos(var_9_17 + 1.75)
                local var_9_27 = var_9_15 + 1.5 * math.sin(var_9_17 + 1.75)
                local var_9_28 = isLineOfSightClear(var_9_24, var_9_25, var_9_16 + iter_9_3, var_9_26, var_9_27, var_9_16 + iter_9_3, true, true, true, true, false)
                local var_9_29 = var_9_14 + 1.5 * math.cos(var_9_17 + 1.55)
                local var_9_30 = var_9_15 + 1.5 * math.sin(var_9_17 + 1.55)
                local var_9_31 = isLineOfSightClear(var_9_14, var_9_15, var_9_16 + iter_9_3, var_9_29, var_9_30, var_9_16 + iter_9_3, true, true, true, true, false)

                if var_9_23 == false or var_9_28 == false or var_9_31 == false then
                    var_9_13 = false

                    break
                end
            end
        end

        if var_9_13 == false then
            ClearLine(var_9_17)
        else
            setCameraPositionUnfixed(-0.3, var_9_17 + 4.7)
        end

        if arg_9_7 and arg_9_3 < var_9_18 then
            setGameKeyState(1, -255)
        elseif arg_9_7 == false then
            setGameKeyState(1, -255)
        end

        if arg_9_4 then
            local var_9_32 = readMemory(getCharPointer(PLAYER_PED) + 1133, 2, 0)

            if var_9_32 == 32 or var_9_32 == 544 then
                state_jump = true
            else
                state_jump = false
            end

            if getCharSpeed(PLAYER_PED) > 6 and state_jump and math.ceil(getCharHeading(PLAYER_PED)) == math.floor(getHeadingFromVector2d(arg_9_0 - var_9_14, arg_9_1 - var_9_15)) and var_9_18 > 10 then
                setGameKeyState(14, 255)
            else
                setGameKeyState(16, 255)
            end
        end
    until var_0_3 == false
end

function ClearLine(arg_10_0)
    local var_10_0, var_10_1, var_10_2 = getCharCoordinates(PLAYER_PED)

    for iter_10_0 = 0.3, 2, 0.2 do
        local var_10_3 = iter_10_0 / 1.2
        local var_10_4 = var_10_0 + 0.4 * math.cos(arg_10_0 + 0.2 - var_10_3)
        local var_10_5 = var_10_1 + 0.4 * math.sin(arg_10_0 + 0.2 - var_10_3)
        local var_10_6 = var_10_0 + 2 * math.cos(arg_10_0 + 1.15 - iter_10_0)
        local var_10_7 = var_10_1 + 2 * math.sin(arg_10_0 + 1.15 - iter_10_0)
        local var_10_8 = isLineOfSightClear(var_10_4, var_10_5, var_10_2 - 0.5, var_10_6, var_10_7, var_10_2 - 0.5, true, true, true, true, false)
        local var_10_9 = var_10_0 + 0.4 * math.cos(arg_10_0 + 2.6 - var_10_3)
        local var_10_10 = var_10_1 + 0.4 * math.sin(arg_10_0 + 2.6 - var_10_3)
        local var_10_11 = var_10_0 + 2 * math.cos(arg_10_0 + 1.6 - iter_10_0)
        local var_10_12 = var_10_1 + 2 * math.sin(arg_10_0 + 1.6 - iter_10_0)
        local var_10_13 = isLineOfSightClear(var_10_9, var_10_10, var_10_2 - 0.5, var_10_11, var_10_12, var_10_2 - 0.5, true, true, true, true, false)
        local var_10_14 = var_10_0 + 2 * math.cos(arg_10_0 + 1.37 - iter_10_0)
        local var_10_15 = var_10_1 + 2 * math.sin(arg_10_0 + 1.37 - iter_10_0)
        local var_10_16 = isLineOfSightClear(var_10_0, var_10_1, var_10_2 - 0.5, var_10_14, var_10_15, var_10_2 - 0.5, true, true, true, true, false)

        if var_10_8 and var_10_13 and var_10_16 then
            local var_10_17 = math.rad(getHeadingFromVector2d(var_10_14 - var_10_0, var_10_15 - var_10_1))

            setCameraPositionUnfixed(-0.3, var_10_17 + 0.1 + 4.7)

            break
        end

        local var_10_18 = var_10_0 + 0.4 * math.cos(arg_10_0 + 0.2 + var_10_3)
        local var_10_19 = var_10_1 + 0.4 * math.sin(arg_10_0 + 0.2 + var_10_3)
        local var_10_20 = var_10_0 + 2 * math.cos(arg_10_0 + 1.15 + iter_10_0)
        local var_10_21 = var_10_1 + 2 * math.sin(arg_10_0 + 1.15 + iter_10_0)
        local var_10_22 = isLineOfSightClear(var_10_18, var_10_19, var_10_2 - 0.5, var_10_20, var_10_21, var_10_2 - 0.5, true, true, true, true, false)
        local var_10_23 = var_10_0 + 0.4 * math.cos(arg_10_0 + 2.6 + var_10_3)
        local var_10_24 = var_10_1 + 0.4 * math.sin(arg_10_0 + 2.6 + var_10_3)
        local var_10_25 = var_10_0 + 2 * math.cos(arg_10_0 + 1.6 + iter_10_0)
        local var_10_26 = var_10_1 + 2 * math.sin(arg_10_0 + 1.6 + iter_10_0)
        local var_10_27 = isLineOfSightClear(var_10_23, var_10_24, var_10_2 - 0.5, var_10_25, var_10_26, var_10_2 - 0.5, true, true, true, true, false)
        local var_10_28 = var_10_0 + 2 * math.cos(arg_10_0 + 1.37 + iter_10_0)
        local var_10_29 = var_10_1 + 2 * math.sin(arg_10_0 + 1.37 + iter_10_0)
        local var_10_30 = isLineOfSightClear(var_10_0, var_10_1, var_10_2 - 0.5, var_10_28, var_10_29, var_10_2 - 0.5, true, true, true, true, false)

        if var_10_22 and var_10_27 and var_10_30 then
            local var_10_31 = math.rad(getHeadingFromVector2d(var_10_28 - var_10_0, var_10_29 - var_10_1))

            setCameraPositionUnfixed(-0.3, var_10_31 + 0.1 + 4.7)

            break
        end
    end
end

function cmd_bot(arg_11_0)
    var_0_3 = not var_0_3

    if var_0_3 then
        lua_thread.create(EnterCarExist)

        var_0_4 = -1
        var_0_7 = -1
        var_0_6 = 0
        _, var_0_5 = sampGetPlayerIdByCharHandle(PLAYER_PED)

        writeMemory(7634870, 1, 1, 1)
        writeMemory(7635034, 1, 1, 1)
        var_0_1.fill(7623723, 144, 8)
        var_0_1.fill(5499528, 144, 6)
        sampAddChatMessage(string.format("[%s %s %s]:{FF4040} \xC0\xEA\xF2\xE8\xE2\xE8\xF0\xEE\xE2\xE0\xED", thisScript().name, thisScript().version, thisScript().authors[1]), 4259648)
    else
        showCursor(false, false)
        writeMemory(7634870, 1, 0, 0)
        writeMemory(7635034, 1, 0, 0)
        var_0_1.hex2bin("5051FF1500838500", 7623723, 8)
        var_0_1.hex2bin("0F847B010000", 5499528, 6)
        sampAddChatMessage(string.format("[%s]: {3398fe}\xC4\xE5\xE0\xEA\xF2\xE8\xE2\xE8\xF0\xEE\xE2\xE0\xED", thisScript().name), 16728128)
    end
end

function var_0_2.onSetPlayerAttachedObject(arg_12_0, arg_12_1, arg_12_2, arg_12_3)
    if var_0_3 and arg_12_0 == var_0_5 then
        if var_0_4 == -1 and arg_12_3.modelId == 2814 then
            var_0_4 = 0
        end

        if var_0_4 == 1 and arg_12_3.modelId == 0 and isCharInAnyCar(PLAYER_PED) == false then
            var_0_4 = 2
        end
    end
end

function var_0_2.onSetCheckpoint(arg_13_0, arg_13_1)
    if var_0_3 and var_0_4 == 0 and arg_13_1 == 3 then
        var_0_6 = math.floor(arg_13_0.x)
    end
end

function var_0_2.onShowDialog(arg_14_0, arg_14_1, arg_14_2, arg_14_3, arg_14_4, arg_14_5)
    if var_0_3 and arg_14_0 == 0 and arg_14_5:find("\xC2\xFB \xF3\xF1\xEF\xE5\xF8\xED\xEE \xEF\xEE\xEB\xEE\xE6\xE8\xEB\xE8 \xEF\xE8\xF6\xF6\xF3") then
        return false
    end
end

function var_0_2.onCreateObject(arg_15_0, arg_15_1)
    if var_0_3 then
        return false
    end
end

function var_0_2.onShowTextDraw(arg_16_0, arg_16_1)
    if var_0_3 then
        if arg_16_1.text == "eng" and arg_16_1.boxColor == -14803284 then
            sampSendChat("/engine")
        end

        if arg_16_1.text:find("icon2") then
            sampSendClickTextdraw(arg_16_0)
        end
    end
end

function var_0_2.onApplyPlayerAnimation(arg_17_0, arg_17_1, arg_17_2, arg_17_3, arg_17_4, arg_17_5, arg_17_6, arg_17_7)
    if var_0_3 and arg_17_0 == var_0_5 then
        return false
    end
end
 

Вложения

  • TS.cs
    2.4 KB · Просмотры: 2
  • Macros_by_JOse.lua
    5.8 KB · Просмотры: 2
  • PIZZA.lua
    16.5 KB · Просмотры: 1

sxpurp

Известный
126
41
decomp
 

Вложения

  • 1_AntiBH_abhop.cs
    996 байт · Просмотры: 5
  • hudscalefix.cs
    11.3 KB · Просмотры: 5