← Back to team overview

sikuli-driver team mailing list archive

[Question #262893]: Gaming Bot

 

New question #262893 on Sikuli:
https://answers.launchpad.net/sikuli/+question/262893

I have a game bot that refines some gems for me however I run into a weird problem,  the script fails at random times with an error stating that  "can not find XXX.png on the screen" the image which causes the failure changes each time. Sometimes my script might iterate 20 or 30 times without issues, sometimes just 3 or 4 times.

What am I doing wrong?

My Code is as follows:

Settings.MoveMouseDelay = 1

for n in range(200):

        if exists("1406144397515-1.png"):
            click("1406144397515-1.png")
            hover("1406214711706-1.png")
            mouseDown(Button.LEFT)
            wait(3)
            hover("rhSelect-1.png")
            click("1406147277952-1.png")
            mouseDown(Button.LEFT)
            mouseUp(Button.LEFT)
            wait(2)
            click("Upgrmg_i-1.png")
            wait(1)
            click("1406148755055-1.png")
            wait(2)
            hover("1406190237343-1.png")
            dragDrop("1406190237343-1.png", "j-1.png")
            click("1406190552325-1.png")
            wait(16)
            click("CcllaccRewar-1.png")

        elif exists("IAddNextVUpg.png"):
            click("Llpgr_ing0wm.png")
            click("1406148755055-1.png")
            wait(2)
            hover("1406190237343-1.png")
            dragDrop("1406190237343-1.png", "j-1.png")
            click("1406190552325-1.png")
            wait(16)
            click("CcllaccRewar-1.png")

        elif exists("YVNEmf_.png"):
            click("Llpgr_ing0wm.png")
            click("1406148755055-1.png")
            wait(2)
            hover("1406190237343-1.png")
            dragDrop("1406190237343-1.png", "j-1.png")
            click("1406190552325-1.png")
            wait(16)
            click("CcllaccRewar-1.png")

        else:
            wait(2)
        
wait(2)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.