Lua Arizona RP | Хэлпер прохождения хэллоуинских квестов

sysus

Новичок
Автор темы
7
7
Активация:
/ribka
- активирует автоматическую рыбалку
/hell - активирует флуд открытками, так-же необходимо зажать кнопку R.

Функции:
Автоматическая рыбалка(кликает на текстдравы рыбы),
Авто-ответ на вопросы от НПС,
Флуд открытками ближайшим игрокам.
Блокировка диалога подаренной вам открытки.
 

Вложения

  • happyhelloween2019.luac
    2.1 KB · Просмотры: 398
Последнее редактирование:

_dimon4

Новичок
1
0
зачем скрывать код, если эта дичь будет актуальна всего 3 дня?
 

Carlos777

Потрачен
227
219
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
зачем скрывать код, если эта дичь будет актуальна всего 3 дня?
Lua:
script_authors("sysus", "V_4")
require("lib.moonloader")
require("sampfuncs")

slot0 = require("vkeys")
slot2 = false
slot3 = false

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

    while not isSampAvailable() do
        wait(100)
    end

    sampRegisterChatCommand("hell", function ()
        uv0 = not uv0

        sampAddChatMessage(uv0 and "Активировано" or "Деактивировано", 6737322)

        if uv0 then
            -- Nothing
        end
    end)
    sampRegisterChatCommand("ribka", function ()
        uv0 = not uv0

        sampAddChatMessage(uv0 and "Активировано" or "Деактивировано", -1)

        if uv0 then
            -- Nothing
        end
    end)
    lua_thread.create(function ()
        while true do
            wait(0)

            if uv0 then
                for slot3 = 0, 5000, 1 do
                    if sampTextdrawIsExists(slot3) then
                        model2, rotXl2, rotYl2, rotZl2, zooml2, clr1l2, clr2l2 = sampTextdrawGetModelRotationZoomVehColor(slot3)

                        if model2 == 19630 then
                            sampSendClickTextdraw(slot3)
                            wait(15)
                        end
                    end
                end
            end
        end
    end)

    while true do
        wait(0)

        if uv0 then
            for slot3 = 0, sampGetMaxPlayerId(true), 1 do
                slot4, slot5 = sampGetCharHandleBySampPlayerId(slot3)

                if slot4 and doesCharExist(slot5) then
                    slot13, slot14, slot15 = getCharCoordinates(PLAYER_PED)
                    slot16, slot17, slot18 = getCharCoordinates(slot5)

                    if getDistanceBetweenCoords3d(slot6, slot7, slot8, slot9, slot10, slot11) <= 50 and uv0 and isKeyDown(uv2.VK_R) and not sampIsChatInputActive() then
                        wait(0)
                        sampSendChat("/halloween2019 " .. slot3)
                    end
                end
            end
        end
    end
end

require("lib.samp.events").onShowDialog = function (slot0, slot1, slot2, slot3, slot4, slot5)
    lua_thread.create(function ()
        if uv0 == 8613 then
            wait(0)
            sampSendDialogResponse(8613, 1, 2)
        end

        if uv0 == 8614 then
            wait(0)
            sampSendDialogResponse(8614, 1, 1)
        end

        if uv0 == 8615 then
            wait(0)
            sampSendDialogResponse(8615, 1, 1)
        end

        if uv0 == 8616 then
            wait(0)
            sampSendDialogResponse(8616, 1, 2)
        end

        if uv0 == 8612 then
            wait(0)
            sampCloseCurrentDialogWithButton(1)
        end
    end)
end

function onReceiveRpc(slot0, slot1)
    if slot0 == 61 then
        objectdd1 = raknetBitStreamReadInt16(slot1)
        objectdd2 = raknetBitStreamReadInt8(slot1)
        objectdd3 = raknetBitStreamReadInt8(slot1)
        objectdd4 = raknetBitStreamReadString(slot1, objectdd3)
        objectdd5 = raknetBitStreamReadInt8(slot1)
        objectdd6 = raknetBitStreamReadString(slot1, objectdd5)

        if objectdd1 == 0 and objectdd2 == 0 and objectdd6 == "Принять" then
            return false
        end
    end
end
 

stranger_karelli

Потрачен
382
262
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
script_authors("sysus", "V_4")
require("lib.moonloader")
require("sampfuncs")

slot0 = require("vkeys")
slot2 = false
slot3 = false

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

    while not isSampAvailable() do
        wait(100)
    end

    sampRegisterChatCommand("hell", function ()
        uv0 = not uv0

        sampAddChatMessage(uv0 and "Активировано" or "Деактивировано", 6737322)

        if uv0 then
            -- Nothing
        end
    end)
    sampRegisterChatCommand("ribka", function ()
        uv0 = not uv0

        sampAddChatMessage(uv0 and "Активировано" or "Деактивировано", -1)

        if uv0 then
            -- Nothing
        end
    end)
    lua_thread.create(function ()
        while true do
            wait(0)

            if uv0 then
                for slot3 = 0, 5000, 1 do
                    if sampTextdrawIsExists(slot3) then
                        model2, rotXl2, rotYl2, rotZl2, zooml2, clr1l2, clr2l2 = sampTextdrawGetModelRotationZoomVehColor(slot3)

                        if model2 == 19630 then
                            sampSendClickTextdraw(slot3)
                            wait(15)
                        end
                    end
                end
            end
        end
    end)

    while true do
        wait(0)

        if uv0 then
            for slot3 = 0, sampGetMaxPlayerId(true), 1 do
                slot4, slot5 = sampGetCharHandleBySampPlayerId(slot3)

                if slot4 and doesCharExist(slot5) then
                    slot13, slot14, slot15 = getCharCoordinates(PLAYER_PED)
                    slot16, slot17, slot18 = getCharCoordinates(slot5)

                    if getDistanceBetweenCoords3d(slot6, slot7, slot8, slot9, slot10, slot11) <= 50 and uv0 and isKeyDown(uv2.VK_R) and not sampIsChatInputActive() then
                        wait(0)
                        sampSendChat("/halloween2019 " .. slot3)
                    end
                end
            end
        end
    end
end

require("lib.samp.events").onShowDialog = function (slot0, slot1, slot2, slot3, slot4, slot5)
    lua_thread.create(function ()
        if uv0 == 8613 then
            wait(0)
            sampSendDialogResponse(8613, 1, 2)
        end

        if uv0 == 8614 then
            wait(0)
            sampSendDialogResponse(8614, 1, 1)
        end

        if uv0 == 8615 then
            wait(0)
            sampSendDialogResponse(8615, 1, 1)
        end

        if uv0 == 8616 then
            wait(0)
            sampSendDialogResponse(8616, 1, 2)
        end

        if uv0 == 8612 then
            wait(0)
            sampCloseCurrentDialogWithButton(1)
        end
    end)
end

function onReceiveRpc(slot0, slot1)
    if slot0 == 61 then
        objectdd1 = raknetBitStreamReadInt16(slot1)
        objectdd2 = raknetBitStreamReadInt8(slot1)
        objectdd3 = raknetBitStreamReadInt8(slot1)
        objectdd4 = raknetBitStreamReadString(slot1, objectdd3)
        objectdd5 = raknetBitStreamReadInt8(slot1)
        objectdd6 = raknetBitStreamReadString(slot1, objectdd5)

        if objectdd1 == 0 and objectdd2 == 0 and objectdd6 == "Принять" then
            return false
        end
    end
end
Молодец, показал свои навыки перетаскивания файла на декомпил👍
 

LittleDeath

Известный
116
12
у меня не работает ничего, пишет активировано но при появлении текстдрава с рыбой ничего не происходит
 
Последнее редактирование:

LittleDeath

Известный
116
12
Lua:
script_authors("sysus", "V_4")
require("lib.moonloader")
require("sampfuncs")

slot0 = require("vkeys")
slot2 = false
slot3 = false

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

    while not isSampAvailable() do
        wait(100)
    end

    sampRegisterChatCommand("hell", function ()
        uv0 = not uv0

        sampAddChatMessage(uv0 and "Активировано" or "Деактивировано", 6737322)

        if uv0 then
            -- Nothing
        end
    end)
    sampRegisterChatCommand("ribka", function ()
        uv0 = not uv0

        sampAddChatMessage(uv0 and "Активировано" or "Деактивировано", -1)

        if uv0 then
            -- Nothing
        end
    end)
    lua_thread.create(function ()
        while true do
            wait(0)

            if uv0 then
                for slot3 = 0, 5000, 1 do
                    if sampTextdrawIsExists(slot3) then
                        model2, rotXl2, rotYl2, rotZl2, zooml2, clr1l2, clr2l2 = sampTextdrawGetModelRotationZoomVehColor(slot3)

                        if model2 == 19630 then
                            sampSendClickTextdraw(slot3)
                            wait(15)
                        end
                    end
                end
            end
        end
    end)

    while true do
        wait(0)

        if uv0 then
            for slot3 = 0, sampGetMaxPlayerId(true), 1 do
                slot4, slot5 = sampGetCharHandleBySampPlayerId(slot3)

                if slot4 and doesCharExist(slot5) then
                    slot13, slot14, slot15 = getCharCoordinates(PLAYER_PED)
                    slot16, slot17, slot18 = getCharCoordinates(slot5)

                    if getDistanceBetweenCoords3d(slot6, slot7, slot8, slot9, slot10, slot11) <= 50 and uv0 and isKeyDown(uv2.VK_R) and not sampIsChatInputActive() then
                        wait(0)
                        sampSendChat("/halloween2019 " .. slot3)
                    end
                end
            end
        end
    end
end

require("lib.samp.events").onShowDialog = function (slot0, slot1, slot2, slot3, slot4, slot5)
    lua_thread.create(function ()
        if uv0 == 8613 then
            wait(0)
            sampSendDialogResponse(8613, 1, 2)
        end

        if uv0 == 8614 then
            wait(0)
            sampSendDialogResponse(8614, 1, 1)
        end

        if uv0 == 8615 then
            wait(0)
            sampSendDialogResponse(8615, 1, 1)
        end

        if uv0 == 8616 then
            wait(0)
            sampSendDialogResponse(8616, 1, 2)
        end

        if uv0 == 8612 then
            wait(0)
            sampCloseCurrentDialogWithButton(1)
        end
    end)
end

function onReceiveRpc(slot0, slot1)
    if slot0 == 61 then
        objectdd1 = raknetBitStreamReadInt16(slot1)
        objectdd2 = raknetBitStreamReadInt8(slot1)
        objectdd3 = raknetBitStreamReadInt8(slot1)
        objectdd4 = raknetBitStreamReadString(slot1, objectdd3)
        objectdd5 = raknetBitStreamReadInt8(slot1)
        objectdd6 = raknetBitStreamReadString(slot1, objectdd5)

        if objectdd1 == 0 and objectdd2 == 0 and objectdd6 == "Принять" then
            return false
        end
    end
end
понял, не работали функции потому что я это закинул