Lua [Arizona RP] Бот-Грузчик

Ottosm

Известный
340
154
Новые ID текстдравов 700, 701, 702 и 703, измените лучше первый(700) в коде и пользуетесь
 

GeroyDE

Участник
120
8

Вложения

  • sa-mp-017.png
    sa-mp-017.png
    431.5 KB · Просмотры: 163

auganec

Потрачен
181
27
пофиксил бота добавив новые текст-дравы, не знаю, нахуй он нужен, но сама суть.
грузчик ебать.луа:
script_name('Грузчик Bot')
script_author('Marcus_Devil')
script_version('1.5')

require "lib.moonloader"
require "lib.sampfuncs"
local ini = require "inicfg"
local tag = "{8a2be2}[Грузчик Bot]: {FFFFFF}"
local botState = false
local moveState = 1
local point=
({
    x={
        2033, 2034, 2032, 2041, 2041, 2015, 2012, 2016
    },
    y=
    {
        -1962, -1958, -1963, -1969, -1976, -1982, -1989, -1974
    }
})

function main()
    sampRegisterChatCommand("gruzon", gruz)
    sampAddChatMessage(tag.."Скрипт активирован! Автор: {ff2400}DEVIL {FFFFFF}| {1faee9}Blast{808080}Hack", -1)
    while true do
        xPed, yPed = getCharCoordinates(PLAYER_PED)
    wait(0)
    end
end

function setCameraToCoord(x, y)

    slot2, slot3, slot4 = getActiveCameraCoordinates()

    setCameraPositionUnfixed(0, (getHeadingFromVector2d(x - slot2, y - slot3) - 90) / 57.2957795)
end

function gruz()
 if botState then botState = false sampAddChatMessage(tag.."Бот {ff2400}Выключен!", -1) moveState = 1 else botState = true sampAddChatMessage(tag.."Бот {66ff00}Активирован!", -1) lua_thread.create(botStart) end
end

function botStart()
    while botState do
        wait(0)
        setGameKeyState(16,-256)
        if moveState == 1 then setCameraToCoord(point.x[1], point.y[1]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[1], point.y[1]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 2 then setCameraToCoord(point.x[2], point.y[2]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[2], point.y[2]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 3 then
            wait(300)
            sampSendClickTextdraw(535 or 534 or 533) moveState = moveState + 1
        end
        if moveState == 4 then
            setCameraToCoord(point.x[3], point.y[3]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[3], point.y[3]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 5 then
            setCameraToCoord(point.x[4], point.y[4]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[4], point.y[4]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 6 then
            setCameraToCoord(point.x[5], point.y[5]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[5], point.y[5]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 7 then
            setCameraToCoord(point.x[6], point.y[6]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[6], point.y[6]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 8 then
            setCameraToCoord(point.x[7], point.y[7]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[7], point.y[7]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 9 then
            setCameraToCoord(point.x[8], point.y[8]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[8], point.y[8]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 10 then
            setGameKeyState(16, 0) wait(10) setGameKeyState(14,-256) setGameKeyState(32,0) moveState = 1
        end
    end
end
 

Dimonster1997

Известный
138
14
пофиксил бота добавив новые текст-дравы, не знаю, нахуй он нужен, но сама суть.
грузчик ебать.луа:
script_name('Грузчик Bot')
script_author('Marcus_Devil')
script_version('1.5')

require "lib.moonloader"
require "lib.sampfuncs"
local ini = require "inicfg"
local tag = "{8a2be2}[Грузчик Bot]: {FFFFFF}"
local botState = false
local moveState = 1
local point=
({
    x={
        2033, 2034, 2032, 2041, 2041, 2015, 2012, 2016
    },
    y=
    {
        -1962, -1958, -1963, -1969, -1976, -1982, -1989, -1974
    }
})

function main()
    sampRegisterChatCommand("gruzon", gruz)
    sampAddChatMessage(tag.."Скрипт активирован! Автор: {ff2400}DEVIL {FFFFFF}| {1faee9}Blast{808080}Hack", -1)
    while true do
        xPed, yPed = getCharCoordinates(PLAYER_PED)
    wait(0)
    end
end

function setCameraToCoord(x, y)

    slot2, slot3, slot4 = getActiveCameraCoordinates()

    setCameraPositionUnfixed(0, (getHeadingFromVector2d(x - slot2, y - slot3) - 90) / 57.2957795)
end

function gruz()
 if botState then botState = false sampAddChatMessage(tag.."Бот {ff2400}Выключен!", -1) moveState = 1 else botState = true sampAddChatMessage(tag.."Бот {66ff00}Активирован!", -1) lua_thread.create(botStart) end
end

function botStart()
    while botState do
        wait(0)
        setGameKeyState(16,-256)
        if moveState == 1 then setCameraToCoord(point.x[1], point.y[1]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[1], point.y[1]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 2 then setCameraToCoord(point.x[2], point.y[2]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[2], point.y[2]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 3 then
            wait(300)
            sampSendClickTextdraw(535 or 534 or 533) moveState = moveState + 1
        end
        if moveState == 4 then
            setCameraToCoord(point.x[3], point.y[3]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[3], point.y[3]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 5 then
            setCameraToCoord(point.x[4], point.y[4]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[4], point.y[4]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 6 then
            setCameraToCoord(point.x[5], point.y[5]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[5], point.y[5]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 7 then
            setCameraToCoord(point.x[6], point.y[6]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[6], point.y[6]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 8 then
            setCameraToCoord(point.x[7], point.y[7]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[7], point.y[7]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 9 then
            setCameraToCoord(point.x[8], point.y[8]) setGameKeyState(1, -128)
            if getDistanceBetweenCoords2d(xPed, yPed, point.x[8], point.y[8]) < 1 then setGameKeyState(1, 0) moveState = moveState + 1 end
        end
        if moveState == 10 then
            setGameKeyState(16, 0) wait(10) setGameKeyState(14,-256) setGameKeyState(32,0) moveState = 1
        end
    end
end
Он когда заходит за мешками, и упирается в стенку этого вагона! Фиксани пожалуйста