pRO's Update! Login Pincode..(similar to bRO)

Philippines

Moderators: waferbaron, Moderators

Forum rules
This server is currently not maintained and tables folder (including connection info) is outdated. Read the wiki for instructions on how to update those information. Please contribute your updated info. Contact Cozzie to join the team as a regular server supporter.
vhonn
Human
Human
Posts: 28
Joined: 03 Jun 2012, 11:50
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#21 Post by vhonn »

afgh1214 wrote:No problem!

Just trying to give back to the community that has done a lot for me too!

I would also gladly accept any thanks in the form of zenies or equips! :D

And no I'm not kidding :mrgreen: :D

Anyways, glad I could be of help.

But just to give you guys a heads up, even I am not that confident with this fix. I would still recommend you guys wait for a better fix by someone with more experience. This fix is more like a bandaid than a fix actually.

Still, its better than nothing!

Well I got the idea from this Topic http://forums.openkore.com/viewtopic.php?f=36&t=18519 and actually I am not really sure, I did change some things on some files then the idea came out when you posted that it is working. So thats it. Reading helps a lot!

Cheers!
Stolatos
Human
Human
Posts: 33
Joined: 07 Aug 2014, 06:28
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#22 Post by Stolatos »

Well what do you know...

Thanks a lot guys.. I don't know if this is stable but I got mine working too.

I just had to edit some extra errors with my servertype pm

BTW do you guys get disconnected sometimes?

Edit:

I'm not really sure but if you are getting disconnected every now and then I think its because of 09CF which is for GameGuard
(but I'm not really sure) so if anyone knows better please enlighten me. TIA.
kapuchino
Noob
Noob
Posts: 17
Joined: 24 Nov 2010, 01:46
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#23 Post by kapuchino »

thanks it's working..
Stolatos
Human
Human
Posts: 33
Joined: 07 Aug 2014, 06:28
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#24 Post by Stolatos »

kapuchino wrote:thanks it's working..
Can you do me a favor and watch your bot for a bit and post errors that you see. TIA.
xpragnarok
Noob
Noob
Posts: 7
Joined: 07 Aug 2014, 20:22
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#25 Post by xpragnarok »

Enter logging into Character Server (invalid character specified)...

Thanks to afgh1214, I got connected. The only problem now is being disconnected from the game after a short while.
Last edited by xpragnarok on 07 Aug 2014, 21:56, edited 1 time in total.
Stolatos
Human
Human
Posts: 33
Joined: 07 Aug 2014, 06:28
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#26 Post by Stolatos »

OK this is what I have noticed so far.

1. If you don't change anything you will get
Error logging into Character Server (invalid character specified)...
because you are not yet in the char select screen and the code isn't accepted yet.

2a. Now if you go to src\Network\Receive\pRO.pm and delete this lines:

sub received_characters {
return if ($net->getState() == Network::IN_GAME);
my ($self, $args) = @_;
$net->setState(Network::CONNECTED_TO_LOGIN_SERVER);

$charSvrSet{normal_slot} = $args->{normal_slot} if (exists $args->{normal_slot});
$charSvrSet{premium_slot} = $args->{premium_slot} if (exists $args->{premium_slot});
$charSvrSet{billing_slot} = $args->{billing_slot} if (exists $args->{billing_slot});
$charSvrSet{producible_slot} = $args->{producible_slot} if (exists $args->{producible_slot});
$charSvrSet{valid_slot} = $args->{valid_slot} if (exists $args->{valid_slot});

undef $conState_tries;

Plugins::callHook('parseMsg/recvChars', $args->{options});
if ($args->{options} && exists $args->{options}{charServer}) {
$charServer = $args->{options}{charServer};
} else {
$charServer = $net->serverPeerHost . ":" . $net->serverPeerPort;
}

# PACKET_HC_ACCEPT_ENTER2 contains no character info
return unless exists $args->{charInfo};

my $blockSize = $self->received_characters_blockSize();
for (my $i = $args->{RAW_MSG_SIZE} % $blockSize; $i < $args->{RAW_MSG_SIZE}; $i += $blockSize) {
#exp display bugfix - chobit andy 20030129
my $unpack_string = $self->received_characters_unpackString;
# TODO: What would be the $unknown ?
my ($cID,$exp,$zeny,$jobExp,$jobLevel, $opt1, $opt2, $option, $stance, $manner, $statpt,
$hp,$maxHp,$sp,$maxSp, $walkspeed, $jobId,$hairstyle, $weapon, $level, $skillpt,$headLow, $shield,$headTop,$headMid,$hairColor,
$clothesColor,$name,$str,$agi,$vit,$int,$dex,$luk,$slot, $rename, $unknown, $mapname, $deleteDate) =
unpack($unpack_string, substr($args->{RAW_MSG}, $i));
$chars[$slot] = new Actor::You;

# Re-use existing $char object instead of re-creating it.
# Required because existing AI sequences (eg, route) keep a reference to $char.
$chars[$slot] = $char if $char && $char->{ID} eq $accountID && $char->{charID} eq $cID;

$chars[$slot]{ID} = $accountID;
$chars[$slot]{charID} = $cID;
$chars[$slot]{exp} = $exp;
$chars[$slot]{zeny} = $zeny;
$chars[$slot]{exp_job} = $jobExp;
$chars[$slot]{lv_job} = $jobLevel;
$chars[$slot]{hp} = $hp;
$chars[$slot]{hp_max} = $maxHp;
$chars[$slot]{sp} = $sp;
$chars[$slot]{sp_max} = $maxSp;
$chars[$slot]{jobID} = $jobId;
$chars[$slot]{hair_style} = $hairstyle;
$chars[$slot]{lv} = $level;
$chars[$slot]{headgear}{low} = $headLow;
$chars[$slot]{headgear}{top} = $headTop;
$chars[$slot]{headgear}{mid} = $headMid;
$chars[$slot]{hair_color} = $hairColor;
$chars[$slot]{clothes_color} = $clothesColor;
$chars[$slot]{name} = $name;
$chars[$slot]{str} = $str;
$chars[$slot]{agi} = $agi;
$chars[$slot]{vit} = $vit;
$chars[$slot]{int} = $int;
$chars[$slot]{dex} = $dex;
$chars[$slot]{luk} = $luk;
$chars[$slot]{sex} = $accountSex2;

$chars[$slot]{deleteDate} = getFormattedDate($deleteDate) if ($deleteDate);
$chars[$slot]{nameID} = unpack("V", $chars[$slot]{ID});
$chars[$slot]{name} = bytesToString($chars[$slot]{name});
}

my $nChars = 0;
foreach (@chars) { $nChars++ if($_); }

# FIXME better support for multiple received_characters packets
if ($args->{switch} eq '099D' && $args->{RAW_MSG_SIZE} >= ($blockSize * 3)) {
$net->setState(1.5);
return;
}

message T("Received characters from Character Server\n"), "connection";

if (charSelectScreen(1) == 1) {
$firstLoginMap = 1;
$startingzeny = $chars[$config{'char'}]{'zeny'} unless defined $startingzeny;
$sentWelcomeMessage = 1;
}
}

2b. and go to tables\servers.txt and add pinCode 1 to your respective server (I put mine under charBlockSize)

Then try to run your bot and now you will see the line PIN code is correct. which was not there before on the console. Now you are able to bot.

3. BUT from time to time you get Disconnected from Map Server, connecting to Account Server in 30 seconds... and you also see Packet Tokenizer: Unknown switch: 09CF in the console and then a bit while you get disconnected.

4. If you look at 09CF on src\Network\Receive\ServerType0 you will see '09CF' => ['gameguard_request'].

5. I'm not really sure of this but I think this is the reason why I get disconnected regularly.

Well I hope I was even bit of a little help to the developers with my observation.
kapuchino
Noob
Noob
Posts: 17
Joined: 24 Nov 2010, 01:46
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#27 Post by kapuchino »

Stolatos wrote:
kapuchino wrote:thanks it's working..
Can you do me a favor and watch your bot for a bit and post errors that you see. TIA.

im botting right now and its running smoothly


just download the latest version of openkore (not necessary svn version) and follow the step provided by afgh1214

NOTE: when copying the bRO.pm to pRO.pm you need to change:
"package Network::Receive::bRO;" to "package Network::Receive::pRO;"
and dont include/delete the "sub items_nonstackable" BLOCK

delete this portion
sub items_nonstackable {
my ($self, $args) = @_;

my $items = $self->{nested}->{items_nonstackable};

if($args->{switch} eq '00A4' || $args->{switch} eq '00A6' || $args->{switch} eq '0122') {
return $items->{type4};
} elsif ($args->{switch} eq '0295' || $args->{switch} eq '0296' || $args->{switch} eq '0297') {
return $items->{type4};
} elsif ($args->{switch} eq '02D0' || $args->{switch} eq '02D1' || $args->{switch} eq '02D2') {
return $items->{type4};
} else {
warning("items_nonstackable: unsupported packet ($args->{switch})!\n");
}
}
and dont forget to put pinCode 1 in server txt (find your server eg.pRO loki, valk etc and add pinCode 1)

thanks afgh1214
Stolatos
Human
Human
Posts: 33
Joined: 07 Aug 2014, 06:28
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#28 Post by Stolatos »

kapuchino wrote:
Stolatos wrote:
kapuchino wrote:thanks it's working..
Can you do me a favor and watch your bot for a bit and post errors that you see. TIA.

im botting right now and its running smoothly


just download the latest version of openkore (not necessary svn version) and follow the step provided by afgh1214

NOTE: when copying the bRO.pm to pRO.pm you need to change:
"package Network::Receive::bRO;" to "package Network::Receive::pRO;"
and dont include/delete the "sub items_nonstackable" BLOCK

delete this portion
sub items_nonstackable {
my ($self, $args) = @_;

my $items = $self->{nested}->{items_nonstackable};

if($args->{switch} eq '00A4' || $args->{switch} eq '00A6' || $args->{switch} eq '0122') {
return $items->{type4};
} elsif ($args->{switch} eq '0295' || $args->{switch} eq '0296' || $args->{switch} eq '0297') {
return $items->{type4};
} elsif ($args->{switch} eq '02D0' || $args->{switch} eq '02D1' || $args->{switch} eq '02D2') {
return $items->{type4};
} else {
warning("items_nonstackable: unsupported packet ($args->{switch})!\n");
}
}
and dont forget to put pinCode 1 in server txt (find your server eg.pRO loki, valk etc and add pinCode 1)

thanks afgh1214
You aren't getting disconnected? Are you getting the 09CF message in the console? Please do check. TIA.

BTW I'm not talking about immediate disconnection. yes it will seem to run smoothly but you will get disconnected on regular intervals. I played another online game before and this is what happens when you play without gameguard. That is why I'm looking very closely to that 09CF message. You will get that once every time your bot successfully logs in and once you get that in about a minute you will get disconnected. I am using the latest openkore files btw.
Last edited by Stolatos on 07 Aug 2014, 22:06, edited 1 time in total.
afgh1214
Plain Yogurt
Plain Yogurt
Posts: 66
Joined: 07 Aug 2014, 05:46
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#29 Post by afgh1214 »

kapuchino wrote:
Stolatos wrote:
kapuchino wrote:thanks it's working..
Can you do me a favor and watch your bot for a bit and post errors that you see. TIA.

im botting right now and its running smoothly


just download the latest version of openkore (not necessary svn version) and follow the step provided by afgh1214

NOTE: when copying the bRO.pm to pRO.pm you need to change:
"package Network::Receive::bRO;" to "package Network::Receive::pRO;"
and dont include/delete the "sub items_nonstackable" BLOCK

delete this portion
sub items_nonstackable {
my ($self, $args) = @_;

my $items = $self->{nested}->{items_nonstackable};

if($args->{switch} eq '00A4' || $args->{switch} eq '00A6' || $args->{switch} eq '0122') {
return $items->{type4};
} elsif ($args->{switch} eq '0295' || $args->{switch} eq '0296' || $args->{switch} eq '0297') {
return $items->{type4};
} elsif ($args->{switch} eq '02D0' || $args->{switch} eq '02D1' || $args->{switch} eq '02D2') {
return $items->{type4};
} else {
warning("items_nonstackable: unsupported packet ($args->{switch})!\n");
}
}
and dont forget to put pinCode 1 in server txt (find your server eg.pRO loki, valk etc and add pinCode 1)

thanks afgh1214
Good Morning!

I just woke up and all my bots are still working fine.

No errors, no disconnects. (Except I forgot to set default weapons and all my bots resorted to punching)

And nobody else is saying that they were getting disconnected so I think its just that one guy.

To the guy that keeps getting disconnected, try doing the steps exactly as outlined in earlier posts.

1. Update using tortoiseSVN

2. add pinCode 1 in servers.txt

3. delete all contents in src/network/receive/pRO.pm and replace it with that small part from bRO.pm that I already posted earlier.

If done exactly like that then you shouldnt be getting any errors cause that's what I did and Im not getting any.

Edit: I am aware that this "fix" is not perfect. But it should be enough until someone who actually knows what their doing can come up with a better one. I just came up with this one mostly with trial and error and a whole lot of luck.

There are a lot of packets(?)/variables(?) in pRO.pm that were removed so there's bound to be some errors but I havent gotten any at all yet so the guy that keeps getting disconnected probably did something different.
Last edited by afgh1214 on 07 Aug 2014, 22:11, edited 1 time in total.
kapuchino
Noob
Noob
Posts: 17
Joined: 24 Nov 2010, 01:46
Noob?: Yes

Re: pRO's Update! Login Pincode..(similar to bRO)

#30 Post by kapuchino »

been botting for almost an hour and so far no disconnection
and no error messages