Xkore on eAthena servers

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Message
Author
Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Xkore on eAthena servers

#1 Post by Bibian »

We all know XKore is broken on certain if not all eAthena servers...

While trying to figure out why i may have stumbled upon something that can cause it. Using ServerType 3 on KoreRO
WIth XKore on (any mode) the maplogin packet that is sent is 20 bytes, after that 6 more bytes are sent and then xkore is disconnected from the server cause its not sending the correct maplogin.
Without xkore though, the maplogin sent it 32 bytes and the bot logs in normally...

For some reason xkore is sending a malformed maplogin packet, but i can not find out why or where.

Volunteers?

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Xkore on eAthena servers

#2 Post by sli »

Just cause I forgot whatever answer I got: wtf is XKore dong handling network stuff?
cs : ee : realist

UltimaWeapon
Human
Human
Posts: 37
Joined: 04 Apr 2008, 22:55
Noob?: Yes
Location: Thailand
Contact:

Re: Xkore on eAthena servers

#3 Post by UltimaWeapon »

Because Client Packet Version not math Kore Packet Version. Client using Packet Version 22 (Latest), but Kore using Packet Version 19.

Solution for fixed this problem.

Create new Server Type. and...

sendSkillUse

Code: Select all

$msg = pack("v x4 v x2 v x9 a4", 0x72, $lv, $ID, $targetID);
sendLook

Code: Select all

$msg = pack("v x5 C x2 C", 0x85, $head, $body);
sendSync

Code: Select all

$msg = pack("v x2 V", 0x89, getTickCount());
sendGetPlayerInfo

Code: Select all

$msg = pack("v x5 a4", 0x8C, $ID);
sendStorageAdd

Code: Select all

$msg = pack("v x5 v x V", 0x94, $index, $amount);
sendMapLogin

Code: Select all

$msg = pack("v x2 a4 x a4 x4 a4 x4 C", 0x9B, $accountID, $charID, $sessionID, $sex);
sendItemUse

Code: Select all

$msg = pack("v x2 v x4 a4", 0x9F, $ID, $targetID);
sendGetCharacterName

Code: Select all

$msg = pack("v x9 a4", 0xA2, $ID);
sendTake

Code: Select all

$msg = pack("v x2 a4", 0xF5, $itemID);
sendStorageGet

Code: Select all

$msg = pack("v x12 v x2 V", 0xF7, $index, $amount);
sendSkillUseLoc

Code: Select all

$msg = pack("v x3 v x2 v x v x6 v", 0x113, $lv, $ID, $x, $y);
sendDrop

Code: Select all

$msg = pack("v x3 v x v", 0x116, $index, $amount);
sendAttack

Code: Select all

$msg = pack("v x3 a4 x9 C", 0x190, $monID, $flag);
sendSit

Code: Select all

$msg = pack("v x16 C", 0x190, 2);
sendStand

Code: Select all

$msg = pack("v x16 C", 0x190, 3);
All Packets is Version 22 and I don't tested yet.

I hope you understand because I'm new for English.
I may make you misunderstand. Because my English isn't good enough. So Sorry.
Image

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Xkore on eAthena servers

#4 Post by sli »

A new servertype is not a fix. What about all the other servertypes?
cs : ee : realist

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: Xkore on eAthena servers

#5 Post by Bibian »

like sli said, a new servertype for every server is not the anwser... its also not logical, since Kore can login but xkore can't...
this means xkore is mangling the packet wrong somehow, we need to find how, why and where and make this work for ALL serverTypes

UltimaWeapon
Human
Human
Posts: 37
Joined: 04 Apr 2008, 22:55
Noob?: Yes
Location: Thailand
Contact:

Re: Xkore on eAthena servers

#6 Post by UltimaWeapon »

Oh!. Sorry for my packets and Other. I'm missing for looking in Network::Send::ServerType8 = =. :mrgreen:
I may make you misunderstand. Because my English isn't good enough. So Sorry.
Image

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Xkore on eAthena servers

#7 Post by sli »

Update: I got it to login!

----------

Just a little relevant Data::Dumper output:

Code: Select all

----------Game Info----------
Char ID: CF C3 00 00 (50127)
MAP Name: pay_arche.gat
MAP IP: koreserver.info
MAP Port: 6902
-----------------------------
$VAR1 = {
          'name' => 'received_character_ID_and_Map',
          'messageID' => '0071',
          'return' => 0
        };
$VAR1 = {
          'name' => 'login_error',
          'messageID' => '006A',
          'return' => 0
        };
Server connection has been denied
$VAR1 = {
          'name' => 'login_error',
          'messageID' => '006A',
          'return' => 0
        };
I stuck some debug messages in sendMapLogin for servertype 3, but they didn't even get printed. Which is odd, because that packet IS being sent, and I'm using servertype 3, so they should have print just fine...

Code: Select all

sub sendMapLogin {
	my ($self, $accountID, $charID, $sessionID, $sex) = @_;
	my $msg;
	$sex = 0 if ($sex > 1 || $sex < 0); # Sex can only be 0 (female) or 1 (male)

	print "---> MAP LOGIN SENDING NOW\n";

	$msg = pack("C*", 0x9b, 0, 0) .
		$accountID .
		pack("C*", 0, 0, 0, 0, 0) .
		$charID .
		pack("C*", 0x50, 0x92, 0x61, 0x00) . #not sure what this is yet (maybe $key?)
		pack("C*", 0xff, 0xff, 0xff) .
		$sessionID .
		pack("V", getTickCount()) .
		pack("C*", $sex);
		
	$self->sendToServer($msg);

	print "---> MAP LOGIN SENT\n";
}
cs : ee : realist

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: Xkore on eAthena servers

#8 Post by sli »

Ok, double posting because this is important. I got it kinda working. I logged in, but now get an unknown packet (see below) and the bot crashes when I use the command prefix (also see below). I added some notes to it in the form of comments, and I removed huge directory names because they're ugly.

Code: Select all

----------Game Info----------
Char ID: CF C3 00 00 (50127)
MAP Name: pay_arche.gat
MAP IP: koreserver.info
MAP Port: 6902
-----------------------------
Unknown packet - B90A # New problem
Map loaded
c test # Run with "; c test" in the client
This program has encountered an unexpected problem. This is probably because of a bug in this program, or in one of the plugins. Please tell us about this problem.

A detailed error report has been saved to errors.txt. Please include the contents of this file in your bug report, or we may not be able to help you!

The error message is:
Assertion ('HASH(0x4d48d98)' must be of class 'Actor::You') failed!
 at src/deps/Carp/Assert.pm line 271
        Carp::Assert::assert('', '\'HASH(0x4d48d98)\' must be of class \'Actor::You\'') called at src/Utils/Assert.pm line 31
        Utils::Assert::assertClass('HASH(0x4d48d98)', 'Actor::You') called at src/Misc.pm line 225
        Misc::checkValidity('mainLoop_part2.1') called at src/functions.pl line 601
        main::mainLoop_initialized() called at src/functions.pl line 70
        main::mainLoop() called at src/Interface.pm line 75
        Interface::mainLoop('Interface::Console::Win32=HASH(0x3dcf5ac)') called at ./openkore.pl line 96
        main::__start() called at ./openkore.pl line 186
Press ENTER to exit this program.
cs : ee : realist

botlah
Noob
Noob
Posts: 16
Joined: 22 May 2008, 03:20
Noob?: No

Re: Xkore on eAthena servers

#9 Post by botlah »

I've got to the same point as SLI but on another eathena server. I'm no dev but I have used openkore and kore/koreC for quite a while. At first I thought it could be a SVN bug, so I re-rolled to the previous version however instead of the assert.pm error I started getting a recieve.pm error. I tried xkore 3 and 1 both had this error. ( and as expected without xkore the bot logs in perfectly fine ).

oibrbot
Noob
Noob
Posts: 2
Joined: 09 Apr 2008, 03:49

Re: Xkore on eAthena servers

#10 Post by oibrbot »

ok, i'm pretty sure that this is like with legacyRO, before the harmony.dll update

u need the new recv packets and then for running kore without xkore, you use server type 8
and for with xkore, you use 8_3

Post Reply