-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbot.py
115 lines (90 loc) · 3.82 KB
/
bot.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import sys
sys.dont_write_bytecode = True
from hokireceh_claimer import base
from core.info import get_info
from core.task import process_do_task, process_boost_speed
from core.mint import process_mint_worm
from core.game import process_break_egg
from core.upgrade import process_upgrade
import time
class Birds:
def __init__(self):
# Get file directory
self.data_file = base.file_path(file_name="data.txt")
self.config_file = base.file_path(file_name="config.json")
# Initialize line
self.line = base.create_line(length=50)
# Initialize banner
self.banner = base.create_banner(game_name="Birds")
# Get config
self.auto_do_task = base.get_config(
config_file=self.config_file, config_name="auto-do-task"
)
self.auto_boost_speed = base.get_config(
config_file=self.config_file, config_name="auto-boost-speed"
)
self.auto_mint_worm = base.get_config(
config_file=self.config_file, config_name="auto-mint-worm"
)
self.auto_break_egg = base.get_config(
config_file=self.config_file, config_name="auto-break-egg"
)
self.auto_upgrade_egg = base.get_config(
config_file=self.config_file, config_name="auto-upgrade-egg"
)
def main(self):
while True:
base.clear_terminal()
print(self.banner)
data = open(self.data_file, "r").read().splitlines()
num_acc = len(data)
base.log(self.line)
base.log(f"{base.green}Number of accounts: {base.white}{num_acc}")
for no, data in enumerate(data):
base.log(self.line)
base.log(f"{base.green}Account number: {base.white}{no+1}/{num_acc}")
try:
get_info(data=data)
# Do task
if self.auto_do_task:
base.log(f"{base.yellow}Auto Do Task: {base.green}ON")
process_do_task(data=data)
else:
base.log(f"{base.yellow}Auto Do Task: {base.red}OFF")
# Boost speed
if self.auto_boost_speed:
base.log(f"{base.yellow}Auto Boost Speed: {base.green}ON")
process_boost_speed(data=data)
else:
base.log(f"{base.yellow}Auto Boost Speed: {base.red}OFF")
# Mint worm
if self.auto_mint_worm:
base.log(f"{base.yellow}Auto Mint Worm: {base.green}ON")
process_mint_worm(data=data)
else:
base.log(f"{base.yellow}Auto Mint Worm: {base.red}OFF")
# Break egg
if self.auto_break_egg:
base.log(f"{base.yellow}Auto Break Egg: {base.green}ON")
process_break_egg(data=data)
else:
base.log(f"{base.yellow}Auto Break Egg: {base.red}OFF")
# Upgrade egg
if self.auto_upgrade_egg:
base.log(f"{base.yellow}Auto Upgrade Egg: {base.green}ON")
process_upgrade(data=data)
else:
base.log(f"{base.yellow}Auto Upgrade Egg: {base.red}OFF")
get_info(data=data)
except Exception as e:
base.log(f"{base.red}Error: {base.white}{e}")
print()
wait_time = 60 * 60
base.log(f"{base.yellow}Wait for {int(wait_time/60)} minutes!")
time.sleep(wait_time)
if __name__ == "__main__":
try:
birds = Birds()
birds.main()
except KeyboardInterrupt:
sys.exit()