-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
123 lines (89 loc) · 3.53 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
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
116
117
118
119
120
121
122
123
import requests
import webbrowser
import time
import sys
blank = ""
print(" ████ ████ █████ █ █ ████ █ █████ █████ █████ █ █ ███ ████ █████ ")
print("█ █ █ █ ██ █ █ █ █ █ █ █ ██ ██ █ █ █ █ █ ")
print("█ ██ █ █ ████ █ █ █ █ █ █ ████ █████ █████ █ █ █ █ █ █ █ ████ ")
print("█ █ █ █ █ █ ██ █ █ █ █ █ █ █ █ █ █ █ █ █ ")
print(" ███ ████ █████ █ █ ████ █████ █████ █████ █████ █ █ ███ ████ █████ ")
print("")
print("")
print("█▀▀ ▄▀▄ █▄ ▄█ █▀▀ █▀▀ █▀▀ ▀█▀ █ █ █▀█ ")
print("█▄█ █▀█ █ ▀ █ ██▄ ▄██ ██▄ █ █▄█ █▀▀ ")
print("")
print("1. Type in ID")
print("2. Use GDUtils mod")
levelOpen = int(input("Choose level open type: "))
print("1. Easy")
print("2. Hard")
print("3. Expert")
typedDiff = int(input("Choose difficulty: "))
if typedDiff == 1:
levelDiff = "3"
if typedDiff == 2:
levelDiff = "4"
if typedDiff == 3:
levelDiff = "5"
lives = 30
skips = 3
# header stuff
headers = {
"User-Agent": ""
}
# data for rob
data = {
"total": 1000,
"noStar": 1,
"type": 4,
"secret": "Wmfd2893gb7",
"len": 5,
"diff":levelDiff,
}
url = "http://www.boomlings.com/database/getGJLevels21.php"
# actually sends the request
req = requests.post(url=url, data=data, headers=headers)
# saves the response
output = (req.text)
levelIDX = 0
# creates an array of levels
levelList = output.split('|')
while True:
# gets the current level's data
currentLevel = levelList[levelIDX].split(':')
likeCount = int(currentLevel[19])
levelID = str((currentLevel[1]))
# checks if the likes are in the negatives, indicating it is bad and is skipped
if likeCount < 0:
# skips bad level
levelIDX += 1
else:
# plays good level
webbrowser.open("https://lostshadowgd.github.io/gd-endless-run/c/" + "?diff=" + str(typedDiff) + "&lives=" + str(lives) + "&levels=" + str(levelIDX))
time.sleep(16)
if levelOpen == 2:
gdLink = "https://gdutils.com/" + levelID
webbrowser.open(gdLink)
else:
print("The ID for level " + str(levelIDX) + " is " + currentLevel[1])
time.sleep(4)
complete = input("Type the 'Attempts' number on the end screen when level has been completed. Press enter to skip. You have " + str(skips) + " skips left. ")
if complete == "" and skips >= 1:
skips -= 1
else:
lives -= int(complete) - 1
if lives <= 0:
print("█▀█ █ █ ▀█▀ █▀█ █▀▀ █ ▀█▀ █ █ █▀▀ █▀▀")
print("█▄█ █▄█ █ █▄█ █▀ █▄▄ ▄█▄ ▀▄▀ ██▄ ▄██")
time.sleep(2.5)
sys.exit()
print("You have " + str(lives) + " lives and " + str(skips) + " skips left.")
levelIDX += 1
time.sleep(1)
print("Loading next level.")
time.sleep(1)
print("Loading next level..")
time.sleep(1)
print("Loading next level...")
time.sleep(1)