Page 3 of 11 FirstFirst 12345 ... LastLast
Results 21 to 30 of 102

Thread: [PYTHON] GHOUL CATCHERS BOT

  1. #21
    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
    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!
    Thank you for being so orderly, aha.

    1. Crtl+Alt+Delete works for me.. did you try waiting 10 seconds after you pressed those 3 buttons? If not, I'm not sure how I would be able to get a type command to work since I think you'd have to activate the Python window first, but I will not dismiss this and promise to check up on it.

    2. I would definitely recommend downloading the "updated" update version. It is slower than before but the thing that made the old update so fast was causing it to crash. It was calling a function too many times and that is why it crashed. Apart from making the code better in a few places, I adjusted the delay time which should fix this problem and the problem above (giving you more time to press the X button on the Python window). To give you an idea, I just ran 50 games with no crash in about an hour. I would suggest playing around with the delay time certainly if this is too slow, but the delay setting I had on it before was too fast, hence the crashing. So far, I know 4.2 is good, and from there, we can try testing faster and faster intervals until we're satisfied.
    Update: ~testing it with 1.2 second delay.
    Update: 1.2 seconds worked with no crash. Average for 50 games = 22 minutes. Feel free to try to go faster than this. (Line 50). @(you need an account to see links)

    3. Screenshot was just there for people who needed help getting a screenshot. I'm using parallels on my Mac and there's no print screen on my keyboard so I made this. A real screenshot would work better than this script but it's just there anyways.

    4. The most neopoints you can gain a day from this is 50k, so any games beyond 50 will not earn you any neopoints, so going beyond 50 seems useless, no? :p

    5. And I was thinking about that too but wasn't sure. I used your way to install PIL as well, but thought this way would work too and would be easier to understand (apparently not). Thank you so much, I just updated it.

  2. #22

    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
    Thanks for the quick response!

    1.) I just tried it again, it still won't stop. But like you said, with the new version it was much easier to just hit the "X" on the script.

    2.) It seems to go slower then your original bot, which took about 30 minutes. So I'll definitely play around with those settings and see how much I can get away with without any crashes. I might edit this post it if I find a good spot but so far no crashes now!

    Edit: I just played around with the delay settings and 1.0 seems to be the most stable. It played all 50 games successfully and took about 19-20 minutes. 0.9 works to around 35 games then it crashes. @(you need an account to see links)

    For 3 and 4 I was just making notes since it's not in the guide but I decided 60 because sometimes the nps won't register for some reason. And in case anyone is dumb like me, you can find the X and Y in the bottom left of Paint when you hover over it, ha ha.

    5.) Maybe it's just me but when I followed the guide it couldn't find the directory for some reason. No idea why but just thought I would let anyone know if they ran into the same problem.

    This has been such a valuable part of my dailies and thanks for answering my questions. Appreciate it!
    Last edited by derky; 01-19-2016 at 09:33 PM.

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

    Atlas (01-19-2016)

  4. #23
    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
    Thanks for the quick response!

    1.) I just tried it again, it still won't stop. But like you said, with the new version it was much easier to just hit the "X" on the script.

    2.) It seems to go slower then your original bot, which took about 30 minutes. So I'll definitely play around with those settings and see how much I can get away with without any crashes. I might edit this post it if I find a good spot but so far no crashes now!

    For 3 and 4 I was just making notes since it's not in the guide but I decided 60 because sometimes the nps won't register for some reason. And in case anyone is dumb like me, you can find the X and Y in the bottom left of Paint when you hover over it, ha ha.

    5.) Maybe it's just me but when I followed the guide it couldn't find the directory for some reason. No idea why but just thought I would let anyone know if they ran into the same problem.

    This has been such a valuable part of my dailies and thanks for answering my questions. Appreciate it!
    1. Hmmm, I'm not sure then. :/ I'm sorry you're having this problem and I'm sorry for not being helpful... I'm looking into it right now. I'll tell you when I find something, hopefully I'll find something.

    2. And yeah I suppose you'll be sacrificing time for sustainity. I'm also looking into it too, what's a fast yet safe time. For sure 1.2 works for me. Definitely experiment.

    3 & 4. Oops yeah sometimes the NPs dont register for me too. I think because the daily "reset" happens every 24 hours; as opposed to every day. So, if I finished 50 games at 4pm, I wouldn't be able to get any more neopoints until after 4pm the next day. So if I played 50 games at 8am, even though it is the next day, I won't get any NP because it hasn't been 24 hours yet. At least that's how I *think* it works. Sort of like how Trudy Surprise works. And yes, I used Paint to find my coordinates as well. I believe it's the easiest way.

    5. I think you're right. Good job on finding how to do it correctly.

    And apparently there's a glitch if you get a "sparkling" magenta ghoul. The program might mistake it as yellow or purple and might get stuck trying to move it. I'll try to find a way to fix this from happening, but it shouldn't happen too often.

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

    derky (01-19-2016)

  6. #24

    Joined
    Oct 2012
    Posts
    227
    Userbars
    6
    Thanks
    39
    Thanked
    51/25
    DL/UL
    89/0
    Mentioned
    17 times
    Time Online
    6d 22h 58m
    Avg. Time Online
    2m
    Just a suggestion:
    Can you put up links and screenshots on the required files, some of us have no idea how to operate python. Basically a more detailed step-by-step guide, would be much appreciated.

  7. The Following 2 Users Say Thank You to winston_tiu For This Useful Post:

    Atlas (01-19-2016),bluevitriol (01-26-2016)

  8. #25
    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 winston_tiu View Post
    Just a suggestion:
    Can you put up links and screenshots on the required files, some of us have no idea how to operate python. Basically a more detailed step-by-step guide, would be much appreciated.
    Are you asking how to install pillow?

    I included a small guide on the download page in the spoilers, also I would definitely recommend watching this video: (you need an account to see links)

  9. #26

    Joined
    Oct 2012
    Posts
    227
    Userbars
    6
    Thanks
    39
    Thanked
    51/25
    DL/UL
    89/0
    Mentioned
    17 times
    Time Online
    6d 22h 58m
    Avg. Time Online
    2m
    Quote Originally Posted by Atlas View Post
    Are you asking how to install pillow?

    I included a small guide on the download page in the spoilers, also I would definitely recommend watching this video: (you need an account to see links)
    Perhaps you should include the video link in OP.

  10. The Following User Says Thank You to winston_tiu For This Useful Post:

    Atlas (01-19-2016)

  11. #27
    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 winston_tiu View Post
    Perhaps you should include the video link in OP.
    Will do now, thank you!

  12. #28
    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
    Thanks for the quick response!


    Edit: I just played around with the delay settings and 1.0 seems to be the most stable. It played all 50 games successfully and took about 19-20 minutes. 0.9 works to around 35 games then it crashes. @(you need an account to see links)

    Sounds about right. I just did 15 at .8 with no crash, but I'll keep mine at 1.0. I'll add that information to the downloads page. Thank you so much for your contribution. (+rep when I'm able to again).

    I thought I could do a way where it screenshots the board once, creates a value for it and saves the value (before), waits a few frames later, takes another screenshot and creates a value for it (after). It would then compare before and after, and if the two values are different, that means the board is moving and the program will pause for .1 seconds and try again with the screenshots. If before was equal to after, then that means the board has stopped moving and the program can continue. I done this, thinking it would make it faster.. It either crashed it or slowed it down. Pretty interesting idea, though, I thought. The code went something like this:

    Code:
    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) #delay time
        before=ImageGrab.grab(box)
        before=before.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
        time.sleep(.1)
        after=ImageGrab.grab(box)
        after=after.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
        while before!=after:
            before=ImageGrab.grab(box)
            before=before.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
            time.sleep(.1)
            after=ImageGrab.grab(box)
            after=after.resize((1,1),Image.ANTIALIAS).getpixel((0,0))
        else:
            move()
        return
    but yeah, I mean it worked but it isn't worth it.. the 1.0 works better.


    & As for the quitting on a key command, still a bit lost on that one..

    update:
    to fix the sparkling magenta misidentification bug:
    go to line 105
    replace
    Code:
    elif 40<ide<60:
    with
    Code:
    elif 40<ide<60 or 168<pix[0]<173:
    the ID process before would confuse it with purple, and that's why sometimes it might have got stuck trying to make an incorrect move.

    the new updates will have this already in (7:45pm nst)

    update: (again)
    another bug I discovered: sometimes it'll keep making the same two moves over and over again, usually near purple ghouls?
    this was caused by the screen reading the cursor (hand) and labeling it as a ghoul. if you really want to fix this problem, you can by finding line 50 (the delay time), and inserting this line below it:
    Code:
    ctypes.windll.user32.SetCursorPos(0,0)
    make sure it's indented on the same level as the line above and below it.

  13. #29

    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
    Sounds about right. I just did 15 at .8 with no crash, but I'll keep mine at 1.0. I'll add that information to the downloads page. Thank you so much for your contribution. (+rep when I'm able to again).
    Glad I could help in some small way. I just tested .8 again and it made it to about 35 games before it crashed on me again. I'll keep trying but I think 1.0 might be best, will keep testing tomorrow. I'm wondering what would happen if the Neopet servers were laggy, would that crash the program?
    Quote Originally Posted by Atlas View Post
    I thought I could do a way where it screenshots the board once, creates a value for it and saves the value (before), waits a few frames later, takes another screenshot and creates a value for it (after). It would then compare before and after, and if the two values are different, that means the board is moving and the program will pause for .1 seconds and try again with the screenshots. If before was equal to after, then that means the board has stopped moving and the program can continue. I done this, thinking it would make it faster.. It either crashed it or slowed it down. Pretty interesting idea, though, I thought.
    That's actually a really smart idea, hopefully it could work in the future. I don't know much about programming so I can't give much insight into it.
    Quote Originally Posted by Atlas View Post
    update: (again)
    another bug I discovered: sometimes it'll keep making the same two moves over and over again, usually near purple ghouls?
    this was caused by the screen reading the cursor (hand) and labeling it as a ghoul. if you really want to fix this problem, you can by finding line 50 (the delay time), and inserting this line below it:
    Code:
    ctypes.windll.user32.SetCursorPos(0,0)
    make sure it's indented on the same level as the line above and below it.
    I discovered this as well when I was testing it on .9 settings. I just manually moved it but glad to see you fixed it, thanks!
    Quote Originally Posted by Atlas View Post
    & As for the quitting on a key command, still a bit lost on that one..
    Yea it still won't stop, but with the settings the way they are now it's not a problem at all. I guess keep the script close to your browser so you can hit "X" easier.

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

    Atlas (01-20-2016)

  15. #30
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Quote Originally Posted by Atlas View Post
    I thought I could do a way where it screenshots the board once, creates a value for it and saves the value (before), waits a few frames later, takes another screenshot and creates a value for it (after). It would then compare before and after, and if the two values are different, that means the board is moving and the program will pause for .1 seconds and try again with the screenshots. If before was equal to after, then that means the board has stopped moving and the program can continue. I done this, thinking it would make it faster.. It either crashed it or slowed it down. Pretty interesting idea, though, I thought.
    If it crashed, it's probably this code. You want to avoid while loops that (can potentially) loop forever. I would add an AND condition to your while loop that either limits iterations or expires after a certain time span has passed. When your only reflection method to the game is color recognition, you must be extremely careful with these kinds of conditions.
    Code:
    while before!=after:       
           before=ImageGrab.grab(box)         
           before=before.resize((1,1),Image.ANTIALIAS).getpixel((0,0))       
           time.sleep(.1)
           after=ImageGrab.grab(box)      
           after=after.resize((1,1),Image.ANTIALIAS).getpixel((0,0))  
    else:     
           move() 
    return

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

    Atlas (01-20-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
  •