Compare commits

..

No commits in common. "1b415d50c5f2a5cb7ad954d80cd818a9dc3ae6a3" and "380930e8e7c8f48dd4bbef48ae5567f89bcc859a" have entirely different histories.

15
bot.py
View File

@ -5,19 +5,9 @@ from tqdm import tqdm
global xc, yc global xc, yc
xc = 0 ; yc = 0 xc = 0 ; yc = 0
def gcolor(x, y):
response = requests.get(f'http://pb.dmcraft.online/?get_color={x},{y}')
return response.text
def draw(cords, color = "black"): def draw(cords, color = "black"):
global xc, yc global xc, yc
for i in tqdm(range(len(cords))): for i in tqdm(range(len(cords))):
try:
color = cords[i][2]
except:
pass
if str(gcolor(cords[i][1], cords[i][0])) != color:
payload = {'x': cords[i][1] + yc, 'y': cords[i][0] + xc, 'color': color } payload = {'x': cords[i][1] + yc, 'y': cords[i][0] + xc, 'color': color }
response = requests.post('http://pb.dmcraft.online', data=payload) response = requests.post('http://pb.dmcraft.online', data=payload)
@ -50,9 +40,10 @@ def fill(xy1, xy2):
print(gcolor(0, 1)) #xc = 500
draw([[0,1, "red"]]) #yc = 500
draw(fill([26,0], [50, 85]),"white")
''' '''
#Russian flag #Russian flag