Glad I stumbled upon this video series. You did a great job explaining & used a great example! I'm switching from Python to C++ so this is what I just needed. Can't wait to work on more!
@Robindahoodz4 жыл бұрын
This called human controlled automation adaptation in which we tell the computer where to look and how to do it and it'll do the rest itself but it's very impractical to ask the not to look through the entire screen every single time a new map loads. It's better to point the bot to the specific area to look for the frog and it will do everything else from there. Instead of getpixel scanning the entire screen it only has to scan a small square for those colors which improves performance.
@RoshanPradhan24 жыл бұрын
Very factual and compact video!
@thecomputer14248 ай бұрын
Windows API is hard to learn.
@edenrosales82144 жыл бұрын
I think I am having trouble with retrieving the DC. I am trying to return the color of a pixel on my screen and when I use the GetPixel function on the game window it does not work, however it works with windows such as file explorer. Getting the coordinates of pixels on the screen works, why does the GetPixel function not work for me?
@littricks3631 Жыл бұрын
where should I look for Zuma deluxe game?
@nyatsuri3 жыл бұрын
thank you boy! i learn alot
@dinhnguyen4642 жыл бұрын
Where I can find part 2 ?
@tudoroltean67994 жыл бұрын
Hey man! I tried making a bot for a game named 4Story , the only problem is that it only accepts raw input, what should I do / try?
@amrofn43614 жыл бұрын
so we got color pixels and coordinates ... now what we can do with them? is there a tutorial to automate mousemovement and mouseclicks and keyboard inputs to specific location or pixel? + did u make a fully automatic bot for this game yet? id love to see how it was done... the mousemovements and all the automation.... i see no automation done in this video
@casualgamer17914 жыл бұрын
I did a second part its on clicks and keybard input: kzbin.info/www/bejne/oGW5d6JqlsiiqLM Sadly I did not continue the series after that (yet). With this game i would probably have to use OpenCV
@amrofn43614 жыл бұрын
@@casualgamer1791 Can you please continue it, and make a fully automated bot for the game in only one map? id love to see how it works so that i can create a bot for my game aswell... but at the moment i'm not sure what can i do... i can only get the pixel colors and x,y pos and that's it..
@swoodc3 жыл бұрын
what about AHK and the findtext() function that gets pixel colors
@moviesynopsis0014 жыл бұрын
Hey mate, on the game window I am trying it for it only returns a 0 or 255 for any of the Colors. I can get this to work with autoit, but just cant seem to get it working on c++, do you have any ideas for why this is returning 255?
@casualgamer17914 жыл бұрын
provide code sniped pls
@testingtesting16023 жыл бұрын
any solution?
@smartphonecodes14 жыл бұрын
hello there , i want to ask that how you search for them find new things and many more , i am also intrested in there and want to learn everything that we can do using c , c++ , also i want to ask some doubts about my learnings I want to learn from you how can i contact you
@casualgamer17914 жыл бұрын
Answered on discord
@alanrichter85944 жыл бұрын
hi, im trying to do the same thing but for other game "all the code is the same im changing only once the bot find the pixel and the pos", but something is wrong with GetPixel(), it says me "undefined reference to '__imp_GetPixel' im using the windows.h library so is not that, could you help me?
@@casualgamer1791 thanks, but i erased the code and now that getpixel is solved... imgur.com/a/4falZIr just check the error i dont understand what is happening xd
@casualgamer17914 жыл бұрын
@@alanrichter8594 Line7 Change LPCWSTR to LPCSTR. And read into what these mean. It will help you in the long run
@alanrichter85944 жыл бұрын
@@casualgamer1791 i finally did it, i changed w for a t, and i dont know what i happen but its ok, but I have a doubt (if you dont want to help me is ok :v) how i could check if for example i have piano tiles, and the first row have 200, 200 for x and y, and if i move the mouse there and the color are 0, 0, 0, do something
@benji91074 жыл бұрын
0:14 no worries just trying to make a way for my ai to play Minecraft
@casualgamer17914 жыл бұрын
Ambitious :D
@zelazko15664 жыл бұрын
I have some questions becouse it doesn't work for me 1. If you include "pch.h" i think we should download it or something becouse i get "pch.h no such file or directory" 2. I thing this header defines hWND and windows_tile Pls help
@zelazko15664 жыл бұрын
EDIT: sorry, windows_tiTle was my mistake
@casualgamer17914 жыл бұрын
Just set project to not use precompiled headers and remove any #include pch.h
@vadosg12384 жыл бұрын
Hi, thanks for content, but where do I get the "pch.h" file?
@casualgamer17914 жыл бұрын
You do not need any such file. Just set precompiled headers to false in your project settings
@toddhalpert93984 жыл бұрын
Hello, it is me again and this I really can't find the solution. I can't seem to run my code that has a GetPixel function because there was an undefined reference. I am using Dev-C++ to code and based on my small amount of time researching, the said function was not in the default libraries and compiler. Can you please provide a header or a download link to the header. I've been stuck in here for days now.
@casualgamer17914 жыл бұрын
The getpixel function is the undefined reference? Just include Windows.h
@toddhalpert93984 жыл бұрын
@@casualgamer1791 I did. I think it is because of dev-c. It is the only undefined reference. The other functions such as the setcursorpos are just fine.
@casualgamer17914 жыл бұрын
Possible. I have no experience with dev-c
@toddhalpert93984 жыл бұрын
@@casualgamer1791 My Visual Studio is acting weird because I can't run any code there, it only says that it cannot fin the file specified.
@toddhalpert93984 жыл бұрын
@@casualgamer1791 I got it working now. What function should I use to make my program click a certain with with a certain colorref or rgb value?
@ZaryarWasTaken4 жыл бұрын
Hey, how can I find the LPCWSTR(window title) of google chrome?
@ZaryarWasTaken4 жыл бұрын
For everyone that is still wondering LPCWSTR wt = L" - Google Chrome";
@8ack2Lobby4 жыл бұрын
Bro! I am getting same color: 4294967295 and Red: 255, Green: 255 and Blue 255. My code is same copy of yours... Any idea?
@karkarplays37982 жыл бұрын
@mralberto40 but the numpad1 works properly for displaying coords
@matt-fk7zx5 жыл бұрын
says no such file for pch.h do i have to download that
@casualgamer17915 жыл бұрын
This is a specific visual studio issue. Basicaly you gotta set the project to not use precompiled headers. The following helped me fix that: developercommunity.visualstudio.com/content/problem/350067/c-include-pchh-is-required-when-precompiled-header.html
@paulomeirel3s5 жыл бұрын
What language is this? U are use visual studio code?
@invictus22335 жыл бұрын
@@paulomeirel3s it's C++ Visual Studio Code is an IDE not a programming language
@shukishan5 жыл бұрын
@@paulomeirel3s if you don't know the difference between visual studio (an IDE) and a programming languages, I suggest you look into the basics of C++ first rather than to hop on board on the windows library. lol.
@m4y0r143 жыл бұрын
Why not if(GetAsyncKeyState(VK_NUMPAD1) & 1)?
@casualgamer17913 жыл бұрын
Both options are possible
@prabhatprabhat15195 жыл бұрын
Hey plzz tell me how to make c++ bot for t - rex run ( google chrome's game) using pixel color method.
@casualgamer17915 жыл бұрын
Sounds like a fun project. Nothing i can answer in a vew lines but might make a video on it
@prabhatprabhat15195 жыл бұрын
@@casualgamer1791 thnx buddy I kinda have this deadline for this project that's 12 days away. I have no clue about using windows.h library. plz save me
Since this is out of context i can only guess but id say you should try and change your project settings: "If, in your project settings, in the "General" tab, your character set is "Use Multi-byte character set" then TCHAR is an alias forchar. However, if it's set to "Use Unicode character set" then TCHAR is an alias forwchar_t instead."
@Xfran1998X5 жыл бұрын
@@casualgamer1791 i had not linked gdi32.dll, i just linked it on codeblocks and borked fine ^^. Pd: If values are stored on server and is a server-sided game its imposible to hack isnt it? Pd2: would be nice if u continue the zuma bot course.
@casualgamer17915 жыл бұрын
Glad you solved it :). It only means that you have no acces to the values which are stored server side but usualy a lot of stuff is stored client side (like position for instance). Haha continue the zuma bot, sure, sounds fun :)
@Anony034 жыл бұрын
@@Xfran1998X I don't know how to "link" gbi32.dll... Can you tell it to me? Please, i've the same problem
@Xfran1998X4 жыл бұрын
@@Anony03 i dont remember, i think the problem is from graphics.h library that is not linked to the proyect or not installed. Try this: kzbin.info/www/bejne/nIjQmqZqqrt2fsk
@Watermelon_cat8156 ай бұрын
can you make this for fnf
@ServalCamouflage4 жыл бұрын
Okay i’m a completely noob when it comes to programming .. What’s my road plan to be able to make bots on my own?
@casualgamer17914 жыл бұрын
From my personal experience: 1. Analyse the situation: Can whatever you want to do be done automaticaly Cosider these things: To get information: Get pixel color at coordinates, potentialy external information (lets say you want to write a trading bot for an mmo auction house: Current item prices from some website with api) Automatied imput: Mouse and keyboard. 2. Collect the parts: Make input work data collection (for instance color C at position x,y means you know you can take action A) 3. Put the parts together: Step by step everything that needs to be done: Example: 1. press key G to open some window 2. wait untill window is open (check color at some position untill it indicates the window is open) 3. klick at some location inside that window to do some action 4. etc. Personaly my first project (no details :P) was a pixel bot and it took me over a month to get it running. Extremly messy code but whatever just get it working and learn from your mistakes ^^
@ServalCamouflage4 жыл бұрын
CasualGamer don’t know how to thank you for this informative comment .. But i think i’ll have to learn programming first :D
@casualgamer17914 жыл бұрын
No problem. It is a good idea to learn some basics first. Starting with "hello world" then loops (for, while,...) and if statements. Understanding classes would be good too. Personally i always try to combine learning and doing as much as possible just reading/watching theory alone is not enough for me to stay motivated/actually internalise things
@fikcjamarzen74955 жыл бұрын
How to write a bot code that will only do in one window (minimized window) :)?
@casualgamer17915 жыл бұрын
I am not aware of any option clicking in minimized widows. The way i solved it in the past for my needs is with a virtual machine
@fikcjamarzen74955 жыл бұрын
@@casualgamer1791 Thanks !
@Saaahmed04 жыл бұрын
How did u learn C++
@casualgamer17914 жыл бұрын
I wanted to get something done and c++ was the best option. Many different sources and very ugly code ^^ Did the whole thing without even knowing what "object oriented" means. That's just how I like doing things: Set some goal, learn how to get it running, no matter how ugly it may be. I probably would not recommend doing it that way tho. Best way would probably be a combination of reading/watching theory and doing practical stuff. Endless amount of sources and there is no single one i would recommend over all others. Just make sure that whatever you write in your code you understand what is happening and why it works.
@ta3113ta5 жыл бұрын
Thank you
@joostbosman72434 жыл бұрын
how do you program when a certain color moves past a x coordinate it does an action (like press spacebar)?
@casualgamer17914 жыл бұрын
I believe my next video in the series should help with that question ("simulating mouse and keyboard events")
@joostbosman72434 жыл бұрын
@@casualgamer1791 thanks, yeah what im trying to make is: when within a certain box on my screen color x appears actions start to follow (like 1.32 sec after color is detected program presses spacebar for me) thanks btw for insanely fast respone (actually shocked for a response at all xD)
@casualgamer17914 жыл бұрын
You could loop through the area with for(x...) for(y...) and inside if(getpixelcolor=...) this does work in theory. In Practice the question is how long does the color remain on screen because this method is not very fast
@Shemetaka4 жыл бұрын
Great!
@mithicash14443 жыл бұрын
Quick advice, when making "basic introduction" tutorials you always need to assume that you are speaking to people who have never tried doing what you are doing. First off, you say nothing about header files, how they work, and where they come from. Sure, you posted links in the description but piecing this all together from half a dozen links which often point to another half a dozen links each is insane. Making this mistake you basically ensure that most people new to this topic would never be able to actually follow your method, but only watch and pretend like they do.
@casualgamer17913 жыл бұрын
Thank you for the input. However, I do not agree. What you describe are cpp basics (which are a prerequisite). My videos on the other hand, cover game hacking basics. Maybe I should have mentioned that at the beginning of the video.