Hi Everyone,
I am trying to build a script to farm currency on a game! I absolutely love this program. I have already scripted the keyboard macro and a few little additional things. I need help with this tricky situation.
This game only has one bot detection (shown in link)...Basically, a popup will occur at random intervals requiring the user to click "YES". Heres the problem, the the popup isnt always in the same position on the screen. Also the "YES" isnt in the same position in the pop up. So you may be thinking, that image detection would work...but the popup changes color each time! see pic..its purple, but next time it might be green or yellow, it does a different hue each time...thousands of color possibility.
Please! can someone help me brainstorm some solutions! I would love to chat on here/discord/skype/etc.
https://imgur.com/a/aLFkmJy
Tricky Problem-Need help!
Moderators: Dorian (MJT support), JRL
Re: Tricky Problem-Need help!
Hi, brandonpresser,
I would see if you could use GetPixelColor. If successful, you could have a macro check points on the screen for colors. The window being searched for is fairly large(compared to the game). The likely hood that the same color would be on the screen in say three different locations, is unlikely. Say you grab the color some where in the upper top left, upper top right, and middle bottom center, If all colors are the same, it indicates the existence of the window.
The window is pretty large. You can easily create a search pattern to find the window on the screen. The game window is small. A macro could check all areas of a "search pattern" within seconds. That window will only fit x many times on the game screen. Maybe you first locate it, and then have a srt determine it's position with more getpixelcolor checks. Maybe a cross-hair type of check. Go from left to right while color is still true. That gives you the x position. Then check the top to bottom color. That gives the y position.
Based on that, you could make a pretty good guess where to click. Or if need be, click multiple areas on the window. That "Yes" is pretty large. Wouldn't be difficult to randomly click on it by covering the area based on size of the "YES". The same method as we're doing to find the window.
Want to collaborate? [email protected].
Good Luck,
PepsiHog
I would see if you could use GetPixelColor. If successful, you could have a macro check points on the screen for colors. The window being searched for is fairly large(compared to the game). The likely hood that the same color would be on the screen in say three different locations, is unlikely. Say you grab the color some where in the upper top left, upper top right, and middle bottom center, If all colors are the same, it indicates the existence of the window.
The window is pretty large. You can easily create a search pattern to find the window on the screen. The game window is small. A macro could check all areas of a "search pattern" within seconds. That window will only fit x many times on the game screen. Maybe you first locate it, and then have a srt determine it's position with more getpixelcolor checks. Maybe a cross-hair type of check. Go from left to right while color is still true. That gives you the x position. Then check the top to bottom color. That gives the y position.
Based on that, you could make a pretty good guess where to click. Or if need be, click multiple areas on the window. That "Yes" is pretty large. Wouldn't be difficult to randomly click on it by covering the area based on size of the "YES". The same method as we're doing to find the window.
Want to collaborate? [email protected].
Good Luck,
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
- Dorian (MJT support)
- Automation Wizard
- Posts: 1390
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Tricky Problem-Need help!
My initial thought was the same as yours, but I'm fairly sure that wouldn't work, as they've made it semi transparent. This means the colour index changes. Sample it in one place, and it's 13012896, in another it's 12815002, and so on. Running the Cursor Colour Monitor over the purple image reveals a constantly changing colour.
Yes, we have a Custom Scripting Service. Message me or go here
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Tricky Problem-Need help!
I would use Image Magick, script using cli to analyze the image. When you have a jump in the colors used you have a bot warning.
Re: Tricky Problem-Need help!
What game is that? Do you run it from an emulator on Windows?