[Help] How to create sendMapLogin code

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
Afazter
Noob
Noob
Posts: 5
Joined: 15 May 2012, 02:51
Noob?: Yes

[Help] How to create sendMapLogin code

#1 Post by Afazter »

[i'm sorry for my bad english]

hi master

i really want to create any sendMapLogin because people say the sendMapLogin is source... ehm (ex : it's player but in my openkore that's NPC), i've been trying even make a plugins for trying all serverType in folder kRO (im following this guide too) http://www.openkore.com/index.php/ServerType

i've been tried 8_1 - 8_4 and my bot already login, but cannot detect the NPC and player, and 8_5 already tried but after 2second my bot is disconnected from server

I thought of making a sendMapLogin such as making serverType and i saw sub forum http://forums.openkore.com/viewtopic.php?f=10&t=16722 . That to make themselves ServerType must record the packet first

I finally thought to get some packages through RPE

Image

and I also use my alternative way to add code under sub sendMapLogin

Code: Select all

debug "Sent : Account ID : ".getHex($accountID).", Char : ".getHex($charID).", Session = ".getHex($sessionID).",Tick : ".getHex(pack("V1", getTickCount()))." Gender : ".getHex(pack("C*", $sex))." (End)\n", "sendPacket", 2;
I finally found a some packets

Code: Select all

Sent : Account ID : 64 9E 1E 00, Char : C0 01 00 00, Session = 8B 41 BF 4F, Tick : FF B6 76 00 Gender : 01
this is my packet :
from_client = 35 08 64 9E 1E 00 C0 01 00 00 FF 69 79 77 29 29 F8 00 01

now :
from_bot = 35 08 $accountID $charID FF 69 79 77 29 29 F8 00 $gender


after that I tried to edit from serverType8:
from :

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)
	$msg = pack("C*", 0x9b, 0, 0x39, 0x33) .
		$accountID .
		pack("C*", 0x65) .
		$charID .
		pack("C*", 0x37, 0x33, 0x36, 0x64) . 
		$sessionID .
		pack("V", getTickCount()) .
		pack("C*", $sex);
	$self->sendToServer($msg);
}
then :

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)
	$msg = pack("C*", 0x35, 0x08) .
		$accountID .
		$charID . 
		$sessionID .
		pack("V", getTickCount()) .
		pack("C*", $sex);
	debug "Sent : ".getHex($msg)."\n", "sendPacket", 2; 
	$self->sendToServer($msg);
}
** But My sendMapLogin Such As serverType 8_5 Cause After A Few Second Its Disconnected From Map Server
** i've completely lost in this code

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: [Help] How to create sendMapLogin code

#2 Post by kLabMouse »

God damn.
Thus Numbered ServerTypes should be Removed!
Why people still try to use them?

Afazter
Noob
Noob
Posts: 5
Joined: 15 May 2012, 02:51
Noob?: Yes

Re: [Help] How to create sendMapLogin code

#3 Post by Afazter »

kLabMouse wrote:God damn.
Thus Numbered ServerTypes should be Removed!
Why people still try to use them?
sorry, but only this serverType that can login to map server

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: [Help] How to create sendMapLogin code

#4 Post by EternalHarvest »

Afazter wrote:i've been tried 8_1 - 8_4 and my bot already login, but cannot detect the NPC and player, and 8_5 already tried but after 2second my bot is disconnected from server

But My sendMapLogin Such As serverType 8_5 Cause After A Few Second Its Disconnected From Map Server
8_5 isn't any different from 8_4 except for sendMapLogin packet. If you're able to login, but something wrong ingame with 8_4, it would be the same with 8_5.

Locked