-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcake_thiever.py
43 lines (31 loc) · 1.14 KB
/
cake_thiever.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import time
import random
from numpy import array
from vision import Vision
from windowcapture import InventoryRegion, ScreenRegion
'''
about ~15k xp/hr ~35min 5 to 25
stand under baker
zoom 2 (middle), camera north full up
inventory open and on drop mode
'''
inventory = InventoryRegion()
screen = ScreenRegion()
stall_region = array([(840,530,25,71)])
cake = Vision('Needle\\thieving\\cake_stall\\cake.png')
bread = Vision('Needle\\thieving\\cake_stall\\bread.png')
choco = Vision('Needle\\thieving\\cake_stall\\choco_cake.png')
junk = [cake, bread, choco]
start_time = time.time()
print('-------starting cake stall thieving-------')
while True:
print('thieving stalls...')
while inventory.amount(cake, 0.75) + inventory.amount(bread, 0.75) + inventory.amount(choco, 0.75) < 28:
screen.click_region(stall_region)
time.sleep(random.normalvariate(3.3, 0.08))
print('dropping junk...')
inventory.drop_list_vert(junk)
current_time = (time.time() - start_time)
current_time_format = time.strftime("%H:%M:%S", time.gmtime(current_time))
print(f"run time: {current_time_format}")
time.sleep(1.2)