-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAutoMudaeRoller.py
63 lines (50 loc) · 1.94 KB
/
AutoMudaeRoller.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
import pyautogui
import time
from configparser import ConfigParser
def roll(rolls, command, time_inbetween_rolls):
i = 1
while i <= rolls:
line = command
pyautogui.typewrite(line)
pyautogui.press("enter")
time.sleep(time_inbetween_rolls)
i += 1
def mudae():
savedata = int(input("""
Type 1 If you want to create a save data
Type 2 If you want to load a save data
>
"""))
if savedata == 1:
rolls = int(
input("How many rolls do you want to roll for (give answer in numbers only): "))
command = input("What command do you want to type? ")
secs = int(input(
"How many seconds do you want before the program runs, so you have enough time to go to discord (give answer in numbers only): "))
time_inbetween_rolls = int(input("How many seconds do you want for each roll to run for (give answer in numbers only): "))
print(
f"You Have {secs} Secs Before The Program Runs Go To Discord Immediately!")
config_object = ConfigParser()
config_object["USERINFO"] = {
"rolls": rolls,
"command": command,
"secs": secs,
"time_inbetween_rolls": time_inbetween_rolls,
}
with open('AutoMudaeRollerconfig.ini', 'w') as conf:
config_object.write(conf)
time.sleep(secs)
roll(rolls, command, time_inbetween_rolls)
elif savedata == 2:
config_object = ConfigParser()
config_object.read("AutoMudaeRollerconfig.ini")
userinfo = config_object["USERINFO"]
rolls = int(userinfo["rolls"])
command = userinfo["command"]
secs = int(userinfo["secs"])
time_inbetween_rolls = int(userinfo["time_inbetween_rolls"])
print(
f"You Have {secs} Secs Before The Program Runs Go To Discord Immediately!")
time.sleep(secs)
roll(rolls, command, time_inbetween_rolls)
mudae()