A Flash player bot ...

Asked by Mowice

Hello !

I'm searching for a bot in a browser game, that just pick up money at each character wich works for me.
It have to be able to recognize when money is available to be picked, scrolling down if not and when scroller is at the end, scrolling up at the top.
I've tried for hours, but it didn't work ...

Region(186,362,466,579)
for x in findAll(Pattern("1527751316512.png").targetOffset(0,1)):
    click("1527751337368.png")
type(Key.DOWN)
type(Key.DOWN)
repeat

That's my most advanced code.

I don't know if you understand me, i'm french, sorry ..
And RaiMan, i've readed many of your answers, and tried your soft, it's really a great work ! Thanks for helping us and continuing to update Sikuli !

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Mowice
Solved:
Last query:
Last reply:
Revision history for this message
Jitendra patel (jpatel1011) said :
#1

You need some way to know when to stop scrolling down. Maybe there is an image that appears only at the end ? here is something you can try

myRegion = Region(186,362,466,579)
moneyImage = Pattern("1527751316512.png").targetOffset(0,1))
endScrollImage = ....
endScroll = False
setROI(myRegion)

while not endScroll:
    if exists(moneyImage):
        images = findAll(moneyImage)
        while images.hasNext():
            click images.next()
    if exists(endScrollImage):
        endScroll = True
    else:
        type(Key.DOWN)

I'm a newbie to sikulix and there is probably a better way to do this but it should work. i'm assuming you're using the ide for programming

Revision history for this message
Mowice (yolando) said :
#2

thanks, my problem was solved ;)