Python Bots! Coding a Better Auto Clicker.

  Рет қаралды 11,105

ClarityCoders

ClarityCoders

2 жыл бұрын

I love code bullet but what code does he use? Today I'm going to show you exactly how he did his last video start to finish. This will include the most popular libraries and how to take the project to the next level. Any questions let me know in our discord.
github.com/ClarityCoders/Auto...
Subscribe to our new streaming channel! If I get 50 I'll do a live stream.
/ @claritystreams1393
👊You got something to say to me?? Join our discord!✌️
/ discord

Пікірлер: 37
@wandevv
@wandevv 2 жыл бұрын
Nice video, I would recommend for the first code a small program that ask the user to click the last upgrade, then it will get the rest using offset or ask to click each upgrade, then store in a JSON file, then your program just read that config.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
This is a great idea.
@candorzofain8682
@candorzofain8682 Жыл бұрын
I created an auto bot for this game, but I did it entirely in JavaScript. All the game data is publicly available and you can use the Cookie Monster 'mod' to get the most efficient building upgrade. Then it is just a matter of calculating what to upgrade and when. All the 'clicking' can be replaced by using the game's own functions to buy buildings and upgrades, and anything else can be done by calling '.click()' on the html element itself. I also fully utilize Golden Cookies and the Wraiths. I eventually want to create a bot for the farm, bank, etc. minigames.
@mr.viewer3579
@mr.viewer3579 3 ай бұрын
Would you create some bot for an old game of mine im playing still when i have free time(Talisman Online) if its ring a bell,would you please good sir/maam can create a bot for farming or scripts for clearing a dungeons or if you can ,can you teach some basics about creating bot program and maybe i can learn and im the one who will create my own bot 😊
@TheDevilzAngelz
@TheDevilzAngelz 2 жыл бұрын
Didn't finish watching yet, but I thought a few quick improvements/optimizations. Rather than manually getting the coords for each upgrade, I would take a screenshot of the image (or name of the item) you're upgrading and save it as a local file. When the program starts, search the screen for those images and save the coordinates. There's something in the pyautogui library called locatecenteronscreen() which should do just this. You could even make an "update_image_locations" function which would ensure the images are where you expect them to be to help with screen scrolling, resizing, different web browsers, the "bookmarks bar" being open, ads, etc. which may change the position of the hard-coded coordinates randomly. In fact, you event commented on it around 13:00 and said "I didn't adjust the pixel values... so it's a little off". One major concern being "buyable" vs "can't afford" upgrades since they change highlighting - but you can provide a "confidence" into the locatecenteronscreen() and it should be sufficient. This can be expanded to work on multiple monitors, but the image search function will obviously take longer. But it saves you from having to do the "swap your code and your game" around the 11:55 mark. This can also be used for the "golden cookie" which is randomly placed throughout the screen and offers the player some benefits. Every ~100 clicks or something, check for the golden cookie, and click it. Secondly, your choice of data constructs is a bit awkward/confusing. The "name" fields of your dictionaries within your click_locations list are completely unused. You could just use a comment instead, or if you actually need the dictionary entry (I can't see why you would), then use it. While you're at it, your X/Y values can be combined into a list, which can be passed direct into the pyautogui.click() function so you don't have to index into them. This might save a few instructions and increase code speed. Ideally you would find a way to do the clicking even when the screen is inactive/hidden. AutoHotKey (AHK) does this well, but I haven't found a reliable way to do this in Python. Either way, not a bad implementation of a simple little script. Keep up the good work!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Amazing points. I really appreciate the feedback I hope you stay around the channel! I tend to use template matching most of the time for dynamically finding coordinates. Like you mention this would fix the buy able not buy able issue. I left this out of this program just because I was following what code bullet did and keeping it simple. The name field is unused in this program but I use it in my Reddit bot I show later. For this program though you are correct I should have eliminated the key value pair. Thanks again for commenting and such great feedback!
@daddyofalltrades
@daddyofalltrades 2 жыл бұрын
Beautiful comment.
@alexm-vb9dv
@alexm-vb9dv 2 жыл бұрын
Awesome video, as per usual! Love your content. I see you with that metamask wallet extension 😉😉
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Been playing around with the idea of botting some play to earn games. Thanks for watching and commenting!
@alexm-vb9dv
@alexm-vb9dv 2 жыл бұрын
@@ClarityCoders Your video put that exact thought in my head! I'm sure you'd get a lot of traction on that video. Looking forward to it, if you decide to do it!
@Lea-ww9hf
@Lea-ww9hf 2 жыл бұрын
Hello Jake! Great video!!! I am learning a lot from your videos! Can you make one about how to make a bot work in a game that uses DirectX? I tryed different methods but couldn't do it
@philip8232
@philip8232 2 жыл бұрын
Liked the video, but could you please create some bot that can run in the background? How can that be done for web game or for any other, i.e. reading memory.
@forensicsman320
@forensicsman320 2 жыл бұрын
Great video! Could you please do a match 3 python bot tutorial? Would love to see how it is done in python.
@iPrint3D
@iPrint3D 2 жыл бұрын
Just released? Had me excited....
@ClarityCoders
@ClarityCoders 2 жыл бұрын
SORRY! I meant relative to have often he releases 😂. Thanks for the comment.
@iPrint3D
@iPrint3D 2 жыл бұрын
@@ClarityCoders All good. Love these!
@DaxtAttack
@DaxtAttack 2 жыл бұрын
Great. Thanks for the video.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks for watching!
@b391i
@b391i 2 жыл бұрын
Thanks Man ✌😁
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Anytime my guy! Thanks for watching and commenting.
@UnderWordMusicOfficial
@UnderWordMusicOfficial Жыл бұрын
please continue uploading python contents
@PhunkyBob
@PhunkyBob 2 жыл бұрын
Why don't you use `python -m venv venv` for your virtual env? What are the benefits of `virtualenv` module?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Honestly you're right unless you have a reason not to you should probably use the built in venv in Python 3.3+. I used virtualenv out of habit.
@shrankai7285
@shrankai7285 2 жыл бұрын
Nice video!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks really means a lot!
@oskarma2473
@oskarma2473 2 жыл бұрын
Can you make ai for maplestory?
@abdullahfaiyaz7624
@abdullahfaiyaz7624 2 жыл бұрын
Nice
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks! Appreciate the comment and views!
@jakelake8113
@jakelake8113 2 жыл бұрын
I WAS THE 50TH SUB!!!
@ClarityCoders
@ClarityCoders 2 жыл бұрын
My guy! Thank you sir.
@klm.4809
@klm.4809 2 жыл бұрын
nice
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks! Appreciate you taking the time to comment.
@MadMan123654
@MadMan123654 2 жыл бұрын
2 module 3 is remainder 2. 3 goes into 2 0 times. You said it backwards but I’m sure you know that. I do not understand how ‘for location in click_locations’ works, as ‘location’ is neither reserved nor defined. Is ‘location’ just a placeholder for each {} within click_locations, meaning ‘for clicks in click_locations’ would work too?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Dang on first point thanks for the correction! "location" used there is just a chosen variable name. You could have chosen anything as long as you then reference it in the loop as such. Each time you go through the loop in this case location will be assigned one dictionary inside of click_locations. Let me know if I'm not explaining that well enough. Because we are going backwards... First Loop location = { "name": "Store", "x": 1632, "y": 216, } Second loop { "name": "Time Machines", "x": 1722, "y": 1032, }
@MadMan123654
@MadMan123654 2 жыл бұрын
@@ClarityCoders “every loop, ‘location’ will be assigned one dictionary entry” This makes it very clear, thank you, confirming what I was trying to ask in a more succinct way
@HoloDoctor90
@HoloDoctor90 2 жыл бұрын
​@@MadMan123654 location is just a temporary variable, like in C++ the i: for(int i=0
@MadMan123654
@MadMan123654 2 жыл бұрын
@@HoloDoctor90 I started with C, where every instruction is specific, so yeah that helps
I tried to make a Valorant AI using computer vision
19:23
River's Educational Channel
Рет қаралды 1,3 МЛН
Cute Barbie gadgets 🩷💛
01:00
TheSoul Music Family
Рет қаралды 67 МЛН
La final estuvo difícil
00:34
Juan De Dios Pantoja
Рет қаралды 26 МЛН
How Many ERRORS Can You Fit in a Video?!
20:40
ElectroBOOM
Рет қаралды 508 М.
Game Automation with YOLOv8: Python Bot Tutorial
21:40
ClarityCoders
Рет қаралды 13 М.
AI Learns to WALK 3D
20:19
Code Bullet
Рет қаралды 2,2 МЛН
Bot Plays Dino Run! Can our dinosaur bot be stopped?
11:30
ClarityCoders
Рет қаралды 50 М.
Programmer VS The Human Benchmark Test | Number Memory
17:47
Code Bullets Day Off
Рет қаралды 397 М.
A.I. Learns to Run (Creature Creator)
16:38
Code Bullet
Рет қаралды 5 МЛН
How I make bots using python (educational)
17:12
Kian Brose
Рет қаралды 519 М.
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Рет қаралды 6 МЛН
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 1,9 МЛН
Трагичная История Девушки 😱🔥
0:58
Смотри Под Чаёк
Рет қаралды 370 М.
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,7 МЛН
Kalem ile Apple Pen Nasıl Yapılır?😱
0:20
Safak Novruz
Рет қаралды 884 М.
What percentage of charge is on your phone now? #entertainment
0:14