-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhypixel_stat_tracker.pyw
206 lines (134 loc) · 6.87 KB
/
hypixel_stat_tracker.pyw
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
from tkinter import *
import webbrowser
import os
from tkinter import messagebox
currentlocation = os.path.dirname(os.path.abspath(__file__))
root = Tk()
root.title("Hypixel Stat Checker")
root.resizable(False, False)
root.overrideredirect(True)
root.geometry("500x325")
root.attributes("-topmost",1)
def rgb_hack(rgb):
return "#%02x%02x%02x" % rgb
root.config(bg=rgb_hack((41, 41, 41)))
def fortnite():
os.system(f'C:/Python38/python.exe "{currentlocation}/fortnite_stat_tracker.pyw"')
def valorant():
os.system(f'C:/Python38/python.exe "{currentlocation}/val_stat_tracker.pyw"')
def hypixelsb():
os.system(f'C:/Python38/python.exe "{currentlocation}/hypixel_sb_stat_tracker.pyw"')
def searchbtn():
global namebox
name = namebox.get(1.0, "end-1c")
if len(name) >= 4:
link = f"https://plancke.io/hypixel/player/stats/{name}"
openStats(link)
else:
messagebox.showinfo("ERROR", "Not Enough Info Provided")
def showcredits():
creditwindow = Tk()
creditwindow.title("Credits")
window_height = 400
window_width = 425
screen_width = creditwindow.winfo_screenwidth()
screen_height = creditwindow.winfo_screenheight()
x_cordinate = int((screen_width/2) - (window_width/2))
y_cordinate = int((screen_height/2) - (window_height/2))
creditwindow.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
burndowntheworld = Label(creditwindow, text="Burndowntheworld", fg="white", bg="black")
discord = Label(creditwindow, text="burndowntheworld#6969", fg="white", bg="black")
email = Label(creditwindow, text="burndowntheworld1@gmail.com", fg="white", bg="black")
copyrightwarning = Label(creditwindow, text="Current form of our 'valorant stat tracker' app is subject to change due to copyright strikes.", font=("helvetica",7), fg="white", bg="black")
trackerggcredit = Label(creditwindow, text="All Statistics' data pulled from tracker.gg.", font=("helvetica",7), fg="white", bg="black")
notpartneredwithtrackergg = Label(creditwindow, text="We are not affiliated, or partnered with 'Tracker Network'. We do not work for/with 'Tracker Network'.", font=("helvetica",7), fg="white", bg="black")
burndowntheworld.pack(pady=(100,0))
discord.pack()
email.pack()
trackerggcredit.pack(anchor="sw", pady=(155,0))
notpartneredwithtrackergg.pack(anchor="sw")
copyrightwarning.pack(anchor="sw")
creditwindow.resizable(False, False)
creditwindow.overrideredirect(1)
creditwindow.attributes("-topmost", "1")
creditwindow.configure(bg='black')
creditsclosebutton = Button(creditwindow, text="X", height=1, width=1, bg="black", fg="white", command=lambda: creditwindow.destroy())
creditsclosebutton.place(y=5, x=400)
def openStats(link):
webbrowser.open_new(link)
def duosplit(string):
words = string.split()
grouped_words = [' '.join(words[i: i + 2]) for i in range(0, len(words), 2)]
return grouped_words
def nothing():
pass
def move(e):
root.geometry(f"+{e.x_root}+{e.y_root}")
def openotherappsmenu():
otherapps.pack_forget()
othermenu.pack_forget()
global fortnitel, hypixell, hypixelsbl, otherappsbackl
fortnitel = Label(menubar, text="Fortnite", bg="MediumOrchid4", fg="white")
fortnitel.pack(side=LEFT, padx=20)
fortnitel.bind('<Button-1>',lambda f: fortnite())
hypixell = Label(menubar, text="Hypixel", bg="MediumOrchid4", fg="white")
hypixell.pack(side=LEFT, padx=(0,20))
hypixell.bind('<Button-1>', lambda h: hypixel())
hypixelsbl = Label(menubar, text="Hypixel SB", bg="MediumOrchid4", fg="white")
hypixelsbl.pack(side=LEFT, padx=(0,20))
hypixelsbl.bind('<Button-1>', lambda hsb: hypixelsb())
otherappsbackl = Label(menubar, text="Back", bg="MediumOrchid4", fg="white")
otherappsbackl.pack(side=LEFT, padx=(0,20))
otherappsbackl.bind('<Button-1>', lambda b: otherappsmenuback())
def otherappsmenuback():
fortnitel.pack_forget()
hypixell.pack_forget()
hypixelsbl.pack_forget()
otherappsbackl.pack_forget()
defaultmenu()
def openothermenumenu():
otherapps.pack_forget()
othermenu.pack_forget()
global creditsl, othermenubackl
creditsl = Label(menubar, text="Credits", bg="MediumOrchid4", fg="white")
creditsl.pack(side=LEFT, padx=20)
creditsl.bind('<Button-1>',lambda c: showcredits())
othermenubackl = Label(menubar, text="Back", bg="MediumOrchid4", fg="white")
othermenubackl.pack(side=LEFT, padx=(0,20))
othermenubackl.bind('<Button-1>',lambda b: othermenuback())
def othermenuback():
creditsl.pack_forget()
othermenubackl.pack_forget()
defaultmenu()
def defaultmenu():
global otherapps, valorantextras, othermenu
otherapps = Label(menubar, text="Other Stat Trackers", bg="MediumOrchid4", fg="white")
otherapps.pack(side=LEFT, padx=20)
otherapps.bind('<Button-1>',lambda s: openotherappsmenu())
othermenu = Label(menubar, text="Other", bg="MediumOrchid4", fg="white")
othermenu.pack(side=LEFT, padx=(0,20))
othermenu.bind('<Button-1>', lambda o: openothermenumenu())
namebox = Text(root, height=2, width=25, bg=rgb_hack((100, 100, 100)), fg="white")
namebox.place(y=100,x=150)
nameboxtitle = Label(root, text="Name", font=("helvetica",10), bg=rgb_hack((41, 41, 41)), fg="white")
nameboxtitle.place(y=70,x=225)
searchforplayerbutton = Button(root, text="Search For Player Stats", height=1, width=25, bg=rgb_hack((100, 100, 100)), fg="white", command=lambda: searchbtn())
searchforplayerbutton.place(y=200,x=160)
title_bar = Frame(root, bg=rgb_hack((80, 80, 80)), relief="raised", bd=0)
title_bar.pack(expand=1, fill=X, anchor="nw")
title_bar.bind('<B1-Motion>', move)
title_bar_title = Label(title_bar, text="Hypixel Stat Tracker", bg=rgb_hack((80,80,80)),bd=0,fg='white',font=("helvetica", 10),highlightthickness=0)
title_bar_title.pack(side=LEFT, pady=6, padx=(10,0))
close_button = Button(title_bar, text=' × ', command=root.destroy,bg=rgb_hack((80, 80, 80)),padx=2,pady=2,font=("calibri", 13),bd=0,fg='white',highlightthickness=0)
close_button.pack(side=RIGHT)
menubar = Frame(root, bg="Orchid4", borderwidth=2, relief="ridge", highlightcolor="purple2")
menubar.pack(expand=1, fill=X, anchor="s")
menubartitle = Label(menubar, text=" MENU ", bg="Orchid4", fg="white")
menubartitle.pack(side=LEFT, pady=(15,15))
otherapps = Label(menubar, text="Other Stat Trackers", bg="MediumOrchid4", fg="white")
otherapps.pack(side=LEFT, padx=20)
otherapps.bind('<Button-1>',lambda s: openotherappsmenu())
othermenu = Label(menubar, text="Other", bg="MediumOrchid4", fg="white")
othermenu.pack(side=LEFT, padx=(0,20))
othermenu.bind('<Button-1>', lambda o: openothermenumenu())
root.mainloop()