Results 1 to 6 of 6

Thread: [Java] Ghoul Catchers Bot

  1. #1

    Joined
    Dec 2016
    Posts
    24
    Userbars
    0
    Thanks
    3
    Thanked
    68/12
    DL/UL
    7/1
    Mentioned
    7 times
    Time Online
    19h 34m
    Avg. Time Online
    N/A

    [Java] Ghoul Catchers Bot

    Hey guys, already tried to upload a version of this to the public downloads and @(you need an account to see links) had an issue that I didn't so I probably should've posted here first to get some more feedback before uploading


    The initial codebase is a fork of lee-jason's Bejewelled Blitz Bot on facebook ((you need an account to see links)) which had most of the components that would be required already written since the two games share so many similarities.


    A pre-compiled version can be found @ (you need an account to see links) or you can compile and run it yourself.


    Any feedback is appreciated, especially if your monitor is not 1080p since I had to make assumptions to account for different resolutions/window sizes.

  2. The Following 3 Users Say Thank You to shiftasterisk For This Useful Post:

    Daviid (12-28-2016),j03 (12-27-2016),npm (12-28-2016)

  3. #2

    Joined
    Jul 2012
    Posts
    1,889
    Userbars
    18
    Thanks
    1,619
    Thanked
    3,295/1,001
    DL/UL
    223/0
    Mentioned
    469 times
    Time Online
    132d 23h 52m
    Avg. Time Online
    51m
    @(you need an account to see links)

    With a 1920 x 1080 screen and with the game window maximized I had to move the area of the replay button screenshot.
    Code:
    		Rectangle replayButtonArea = new Rectangle(gameParameters.originX + (gameParameters.squareDimension * 3) - 50, gameParameters.originY + (gameParameters.squareDimension * 4), 100, 100);
    Before:


    After:


    But it still can't detect it.

    Update:
    Added some debug code, it doesn't seem to match the colors correctly and only tries one time:


    Update2:
    I've found 2 curly brackets missing when comparing the actual color with the expected one.


    Update3:
    I had to change the replay button color to -12498610, might be because of moving the screenshot

    Now it works fine for me, I also changed the random wait to 5 seconds to make sure it waits for combos, lag and all those things.

  4. The Following User Says Thank You to Daviid For This Useful Post:

    shiftasterisk (12-28-2016)

  5. #3

    Joined
    Dec 2016
    Posts
    24
    Userbars
    0
    Thanks
    3
    Thanked
    68/12
    DL/UL
    7/1
    Mentioned
    7 times
    Time Online
    19h 34m
    Avg. Time Online
    N/A
    Thanks Daviid, I'll look at the replay button detection.

    I don't put curly braces around single line if satements (just preference ). The code may have some that do but it's probably a remnant from the initial code

  6. #4
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,463/678
    DL/UL
    98/0
    Mentioned
    511 times
    Time Online
    24d 11h 54m
    Avg. Time Online
    9m
    Quote Originally Posted by shiftasterisk View Post
    Thanks Daviid, I'll look at the replay button detection.

    I don't put curly braces around single line if satements (just preference ). The code may have some that do but it's probably a remnant from the initial code
    Look again - it's not a single line if statement. If the colors match, we should call System.out.println as well as return true.. Without the braces on the IF statement, it would return true everytime during the first iteration of x

  7. #5

    Joined
    Dec 2016
    Posts
    24
    Userbars
    0
    Thanks
    3
    Thanked
    68/12
    DL/UL
    7/1
    Mentioned
    7 times
    Time Online
    19h 34m
    Avg. Time Online
    N/A

  8. #6

    Joined
    Dec 2016
    Posts
    24
    Userbars
    0
    Thanks
    3
    Thanked
    68/12
    DL/UL
    7/1
    Mentioned
    7 times
    Time Online
    19h 34m
    Avg. Time Online
    N/A
    Thanks again @(you need an account to see links), considering we are both at 1080p and saw different results, I added a config file with offset parameters.

Posting Permissions

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