forked from tanjeffreyz/auto-maple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
60 lines (51 loc) · 1.52 KB
/
main.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
"""The central program that ties all the modules together."""
import time
from src.modules.bot import Bot
from src.modules.capture import Capture
from src.modules.notifier import Notifier
from src.modules.listener import Listener
from src.modules.gui import GUI
from src.common import settings, config
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--full_screen', action='store_true')
parser.add_argument('-cb', type=str, default="")
parser.add_argument('-rt', type=str, default="")
parser.add_argument('--rent', action='store_true')
parser.add_argument('-dk', action='store_true')
args = parser.parse_args()
print(args)
if args.full_screen:
settings.full_screen = True
if args.rent:
settings.rent_frenzy = True
if args.dk:
settings.driver_key = True
bot = Bot()
capture = Capture()
notifier = Notifier()
listener = Listener()
bot.start()
while not bot.ready:
time.sleep(0.01)
capture.start()
while not capture.ready:
time.sleep(0.01)
notifier.start()
while not notifier.ready:
time.sleep(0.01)
listener.start()
while not listener.ready:
time.sleep(0.01)
print('\n[~] Successfully initialized Auto Maple')
if args.cb:
if args.rt:
gui = GUI(cb=args.cb,rt=args.rt)
gui.start()
else:
gui = GUI(cb=args.cb)
gui.start()
else:
gui = GUI()
gui.start()