On /src/netword/send/servertype0.pm delete the sub sendMasterLogin and add the content from fRO. I tried using fRO serverType but some stuff got messed and this is better.
The code is
Code: Select all
sub version {
return $masterServer->{version} || 1;
}
sub sendClientMD5Hash {
my ($self) = @_;
my $msg = pack('v H32', 0x0204, $masterServer->{clientHash});
$self->sendToServer($msg);
}
# 0x02b0,85
sub sendMasterLogin {
my ($self, $username, $password, $master_version, $version) = @_;
# Little Hack by 'Technology'
$self->sendClientMD5Hash() if ($masterServer->{clientHash} != '');
my $key = pack('C24', (6, 169, 33, 64, 54, 184, 161, 91, 81, 46, 3, 213, 52, 18, 0, 6, 61, 175, 186, 66, 157, 158, 180, 48));
my $chain = pack('C24', (61, 175, 186, 66, 157, 158, 180, 48, 180, 34, 218, 128, 44, 159, 172, 65, 1, 2, 4, 8, 16, 32, 128));
my $in = pack('a24', $password);
my $rijndael = Utils::Rijndael->new();
$rijndael->MakeKey($key, $chain, 24, 24);
$password = $rijndael->Encrypt($in, undef, 24, 0);
# To get out local IP of our connection we need: $self->{net}->{remote_socket}->sockhost();
my $ip = "3139322e3136382e322e3400685f4c40";
# To get the MAC we need to use Net::ARPing or Net::Address::Ethernet or even Net::Ifconfig::Wrapper, that are not bundeled in Win Distro.
my $mac = "31313131313131313131313100"; # May-be Get it from Network Connection?
my $isGravityID = 0;
my $msg = pack('v V a24 a24 C H32 H26 C', 0x02B0, version(), $username, $password, $master_version, $ip, $mac, $isGravityID);
$self->sendToServer($msg);
}
Code: Select all
sub new {
my ($class) = @_;
my $self = $class->SUPER::new(@_);
my %packets = (
'0078' => ['actor_display', 'C a4 v14 a4 a2 v2 C2 a3 C3 v', [qw(object_type ID walk_speed opt1 opt2 option type hair_style weapon lowhead shield tophead midhead hair_color clothes_color head_dir guildID emblemID manner opt3 karma sex coords unknown1 unknown2 act lv)]], # 55 # standing
'007C' => ['actor_display', 'C a4 v14 C2 a3 C2', [qw(object_type ID walk_speed opt1 opt2 option hair_style weapon lowhead type shield tophead midhead hair_color clothes_color head_dir karma sex coords unknown1 unknown2)]], # 42 # spawning
'022C' => ['actor_display', 'C a4 v3 V v5 V v5 a4 a2 v V C2 a6 C2 v', [qw(object_type ID walk_speed opt1 opt2 option type hair_style weapon shield lowhead tick tophead midhead hair_color clothes_color head_dir guildID emblemID manner opt3 karma sex coords unknown1 unknown2 lv)]], # 65 # walking
);
foreach my $switch (keys %packets) {
$self->{packet_list}{$switch} = $packets{$switch};
}
return $self;
}