Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
Add raids KP
  • Loading branch information
ajmandourah authored Oct 20, 2020
1 parent 48ec521 commit f70cc9e
Showing 1 changed file with 117 additions and 22 deletions.
139 changes: 117 additions & 22 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,36 @@
import pygetwindow
import time

base64.b64encode(bytes.fromhex("0264f62d0100")).decode()
#defining various killing proof
#w1
vale = "892f0100"
gorseval = "b72f0100"
sabetha = "a02f0100"
#w2
sloth = "8a2f0100"
matthias = "6f2f0100"
#w3
kc = "36340100"
xera = "5e340100"
#w4
carin = "ef3a0100"
Murssat = "8d390100"
samarog = "d7380100"
demios = "9e3a0100"
#w5
desmina = "e94f0100"
statue = "284f0100"
dhuum = "814e0100"
#w6
ca = "df590100"
twin = "1c5b0100"
qadim = "455a0100"
#w7
sabir = "86640100"
adina = "6e640100"
qadim2 = "27640100"

li = "f62d0100"

def paste():
keyboard.press_and_release('enter')
Expand All @@ -14,37 +43,107 @@ def paste():
keyboard.release('ctrl+v')
keyboard.press_and_release('enter')

def getCode(n,kp):
li_hexed = "02"+str(n)+kp
chat_code = base64.b64encode(bytes.fromhex(li_hexed)).decode()
chat_code = pyperclip.copy("[&"+str(chat_code)+"]")

sg.theme('Reddit')
layout = [
[sg.Text('Please enter the wanted legendary insight amount!')],
[sg.Text('Amount', size =(10, 1)), sg.InputText()],
[sg.Button('Generate', key='-gen-')]
[sg.Text('Choose he KP\LI you want to ping!'),
sg.Combo([
"Legendary Insight",
"W1 Vale Gurdian",
"W1 Gorseval",
"W1 Sabetha",
"W2 Sloth",
"W2 Matthaias",
"W3 KC",
"W3 Xera",
"W4 Carin",
"W4 Murssat",
"W4 Samarog",
"W4 Demios",
"W5 Desmina",
"W5 Statue",
"W5 Dhuum",
"W6 CA",
"W6 Twin",
"W6 Qadim",
"W7 Sabir",
"W7 Adina",
"W7 Quadim"
],default_value="Legendary Insight")],
[sg.Text('Amount', size =(10, 1)), sg.InputText(default_text=1)],
[sg.Button('Generate', key='-gen-'), sg.Text('how many pings', size =(15, 1)), sg.InputText(default_text=1)]
]

if __name__ == '__main__':

window = sg.Window('GW2 LI generator by Ladis', layout=layout, size=(400,100), keep_on_top = True, finalize=True)
window = sg.Window('GW2proof by Ladis', layout=layout, size=(400,100), keep_on_top = True, finalize=True)
while True:
event, values = window.read(timeout=1)
if event == None:
break
if event == '-gen-':
try:
amount = int(values[0])
amount = int(values[1])
ping = int(values[2])
except:
sg.popup("please enter a number between 1 - 250!", keep_on_top= True)
continue
if amount > 250:
sg.popup("please enter a number between 1 - 250!", keep_on_top= True)
if amount > 250 or amount < 1 or ping > 5 or ping < 1:
sg.popup("please enter a number between 1 - 250! \n Also thr ping amount should not exceed 5 !", keep_on_top= True)
continue
if amount <16:
hexed_amount = "0" + str(hex(amount).lstrip("0x").rstrip("L"))
hexed = "0" + str(hex(amount).lstrip("0x").rstrip("L"))
else:
hexed_amount = hex(amount).lstrip("0x").rstrip("L")
hexed = hex(amount).lstrip("0x").rstrip("L")

li_hexed = "02"+str(hexed_amount)+"f62d0100"
chat_code = base64.b64encode(bytes.fromhex(li_hexed)).decode()
chat_code = pyperclip.copy("[&"+str(chat_code)+"]")
toPing = values[0]
if toPing == "Legendary Insight":
getCode(hexed, li)
if toPing == "W1 Vale Gurdian":
getCode(hexed, vale)
if toPing == "W1 Gorseval":
getCode(hexed, gorseval)
if toPing == "W1 Sabetha":
getCode(hexed, sabetha)
if toPing == "W2 Sloth":
getCode(hexed, sloth)
if toPing == "W2 Matthaias":
getCode(hexed, matthias)
if toPing == "W3 KC":
getCode(hexed, kc)
if toPing == "W3 Xera":
getCode(hexed, xera)
if toPing == "W4 Carin":
getCode(hexed, carin)
if toPing == "W4 Murssat":
getCode(hexed, Murssat)
if toPing == "W4 Samarog":
getCode(hexed, samarog)
if toPing == "W4 Demios":
getCode(hexed, demios)
if toPing == "W5 Desmina":
getCode(hexed, desmina)
if toPing == "W5 Statue":
getCode(hexed, statue)
if toPing == "W5 Dhuum":
getCode(hexed, dhuum)
if toPing == "W6 CA":
getCode(hexed, ca)
if toPing == "W6 Twin":
getCode(hexed, twin)
if toPing == "W6 Qadim":
getCode(hexed, qadim)
if toPing == "W7 Sabir":
getCode(hexed, sabir)
if toPing == "W7 Adina":
getCode(hexed, adina)
if toPing == "W7 Quadim":
getCode(hexed, qadim2)

try:
gw2 = pygetwindow.getWindowsWithTitle("Guild Wars 2")[0]
except:
Expand All @@ -53,14 +152,10 @@ def paste():
gw2.activate()
time.sleep(0.5)
keyboard.press_and_release('esc')
paste()
paste()
paste()
paste()
paste()

# keyboard.press('enter')
# keyboard.release('enter')
for _ in range(ping):
paste()






0 comments on commit f70cc9e

Please sign in to comment.