So ye, i tried make anti afk bot, on .lua but it's not working i don't know what im doing wrong. There is like table/gui where u need select GREEN text, and if u select wrong it u will write numbers in gui. So i need auto pressing TEXT, TEXT is GREEN.
Code:
ev = require 'lib.samp.events'
function ev.onShowDialog(dialogId,style,title,button1,button2,text)
if title.find('AFK r') then
lin = {}
for s in text:gmatch("[^\r\n]+") do
table.insert(lin, s)
end
for k,v in ipairs(lin) do
if v:find('{47AB3F}') then
sampSendDialogResponse(dialogId,1,k+1,'')
end
end
end
end