Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poseidon BIG update #3468

Merged
merged 33 commits into from
Aug 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a7e8991
poseidon
ya4ept Jul 11, 2021
5e208a5
poseidon
ya4ept Jul 12, 2021
9509bdf
poseidon
ya4ept Jul 12, 2021
a87c284
poseidon
ya4ept Jul 12, 2021
a597228
poseidon
ya4ept Jul 12, 2021
957b517
replaced timestamp with hh:mm:cc
ya4ept Jul 15, 2021
632ad0d
[Poseidon] update
alisonrag Jul 15, 2021
dd12140
update date of kRO ragexe in poseidon
alisonrag Jul 15, 2021
7e1d117
Add support to 0276 packet
alisonrag Jul 15, 2021
5d33010
fix header
ya4ept Jul 15, 2021
9158e69
poseidon
alisonrag Jul 15, 2021
12d73c6
poseidon use packet names
alisonrag Jul 15, 2021
96e2fb6
poseidon
alisonrag Jul 15, 2021
cafcb72
fix "0ADE" package (overweight_percent)
ya4ept Jul 15, 2021
eeff289
fix typo
alisonrag Jul 15, 2021
fa1197d
Merge branch 'poseidon' of https://github.com/OpenKore/openkore into …
alisonrag Jul 15, 2021
d44c642
poseidon
alisonrag Jul 15, 2021
626d272
change initial map
alisonrag Jul 15, 2021
e926dc0
poseidon
alisonrag Jul 16, 2021
685ab7b
Update servertypes.txt
alisonrag Jul 16, 2021
8b056b8
remove charblocksize from poseidon.txt
alisonrag Jul 16, 2021
9aa4382
replace Globals IDs value with real IDs
alisonrag Jul 16, 2021
5686134
poseidon
alisonrag Jul 16, 2021
95c8dc9
poseidon
alisonrag Jul 16, 2021
dc062bb
poseidon
alisonrag Jul 17, 2021
e21624f
poseidon
alisonrag Jul 17, 2021
f915fdd
poseidon
alisonrag Jul 17, 2021
8e6d88c
translation
ya4ept Jul 17, 2021
02e0579
fix wrong check
alisonrag Jul 18, 2021
ab3ef74
Update servertypes.txt
alisonrag Jul 18, 2021
aff3ff2
add debug in sent packets
alisonrag Jul 28, 2021
6f16fd9
added jRO support
ya4ept Jul 30, 2021
44d6747
updated major version of poseidon
ya4ept Aug 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions src/Poseidon/RagnarokServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ sub ParsePacket {

# send characters_info
} elsif (($switch eq '0065') || ($switch eq '0275') || ($msg =~ /^$packed_switch$accountID$sessionID$sessionID2\x0\x0.$/)) { # client sends server choice packet
if ($self->{type}->{$config{server_type}}->{charListPacket} eq '0x099D') {
if ($self->{type}->{$config{server_type}}->{charListPacket} eq '0x099D' || $self->{type}->{$config{server_type}}->{charListPacket} eq '0x0B72') {
my $data;
$data = $accountID;
$client->send($data);
Expand Down Expand Up @@ -597,10 +597,10 @@ sub ParsePacket {
(substr($msg, 6, 4) eq $charID) &&
(substr($msg, 10, 4) eq $sessionID)
) { # client sends the maplogin packet
$clientdata{$index}{serverType} = 0;

SendMapLogin($self, $client, $msg, $index);

$client->send(pack("v a4", 0x0283, $accountID));
# mapLogin packet
$client->send(pack("v", 0x2EB) . pack("V", getTickCount) . getCoordString($posX, $posY, 1) . pack("C*", 0x05, 0x05) . pack("C*", 0x05, 0x05));
$client->{connectedToMap} = 1;

} elsif ($msg =~ /^$packed_switch/
Expand Down Expand Up @@ -955,6 +955,9 @@ sub SendCharacterList
} elsif ($self->{type}->{$config{server_type}}->{charListPacket} eq '0x099D') {
$data = pack("v", 0x099D) .
pack("v", $len + 4);
} elsif ($self->{type}->{$config{server_type}}->{charListPacket} eq '0x0B72') {
$data = pack("v", 0x0B72) .
pack("v", $len + 4);
} else {
$data = $accountID . pack("v v C3", 0x006b, $len + 7, $totalslots, -1, -1);
}
Expand Down Expand Up @@ -1002,24 +1005,24 @@ sub SendCharacterList
sub SendMapLogin {
my ($self, $client, $msg, $index) = @_;

# '0073' => ['map_loaded','x4 a3',[qw(coords)]]
my $data;
if ( $config{server_type} =~ /^kRO/ ) { # kRO Zero
$data .= pack("C*", 0x83, 0x02) . $accountID; #accountID
$client->send($data);

$data = pack("C*", 0xDE, 0x0A, 0x46, 0x00, 0x00, 0x00); # idk '-'
$client->send($data);

$data = pack("C*", 0xEB, 0x02) . pack("V", getTickCount) . getCoordString($posX, $posY, 1) . pack("C*", 0x05, 0x05, 0x00, 0x00); # map loaded
$client->send($data);
$client->send(pack("v a4", 0x0283, $accountID));

# mapLogin packet
if ($self->{type}->{$config{server_type}}->{charListPacket} eq '0x0A18') {
# '0A18' => ['map_loaded', 'V a3 C2 v C', [qw(syncMapSync coords xSize ySize font sex)]], # 14
$client->send(pack("v", 0x02EB) . pack("V", getTickCount) . getCoordString($posX, $posY, 1) . pack("C*", 0x05, 0x05) . pack("C*", 0x05, 0x05));
} elsif ($self->{type}->{$config{server_type}}->{charListPacket} eq '0x02EB') {
# '02EB' => ['map_loaded', 'V a3 a a v', [qw(syncMapSync coords xSize ySize font)]], # 13
$client->send(pack("v", 0x02EB) . pack("V", getTickCount) . getCoordString($posX, $posY, 1) . pack("C*", 0x05, 0x05) . pack("C*", 0x05, 0x05));
} else {
if ( $config{server_type} !~ /^bRO/ ) { $data .= $accountID; } #<- This is Server Type Based !!
$data = pack("C*", 0x73, 0x00) . pack("V", getTickCount) . getCoordString($posX, $posY, 1) . pack("C*", 0x05, 0x05);
$client->send($data);
# '0073' => ['map_loaded','x4 a3',[qw(coords)]]
$client->send(pack("v", 0x0073) . pack("V", getTickCount) . getCoordString($posX, $posY, 1) . pack("C*", 0x05, 0x05);
}

if ( $config{server_type} =~ /^kRO/ ) { # kRO
$client->send(pack("C*", 0xDE, 0x0A, 0x46, 0x00, 0x00, 0x00)); # Overweight percent
alisonrag marked this conversation as resolved.
Show resolved Hide resolved
}

if ($clientdata{$index}{mode}) {
$data = pack("C2 v1", 0x0F, 0x01, 226) .
# skillID targetType level sp range skillName
Expand Down
16 changes: 15 additions & 1 deletion src/Poseidon/servertypes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ actorListPacket 0x09FF
inventoryPacket 0x0B08
skillsListPacket 0x010F
itemExistsPacket 0x009D
expandedItemID 1
mapLoadedPacket 0x02EB

[cRO_2021-07-xx]
decrypt_mid 0
Expand All @@ -22,6 +24,8 @@ actorListPacket 0x09FF
inventoryPacket 0x0B08
skillsListPacket 0x010F
itemExistsPacket 0x0ADD
expandedItemID 1
mapLoadedPacket 0x02EB

[vRO_2021-07-07]
decrypt_mid 0
Expand All @@ -34,6 +38,8 @@ actorListPacket 0x09FF
inventoryPacket 0x0B08
skillsListPacket
itemExistsPacket
expandedItemID 1
mapLoadedPacket 0x02EB

[twRO_2021-06-21]
decrypt_mid 0
Expand All @@ -46,6 +52,8 @@ actorListPacket 0x09FF
inventoryPacket 0x0B08
skillsListPacket
itemExistsPacket
expandedItemID 1
mapLoadedPacket 0x02EB

[kRO_2021-06-30]
decrypt_mid 0
Expand All @@ -58,6 +66,8 @@ actorListPacket 0x09FF
inventoryPacket
skillsListPacket 0x0B32
itemExistsPacket
expandedItemID 1
mapLoadedPacket 0x02EB

[kRO_Zero_2021-06-30]
decrypt_mid 0
Expand All @@ -70,6 +80,8 @@ actorListPacket 0x09FF
inventoryPacket 0x0B08
skillsListPacket 0x0B32
itemExistsPacket
expandedItemID 1
mapLoadedPacket 0x02EB

[jRO_2021-07-xx]
decrypt_mid 0
Expand All @@ -81,4 +93,6 @@ maploginPacket 0x0436
actorListPacket
inventoryPacket
skillsListPacket
itemExistsPacket
itemExistsPacket
expandedItemID
mapLoadedPacket