Я создал скрипт для авто ввода капчи, которая состоит из 5 цифр, но у меня вместо того чтобы вводились цифры который выбивают в окошке игры вводяться или 00000, 11111,22222,33333 И Т.Д.
Вот мой скрипт:
https://imgur.com/a/lMAQ1cv
Помогите, пожалуйста!!!!!!!!
Код:
require "lib.moonloader"
local keys = require "vkeys"
local sampev = require 'lib.samp.events'
local captchaS0 = 0
local captchaS1 = 0
local captchaS2 = 0
local captchaS3 = 0
local captchaS4 = 0
resCap = 0
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(0) end
wait(0)
sampRegisterChatCommand("aahk", atax)
sampAddChatMessage("{ff00d0}—крипт дл¤ ловли имущества, с автоматическим вводом капчи,јвтор:{FFFFFF}Wizard",-1)
while true do
wait(0)
for i = 0, 4 do
offset = -10
if sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and sampTextdrawIsExists(2084+(7*i)+offset) and not sampTextdrawIsExists(2085+(7*i)+offset) and sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 0 end -- 2087
if sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and sampTextdrawIsExists(2084+(7*i)+offset) and sampTextdrawIsExists(2085+(7*i)+offset) and not sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 9 end --
if sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and not sampTextdrawIsExists(2083+(7*i)+offset) and not sampTextdrawIsExists(2084+(7*i)+offset) and sampTextdrawIsExists(2085+(7*i)+offset) and not sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 4 end
if sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and sampTextdrawIsExists(2084+(7*i)+offset) and sampTextdrawIsExists(2085+(7*i)+offset) and sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 8 end
if not sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and not sampTextdrawIsExists(2084+(7*i)+offset) and not sampTextdrawIsExists(2085+(7*i)+offset) and not sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 7 end
if sampTextdrawIsExists(2081+(7*i)+offset) and not sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and sampTextdrawIsExists(2084+(7*i)+offset) and sampTextdrawIsExists(2085+(7*i)+offset) and sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 6 end
if sampTextdrawIsExists(2081+(7*i)+offset) and not sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and sampTextdrawIsExists(2084+(7*i)+offset) and sampTextdrawIsExists(2085+(7*i)+offset) and not sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 5 end
if not sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and sampTextdrawIsExists(2084+(7*i)+offset) and sampTextdrawIsExists(2085+(7*i)+offset) and not sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 3 end
if not sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and sampTextdrawIsExists(2083+(7*i)+offset) and sampTextdrawIsExists(2084+(7*i)+offset) and sampTextdrawIsExists(2085+(7*i)+offset) and sampTextdrawIsExists(2086+(7*i)+offset) and not sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 2 end
if not sampTextdrawIsExists(2081+(7*i)+offset) and sampTextdrawIsExists(2082+(7*i)+offset) and not sampTextdrawIsExists(2083+(7*i)+offset) and not sampTextdrawIsExists(2084+(7*i)+offset) and not sampTextdrawIsExists(2085+(7*i)+offset) and not sampTextdrawIsExists(2086+(7*i)+offset) and sampTextdrawIsExists(2087+(7*i)+offset) then resCap = 1 end
if i == 0 then captchaS0 = resCap elseif i == 1 then captchaS1 = resCap elseif i == 2 then captchaS2 = resCap elseif i == 3 then captchaS3 = resCap elseif i == 4 then captchaS4 = resCap end
end
end
end
function atax(par)
id, id1, id2, id3, id4 = par:match("(.+) (%d+) (%d+) (%d+) (%d+)")
if id ~= nil or id1 ~= nil or id2 ~= nil or id3 ~= nil or id4 ~= nil then
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
lua_thread.create(function()
if title:find('робота') then
wait(id)
sampSetCurrentDialogEditboxText(captchaS0)
wait(id1)
sampSetCurrentDialogEditboxText(captchaS1..captchaS2)
wait(id2)
sampSetCurrentDialogEditboxText(captchaS0..captchaS1..captchaS2..captchaS3)
wait(id3)
sampSetCurrentDialogEditboxText(captchaS0..captchaS1..captchaS2..captchaS3..captchaS4)
wait(id4)
sampSendDialogResponse(23045, 1, '', ''..captchaS0..captchaS1..captchaS2..captchaS3..captchaS4..'')
wait(1)
sampCloseCurrentDialogWithButton(1)
end
end)
end
end
end