brunogge 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- brunogge-0.1.4/PKG-INFO +11 -0
- brunogge-0.1.4/README.md +2 -0
- brunogge-0.1.4/brunogge/__init__.py +5 -0
- brunogge-0.1.4/brunogge/barony.py +213 -0
- brunogge-0.1.4/brunogge/get_ws.py +18 -0
- brunogge-0.1.4/brunogge/getconfig.py +220 -0
- brunogge-0.1.4/brunogge/ggs_stuff.py +100 -0
- brunogge-0.1.4/brunogge/just_funcs.py +56 -0
- brunogge-0.1.4/brunogge/server_list.json +157 -0
- brunogge-0.1.4/brunogge.egg-info/PKG-INFO +11 -0
- brunogge-0.1.4/brunogge.egg-info/SOURCES.txt +13 -0
- brunogge-0.1.4/brunogge.egg-info/dependency_links.txt +1 -0
- brunogge-0.1.4/brunogge.egg-info/top_level.txt +1 -0
- brunogge-0.1.4/pyproject.toml +22 -0
- brunogge-0.1.4/setup.cfg +4 -0
brunogge-0.1.4/PKG-INFO
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: brunogge
|
3
|
+
Version: 0.1.4
|
4
|
+
Summary: Bilbioteka Python dla Goodgame Empire.
|
5
|
+
Author-email: WojtS & ThunderStorm <wojts8@proton.me>
|
6
|
+
Project-URL: Homepage, https://github.com/wojtsik/brunogge
|
7
|
+
Requires-Python: >=3.12
|
8
|
+
Description-Content-Type: text/markdown
|
9
|
+
|
10
|
+
# brunogge
|
11
|
+
Biblioteka Pythona dla GoodGame Empire
|
brunogge-0.1.4/README.md
ADDED
@@ -0,0 +1,213 @@
|
|
1
|
+
### OUTDATED DONT USE ->>import asyncio, json, websockets, math, random, time, os, sys, re
|
2
|
+
### OUTDATED DONT USE ->>from datetime import datetime
|
3
|
+
### OUTDATED DONT USE ->>message_queue = []
|
4
|
+
### OUTDATED DONT USE ->>time_list = []
|
5
|
+
### OUTDATED DONT USE ->>async def generatescans(kid, distance, sx, sy, servers, rect_width=13, rect_height=13):
|
6
|
+
### OUTDATED DONT USE ->>
|
7
|
+
### OUTDATED DONT USE ->> min_x = (sx-distance)
|
8
|
+
### OUTDATED DONT USE ->> max_x = (sx+distance)
|
9
|
+
### OUTDATED DONT USE ->> min_y = (sy-distance)
|
10
|
+
### OUTDATED DONT USE ->> max_y = (sy+distance)
|
11
|
+
### OUTDATED DONT USE ->>
|
12
|
+
### OUTDATED DONT USE ->> messages = []
|
13
|
+
### OUTDATED DONT USE ->>
|
14
|
+
### OUTDATED DONT USE ->> y = min_y
|
15
|
+
### OUTDATED DONT USE ->> while y < max_y:
|
16
|
+
### OUTDATED DONT USE ->> x = min_x
|
17
|
+
### OUTDATED DONT USE ->> while x < max_x:
|
18
|
+
### OUTDATED DONT USE ->> ax1, ay1 = x, y
|
19
|
+
### OUTDATED DONT USE ->> ax2 = min(x + rect_width - 1, max_x - 1)
|
20
|
+
### OUTDATED DONT USE ->> ay2 = min(y + rect_height - 1, max_y - 1)
|
21
|
+
### OUTDATED DONT USE ->> messages.append(f"%xt%{servers}%gaa%1%{{\"KID\":{kid},\"AX1\":{ax1},\"AY1\":{ay1},\"AX2\":{ax2},\"AY2\":{ay2}}}%")
|
22
|
+
### OUTDATED DONT USE ->> x = ax2 + 1
|
23
|
+
### OUTDATED DONT USE ->> y = ay2 + 1
|
24
|
+
### OUTDATED DONT USE ->>
|
25
|
+
### OUTDATED DONT USE ->> return messages
|
26
|
+
### OUTDATED DONT USE ->>
|
27
|
+
### OUTDATED DONT USE ->>def coma_to_list(value):
|
28
|
+
### OUTDATED DONT USE ->> return [int(item.strip()) for item in value.split(",") if item.strip()]
|
29
|
+
### OUTDATED DONT USE ->>
|
30
|
+
### OUTDATED DONT USE ->>async def listening(ws, kid, radius_option, sx, sy, distance):
|
31
|
+
### OUTDATED DONT USE ->> targets = []
|
32
|
+
### OUTDATED DONT USE ->> while ws.open:
|
33
|
+
### OUTDATED DONT USE ->> try:
|
34
|
+
### OUTDATED DONT USE ->> response = await asyncio.wait_for(ws.recv(), timeout=3)
|
35
|
+
### OUTDATED DONT USE ->> response = response.decode('utf-8')
|
36
|
+
### OUTDATED DONT USE ->>
|
37
|
+
### OUTDATED DONT USE ->> if "%xt%gaa%1%0%" in response:
|
38
|
+
### OUTDATED DONT USE ->> response = response.replace('%xt%gaa%1%0%', '').rstrip('%').strip()
|
39
|
+
### OUTDATED DONT USE ->> response = json.loads(response)
|
40
|
+
### OUTDATED DONT USE ->> objects = response["AI"]
|
41
|
+
### OUTDATED DONT USE ->>
|
42
|
+
### OUTDATED DONT USE ->> for object in objects:
|
43
|
+
### OUTDATED DONT USE ->> if len(object) == 7:
|
44
|
+
### OUTDATED DONT USE ->> if object[0] == 2 and object[5] < 0 and object[6] == int(kid):
|
45
|
+
### OUTDATED DONT USE ->> tx = object[1]
|
46
|
+
### OUTDATED DONT USE ->> ty = object[2]
|
47
|
+
### OUTDATED DONT USE ->> radius = round(math.sqrt((sx - tx)*(sx - tx) + (sy - ty)*(sy - ty)), 2)
|
48
|
+
### OUTDATED DONT USE ->> target = [tx, ty, radius]
|
49
|
+
### OUTDATED DONT USE ->>
|
50
|
+
### OUTDATED DONT USE ->> if target not in targets and (radius <= int(distance) or radius_option == "s"):
|
51
|
+
### OUTDATED DONT USE ->> targets.append(target)
|
52
|
+
### OUTDATED DONT USE ->> except asyncio.TimeoutError:
|
53
|
+
### OUTDATED DONT USE ->> targets.sort(key=lambda x: x[2])
|
54
|
+
### OUTDATED DONT USE ->> return targets
|
55
|
+
### OUTDATED DONT USE ->> print("Connection closed or error occurred.")
|
56
|
+
### OUTDATED DONT USE ->>
|
57
|
+
### OUTDATED DONT USE ->>async def inspecting(ws, leaders):
|
58
|
+
### OUTDATED DONT USE ->> try:
|
59
|
+
### OUTDATED DONT USE ->> global total_time
|
60
|
+
### OUTDATED DONT USE ->> while ws.open:
|
61
|
+
### OUTDATED DONT USE ->> response = (await asyncio.wait_for(ws.recv(), timeout=300)).decode('utf-8')
|
62
|
+
### OUTDATED DONT USE ->>
|
63
|
+
### OUTDATED DONT USE ->> if '%xt%cra%1%' in response:
|
64
|
+
### OUTDATED DONT USE ->> if '%xt%cra%1%0%' not in response:
|
65
|
+
### OUTDATED DONT USE ->> print("!ERROR! Attack not sent!")
|
66
|
+
### OUTDATED DONT USE ->> else:
|
67
|
+
### OUTDATED DONT USE ->> response = response.replace('%xt%cra%1%0%', '').rstrip('%').strip()
|
68
|
+
### OUTDATED DONT USE ->> response = json.loads(response)
|
69
|
+
### OUTDATED DONT USE ->> total_time = response["AAM"]["M"]["TT"]
|
70
|
+
### OUTDATED DONT USE ->> leader_id = response["AAM"]["UM"]["L"]["ID"]
|
71
|
+
### OUTDATED DONT USE ->> now = int(datetime.now().timestamp())
|
72
|
+
### OUTDATED DONT USE ->>
|
73
|
+
### OUTDATED DONT USE ->> time_list[leaders.index(leader_id)] = now + total_time
|
74
|
+
### OUTDATED DONT USE ->> elif '%xt%cat%1%0%' in response:
|
75
|
+
### OUTDATED DONT USE ->> print("We hit the tower!")
|
76
|
+
### OUTDATED DONT USE ->> response = response.replace('%xt%cat%1%0%', '').rstrip('%').strip()
|
77
|
+
### OUTDATED DONT USE ->> response = json.loads(response)
|
78
|
+
### OUTDATED DONT USE ->> total_time = response["A"]["M"]["TT"]
|
79
|
+
### OUTDATED DONT USE ->> leader_id = response["A"]["UM"]["L"]["ID"]
|
80
|
+
### OUTDATED DONT USE ->> time_list[leaders.index(leader_id)] += total_time
|
81
|
+
### OUTDATED DONT USE ->> except websockets.ConnectionClosedError as e:
|
82
|
+
### OUTDATED DONT USE ->> print("inspecting: Connection closed.")
|
83
|
+
### OUTDATED DONT USE ->> raise e
|
84
|
+
### OUTDATED DONT USE ->>
|
85
|
+
### OUTDATED DONT USE ->>async def scanning(ws, messages):
|
86
|
+
### OUTDATED DONT USE ->> while True:
|
87
|
+
### OUTDATED DONT USE ->> for line in messages:
|
88
|
+
### OUTDATED DONT USE ->> await ws.send(line)
|
89
|
+
### OUTDATED DONT USE ->> await asyncio.sleep(0.04)
|
90
|
+
### OUTDATED DONT USE ->> break
|
91
|
+
### OUTDATED DONT USE ->>
|
92
|
+
### OUTDATED DONT USE ->>async def attacking(ws, sx, sy, leaders, kid, vip_option, targets, max_flank, max_front, unit_id, flank_id, flank_tool_ammount, front_id_1, front_tool_ammount1, front_tool_ammount2, front_id_2, servers):
|
93
|
+
### OUTDATED DONT USE ->> global message_queue
|
94
|
+
### OUTDATED DONT USE ->> i = 0
|
95
|
+
### OUTDATED DONT USE ->> print("Starting to attack.\n")
|
96
|
+
### OUTDATED DONT USE ->> if vip_option == "n":
|
97
|
+
### OUTDATED DONT USE ->> for line in targets:
|
98
|
+
### OUTDATED DONT USE ->> tx = line[0]
|
99
|
+
### OUTDATED DONT USE ->> ty = line[1]
|
100
|
+
### OUTDATED DONT USE ->> bpc = 0
|
101
|
+
### OUTDATED DONT USE ->> lid = leaders[i % len(leaders)]
|
102
|
+
### OUTDATED DONT USE ->>
|
103
|
+
### OUTDATED DONT USE ->> if max_flank == 0:
|
104
|
+
### OUTDATED DONT USE ->> flank_unit_id = -1
|
105
|
+
### OUTDATED DONT USE ->> else:
|
106
|
+
### OUTDATED DONT USE ->> flank_unit_id = unit_id
|
107
|
+
### OUTDATED DONT USE ->>
|
108
|
+
### OUTDATED DONT USE ->> if max_front == 0:
|
109
|
+
### OUTDATED DONT USE ->> front_unit_id = -1
|
110
|
+
### OUTDATED DONT USE ->> else:
|
111
|
+
### OUTDATED DONT USE ->> front_unit_id = unit_id
|
112
|
+
### OUTDATED DONT USE ->>
|
113
|
+
### OUTDATED DONT USE ->> while True:
|
114
|
+
### OUTDATED DONT USE ->> now = int(datetime.now().timestamp())
|
115
|
+
### OUTDATED DONT USE ->> if now > time_list[i % len(leaders)] + 3:
|
116
|
+
### OUTDATED DONT USE ->> break
|
117
|
+
### OUTDATED DONT USE ->> else:
|
118
|
+
### OUTDATED DONT USE ->> await asyncio.sleep(1)
|
119
|
+
### OUTDATED DONT USE ->>
|
120
|
+
### OUTDATED DONT USE ->>
|
121
|
+
### OUTDATED DONT USE ->> # Instead of sending directly, add the message to the queue
|
122
|
+
### OUTDATED DONT USE ->> message_queue.append(f"""%xt%{servers}%adi%1%{{"SX":{sx},"SY":{sy},"TX":{tx},"TY":{ty},"KID":{kid}}}%""")
|
123
|
+
### OUTDATED DONT USE ->> if i == 0:
|
124
|
+
### OUTDATED DONT USE ->> message_queue.append(f"""%xt%{servers}%gas%1%{{}}%""")
|
125
|
+
### OUTDATED DONT USE ->>
|
126
|
+
### OUTDATED DONT USE ->> message_queue.append(f"""%xt%{servers}%cra%1%{{"SX":{sx},"SY":{sy},"TX":{tx},"TY":{ty},"KID":{kid},"LID":{lid},"WT":0,"HBW":-1,"BPC":{bpc},"ATT":0,"AV":0,"LP":0,"FC":0,"PTT":1,"SD":0,"ICA":0,"CD":99,"A":[{{"L":{{"T":[[{flank_id},{flank_tool_ammount}],[-1,0]],"U":[[{flank_unit_id},{max_flank}],[-1,0]]}},"R":{{"T":[[{flank_id},{flank_tool_ammount}],[-1,0]],"U":[[{flank_unit_id},{max_flank}],[-1,0]]}},"M":{{"T":[[{front_id_1},{front_tool_ammount1}],[{front_id_2},{front_tool_ammount2}],[-1,0]],"U":[[{front_unit_id},{max_front}],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]]}}}}],"BKS":[],"AST":[-1,-1,-1],"RW":[[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]],"ASCT":0}}%""")
|
127
|
+
### OUTDATED DONT USE ->> if i % 10 == 0:
|
128
|
+
### OUTDATED DONT USE ->> print(f"Queued attack number {i+1}")
|
129
|
+
### OUTDATED DONT USE ->>
|
130
|
+
### OUTDATED DONT USE ->> i += 1
|
131
|
+
### OUTDATED DONT USE ->> print(f"Queued {i} attacks.")
|
132
|
+
### OUTDATED DONT USE ->> elif vip_option == "y":
|
133
|
+
### OUTDATED DONT USE ->> # Similar logic for the VIP option
|
134
|
+
### OUTDATED DONT USE ->> for line in targets:
|
135
|
+
### OUTDATED DONT USE ->> tx = line[0]
|
136
|
+
### OUTDATED DONT USE ->> ty = line[1]
|
137
|
+
### OUTDATED DONT USE ->>
|
138
|
+
### OUTDATED DONT USE ->> if i < len(leaders):
|
139
|
+
### OUTDATED DONT USE ->> bpc = 0
|
140
|
+
### OUTDATED DONT USE ->> lid = leaders[i]
|
141
|
+
### OUTDATED DONT USE ->> else:
|
142
|
+
### OUTDATED DONT USE ->> bpc = 1
|
143
|
+
### OUTDATED DONT USE ->> lid = "-14"
|
144
|
+
### OUTDATED DONT USE ->>
|
145
|
+
### OUTDATED DONT USE ->> message_queue.append(f"""%xt%{servers}%adi%1%{{"SX":{sx},"SY":{sy},"TX":{tx},"TY":{ty},"KID":{kid}}}%""")
|
146
|
+
### OUTDATED DONT USE ->> if i == 0:
|
147
|
+
### OUTDATED DONT USE ->> message_queue.append(f"""%xt%{servers}%gas%1%{{}}%""")
|
148
|
+
### OUTDATED DONT USE ->>
|
149
|
+
### OUTDATED DONT USE ->> message_queue.append(f"""%xt%{servers}%cra%1%{{"SX":{sx},"SY":{sy},"TX":{tx},"TY":{ty},"KID":{kid},"LID":{lid},"WT":0,"HBW":-1,"BPC":{bpc},"ATT":0,"AV":0,"LP":0,"FC":0,"PTT":1,"SD":0,"ICA":0,"CD":99,"A":[{{"L":{{"T":[[{flank_id},{flank_tool_ammount}],[-1,0]],"U":[[{flank_unit_id},{max_flank}],[-1,0]]}},"R":{{"T":[[{flank_id},{flank_tool_ammount}],[-1,0]],"U":[[{flank_unit_id},{max_flank}],[-1,0]]}},"M":{{"T":[[{front_id_1},{front_tool_ammount1}],[{front_id_2},{front_tool_ammount2}],[-1,0]],"U":[[{front_unit_id},{max_front}],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]]}}}}],"BKS":[],"AST":[-1,-1,-1],"RW":[[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]],"ASCT":0}}%""")
|
150
|
+
### OUTDATED DONT USE ->>
|
151
|
+
### OUTDATED DONT USE ->> print(f"Queued attack number {i+1}")
|
152
|
+
### OUTDATED DONT USE ->> i += 1
|
153
|
+
### OUTDATED DONT USE ->>
|
154
|
+
### OUTDATED DONT USE ->>async def process_queue(ws):
|
155
|
+
### OUTDATED DONT USE ->> try:
|
156
|
+
### OUTDATED DONT USE ->> if ws.open:
|
157
|
+
### OUTDATED DONT USE ->> print("Processing message queue...")
|
158
|
+
### OUTDATED DONT USE ->> global message_queue
|
159
|
+
### OUTDATED DONT USE ->> while message_queue:
|
160
|
+
### OUTDATED DONT USE ->> message = message_queue.pop(0) # Get the first message in the queue
|
161
|
+
### OUTDATED DONT USE ->> await ws.send(message)
|
162
|
+
### OUTDATED DONT USE ->> await asyncio.sleep(random.uniform(2.01,2.5)) # Random delay between messages
|
163
|
+
### OUTDATED DONT USE ->> if len(message_queue) == 0:
|
164
|
+
### OUTDATED DONT USE ->> print("Done.")
|
165
|
+
### OUTDATED DONT USE ->> exit()
|
166
|
+
### OUTDATED DONT USE ->> except websockets.ConnectionClosedError:
|
167
|
+
### OUTDATED DONT USE ->> print("process_queue: Connection closed.")
|
168
|
+
### OUTDATED DONT USE ->>
|
169
|
+
### OUTDATED DONT USE ->>
|
170
|
+
### OUTDATED DONT USE ->>
|
171
|
+
### OUTDATED DONT USE ->>async def baronbot(ws, sx, sy, info, servers, leaders):
|
172
|
+
### OUTDATED DONT USE ->> print("Starting Baron bot...")
|
173
|
+
### OUTDATED DONT USE ->> kid = info["kid"]
|
174
|
+
### OUTDATED DONT USE ->> distance = info["distance"]
|
175
|
+
### OUTDATED DONT USE ->> excluded_commanders = info["excluded_commanders"]
|
176
|
+
### OUTDATED DONT USE ->> vip_option = info["vip_option"]
|
177
|
+
### OUTDATED DONT USE ->> radius_option = info["radius_option"]
|
178
|
+
### OUTDATED DONT USE ->> max_flank = info["max_flank"]
|
179
|
+
### OUTDATED DONT USE ->> max_front = info["max_front"]
|
180
|
+
### OUTDATED DONT USE ->> unit_id = info["unit_id"]
|
181
|
+
### OUTDATED DONT USE ->> flank_id = info["flank_id"]
|
182
|
+
### OUTDATED DONT USE ->> flank_tool_ammount = info["flank_tool_ammount"]
|
183
|
+
### OUTDATED DONT USE ->> front_id_1 = info["front_id_1"]
|
184
|
+
### OUTDATED DONT USE ->> front_id_2 = info["front_id_2"]
|
185
|
+
### OUTDATED DONT USE ->> front_tool_ammount1 = info["front_tool_ammount1"]
|
186
|
+
### OUTDATED DONT USE ->> front_tool_ammount2 = info["front_tool_ammount2"]
|
187
|
+
### OUTDATED DONT USE ->>
|
188
|
+
### OUTDATED DONT USE ->> messages = await generatescans(kid, distance, sx, sy, servers)
|
189
|
+
### OUTDATED DONT USE ->> if excluded_commanders != "-1":
|
190
|
+
### OUTDATED DONT USE ->> excluded_commanders = coma_to_list(excluded_commanders)
|
191
|
+
### OUTDATED DONT USE ->> leaders = [lids for i, lids in enumerate(leaders, start=1) if i not in excluded_commanders]
|
192
|
+
### OUTDATED DONT USE ->> global time_list
|
193
|
+
### OUTDATED DONT USE ->> for leader in leaders:
|
194
|
+
### OUTDATED DONT USE ->> time_list.append(0)
|
195
|
+
### OUTDATED DONT USE ->> czas = random.uniform(1,2)
|
196
|
+
### OUTDATED DONT USE ->> lister = asyncio.create_task(listening(ws, kid, radius_option, sx, sy, distance))
|
197
|
+
### OUTDATED DONT USE ->> await scanning(ws, messages)
|
198
|
+
### OUTDATED DONT USE ->> targets = await lister
|
199
|
+
### OUTDATED DONT USE ->> print(f"Barons to attack: {len(targets)}")
|
200
|
+
### OUTDATED DONT USE ->> czas = random.uniform(3,6)
|
201
|
+
### OUTDATED DONT USE ->> await asyncio.sleep(czas)
|
202
|
+
### OUTDATED DONT USE ->> inspection = asyncio.create_task(inspecting(ws, leaders))
|
203
|
+
### OUTDATED DONT USE ->> await attacking(ws, sx, sy, leaders, kid, vip_option, targets, max_flank, max_front, unit_id, flank_id, flank_tool_ammount, front_id_1, front_tool_ammount1, front_tool_ammount2, front_id_2, servers)
|
204
|
+
### OUTDATED DONT USE ->> processattacks = asyncio.create_task(process_queue(ws))
|
205
|
+
### OUTDATED DONT USE ->>
|
206
|
+
### OUTDATED DONT USE ->>async def baronbot_restarted(ws):
|
207
|
+
### OUTDATED DONT USE ->> if ws.open:
|
208
|
+
### OUTDATED DONT USE ->> try:
|
209
|
+
### OUTDATED DONT USE ->> print(f"Baron bot resumed, left to attack {len(message_queue) // 2} barons.")
|
210
|
+
### OUTDATED DONT USE ->> await process_queue(ws)
|
211
|
+
### OUTDATED DONT USE ->> except websockets.ConnectionClosedError as e:
|
212
|
+
### OUTDATED DONT USE ->> print("You should never see this, if you do please contact the Authors of the script.")
|
213
|
+
### OUTDATED DONT USE ->> raise e
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import asyncio, websockets
|
2
|
+
from .just_funcs import getserver
|
3
|
+
relogin_error_code = 184
|
4
|
+
async def ggs_ws(server: str) -> websockets.WebSocketClientProtocol:
|
5
|
+
"""
|
6
|
+
Connect to the GGS websocket server and return the websocket object.
|
7
|
+
"""
|
8
|
+
server = getserver(server, "ws")
|
9
|
+
try:
|
10
|
+
ws = await websockets.connect(server, ping_interval=None) ###GGS chce swoje
|
11
|
+
print(f"Connected to {server}")
|
12
|
+
return ws
|
13
|
+
except websockets.exceptions.ClientClosedError as e:
|
14
|
+
print(f"Unexpected error, maybe someone else logged in? {e}")
|
15
|
+
return relogin_error_code
|
16
|
+
except Exception as e:
|
17
|
+
print(f"Error connecting to {server}: {e}")
|
18
|
+
return None
|
@@ -0,0 +1,220 @@
|
|
1
|
+
from configparser import ConfigParser
|
2
|
+
import json, os
|
3
|
+
def getconfig(type:str ,savename:str ,created:str = "y"):
|
4
|
+
if created == "y":
|
5
|
+
config = ConfigParser()
|
6
|
+
# Use the user’s home directory and create the config file path
|
7
|
+
home_directory = os.path.expanduser("~")
|
8
|
+
configname = os.path.join(home_directory, type + "config.ini")
|
9
|
+
config.read(configname)
|
10
|
+
if savename not in config:
|
11
|
+
raise ValueError(f"Config '{savename}' not found.")
|
12
|
+
|
13
|
+
|
14
|
+
if savename in config:
|
15
|
+
if type == "baron":
|
16
|
+
kid = config.get(savename, "kid")
|
17
|
+
excluded_commanders = config.get(savename, "excluded_commanders")
|
18
|
+
radius_option = config.get(savename, "radius_option")
|
19
|
+
distance = config.getfloat(savename, "distance") # converted to float
|
20
|
+
vip_option = config.get(savename, "vip_option")
|
21
|
+
max_flank = config.getint(savename, "max_flank") # converted to int
|
22
|
+
max_front = config.getint(savename, "max_front") # converted to int
|
23
|
+
unit_id = config.get(savename, "unit_id")
|
24
|
+
flank_id = config.get(savename, "flank_id")
|
25
|
+
flank_tool_ammount = config.getint(savename, "flank_tool_ammount") # converted to int
|
26
|
+
front_id_1 = config.get(savename, "front_id_1")
|
27
|
+
front_tool_ammount1 = config.getint(savename, "front_tool_ammount1") # converted to int
|
28
|
+
front_id_2 = config.get(savename, "front_id_2")
|
29
|
+
front_tool_ammount2 = config.getint(savename, "front_tool_ammount2") # converted to int
|
30
|
+
if kid == "g":
|
31
|
+
kid = "0"
|
32
|
+
elif kid == "s":
|
33
|
+
kid = "1"
|
34
|
+
elif kid == "c":
|
35
|
+
kid = "2"
|
36
|
+
elif kid == "f":
|
37
|
+
kid = "3"
|
38
|
+
# Return as a dictionary
|
39
|
+
result = {
|
40
|
+
"kid": kid,
|
41
|
+
"excluded_commanders": excluded_commanders,
|
42
|
+
"radius_option": radius_option,
|
43
|
+
"distance": distance,
|
44
|
+
"vip_option": vip_option,
|
45
|
+
"max_flank": max_flank,
|
46
|
+
"max_front": max_front,
|
47
|
+
"unit_id": unit_id,
|
48
|
+
"flank_id": flank_id,
|
49
|
+
"flank_tool_ammount": flank_tool_ammount,
|
50
|
+
"front_id_1": front_id_1,
|
51
|
+
"front_tool_ammount1": front_tool_ammount1,
|
52
|
+
"front_id_2": front_id_2,
|
53
|
+
"front_tool_ammount2": front_tool_ammount2
|
54
|
+
}
|
55
|
+
|
56
|
+
# Convert to JSON string and return
|
57
|
+
return json.dumps(result, indent=4) # Return a formatted JSON string
|
58
|
+
if created == "n":
|
59
|
+
config_maker_barons(savename)
|
60
|
+
else:
|
61
|
+
print("Invalid str as the created parameter. Use 'y' or 'n' - y if you have created the config already, 'n' if no.")
|
62
|
+
exit()
|
63
|
+
|
64
|
+
|
65
|
+
def config_maker_barons(savename, filename = "baronconfig.ini"):
|
66
|
+
config = ConfigParser()
|
67
|
+
unit_options = {
|
68
|
+
"1": ("Distance Samurai", '35'),
|
69
|
+
"2": ("Distance Veteran Demon", '10'),
|
70
|
+
"3": ("Distance Mead lvl 10", '216'),
|
71
|
+
"4": ("Distance Mead lvl 2", '207'),
|
72
|
+
"5": ("Distance Mead lvl 1", '206'),
|
73
|
+
"6": ("Distance Mead lvl 0", '205'),
|
74
|
+
"7": ("Meelee Mead lvl 10", '215'),
|
75
|
+
"8": ("Meelee Mead lvl 3", '198'),
|
76
|
+
"9": ("Meelee Mead lvl 2", '197'),
|
77
|
+
"10": ("Meelee Mead lvl 1", '196'),
|
78
|
+
"11": ("Meelee Mead lvl 0", '195')
|
79
|
+
}
|
80
|
+
|
81
|
+
flank_tool_options = {
|
82
|
+
"1": ("20% towers", '649'),
|
83
|
+
"2": ("5% ladders", '614'),
|
84
|
+
"3": ("15% steel walls (anti distance)", '651'),
|
85
|
+
"4": ("5% wooden walls (anti distance)", '651'),
|
86
|
+
"5": ("-- None", '-1')
|
87
|
+
}
|
88
|
+
|
89
|
+
front_tool_options_1 = {
|
90
|
+
"1": ("20% towers", '649'),
|
91
|
+
"2": ("5% ladders", '614'),
|
92
|
+
"3": ("15% steel walls (anti distance)", '651'),
|
93
|
+
"4": ("5% wooden walls (anti distance)", '651'),
|
94
|
+
"5": ("-- None", '-1')
|
95
|
+
}
|
96
|
+
|
97
|
+
front_tool_options_2 = {
|
98
|
+
"1": ("20% ram", '648'),
|
99
|
+
"2": ("5% ram", '611'),
|
100
|
+
"3": ("-- None", '-1')
|
101
|
+
}
|
102
|
+
|
103
|
+
config.read(filename)
|
104
|
+
print(f'Saves: {config.sections()}')
|
105
|
+
save_name = savename
|
106
|
+
while True:
|
107
|
+
if not save_name:
|
108
|
+
print("...")
|
109
|
+
exit()
|
110
|
+
elif config.has_section(save_name):
|
111
|
+
if_overwrite = input("Save with this name already exists. Do you want to overwrite it?\n(y/n): ")
|
112
|
+
if if_overwrite == 'y':
|
113
|
+
config.remove_section(save_name)
|
114
|
+
else:
|
115
|
+
print("Exitting.")
|
116
|
+
exit()
|
117
|
+
else:
|
118
|
+
break
|
119
|
+
config.add_section(save_name)
|
120
|
+
|
121
|
+
def input_int_list(prompt):
|
122
|
+
while True:
|
123
|
+
raw = input(prompt).strip()
|
124
|
+
if raw:
|
125
|
+
try:
|
126
|
+
values = [int(item.strip()) for item in raw.split(",") if item.strip()]
|
127
|
+
return ",".join(str(val) for val in values)
|
128
|
+
except ValueError:
|
129
|
+
print("Please enter valid comma separated integers (e.g. 2,29,30,31).")
|
130
|
+
else:
|
131
|
+
print("Input cannot be empty.")
|
132
|
+
|
133
|
+
def input_int(prompt):
|
134
|
+
while True:
|
135
|
+
raw = input(prompt).strip()
|
136
|
+
if raw:
|
137
|
+
try:
|
138
|
+
return str(int(raw))
|
139
|
+
except ValueError:
|
140
|
+
print("Please enter a valid integer.")
|
141
|
+
else:
|
142
|
+
print("Input cannot be empty.")
|
143
|
+
|
144
|
+
|
145
|
+
kid = input("Kingdom Green = g, Kingdom Fire = f, Kingdom Sand = s, Kingdom Cold = c\nKingdom -> <-\b\b\b")
|
146
|
+
config.set(save_name, "kid", kid)
|
147
|
+
|
148
|
+
excluded_commanders = input_int_list("Enter excluded commanders (comma separated integers, e.g. 2,3,17. -1 if none): ")
|
149
|
+
config.set(save_name, "excluded_commanders", excluded_commanders)
|
150
|
+
|
151
|
+
radius_option = input("Attacking in a circle (radius) or a square (square)?\n(c/s) -> <-\b\b\b")
|
152
|
+
config.set(save_name, "radius_option", radius_option)
|
153
|
+
|
154
|
+
distance = input_int("Distance for attacks (not preicse): ")
|
155
|
+
config.set(save_name, "distance", distance)
|
156
|
+
|
157
|
+
vip_option = input("Do you want the bot to use VIP commanders? (if no, it will send all commanders, wait until they come back and do it until the end.)\n(y/n) -> <-\b\b\b")
|
158
|
+
if vip_option in ["y", "n"]:
|
159
|
+
config.set(save_name, "vip_option", vip_option)
|
160
|
+
else:
|
161
|
+
print("Not an answer. y for yes, n for no.")
|
162
|
+
exit()
|
163
|
+
|
164
|
+
print("The script will use 4 waves. Always. Each wave will have the same setup.")
|
165
|
+
max_flank = input_int("Enter ammount of units on a flank (0 if none) : ")
|
166
|
+
config.set(save_name, "max_flank", max_flank)
|
167
|
+
|
168
|
+
max_front = input_int("Enter ammount of units on the front (0 if none): ")
|
169
|
+
config.set(save_name, "max_front", max_front)
|
170
|
+
|
171
|
+
print("\nPick units to send in the attack\n")
|
172
|
+
for key, value in unit_options.items():
|
173
|
+
print(f"{key} - {value[0]}\n")
|
174
|
+
unit_choice = (input("Selection: "))
|
175
|
+
print(f'Selected option "{unit_options[unit_choice][0]}"')
|
176
|
+
config.set(save_name, "unit_id", str(unit_options[unit_choice][1]))
|
177
|
+
|
178
|
+
print("\nPick wich tool do you want to use on the flanks\n")
|
179
|
+
for key, value in flank_tool_options.items():
|
180
|
+
print(f"{key} - {value[0]}\n")
|
181
|
+
flank_choice = input("Selection: ")
|
182
|
+
print(f'Selected option "{flank_tool_options[flank_choice][0]}"')
|
183
|
+
config.set(save_name, "flank_id", str(flank_tool_options[flank_choice][1]))
|
184
|
+
|
185
|
+
if flank_tool_options[flank_choice][0] != "-- None":
|
186
|
+
flank_tool_ammount = input_int("Enter ammount of those tools per flank: ")
|
187
|
+
config.set(save_name, "flank_tool_ammount", flank_tool_ammount)
|
188
|
+
else:
|
189
|
+
config.set(save_name, "flank_tool_ammount", "0")
|
190
|
+
|
191
|
+
print("\nPick the first tool you want to use on the front\n")
|
192
|
+
for key, value in front_tool_options_1.items():
|
193
|
+
print(f"{key} - {value[0]}\n")
|
194
|
+
front_choice1 = input("Selection: ")
|
195
|
+
print(f'Selected option "{front_tool_options_1[front_choice1][0]}"')
|
196
|
+
config.set(save_name, "front_id_1", str(front_tool_options_1[front_choice1][1]))
|
197
|
+
|
198
|
+
if front_tool_options_1[front_choice1][0] != "-- None":
|
199
|
+
front_tool_ammount1 = input_int("Enter ammount of those tools per front: ")
|
200
|
+
config.set(save_name, "front_tool_ammount1", front_tool_ammount1)
|
201
|
+
else:
|
202
|
+
config.set(save_name, "front_tool_ammount1", "0")
|
203
|
+
|
204
|
+
print("\nPick the second tool you want to use on the front\n")
|
205
|
+
for key, value in front_tool_options_2.items():
|
206
|
+
print(f"{key} - {value[0]}\n")
|
207
|
+
front_choice2 = input("Selection: ")
|
208
|
+
print(f'Selected option "{front_tool_options_2[front_choice2][0]}"')
|
209
|
+
config.set(save_name, "front_id_2", str(front_tool_options_2[front_choice2][1]))
|
210
|
+
|
211
|
+
if front_tool_options_2[front_choice2][0] != "-- None":
|
212
|
+
front_tool_ammount2 = input_int("Enter ammount of those tools per front: ")
|
213
|
+
config.set(save_name, "front_tool_ammount2", front_tool_ammount2)
|
214
|
+
else:
|
215
|
+
config.set(save_name, "front_tool_ammount2", "0")
|
216
|
+
|
217
|
+
with open(filename, "w") as f:
|
218
|
+
config.write(f)
|
219
|
+
|
220
|
+
print(f"\nConfiguration saved.")
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import websockets, asyncio, random, re
|
2
|
+
import json as json_module
|
3
|
+
from .just_funcs import getserver
|
4
|
+
async def ggs_login(ws, nick: str, pwrd: str, server: str, kid: int = "0") -> None:
|
5
|
+
|
6
|
+
"""
|
7
|
+
Login function which logins to your account.
|
8
|
+
"""
|
9
|
+
if ws.open:
|
10
|
+
await ws.send(f"""<msg t='sys'><body action='verChk' r='0'><ver v='166' /></body></msg>""")
|
11
|
+
await ws.send(f"""<msg t='sys'><body action='login' r='0'><login z='{server}'><nick><![CDATA[]]></nick><pword><![CDATA[605015%pl%0]]></pword></login></body></msg>""")
|
12
|
+
await ws.send(f"""<msg t='sys'><body action='autoJoin' r='-1'></body></msg>""")
|
13
|
+
await ws.send(f"""<msg t='sys'><body action='roundTrip' r='1'></body></msg>""")
|
14
|
+
await ws.send(f"""%xt%{server}%lli%1%{{"CONM":625,"RTM":56,"ID":0,"PL":1,"NOM":"{nick}","PW":"{pwrd}","LT":null,"LANG":"pl","DID":"0","AID":"1726521097373776320","KID":"","REF":"https://empire.goodgamestudios.com","GCI":"","SID":9,"PLFID":1}}%""")
|
15
|
+
await ws.send(f"%xt%{server}%nch%1%")
|
16
|
+
while ws.open:
|
17
|
+
try:
|
18
|
+
response = await asyncio.wait_for(ws.recv(), timeout=5.5)
|
19
|
+
response = response.decode('utf-8')
|
20
|
+
|
21
|
+
if "%xt%lli%1%" in response:
|
22
|
+
if "%xt%lli%1%0%" not in response:
|
23
|
+
print("Wrong login data.")
|
24
|
+
exit()
|
25
|
+
elif "%xt%gbd%1%0%" in response:
|
26
|
+
response = response.replace('%xt%gbd%1%0%', '').rstrip('%').strip()
|
27
|
+
response = json_module.loads(response)
|
28
|
+
lids = []
|
29
|
+
fragments = response["gli"]["C"]
|
30
|
+
for fragment in fragments:
|
31
|
+
lids.append(fragment["ID"])
|
32
|
+
lids = sorted(lids)
|
33
|
+
break
|
34
|
+
except asyncio.TimeoutError:
|
35
|
+
break
|
36
|
+
|
37
|
+
await ws.send(f"""%xt%{server}%core_gic%1%{{"T":"link","CC":"PL","RR":"html5"}}%""")
|
38
|
+
await ws.send(f"%xt%{server}%gbl%1%{{}}%")
|
39
|
+
await ws.send(f"""%xt%{server}%jca%1%{{"CID":-1,"KID":0}}%""")
|
40
|
+
await ws.send(f"%xt%{server}%alb%1%{{}}%")
|
41
|
+
await ws.send(f"%xt%{server}%sli%1%{{}}%")
|
42
|
+
await ws.send(f"%xt%{server}%gie%1%{{}}%")
|
43
|
+
await ws.send(f"%xt%{server}%asc%1%{{}}%")
|
44
|
+
await ws.send(f"%xt%{server}%sie%1%{{}}%")
|
45
|
+
await ws.send(f"""%xt%{server}%ffi%1%{{"FIDS":[1]}}%""")
|
46
|
+
await ws.send(f"%xt%{server}%kli%1%{{}}%")
|
47
|
+
while ws.open:
|
48
|
+
try:
|
49
|
+
response = await asyncio.wait_for(ws.recv(), timeout=2)
|
50
|
+
response = response.decode('utf-8')
|
51
|
+
if "%xt%jaa%1%0%" in response:
|
52
|
+
pattern = rf"\[{kid},(\d+),(\d+),(\d+),1"
|
53
|
+
match = re.search(pattern, response)
|
54
|
+
cid = match.group(1)
|
55
|
+
global sx, sy
|
56
|
+
sx = match.group(2)
|
57
|
+
sy = match.group(3)
|
58
|
+
break
|
59
|
+
except asyncio.TimeoutError:
|
60
|
+
break
|
61
|
+
|
62
|
+
while ws.open:
|
63
|
+
try:
|
64
|
+
response = await asyncio.wait_for(ws.recv(), timeout=3.5)
|
65
|
+
response = response.decode('utf-8')
|
66
|
+
if "%xt%ffi%1%0%" in response:
|
67
|
+
await ws.send(f"%xt%{server}%gcs%1%{{}}%")
|
68
|
+
print("Successfully logged in")
|
69
|
+
break
|
70
|
+
except asyncio.TimeoutError:
|
71
|
+
break
|
72
|
+
else:
|
73
|
+
print("Connection closed, stopping login")
|
74
|
+
sx = int(sx)
|
75
|
+
sy = int(sy)
|
76
|
+
return sx, sy, lids, cid
|
77
|
+
|
78
|
+
async def keeping(ws, server):
|
79
|
+
while ws.open:
|
80
|
+
try:
|
81
|
+
await ws.send(f"%xt%{server}%pin%1%<RoundHouseKick>%")
|
82
|
+
print("Sending keep-alive message...")
|
83
|
+
await asyncio.sleep(60) # Keep-alive interval
|
84
|
+
except websockets.exceptions.ConnectionClosedError:
|
85
|
+
print("Connection closed, stopping keep-alive")
|
86
|
+
break
|
87
|
+
|
88
|
+
async def ggs_account(ws, nick, pwrd, server) -> None:
|
89
|
+
"""Login to the account and trigger next functions."""
|
90
|
+
print("Logging in...")
|
91
|
+
try:
|
92
|
+
server = getserver(server, "ex")
|
93
|
+
keepconnect = asyncio.create_task(keeping(ws, server))
|
94
|
+
sx, sy, lids, cid = await ggs_login(ws, nick, pwrd, server)
|
95
|
+
print("Keeping connection alive...")
|
96
|
+
while ws.open:
|
97
|
+
await asyncio.sleep(100)
|
98
|
+
except websockets.exceptions.ConnectionClosedError:
|
99
|
+
print("Theoretically you should never see this. If you do, pray for your account.")
|
100
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import asyncio, re
|
2
|
+
import json as json_module
|
3
|
+
from importlib.resources import files
|
4
|
+
|
5
|
+
async def c2s_search_for(ws, c2s_code: str, waiting_time: float):
|
6
|
+
"""Phrase is made from 3 letters. Returns response json or error code."""
|
7
|
+
while True:
|
8
|
+
try:
|
9
|
+
response = await asyncio.wait_for(ws.recv(), timeout=waiting_time)
|
10
|
+
response = response.decode('utf-8')
|
11
|
+
phrase = rf'%xt%{c2s_code}%1%(\d+)%'
|
12
|
+
starting_info = re.search(phrase, response)
|
13
|
+
if starting_info is not None:
|
14
|
+
error_code = starting_info.group(1)
|
15
|
+
if error_code == "0":
|
16
|
+
response = response.replace(f'%xt%{c2s_code}%1%0%', '').rstrip('%').strip()
|
17
|
+
return json_module.loads(response)
|
18
|
+
else:
|
19
|
+
return int(error_code)
|
20
|
+
except asyncio.TimeoutError:
|
21
|
+
return -1
|
22
|
+
|
23
|
+
def getserver(server, full: str = "full") -> str:
|
24
|
+
"""
|
25
|
+
Get the server URL and exname from the server list.
|
26
|
+
Full -> ws for wsuri <--> ex for empireex_xyz <--> full for both wsuri and exname"""
|
27
|
+
|
28
|
+
data_path = files("brunogge").joinpath("server_list.json")
|
29
|
+
with data_path.open("r", encoding="utf-8") as f:
|
30
|
+
data = json_module.load(f)
|
31
|
+
wsuri = data["servers"][server]["wsuri"]
|
32
|
+
exname = data["servers"][server]["exname"]
|
33
|
+
if full == "full":
|
34
|
+
return wsuri, exname
|
35
|
+
elif full == "ex":
|
36
|
+
return exname
|
37
|
+
elif full == "ws":
|
38
|
+
return wsuri
|
39
|
+
|
40
|
+
async def fakescanning(ws, server: str) -> None:
|
41
|
+
"""
|
42
|
+
Fake scanning for the server.
|
43
|
+
This function is used to hopefully avoid getting banned.
|
44
|
+
"""
|
45
|
+
empireex = getserver(server, "ex")
|
46
|
+
delays = [6, 2, 4, 2]
|
47
|
+
while ws.open:
|
48
|
+
for delay in delays:
|
49
|
+
print("Fake scanned...")
|
50
|
+
await ws.send(f"""%xt%{empireex}%gaa%1%{{"KID":0,"AX1":0,"AY1":0,"AX2":12,"AY2":12}}%""")
|
51
|
+
await ws.send(f"""%xt%{empireex}%gaa%1%{{"KID":0,"AX1":1274,"AY1":0,"AX2":1286,"AY2":12}}%""")
|
52
|
+
await ws.send(f"""%xt%{empireex}%gaa%1%{{"KID":0,"AX1":13,"AY1":0,"AX2":25,"AY2":12}}%""")
|
53
|
+
await ws.send(f"""%xt%{empireex}%gaa%1%{{"KID":0,"AX1":1274,"AY1":13,"AX2":1286,"AY2":25}}%""")
|
54
|
+
await ws.send(f"""%xt%{empireex}%gaa%1%{{"KID":0,"AX1":0,"AY1":13,"AX2":12,"AY2":25}}%""")
|
55
|
+
await ws.send(f"""%xt%{empireex}%gaa%1%{{"KID":0,"AX1":13,"AY1":13,"AX2":25,"AY2":25}}%""")
|
56
|
+
await asyncio.sleep(delay * 60)
|
@@ -0,0 +1,157 @@
|
|
1
|
+
{
|
2
|
+
"servers": {
|
3
|
+
"PL1": {
|
4
|
+
"wsuri": "wss://ep-live-pl1-game.goodgamestudios.com/",
|
5
|
+
"exname": "EmpireEx_5"
|
6
|
+
},
|
7
|
+
"INT1": {
|
8
|
+
"wsuri": "wss://ep-live-mz-cz1-es2-game.goodgamestudios.com/",
|
9
|
+
"exname": "EmpireEx_38"
|
10
|
+
},
|
11
|
+
"INT2": {
|
12
|
+
"wsuri": "wss://ep-live-mz-int2-es1-it1-game.goodgamestudios.com/",
|
13
|
+
"exname": "EmpireEx_7"
|
14
|
+
},
|
15
|
+
"INT3": {
|
16
|
+
"wsuri": "wss://ep-live-int3-game.goodgamestudios.com/",
|
17
|
+
"exname": "EmpireEx_43"
|
18
|
+
},
|
19
|
+
"WORLD": {
|
20
|
+
"wsuri": "wss://ep-live-world1-game.goodgamestudios.com/",
|
21
|
+
"exname": "EmpireEx_46"
|
22
|
+
},
|
23
|
+
"DE1": {
|
24
|
+
"wsuri": "wss://ep-live-de1-game.goodgamestudios.com/",
|
25
|
+
"exname": "EmpireEx_2"
|
26
|
+
},
|
27
|
+
"FR1": {
|
28
|
+
"wsuri": "wss://ep-live-fr1-game.goodgamestudios.com/",
|
29
|
+
"exname": "EmpireEx_3"
|
30
|
+
},
|
31
|
+
"CZ1": {
|
32
|
+
"wsuri": "wss://ep-live-mz-cz1-es2-game.goodgamestudios.com/",
|
33
|
+
"exname": "EmpireEx_4"
|
34
|
+
},
|
35
|
+
"PT1": {
|
36
|
+
"wsuri": "wss://ep-live-pt1-game.goodgamestudios.com/",
|
37
|
+
"exname": "EmpireEx_6"
|
38
|
+
},
|
39
|
+
"ES1": {
|
40
|
+
"wsuri": "wss://ep-live-mz-int2-es1-it1-game.goodgamestudios.com/",
|
41
|
+
"exname": "EmpireEx_8"
|
42
|
+
},
|
43
|
+
"IT1": {
|
44
|
+
"wsuri": "wss://ep-live-mz-int2-es1-it1-game.goodgamestudios.com/",
|
45
|
+
"exname": "EmpireEx_9"
|
46
|
+
},
|
47
|
+
"TR1": {
|
48
|
+
"wsuri": "wss://ep-live-mz-tr1-nl1-bg1-game.goodgamestudios.com/",
|
49
|
+
"exname": "EmpireEx_10"
|
50
|
+
},
|
51
|
+
"NL1": {
|
52
|
+
"wsuri": "wss://ep-live-mz-tr1-nl1-bg1-game.goodgamestudios.com/",
|
53
|
+
"exname": "EmpireEx_11"
|
54
|
+
},
|
55
|
+
"HU1": {
|
56
|
+
"wsuri": "wss://ep-live-mz-hu1-skn1-gr1-lt1-game.goodgamestudios.com/",
|
57
|
+
"exname": "EmpireEx_12"
|
58
|
+
},
|
59
|
+
"SKN1": {
|
60
|
+
"wsuri": "wss://ep-live-mz-hu1-skn1-gr1-lt1-game.goodgamestudios.com/",
|
61
|
+
"exname": "EmpireEx_13"
|
62
|
+
},
|
63
|
+
"RU1": {
|
64
|
+
"wsuri": "wss://ep-live-ru1-game.goodgamestudios.com/",
|
65
|
+
"exname": "EmpireEx_14"
|
66
|
+
},
|
67
|
+
"RO1": {
|
68
|
+
"wsuri": "wss://ep-live-ro1-game.goodgamestudios.com/",
|
69
|
+
"exname": "EmpireEx_15"
|
70
|
+
},
|
71
|
+
"BG1": {
|
72
|
+
"wsuri": "wss://ep-live-mz-tr1-nl1-bg1-game.goodgamestudios.com/",
|
73
|
+
"exname": "EmpireEx_16"
|
74
|
+
},
|
75
|
+
"HU2": {
|
76
|
+
"wsuri": "wss://ep-live-hu2-game.goodgamestudios.com/",
|
77
|
+
"exname": "EmpireEx_17"
|
78
|
+
},
|
79
|
+
"SK1": {
|
80
|
+
"wsuri": "wss://ep-live-mz-int1-sk1-gb1-game.goodgamestudios.com/",
|
81
|
+
"exname": "EmpireEx_18"
|
82
|
+
},
|
83
|
+
"GB1": {
|
84
|
+
"wsuri": "wss://ep-live-mz-int1-sk1-gb1-game.goodgamestudios.com/",
|
85
|
+
"exname": "EmpireEx_19"
|
86
|
+
},
|
87
|
+
"BR1": {
|
88
|
+
"wsuri": "wss://ep-live-br1-game.goodgamestudios.com/",
|
89
|
+
"exname": "EmpireEx_20"
|
90
|
+
},
|
91
|
+
"US1": {
|
92
|
+
"wsuri": "wss://ep-live-us1-game.goodgamestudios.com/",
|
93
|
+
"exname": "EmpireEx_21"
|
94
|
+
},
|
95
|
+
"AU1": {
|
96
|
+
"wsuri": "wss://ep-live-au1-game.goodgamestudios.com/",
|
97
|
+
"exname": "EmpireEx_22"
|
98
|
+
},
|
99
|
+
"KR1": {
|
100
|
+
"wsuri": "wss://ep-live-mz-kr1-jp1-in1-cn1-game.goodgamestudios.com/",
|
101
|
+
"exname": "EmpireEx_23"
|
102
|
+
},
|
103
|
+
"JP1": {
|
104
|
+
"wsuri": "wss://ep-live-mz-kr1-jp1-in1-cn1-game.goodgamestudios.com/",
|
105
|
+
"exname": "EmpireEx_24"
|
106
|
+
},
|
107
|
+
"HIS1": {
|
108
|
+
"wsuri": "wss://ep-live-his1-game.goodgamestudios.com/",
|
109
|
+
"exname": "EmpireEx_25"
|
110
|
+
},
|
111
|
+
"IN1": {
|
112
|
+
"wsuri": "wss://ep-live-mz-kr1-jp1-in1-cn1-game.goodgamestudios.com/",
|
113
|
+
"exname": "EmpireEx_26"
|
114
|
+
},
|
115
|
+
"CN1": {
|
116
|
+
"wsuri": "wss://ep-live-mz-kr1-jp1-in1-cn1-game.goodgamestudios.com/",
|
117
|
+
"exname": "EmpireEx_27"
|
118
|
+
},
|
119
|
+
"GR1": {
|
120
|
+
"wsuri": "wss://ep-live-mz-hu1-skn1-gr1-lt1-game.goodgamestudios.com/",
|
121
|
+
"exname": "EmpireEx_28"
|
122
|
+
},
|
123
|
+
"LT1": {
|
124
|
+
"wsuri": "wss://ep-live-mz-hu1-skn1-gr1-lt1-game.goodgamestudios.com/",
|
125
|
+
"exname": "EmpireEx_29"
|
126
|
+
},
|
127
|
+
"SA1": {
|
128
|
+
"wsuri": "wss://ep-live-mz-sa1-ae1-eg1-arab1-game.goodgamestudios.com/",
|
129
|
+
"exname": "EmpireEx_32"
|
130
|
+
},
|
131
|
+
"AE1": {
|
132
|
+
"wsuri": "wss://ep-live-mz-sa1-ae1-eg1-arab1-game.goodgamestudios.com/",
|
133
|
+
"exname": "EmpireEx_33"
|
134
|
+
},
|
135
|
+
"EG1": {
|
136
|
+
"wsuri": "wss://ep-live-mz-sa1-ae1-eg1-arab1-game.goodgamestudios.com/",
|
137
|
+
"exname": "EmpireEx_34"
|
138
|
+
},
|
139
|
+
"ARAB1": {
|
140
|
+
"wsuri": "wss://ep-live-mz-sa1-ae1-eg1-arab1-game.goodgamestudios.com/",
|
141
|
+
"exname": "EmpireEx_35"
|
142
|
+
},
|
143
|
+
"ASIA1": {
|
144
|
+
"wsuri": "wss://ep-live-mz-asia1-hant1-game.goodgamestudios.com/",
|
145
|
+
"exname": "EmpireEx_36"
|
146
|
+
},
|
147
|
+
"HANT1": {
|
148
|
+
"wsuri": "wss://ep-live-mz-asia1-hant1-game.goodgamestudios.com/",
|
149
|
+
"exname": "EmpireEx_37"
|
150
|
+
},
|
151
|
+
"ES2": {
|
152
|
+
"wsuri": "wss://ep-live-mz-cz1-es2-game.goodgamestudios.com/",
|
153
|
+
"exname": "EmpireEx_38"
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: brunogge
|
3
|
+
Version: 0.1.4
|
4
|
+
Summary: Bilbioteka Python dla Goodgame Empire.
|
5
|
+
Author-email: WojtS & ThunderStorm <wojts8@proton.me>
|
6
|
+
Project-URL: Homepage, https://github.com/wojtsik/brunogge
|
7
|
+
Requires-Python: >=3.12
|
8
|
+
Description-Content-Type: text/markdown
|
9
|
+
|
10
|
+
# brunogge
|
11
|
+
Biblioteka Pythona dla GoodGame Empire
|
@@ -0,0 +1,13 @@
|
|
1
|
+
README.md
|
2
|
+
pyproject.toml
|
3
|
+
brunogge/__init__.py
|
4
|
+
brunogge/barony.py
|
5
|
+
brunogge/get_ws.py
|
6
|
+
brunogge/getconfig.py
|
7
|
+
brunogge/ggs_stuff.py
|
8
|
+
brunogge/just_funcs.py
|
9
|
+
brunogge/server_list.json
|
10
|
+
brunogge.egg-info/PKG-INFO
|
11
|
+
brunogge.egg-info/SOURCES.txt
|
12
|
+
brunogge.egg-info/dependency_links.txt
|
13
|
+
brunogge.egg-info/top_level.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
brunogge
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[project]
|
2
|
+
name = "brunogge"
|
3
|
+
version = "0.1.4"
|
4
|
+
description = "Bilbioteka Python dla Goodgame Empire."
|
5
|
+
authors = [{ name = "WojtS & ThunderStorm", email = "wojts8@proton.me" }]
|
6
|
+
readme = "README.md"
|
7
|
+
license = { file = "LICENSE" }
|
8
|
+
requires-python = ">=3.12"
|
9
|
+
dependencies = []
|
10
|
+
|
11
|
+
[project.urls]
|
12
|
+
Homepage = "https://github.com/wojtsik/brunogge"
|
13
|
+
|
14
|
+
[build-system]
|
15
|
+
requires = ["setuptools>=61.0", "websockets==13.1", "asyncio"]
|
16
|
+
build-backend = "setuptools.build_meta"
|
17
|
+
|
18
|
+
[tool.setuptools]
|
19
|
+
packages = ["brunogge"]
|
20
|
+
|
21
|
+
[tool.setuptools.package-data]
|
22
|
+
"brunogge" = ["*.json"]
|
brunogge-0.1.4/setup.cfg
ADDED