'i want to create a bot for game named (gun and bottles) using python
i want to make a bot on game named (gun and bottles) in python
this is the link of the game https://gamesnacks.com/embed/games/aktestgunsandbottles
i am thinking of an invisible radius (line moving in circular path with gun ) which can recognize pixel colors , IF green pixel is encountered , (click) action will be triggered , but how can i make a line which moves with the gun in circular direction and recognize the pixel color ?
please help
i asked similar question on discord and got this
import clickclickclickclock
# border_edge = [(x, y), (x, y), (x, y), (x,y)]
center_pixel_loc = (x, y)
gun_tip_pixel_loc = (x, y)
bottle_pixel_loc = (x, y)
x1, y1 = center_pixel_loc[0], center_pixel_loc[1]
x2, y2 = gun_tip_pixel_loc[0], gun_tip_pixel_loc[1]
m = (y2 - y1) // (x2 - x1)
b = 0
if (bottle_pixel_loc[1] == m * bottle_pixel_loc[0] + b):
shoot()
def shoot():
click()
sleep()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
