Page 1 of 1
Poseidon: CHARACTER_INFO size error
Posted: 20 Nov 2010, 04:58
by kudos2u
This is as far as I could go. Could somebody tell me how to fix this? I've tried searching everywhere and yet, I found no answer.
*Hoping for someone to help me out*
Re: Poseidon: CHARACTER_INFO size error
Posted: 20 Nov 2010, 05:20
by EternalHarvest
Maybe character list packet construction in Poseidon::RagnarokServer needs modification according to your server's charBlockSize.
Re: Poseidon: CHARACTER_INFO size error
Posted: 20 Nov 2010, 09:30
by kudos2u
Thanks for the idea. I've tried what you've suggested, and failed (got overwhelmed by those packets). lol
Modifying some strings resulted in "Failed to connect to server" popups. I just don't know how to modify it correctly since I didn't study perl or any language at all.
Shed some light, anyone?
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Poseidon: CHARACTER_INFO size error
Posted: 21 Nov 2010, 06:45
by EternalHarvest
Updated relevant part of Poseidon::RagnarokServer (OpenKore can see characters correctly and connect now, no idea about client):
Code: Select all
} elsif (($switch eq '0065') || ($switch eq '0275') || ($msg =~ /^$packed_switch$accountID$sessionID$sessionID2\x0\x0.$/)) { # client sends server choice packet
my %character_base = (
exp => 0, zeny => 0, exp_job => 0, lvl_job => 70,
hp => 0x0fff, sp => 0x0fff, job_id1 => 0, job_id2 => 23,
hairStyle => 16, level => 99, points_skill => 1,
hairColor => 6,
str => 99, agi => 99, vit => 99, int => 99, dex => 99, luk => 99,
rename => 0,
);
my @characters = (
{%character_base, slot => 0, name => 'Poseidon', head_low => 0x0038, head_top => 0x00a0, head_mid => 0x009e},
{%character_base, slot => 1, name => 'Poseidon Dev', head_low => 0x0039, head_top => 0x009f, head_mid => 0x0098},
);
my $data;
if($clientdata{$index}{kRO}) { #Packet 006B of kRO differs from that of other servers
$client->send($accountID);
$data = pack ("H272", "6b0088000100000064000000007fffffbc000000000000004cf1d00080020000000000002300000001000000000000000000000000000000000000000000000002004c0000004c00000016001600960006001700000006000000000000000000000001000000b1e2beefbcd3b1d7c0dabdc42100000000000000000000000c0901010c0100000100");
} else {
for (@characters) {
$data .= pack
$ENV{POSEIDON_CHARBLOCKSIZE} == 112
? 'a4 V4 x22 V2 v2 x2 v2 x2 v3 x2 v3 x2 a24 C6 v2'
: 'a4 V4 x22 v4 x2 v2 x2 v3 x2 v3 x2 a24 C6 v', # old Poseidon packing (charBlockSize 106?)
$charID, @{$_}{qw(exp zeny exp_job lvl_job hp hp sp sp job_id1 hairStyle level points_skill head_low head_top head_mid hairColor name str agi vit int dex luk slot rename)};
# NOTE: ideally, all character slots are filled with the same character, for idiot-proofing
# NOTE: also, the character's appearance may be made to be modifiable
}
$data = $accountID . pack("v2 x20", 0x6b, ($ENV{POSEIDON_CHARBLOCKSIZE} || 106)*@characters + 24) . $data;
}
$client->send($data);
# save servers.txt info
if ($switch ne '0065') {
$clientdata{$index}{gameLogin_packet} = $switch;
} else {
undef $clientdata{$index}{gameLogin_packet};
}
} elsif ($switch eq '0066') { # client sends character choice packet
Run with POSEIDON_CHARBLOCKSIZE=112 (or modify conditions in the source).
Re: Poseidon: CHARACTER_INFO size error
Posted: 21 Nov 2010, 13:39
by kudos2u
Tried your code on every block size from 106 to 128. It's either it would fail to connect to server or show the same popup from my screenshot. I can't figure out why openkore can connect on the right charBlockSize whereas poseidon cannot. Jeez!
Thanks for helping me btw, I appreciate it much!
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Poseidon: CHARACTER_INFO size error
Posted: 23 Nov 2010, 12:32
by KeithRafael
Is this code only works on KRO right? just to clarify. i'm also working on Poseidon and gathering some update on it. list client receivepacket etc. I also got the same error. Thanks and regards.
Re: Poseidon: CHARACTER_INFO size error
Posted: 27 May 2011, 08:34
by paulmichael
any update on this?
![Smile :)](./images/smilies/icon_e_smile.gif)