Page 2 of 11 FirstFirst 1234 ... LastLast
Results 11 to 20 of 102

Thread: [PYTHON] GHOUL CATCHERS BOT

  1. #11
    Atlas's Avatar
    Joined
    Jun 2013
    Posts
    260
    Userbars
    6
    Thanks
    668
    Thanked
    430/149
    DL/UL
    67/8
    Mentioned
    123 times
    Time Online
    27d 4h 44m
    Avg. Time Online
    9m
    Quote Originally Posted by Daviid View Post
    In case someone has the same error as me, I had PIL installed beforehand and couldn't use ImageGrab and ImageOps as
    Code:
    import ImageGrab
    import ImageOps
    and had to change it to
    Code:
    from PIL import ImageGrab
    from PIL import ImageOps
    Also Numpy installed on "D:\Python27\Lib\site-packages\numpy-1.10.2-py2.7-win32.egg" but failed on
    Code:
    from numpy import *
    and had to copy the directory "D:\Python27\Lib\site-packages\numpy-1.10.2-py2.7-win32.egg\numpy" to site-packages, so I had "D:\Python27\Lib\site-packages\numpy-1.10.2-py2.7-win32.egg" and "D:\Python27\Lib\site-packages\numpy".

    And then it worked fine.
    This is correct. I did a system restore and I had to reinstall everything and I had trouble with my own program. That's a problem. Im working a new version which only requires PIL/pillow. No numpy or pywin32 (uses ctypes to move cursor and click)

  2. #12
    Atlas's Avatar
    Joined
    Jun 2013
    Posts
    260
    Userbars
    6
    Thanks
    668
    Thanked
    430/149
    DL/UL
    67/8
    Mentioned
    123 times
    Time Online
    27d 4h 44m
    Avg. Time Online
    9m
    I got a new version made.
    Before I upload it, I'd like to test it out and edit it some more, but would also like some other people to test it out as well. Lately, the game has been causing havoc on my computer. It makes it hot, turns the fan on, and everything gets slow. I'm not sure if it's from the game itself, my program, or something else.

    If anyone wants to test it? It only requires you have PIL.

  3. The Following User Says Thank You to Atlas For This Useful Post:

    Maison (01-17-2016)

  4. #13
    Atlas's Avatar
    Joined
    Jun 2013
    Posts
    260
    Userbars
    6
    Thanks
    668
    Thanked
    430/149
    DL/UL
    67/8
    Mentioned
    123 times
    Time Online
    27d 4h 44m
    Avg. Time Online
    9m
    Code:
    from PIL import ImageGrab
    from PIL import Image
    import colorsys
    import ctypes
    import time
    import os
    
    box = 203, 276, 534, 609 ## replace this with YOUR coordinates
    size = 0,0,int(box[2]-box[0]),int(box[3]-box[1])
    x_pad = box[0]-1
    y_pad = box[1]-1
    
    cart = [[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[1,0],[1,1],
    [1,2],[1,3],[1,4],[1,5],[2,0],[2,1],[2,2],[2,3],[2,4],
    [2,5],[3,0],[3,1],[3,2],[3,3],[3,4],[3,5],[4,0],[4,1],
    [4,2],[4,3],[4,4],[4,5],[5,0],[5,1],[5,2],[5,3],[5,4],
    [5,5]]
    
    cc = cart[:]
    replaybutton = int((size[2])*.51+x_pad), int((size[3])*.82+y_pad)
    
    for i in range(36):
        cc[i] = int((cart[i][0]+.5)*(size[2]/6)+x_pad),\
                int((cart[i][1]+.5)*(size[3]/6)+y_pad)
    gamecount=0
    
    def go():
        global gamecount
        click(cc[18])
        time.sleep(.01)
        click(cc[18])
        while gamecount < 50:
            demo()
            move()
            print('Finished game ' + str(i+1))
            time.sleep(2)
        
    def swap(c, d):
        ctypes.windll.user32.SetCursorPos(cc[c][0],cc[c][1])
        time.sleep(.2)
        ctypes.windll.user32.mouse_event(2,0,0,0,0)#leftdown
        time.sleep(.2)
        ctypes.windll.user32.SetCursorPos(cc[d][0],cc[d][1])
        time.sleep(.2)
        ctypes.windll.user32.mouse_event(4,0,0,0,0)#leftup
        time.sleep(.2)
        did_move_count(c)
    
    def click((x, y)):
        ctypes.windll.user32.SetCursorPos(x, y)
        ctypes.windll.user32.mouse_event(2, 0, 0, 0,0) #left down
        time.sleep(.3)
        ctypes.windll.user32.mouse_event(4, 0, 0, 0,0) #left up
        time.sleep(.4)
    
    def demo():
        swap(18,19)
        time.sleep(3)
    
    
    def is_board_moving():
        img=ImageGrab.grab(box)
        pix=img.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
        before=pix
        time.sleep(.5)
        img=ImageGrab.grab(box)
        pix=img.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
        after=pix
        if before==after:
            pass
        elif before!=after:
            time.sleep(.5)
            is_board_moving()
    
    counter=0
    
    def did_move_count(c):
        global counter
        is_board_moving()
        replay()
        gb=color()
        before=gb[c]
        time.sleep(.5)
        gb=color()
        after=gb[c]
        if before==after:
            move()
        elif before!=after:
            counter+=1
            replay()
    
    def replay():
        global gamecount
        gb=color()
        if gb[35]==['over']:
            click(replaybutton)
            gamecount+=1
        elif gb[35]!='over':
            move()
    
    def color():
        gb=[]
        img=ImageGrab.grab(box)
        for i in range(36):
            w,h=img.size
            im=img.crop((int((size[2]/6)*(cart[i][0]+.15)),\
           int((size[3]/6)*(cart[i][1]+.15)),\
           w-int((size[2]/6)*(5-cart[i][0]+.15)),\
           h-int((size[3]/6)*(5-cart[i][1]+.15))))
            pix=im.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
            yiq=colorsys.rgb_to_yiq(pix[0],pix[1],pix[2])
            ide=yiq[1]
            if 60<ide<80:
                gb.append(['o'])
            elif 40<ide<60:
                gb.append(['m'])
            elif -30<ide<-10:
                gb.append(['g'])
            elif -60<ide<-40:
                gb.append(['c'])
            elif 20<ide<40:
                gb.append(['y'])
            elif -5<ide<10:
                gb.append(['p'])
            elif -10<ide<-5:
                gb.append(['over'])
            else:
                gb.append(['?'])
        return gb
    
    def move():
        global counter
        while counter<5:
            gb=color()
            for i in range(len(p)):
                c = int(p[i][0])
                a = int(p[i][1])
                b = int(p[i][2])
                d = int(p[i][3])
                if gb[a] == gb[b] == gb[c]:
                    swap(c, d)
                    return
    
    p = [(0,2,3,1),(0,7,8,6),(0,7,13,1),(0,12,18,6),(6,1,2,0),(6,1,13,7),\
         (6,8,9,7),(6,13,14,12),(6,13,19,7),(6,18,24,12),(12,1,7,13),(12,7,8,6),\
         (12,7,19,13),(12,14,15,13),(12,19,20,18),(12,19,25,13),(12,24,30,18),\
         (18,6,0,12),(18,7,13,19),(18,13,14,12),(18,13,25,19),(18,20,21,19),\
         (18,25,26,24),(18,25,31,19),(24,12,6,18),(24,13,19,25),(24,19,20,18),\
         (24,19,31,25),(24,26,27,25),(24,31,32,30),(30,18,12,24),(30,19,25,31),\
         (30,25,26,24),(30,32,33,31),(1,3,4,2),(1,6,8,7),(1,6,12,0),(1,8,9,7),\
         (1,8,14,2),(1,13,19,7),(7,0,2,1),(7,0,12,6),(7,2,3,1),(7,2,14,8),(7,9,10,8),\
         (7,12,14,13),(7,12,18,6),(7,14,15,13),(7,14,20,8),(7,19,25,13),(13,0,6,12),\
         (13,2,8,14),(13,6,8,7),(13,6,18,12),(13,8,9,7),(13,8,20,14),(13,15,16,14),\
         (13,18,20,19),(13,18,24,12),(13,20,21,19),(13,20,26,14),(13,25,31,19),\
         (19,6,12,18),(19,7,1,13),(19,8,14,20),(19,12,14,13),(19,12,24,18),(19,14,15,13),\
         (19,14,26,20),(19,21,22,20),(19,24,26,25),(19,24,30,18),(19,26,27,25),(19,26,32,20),\
         (25,12,18,24),(25,13,7,19),(25,14,20,26),(25,18,20,19),(25,18,30,24),(25,20,21,19),\
         (25,20,32,26),(25,27,28,26),(25,30,32,31),(25,32,33,31),(31,18,24,30),(31,19,13,25),\
         (31,20,26,32),(31,24,26,25),(31,26,27,25),(31,33,34,32),(2,4,5,3),(2,6,7,8),(2,7,9,8),\
         (2,7,13,1),(2,9,10,8),(2,9,15,3),(2,14,20,8),(8,0,1,2),(8,1,3,2),(8,1,13,7),(8,3,4,2),\
         (8,3,15,9),(8,10,11,9),(8,12,13,14),(8,13,15,14),(8,13,19,7),(8,15,16,14),(8,15,21,9),\
         (8,20,26,14),(14,1,7,13),(14,3,9,15),(14,6,7,8),(14,7,9,8),(14,7,19,13),(14,9,10,8),\
         (14,9,21,15),(14,16,17,15),(14,18,19,20),(14,19,21,20),(14,19,25,13),(14,21,22,20),\
         (14,21,27,15),(14,26,32,20),(20,7,13,19),(20,8,2,14),(20,9,15,21),(20,12,13,14),\
         (20,13,15,14),(20,13,25,19),(20,15,16,14),(20,15,27,21),(20,22,23,21),(20,24,25,26),\
         (20,25,27,26),(20,25,31,19),(20,27,28,26),(20,27,33,21),(26,13,19,25),(26,14,8,20),\
         (26,15,21,27),(26,18,19,20),(26,19,21,20),(26,19,31,25),(26,21,22,20),(26,21,33,27),\
         (26,28,29,27),(26,30,31,32),(26,31,33,32),(26,33,34,32),(32,19,25,31),(32,20,14,26),\
         (32,21,27,33),(32,24,25,26),(32,25,27,26),(32,27,28,26),(32,34,35,33),(3,0,1,2),\
         (3,7,8,9),(3,8,10,9),(3,8,14,2),(3,10,11,9),(3,10,16,4),(3,15,21,9),(9,1,2,3),\
         (9,2,4,3),(9,2,14,8),(9,4,5,3),(9,4,16,10),(9,6,7,8),(9,13,14,15),(9,14,16,15),\
         (9,14,20,8),(9,16,17,15),(9,16,22,10),(9,21,27,15),(15,2,8,14),(15,4,10,16),\
         (15,7,8,9),(15,8,10,9),(15,8,20,14),(15,10,11,9),(15,10,22,16),(15,12,13,14),\
         (15,19,20,21),(15,20,22,21),(15,20,26,14),(15,22,23,21),(15,22,28,16),(15,27,33,21),\
         (21,8,14,20),(21,9,3,15),(21,10,16,22),(21,13,14,15),(21,14,16,15),(21,14,26,20),\
         (21,16,17,15),(21,16,28,22),(21,18,19,20),(21,25,26,27),(21,26,28,27),(21,26,32,20),\
         (21,28,29,27),(21,28,34,22),(27,14,20,26),(27,15,9,21),(27,16,22,28),(27,19,20,21),\
         (27,20,22,21),(27,20,32,26),(27,22,23,21),(27,22,34,28),(27,24,25,26),(27,31,32,33),\
         (27,32,34,33),(27,34,35,33),(28,15,21,27),(33,20,26,32),(33,21,15,27),(33,22,28,34),\
         (33,25,26,27),(33,26,28,27),(33,28,29,27),(33,30,31,32),(4,1,2,3),(4,8,9,10),(4,9,11,10),\
         (4,9,15,3),(4,11,17,5),(4,16,22,10),(10,2,3,4),(10,3,5,4),(10,3,15,9),(10,5,17,11),(10,7,8,9),\
         (10,14,15,16),(10,15,17,16),(10,15,21,9),(10,17,23,11),(10,22,28,16),(16,3,9,15),(16,5,11,17),\
         (16,8,9,10),(16,9,11,10),(16,9,21,15),(16,11,23,17),(16,13,14,15),(16,20,21,22),(16,21,23,22),\
         (16,21,27,15),(16,23,29,17),(16,28,34,22),(22,9,15,21),(22,10,4,16),(22,11,17,23),(22,14,15,16),\
         (22,15,17,16),(22,15,27,21),(22,17,29,23),(22,19,20,21),(22,26,27,28),(22,27,29,28),(22,27,33,21),\
         (22,29,35,23),(28,16,10,22),(28,17,23,29),(28,20,21,22),(28,21,23,22),(28,21,33,27),(28,23,35,29),\
         (28,25,26,27),(28,32,33,34),(28,33,35,34),(34,21,27,33),(34,22,16,28),(34,23,29,35),(34,26,27,28),\
         (34,27,29,28),(34,31,32,33),(5,2,3,4),(5,9,10,11),(5,10,16,4),(5,17,23,11),(11,3,4,5),(11,4,16,10),\
         (11,8,9,10),(11,15,16,17),(11,16,22,10),(11,23,29,17),(17,4,10,16),(17,9,10,11),(17,10,22,16),\
         (17,14,15,16),(17,21,22,23),(17,22,28,16),(17,29,35,23),(23,10,16,22),(23,11,5,17),(23,15,16,17),\
         (23,16,28,22),(23,20,21,22),(23,27,28,29),(23,28,34,22),(29,16,22,28),(29,17,11,23),(29,21,22,23),\
         (29,22,34,28),(29,26,27,28),(29,33,34,35),(35,22,28,34),(35,23,17,29),(35,27,28,29),(35,32,33,34)]
    
    c = p[i][0]
    a = p[i][1]
    b = p[i][2]
    d = p[i][3]


    ^Just wanted to go ahead and *preview* the update of this bot.
    Here's how it works:

    It takes a screenshot of the gameboard, and then analyzes the 36 cells of the image to identify a color (crops original board image to each of the 36 cells, shrinks that image to 1px by 1px, and finds the RGB color of that pixel, translates it to the YIQ value, and uses the I value as an identification range). It puts the color of the cells in a list. There's another list containing the indices of all matching combinations. It uses the list and once it finds a match, it makes a swap. (I made it so the top row has swap priority in order to avoid changing the board so much, thus avoiding longer delay times while the board is moving...which brings me to my next point.)

    The bot knows when the gameboard is moving, so when it is moving, it waits .5 seconds until it stops. How this works is very similar to the method above: it takes a screenshot of the board, reduces it to a 1px x 1px image, finds the color value, waits .5 seconds, does it again, and compares the 'before' and 'after' color values; if they're the same, the board stopped moving and the bot is ready to make another move--if they're not the same, the bot waits another .5 seconds and checks again. Furthermore, the bot checks to see if a moved counted. Not exactly sure if this is necessary but it's in there as of now (might take it out though).

    Furthermore, in reaction to all the trouble the last program faced involving installing libraries and modules, this bot only require you to have PIL. I will include step by step directions on how to do so. I dropped numpy, and instead of using PyWin32 to control your mouse, I use ctypes which *should* be already installed.

    And last but not least, I'd like to thank everyone who helped me along the way and everyone who downloaded this bot. I'm sorry many of you couldn't get it to work, but perhaps this version will work for you now.






    Code:
    from PIL import ImageGrab
    from PIL import Image
    import colorsys
    import ctypes
    import time
    
    box = 203, 276, 534, 609 ## replace this with your coordinates
    maxgames = 5 ## replace this with how many games you'd like to play
    
    #maxgames = input('How many games would you like to play? ')
    ''' or put a hashtag in front of the first maxgames and
        delete the hastag from this maxgames and when you start,
        the bot, it'll ask you for how many games you'd like to play.
    '''
    
    counter=0
    size = 0,0,int(box[2]-box[0]),int(box[3]-box[1])
    x_pad = box[0]-1
    y_pad = box[1]-1
    
    
    def go():
        click(cc[18])
        click(cc[18])
        demo()
    
    
    ### to run, hit F5 and type "go()" (without quotes)
    ''' to 'fast' run, delete the hashtag in front of the go()
        at the bottom of this script. just save, exit, and then
        double click on the icon.
    '''
    
    
    
    
    
    
    cart = [[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[1,0],[1,1],
    [1,2],[1,3],[1,4],[1,5],[2,0],[2,1],[2,2],[2,3],[2,4],
    [2,5],[3,0],[3,1],[3,2],[3,3],[3,4],[3,5],[4,0],[4,1],
    [4,2],[4,3],[4,4],[4,5],[5,0],[5,1],[5,2],[5,3],[5,4],
    [5,5]]
    '''
                > these are grid coordinates
                > go in order from cell #0 to cell #35.
                > (0,0) is top right corner, also cell #0...
                    (0,1) is right below it, also cell #1...
                    (5,5) is bottom left corner, also cell #35
                    
                > this:
    
                (0,0)   (1,0)   (2,0)   (3,0)   (4,0)   (5,0)
                (0,1)   (1,1)   (2,1)   (3,1)   (4,1)   (5,1)
                (0,2)   (1,2)   (2,2)   (3,2)   (4,2)   (5,2)
                (0,3)   (1,3)   (2,3)   (3,3)   (4,3)   (5,3)
                (0,4)   (1,4)   (2,4)   (3,4)   (4,4)   (5,4)
                (0,5)   (1,5)   (2,5)   (3,5)   (4,5)   (5,5)
    
                > and this:
    
                0,  6,  12, 18, 24, 30
                1,  7,  13, 19, 25, 31
                2,  8,  14, 20, 26, 32
                3,  9,  15, 21, 27, 33
                4,  10, 16, 22, 28, 34
                5,  11, 17, 23, 29, 35
    '''
    
    cc = cart[:]
    replaybutton = int((size[2])*.51+x_pad), int((size[3])*.82+y_pad)
    for i in range(36):
        cc[i] = int((cart[i][0]+.5)*(size[2]/6)+x_pad),\
                int((cart[i][1]+.5)*(size[3]/6)+y_pad)
    '''
                > replay button is where the replay button is located:
                    about halfway horizontally and a bit more than halfway vertically
                > cc[i] is the (x,y) pixel coordinate of the cell (where to click),
                > i correlates to cell #, so cc[0] is for cell #0.
    '''
    
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
        
    def click((x, y)):
        ctypes.windll.user32.SetCursorPos(x, y)
        time.sleep(.01)
        ctypes.windll.user32.mouse_event(2, 0, 0, 0,0) #left down
        time.sleep(.01)
        ctypes.windll.user32.mouse_event(4, 0, 0, 0,0) #left up
        time.sleep(.01)
    
    '''
                > simple function.
                > only really used for go() to activate game window
                    and to click the replay button
    '''
    
    def swap(c, d):
        ctypes.windll.user32.SetCursorPos(cc[c][0],cc[c][1])
        time.sleep(.1)
        ctypes.windll.user32.mouse_event(2,0,0,0,0)#leftdown
        time.sleep(.1)
        ctypes.windll.user32.SetCursorPos(cc[d][0],cc[d][1])
        time.sleep(.1)
        ctypes.windll.user32.mouse_event(4,0,0,0,0)#leftup
        time.sleep(1)
        replay()
    
    '''
                > simple function.
                > moves cursor over current cell.
                > holds left click down on mouse and drags over to swapping cell.
                > releases left click up on mouse, waits, and then sends to replay to see if done.
    '''
    
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    
    def demo():
        global counter
        print('Playing game ' + str(counter) + ' of ' + str(maxgames))
        swap(18,19)
    
    '''
                > prints what game youre on and how close you are to being
                    done with your max games.
                > first move of level one is always combination.
                
    '''
        
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    
    
    def replay():
        global counter
        gb=color()
        if gb[35]==['over']:
            if counter<maxgames:
                time.sleep(3)
                click(replaybutton)
                counter+=1
                time.sleep(3)
                demo()
            else:
                print('Finished')
                done()
        elif gb[35]!='over':
            move()
    
    '''
                > after every swap, it checks to see if game is done.
                > finds color value of cell #35.
                > if color value returns 'over',
                    clicks replaybutton and starts from demo.
                    - adds game to counter
                > if color value does not return 'over',
                    continues making moves.
    '''
            
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    
    def move():
        gb=color()
        for i in range(len(p)):
            c = int(p[i][0]) #current cell
            a = int(p[i][1]) #condition cell 1
            b = int(p[i][2]) #condition cell 2
            d = int(p[i][3]) #swapping cell
            if gb[a] == gb[b] == gb[c]:
                swap(c, d)
                return
            
    '''
                > takes list gb from color fcn (see further below)
                > uses sets from list p (see further below)
                    as indices to search thru list gb.
                > once it finds a match, it makes a move.
    '''
    
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    
    def done():
        while True:
            time.sleep(100)
    '''
                > The game is done with its max games
                and it's waiting for you to close. :)
    '''
    
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
    
    def color():
        gb=[]
        img=ImageGrab.grab(box)
        for i in range(36):
            w,h=img.size
            im=img.crop((int((size[2]/6)*(cart[i][0]+.15)),\
           int((size[3]/6)*(cart[i][1]+.15)),\
           w-int((size[2]/6)*(5-cart[i][0]+.15)),\
           h-int((size[3]/6)*(5-cart[i][1]+.15))))
            pix=im.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
            yiq=colorsys.rgb_to_yiq(pix[0],pix[1],pix[2])
            ide=yiq[1]
            if 60<ide<80:
                gb.append(['o'])
            elif 40<ide<60:
                gb.append(['m'])
            elif -30<ide<-10:
                gb.append(['g'])
            elif -60<ide<-40:
                gb.append(['c'])
            elif 20<ide<40:
                gb.append(['y'])
            elif -5<ide<10:
                gb.append(['p'])
            elif -10<ide<-5:
                gb.append(['over'])
            else:
                gb.append(['?'])
        return gb
    
    '''
                > takes screenshot of board.
                > crops the screenshot 36 times.
                > reduces each cropped image to a 1x1 pixel image.
                > finds RGB value and translates it to YIQ.
                > uses I value range to label cell by color.
                > inputs color into list gb.
                > think of gb as gameboard.
    '''
    
    #### #### #### #### #### #### #### ####
    #### #### #### #### #### #### #### ####
        
    p = [(18,13,25,19),(0,2,3,1),(0,7,8,6),(0,7,13,1),(0,12,18,6),(6,1,2,0),(6,1,13,7),\
         (6,8,9,7),(6,13,14,12),(6,13,19,7),(6,18,24,12),(12,1,7,13),(12,7,8,6),\
         (12,7,19,13),(12,14,15,13),(12,19,20,18),(12,19,25,13),(12,24,30,18),\
         (18,6,0,12),(18,7,13,19),(18,13,14,12),(18,13,25,19),(18,20,21,19),\
         (18,25,26,24),(18,25,31,19),(24,12,6,18),(24,13,19,25),(24,19,20,18),\
         (24,19,31,25),(24,26,27,25),(24,31,32,30),(30,18,12,24),(30,19,25,31),\
         (30,25,26,24),(30,32,33,31),(1,3,4,2),(1,6,8,7),(1,6,12,0),(1,8,9,7),\
         (1,8,14,2),(1,13,19,7),(7,0,2,1),(7,0,12,6),(7,2,3,1),(7,2,14,8),(7,9,10,8),\
         (7,12,14,13),(7,12,18,6),(7,14,15,13),(7,14,20,8),(7,19,25,13),(13,0,6,12),\
         (13,2,8,14),(13,6,8,7),(13,6,18,12),(13,8,9,7),(13,8,20,14),(13,15,16,14),\
         (13,18,20,19),(13,18,24,12),(13,20,21,19),(13,20,26,14),(13,25,31,19),\
         (19,6,12,18),(19,7,1,13),(19,8,14,20),(19,12,14,13),(19,12,24,18),(19,14,15,13),\
         (19,14,26,20),(19,21,22,20),(19,24,26,25),(19,24,30,18),(19,26,27,25),(19,26,32,20),\
         (25,12,18,24),(25,13,7,19),(25,14,20,26),(25,18,20,19),(25,18,30,24),(25,20,21,19),\
         (25,20,32,26),(25,27,28,26),(25,30,32,31),(25,32,33,31),(31,18,24,30),(31,19,13,25),\
         (31,20,26,32),(31,24,26,25),(31,26,27,25),(31,33,34,32),(2,4,5,3),(2,6,7,8),(2,7,9,8),\
         (2,7,13,1),(2,9,10,8),(2,9,15,3),(2,14,20,8),(8,0,1,2),(8,1,3,2),(8,1,13,7),(8,3,4,2),\
         (8,3,15,9),(8,10,11,9),(8,12,13,14),(8,13,15,14),(8,13,19,7),(8,15,16,14),(8,15,21,9),\
         (8,20,26,14),(14,1,7,13),(14,3,9,15),(14,6,7,8),(14,7,9,8),(14,7,19,13),(14,9,10,8),\
         (14,9,21,15),(14,16,17,15),(14,18,19,20),(14,19,21,20),(14,19,25,13),(14,21,22,20),\
         (14,21,27,15),(14,26,32,20),(20,7,13,19),(20,8,2,14),(20,9,15,21),(20,12,13,14),\
         (20,13,15,14),(20,13,25,19),(20,15,16,14),(20,15,27,21),(20,22,23,21),(20,24,25,26),\
         (20,25,27,26),(20,25,31,19),(20,27,28,26),(20,27,33,21),(26,13,19,25),(26,14,8,20),\
         (26,15,21,27),(26,18,19,20),(26,19,21,20),(26,19,31,25),(26,21,22,20),(26,21,33,27),\
         (26,28,29,27),(26,30,31,32),(26,31,33,32),(26,33,34,32),(32,19,25,31),(32,20,14,26),\
         (32,21,27,33),(32,24,25,26),(32,25,27,26),(32,27,28,26),(32,34,35,33),(3,0,1,2),\
         (3,7,8,9),(3,8,10,9),(3,8,14,2),(3,10,11,9),(3,10,16,4),(3,15,21,9),(9,1,2,3),\
         (9,2,4,3),(9,2,14,8),(9,4,5,3),(9,4,16,10),(9,6,7,8),(9,13,14,15),(9,14,16,15),\
         (9,14,20,8),(9,16,17,15),(9,16,22,10),(9,21,27,15),(15,2,8,14),(15,4,10,16),\
         (15,7,8,9),(15,8,10,9),(15,8,20,14),(15,10,11,9),(15,10,22,16),(15,12,13,14),\
         (15,19,20,21),(15,20,22,21),(15,20,26,14),(15,22,23,21),(15,22,28,16),(15,27,33,21),\
         (21,8,14,20),(21,9,3,15),(21,10,16,22),(21,13,14,15),(21,14,16,15),(21,14,26,20),\
         (21,16,17,15),(21,16,28,22),(21,18,19,20),(21,25,26,27),(21,26,28,27),(21,26,32,20),\
         (21,28,29,27),(21,28,34,22),(27,14,20,26),(27,15,9,21),(27,16,22,28),(27,19,20,21),\
         (27,20,22,21),(27,20,32,26),(27,22,23,21),(27,22,34,28),(27,24,25,26),(27,31,32,33),\
         (27,32,34,33),(27,34,35,33),(28,15,21,27),(33,20,26,32),(33,21,15,27),(33,22,28,34),\
         (33,25,26,27),(33,26,28,27),(33,28,29,27),(33,30,31,32),(4,1,2,3),(4,8,9,10),(4,9,11,10),\
         (4,9,15,3),(4,11,17,5),(4,16,22,10),(10,2,3,4),(10,3,5,4),(10,3,15,9),(10,5,17,11),(10,7,8,9),\
         (10,14,15,16),(10,15,17,16),(10,15,21,9),(10,17,23,11),(10,22,28,16),(16,3,9,15),(16,5,11,17),\
         (16,8,9,10),(16,9,11,10),(16,9,21,15),(16,11,23,17),(16,13,14,15),(16,20,21,22),(16,21,23,22),\
         (16,21,27,15),(16,23,29,17),(16,28,34,22),(22,9,15,21),(22,10,4,16),(22,11,17,23),(22,14,15,16),\
         (22,15,17,16),(22,15,27,21),(22,17,29,23),(22,19,20,21),(22,26,27,28),(22,27,29,28),(22,27,33,21),\
         (22,29,35,23),(28,16,10,22),(28,17,23,29),(28,20,21,22),(28,21,23,22),(28,21,33,27),(28,23,35,29),\
         (28,25,26,27),(28,32,33,34),(28,33,35,34),(34,21,27,33),(34,22,16,28),(34,23,29,35),(34,26,27,28),\
         (34,27,29,28),(34,31,32,33),(5,2,3,4),(5,9,10,11),(5,10,16,4),(5,17,23,11),(11,3,4,5),(11,4,16,10),\
         (11,8,9,10),(11,15,16,17),(11,16,22,10),(11,23,29,17),(17,4,10,16),(17,9,10,11),(17,10,22,16),\
         (17,14,15,16),(17,21,22,23),(17,22,28,16),(17,29,35,23),(23,10,16,22),(23,11,5,17),(23,15,16,17),\
         (23,16,28,22),(23,20,21,22),(23,27,28,29),(23,28,34,22),(29,16,22,28),(29,17,11,23),(29,21,22,23),\
         (29,22,34,28),(29,26,27,28),(29,33,34,35),(35,22,28,34),(35,23,17,29),(35,27,28,29),(35,32,33,34)]
    
    '''
                > think of as possible swap combination directory.
                > top swaps have priority.
                > reads as (current, condition 1, condition 2, swapping)
                > for example, (0,2,3,1) reads like this:
                    - ask, can I move cell #0?
                    - look, does cell #2 and cell #3 match cell #0?
                    - swap, if yes, swap cell #0 for cell #1.
    '''
    
    
    #go()
    ^ update.

    Almost close to being finalised.
    I'm really liking how this one turned out.
    It comes with a few options:

    1. Max games: You can either set a max game or you can let it ask you every time you run it.

    2. Fast run: You can double click the icon and the python executor will pop open. It's recommended if you do this, that you have the max games prompt you every time you run it, so you have time to drag it out of the way of the game screen.

    Also, I put in lots and lots of notes and explanations in here. It seems a bit redundant so I might get rid of them (or just make it less).

    Again, you only need PIL for this. What I'm trying to do now is find and fix a few bugs before uploading the updated version on the downloads page, but you can take it from this post. I would like to clean it up a bit and possibly make it more readable.

  5. The Following User Says Thank You to Atlas For This Useful Post:

    Daviid (01-18-2016)

  6. #14
    Atlas's Avatar
    Joined
    Jun 2013
    Posts
    260
    Userbars
    6
    Thanks
    668
    Thanked
    430/149
    DL/UL
    67/8
    Mentioned
    123 times
    Time Online
    27d 4h 44m
    Avg. Time Online
    9m

  7. The Following User Says Thank You to Atlas For This Useful Post:

    workallnight (01-18-2016)

  8. #15

    Joined
    Dec 2011
    Posts
    87
    Userbars
    1
    Thanks
    14
    Thanked
    9/8
    DL/UL
    61/0
    Mentioned
    15 times
    Time Online
    1d 21h 40m
    Avg. Time Online
    N/A
    thanks for this, great for newbies to earn some np to start battledoming

  9. The Following User Says Thank You to workallnight For This Useful Post:

    Atlas (01-18-2016)

  10. #16

    Joined
    Jan 2016
    Posts
    3
    Userbars
    0
    Thanks
    0
    Thanked
    0/0
    DL/UL
    52/0
    Mentioned
    1 time
    Time Online
    7h 56m
    Avg. Time Online
    N/A
    I have a theory it may not work for me despite the accurate coordinates, I have 125% scaling on Windows and the cursor is always off somehow. Maybe the program isn't working correctly, but think that may have something to do with it. Anyway, it repeatedly moves the same one over and over when it does work. Don't know what to do.

  11. #17
    Atlas's Avatar
    Joined
    Jun 2013
    Posts
    260
    Userbars
    6
    Thanks
    668
    Thanked
    430/149
    DL/UL
    67/8
    Mentioned
    123 times
    Time Online
    27d 4h 44m
    Avg. Time Online
    9m
    Quote Originally Posted by Jarjarbinks2016 View Post
    I have a theory it may not work for me despite the accurate coordinates, I have 125% scaling on Windows and the cursor is always off somehow. Maybe the program isn't working correctly, but think that may have something to do with it. Anyway, it repeatedly moves the same one over and over when it does work. Don't know what to do.
    Can you put a hashtag in front of line 24 (maxgames=input('How many games would you like to play? '))
    and a hashtag in front of line 166 (#go()), and then run the program and type color() while the game board is loaded?

    And then copy whatever shows up and paste it here (or PM me). It might be labeling the colors wrong...

  12. #18

    Joined
    Oct 2015
    Posts
    48
    Userbars
    5
    Thanks
    72
    Thanked
    27/24
    DL/UL
    127/0
    Mentioned
    16 times
    Time Online
    29d 19h 30m
    Avg. Time Online
    13m
    Just wanted to thank you for this program, been using it for a week now and have had no problems at all. Glad to see your still upgrading it.

  13. The Following User Says Thank You to derky For This Useful Post:

    Atlas (01-18-2016)

  14. #19
    Atlas's Avatar
    Joined
    Jun 2013
    Posts
    260
    Userbars
    6
    Thanks
    668
    Thanked
    430/149
    DL/UL
    67/8
    Mentioned
    123 times
    Time Online
    27d 4h 44m
    Avg. Time Online
    9m
    Quote Originally Posted by derky View Post
    Just wanted to thank you for this program, been using it for a week now and have had no problems at all. Glad to see your still upgrading it.
    I'm surprised people got the last one to work :o
    Thank you so much! It means a lot to me :-)

    Also, just got the idea: this program would work great with multiple desktops. That way, you can let it run in one desktop while you browse with the other. I think Windows 10 comes with this feature; as for Windows 7 and 8, I'm sure there are programs you could download (be safe though).

    Made an update to the update: Fixed coding in a few places; slowed delay time. You can adjust the delay time too in line 48.

  15. #20

    Joined
    Oct 2015
    Posts
    48
    Userbars
    5
    Thanks
    72
    Thanked
    27/24
    DL/UL
    127/0
    Mentioned
    16 times
    Time Online
    29d 19h 30m
    Avg. Time Online
    13m
    Quote Originally Posted by Atlas View Post
    I'm surprised people got the last one to work :o
    Thank you so much! It means a lot to me :-)
    It definitely took me awhile but glad to see you made it easier. I just have a few questions and notes.

    1.) Is there anyway to pause or stop the program at all? CTRL+ALT+DELETE doesn't seem to stop it anymore, I had to soft reset.

    2.) It crashed on me a few times, not a big deal but I thought I should let you know.

    3.) Wasn't sure how the screenshot worked but you can also Print Screen and Paste into Paint as well. I like to keep mine in the top left corner so it's easier to remember and I don't have to re-enter my coordinates each time.

    4.) How many games would you recommend? I do about 60-70. 50 I think is the maximum amount you can earn each day.

    5.) "pip install Downloads\Pillow-3.1.0-cp27-none-win32.whl" this step should be "pip install C:\Users\namehere\Downloads\Pillow-3.1.0-cp27-none-win32.whl" Confused me a bit at first.

    Other then that, it seems much more faster and accurate. Thanks again, this program is amazing!

  16. The Following User Says Thank You to derky For This Useful Post:

    Atlas (01-18-2016)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •