|
Post by liusad on Feb 22, 2019 7:23:50 GMT
Hi, In the game I'm scripting for there is a four-choice captcha-quiz that can't be beat with image recognition so I need to wing it. There are four buttons and if you press the wrong one you get a (1/5/10/30) minute timeout.
The answer never changes but you can press the same button multiple times which is what I want to avoid.
I'm wondering if there's a smart way to do this, or if creating a nested if-else operation is the way to go.
The only think I can think of is something like this: while quizstate == 1 do
if exists:quiz then
button = math.random(4) if button == 1 then click(quiz1) if exists:correct then break else wait(60) keyevent(4) button = math.random(3) if button == 1 then click(quiz2)
.......
Repeat for all possible button combinations.
This seems like a shitty way to do it, to be honest. All suggestions appreciated!
|
|
|
Post by AnkuLua on Feb 22, 2019 13:05:32 GMT
Maybe just click from 1 to 4
if exists:quiz then for button = 1, 4 do click("quiz" .. button) if exists:correct then break else wait(60) keyevent(4) end end
|
|
|
Post by liusad on Feb 22, 2019 15:27:47 GMT
Maybe just click from 1 to 4 if exists:quiz then for button = 1, 4 do click("quiz" .. button) if exists:correct then break else wait(60) keyevent(4) end end I considered that, but I'm thinking that if they have some kind of bot detection mechanism it's better to have it random than to go in sequence every time.
|
|