summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2019-04-16 13:22:15 -0400
committergumi <git@gumi.ca>2019-04-16 14:36:27 -0400
commit17c2142543cca6a6849388542e81cbf38d7e5cfd (patch)
tree72dfe76591101fb6f080d9c74013f56faee9edb8
parentf2bca12e7d132000032dc9592993216a212e6981 (diff)
downloadmanamarket-17c2142543cca6a6849388542e81cbf38d7e5cfd.tar.gz
manamarket-17c2142543cca6a6849388542e81cbf38d7e5cfd.tar.bz2
manamarket-17c2142543cca6a6849388542e81cbf38d7e5cfd.tar.xz
manamarket-17c2142543cca6a6849388542e81cbf38d7e5cfd.zip
add missing packets
-rwxr-xr-xmain.py59
-rw-r--r--net/packet.py12
-rw-r--r--net/protocol.py14
3 files changed, 78 insertions, 7 deletions
diff --git a/main.py b/main.py
index ae75e91..aa926bd 100755
--- a/main.py
+++ b/main.py
@@ -71,7 +71,7 @@ def process_whisper(nick, msg, mapserv):
broken_string = msg.split()
if len(broken_string) == 0:
- return
+ return
if user != -10:
if int(user.get("accesslevel")) == -1: # A user who has been blocked for abuse.
@@ -826,8 +826,63 @@ def main():
# A Thread to send a shop broadcast: also keeps the network active to prevent timeouts.
shop_broadcaster.start()
+ elif packet.is_type(SMSG_PVP_SET):
+ packet.skip(12)
+
+ elif packet.is_type(SMSG_PVP_MAP_MODE):
+ packet.skip(2)
+
+ elif packet.is_type(SMSG_QUEST_SET_VAR):
+ packet.skip(6)
+
elif packet.is_type(SMSG_QUEST_PLAYER_VARS):
- continue
+ nb = (packet.read_int16() - 4) / 6
+ for loop in range(nb):
+ packet.skip(6)
+
+ elif packet.is_type(SMSG_NPC_COMMAND):
+ packet.skip(14)
+
+ elif packet.is_type(SMSG_BEING_MOVE3):
+ nb = (packet.read_int16() - 14) / 1
+ packet.skip(10)
+ for loop in range(nb):
+ packet.skip(1)
+
+ elif packet.is_type(SMSG_MAP_MASK):
+ packet.skip(8)
+
+ elif packet.is_type(SMSG_MAP_MUSIC):
+ nb = (packet.read_int16() - 4) / 1
+ for loop in range(nb):
+ packet.skip(1)
+
+ elif packet.is_type(SMSG_NPC_CHANGETITLE):
+ nb = (packet.read_int16() - 10) / 1
+ packet.skip(6)
+ for loop in range(nb):
+ packet.skip(1)
+
+ elif packet.is_type(SMSG_SCRIPT_MESSAGE):
+ nb = (packet.read_int16() - 5) / 1
+ packet.skip(1)
+ for loop in range(nb):
+ packet.skip(1)
+
+ elif packet.is_type(SMSG_PLAYER_CLIENT_COMMAND):
+ nb = (packet.read_int16() - 4) / 1
+ for loop in range(nb):
+ packet.skip(1)
+
+ elif packet.is_type(SMSG_MAP_SET_TILES_TYPE):
+ packet.skip(32)
+
+ elif packet.is_type(SMSG_PLAYER_HP):
+ packet.skip(8)
+
+ elif packet.is_type(SMSG_PLAYER_HP_FULL):
+ packet.skip(12)
+
elif packet.is_type(SMSG_WHISPER):
msg_len = packet.read_int16() - 26
nick = packet.read_string(24)
diff --git a/net/packet.py b/net/packet.py
index ef48094..232cd52 100644
--- a/net/packet.py
+++ b/net/packet.py
@@ -11,7 +11,7 @@ packet_lengths = [
#0x0040
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 50, 3, -1, 55, 17, 3, 37, 46, -1, 23, -1, 3,108, 3, 2,
+ 0, 50, 3, -1, 55, 17, 3, 37, 46, -1, 23, -1, 3,108, 3, 2,
3, 28, 19, 11, 3, -1, 9, 5, 54, 53, 58, 60, 41, 2, 6, 6,
#0x0080
7, 3, 2, 2, 2, 5, 16, 12, 10, 7, 29, 23, -1, -1, -1, 0,
@@ -42,10 +42,12 @@ packet_lengths = [
2, 14, 10, -1, 22, 22, 4, 2, 13, 97, 0, 9, 9, 29, 6, 28,
8, 14, 10, 35, 6, 8, 4, 11, 54, 53, 60, 2, -1, 47, 33, 6,
30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1,
- -1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
-#0x2000
- 26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 10, 0, 0, 0,
- 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ -1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 4,
+#0x0200
+ 26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 10, 0, 0, 0,
+ 0, 0, 16, 0, 8, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -1, 10, -1, -1, -1, 0, 0, 0, 0, 0, 0,
+ -1, 34, 10, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
class PacketOut:
diff --git a/net/protocol.py b/net/protocol.py
index fc64767..a6dcb4c 100644
--- a/net/protocol.py
+++ b/net/protocol.py
@@ -1,5 +1,6 @@
SMSG_LOGIN_DATA = 0x0069
SMSG_CHAR_LOGIN = 0x006b
+SMSG_QUEST_SET_VAR = 0x0214
SMSG_QUEST_PLAYER_VARS = 0x0215
SMSG_CHAR_MAP_INFO = 0x0071
SMSG_MAP_LOGIN_SUCCESS = 0x0073
@@ -60,6 +61,19 @@ SMSG_TRADE_COMPLETE = 0x00f0
SMSG_ITEM_VISIBLE = 0x009d
SMSG_ITEM_DROPPED = 0x009e
SMSG_ITEM_REMOVE = 0x00a1
+SMSG_PVP_SET = 0x019a
+SMSG_PVP_MAP_MODE = 0x0199
+
+SMSG_NPC_COMMAND = 0x0212
+SMSG_BEING_MOVE3 = 0x0225
+SMSG_MAP_MASK = 0x0226
+SMSG_MAP_MUSIC = 0x0227
+SMSG_NPC_CHANGETITLE 0x0228
+SMSG_SCRIPT_MESSAGE = 0x0229
+SMSG_PLAYER_CLIENT_COMMAND = 0x0230
+SMSG_MAP_SET_TILES_TYPE = 0x0231
+SMSG_PLAYER_HP = 0x0232
+SMSG_PLAYER_HP_FULL = 0x0233
inventory_offset = 2
storage_offset = 1