Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > IT форум > Общие вопросы по программированию, компьютерный форум
Регистрация

Восстановить пароль
Повторная активизация e-mail

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 09.12.2019, 21:53   #1
Nilsoned
Новичок
Джуниор
 
Регистрация: 09.12.2019
Сообщений: 1
Сообщение Помогите не понимаю свою ошибку

Я создал скрипт для авто ввода капчи, которая состоит из 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

Последний раз редактировалось Nilsoned; 09.12.2019 в 22:27.
Nilsoned вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
не понимаю ошибку в коде (Шифровка и дешифровка) Lampampam Помощь студентам 1 16.12.2015 00:24
Не могу найти свою ошибку в скрипле-Слайдере pompiduskus JavaScript, Ajax 3 31.07.2013 00:34
Не понимаю ошибку! leito87 C/C++ Сетевое программирование 2 05.01.2012 03:22
Не понимаю ошибку GoRdoN 17 Общие вопросы C/C++ 3 19.07.2009 22:35