Taming monster/pet

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

subok13
Noob
Noob
Posts: 12
Joined: 05 Sep 2009, 16:42
Noob?: Yes

Taming monster/pet

#1 Post by subok13 »

HELP!!!!!!!!!!!!!!!!!!!!!!
COMMENT ANYTHING..whether (you don't know how to solve this problem) or (you also want to know how to solve this problem) or (you have found a solution and post a link) or (this is impossible)..anything relevant!


Case/Scenario:
-if you're online, using a taming item on a monster will display a slot machine having "success" or "failed"
-trigger the slot machine by clicking on it..then it will return a random "success/failed" value
- if "success", you will have the egg of that monster to pet...if "failed", no egg


Question:
how to trigger that slot machine when using OpenKore? when i use the taming item on a monster, all the openkore tell me is that i have used that item on the monster (thus, deducting its amount by 1) but does not prompt me to any more action (which should have been triggering the slot machine)..help anyone..thanks


Summary in Openkore:
-i use taming item on monster (im <item#> <monster#>)
-openkore says item amount = -1 since you used it (You used Item: Orange Juice (9) x 1 - 19 left)
-that's it...
*no prompt whether to select a random "success" or "failed" to begin taming
*(then of course) no return value whether taming is "success" or "failed"
freegoods
Perl Monk
Perl Monk
Posts: 8
Joined: 05 Apr 2008, 02:39
Noob?: Yes
Location: Russia

Re: HELP: How to tame monster/pet using OpenKore?

#2 Post by freegoods »

It's not possible, since it's not implemented.
OpenKore ignores many packets, including slot maschine packets.
subok13
Noob
Noob
Posts: 12
Joined: 05 Sep 2009, 16:42
Noob?: Yes

Re: HELP: How to tame monster/pet using OpenKore?

#3 Post by subok13 »

ouch! too bad..

i needed this on a quest which refreshes every 20hrs..
my problem is i am delayed for 2days so i needed to do this again exactly 20hrs after completing it to catch up..

i can't play online since i am not at home all the time..
most Internet Cafe doesn't have pRO..
etc..etc..

Thanks for the reply -> freegoods

i am still hoping that future developments will enable this feature since people visits this thread hehehe..
Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: HELP: How to tame monster/pet using OpenKore?

#4 Post by Technology »

Hi Freegoods!

Code: Select all

0x019e	2	PACKET_ZC_START_CAPTURE
0x019f	6	PACKET_CZ_TRYCAPTURE_MONSTER
0x01a0	3	PACKET_ZC_TRYCAPTURE_MONSTER

Code: Select all

'019E' => ['pet_capture_process'], # 2
# 0x019f is sent packet
'01A0' => ['pet_capture_result', 'C', [qw(type)]], # 3

sub pet_capture_result {
	my ($self, $args) = @_;

	if ($args->{success}) {
		message T("Pet capture success\n");
	} else {
		message T("Pet capture failed\n");
	}
}

# 019E
# TODO
# note: this is probably the trigger for the client's slotmachine effect or so.
sub pet_capture_process {
	my ($self, $args) = @_;
	message T("Attempting to capture pet.\n"), "info";
}

Code: Select all

# 0x019f,6,catchpet,2
sub sendPetCapture {
	my ($self, $monID) = @_;
	my $msg = pack('v a4', 0x019F, $monID);
	$self->sendToServer($msg);
	debug "Sent pet capture: ".getHex($monID)."\n", "sendPacket", 2;
}
Its implemented in the send and receive part, but not in commands.

EDIT:
It should be fully implemented now, test svn r6905 please.
feature: pet system updated to match functionality of the RO client
a few notes:
- you should use the taming item before trying to catch the pet, else the capture will fail and the monster will do an angry emoticon :P
- to not get DC, use the "Pet Incubator" item before doing the command pet hatch <itemName|itemIndex>
- if you use xkore and return the pet to its egg trough the client things can get messy # todo: instead undef %pet when the actor (our pet) dissapears, this is safer (xkore)

pet [capture <monsterIndex>] | [hatch <itemIndex|itemName>]
pet [status|info|feed|performance|return|unequip|name <name>]
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!
subok13
Noob
Noob
Posts: 12
Joined: 05 Sep 2009, 16:42
Noob?: Yes

Re: HELP: How to tame monster/pet using OpenKore?

#5 Post by subok13 »

Wow!! Thanks for the post -> Technology

A bit tech-y for a noob like me but i'll try to figure this one out..i'll try checking out SVN r6905 first asap..ill update you for any results (both negative but preferably positive ü) though im kinda busy this week..thanks!

To Everyone:
-feel free to post as many solutions as possible..i'll try each and every one you post..in the meantime i will try those already posted, like Technology's..thanks people ü
subok13
Noob
Noob
Posts: 12
Joined: 05 Sep 2009, 16:42
Noob?: Yes

Taming monster always fail.. >_<

#6 Post by subok13 »

Steps taken:

===============================================================================================
1. downloaded and extracted OpenKore 2.0.7
===============================================================================================

https://sourceforge.net/projects/openko ... p/download
on kLabMouse's post http://forums.openkore.com/viewtopic.php?f=0&t=6795

===============================================================================================
2. alter openkore-2.0.7\control\config.txt to connect my player to the game (pRO Valkyrie)
===============================================================================================

master Philippines - pRO: Valkyrie
server 0
serverType 22
username *******
password *******
char 1

-connected

===============================================================================================
3. included the following on openkore-2.0.7\src\Network\Receive.PM
===============================================================================================

Code: Select all

'019E' => ['pet_capture_process'],
'01A0' => ['pet_capture_result', 'C', [qw(type)]],

sub pet_capture_result {
	my ($self, $args) = @_;

	if ($args->{success}) {
		message T("Pet capture success\n");
	} else {
		message T("Pet capture failed\n");
	}
}

sub pet_capture_process {
	my ($self, $args) = @_;
	message T("Attempting to capture pet.\n"), "info";
}
replaced previous:

Code: Select all

'01A0' => ['pet_capture_result', 'C1', [qw(type)]],

sub pet_capture_result {
	my ($self, $args) = @_;

	if ($args->{success}) {
		message T("Pet capture success\n");
	} else {
		message T("Pet capture failed\n");
	}
}
===============================================================================================
4. did the following to the openkore-2.0.7\src\Commands.PM
===============================================================================================

removed # in #pet (initHandlers)


changed

Code: Select all

if (!%pet) {
		error T("Error in function 'pet' (Pet Management)\n" .
			"You don't have a pet.\n");
into

Code: Select all

if (!%pet) {
		$messageSender->sendPetCapture();
because i get an error stating i have no pet when invoking "pet" command in console
my char doesn't have any pet

===============================================================================================
5. added the following to the openkore-2.0.7\src\Network\Send\ServerType22.PM
===============================================================================================

Send\ServerType22.PM since pRO - Valkyrie is ServerType22

Code: Select all

sub sendPetCapture {
	my ($self, $monID) = @_;
	my $msg = pack('v a4', 0x019F, $monID);
	$self->sendToServer($msg);
	debug "Sent pet capture: ".getHex($monID)."\n", "sendPacket", 2;
}


***********************************************************************************************
in OpenKore Console Command
***********************************************************************************************

Code: Select all

- Equipment (Equipped) --
-- Equipment (Not Equipped) --
-- Non-Usable --
-- Usable --
0    Battle Manual x 5                                    
1    Bubble Gum x 5                                       
2    Unknown #12408 x 5    <- taming item                               
-------------------------------
console command: im 2 0

Attempting to capture pet.
You used Item: Unknown #12408 (2) x 1 - 4 left

console command: pet 0

Pet capture failed <- comes right after "pet 0"


tried 20x..all failed..help..as you can see..im a noob :(
subok13
Noob
Noob
Posts: 12
Joined: 05 Sep 2009, 16:42
Noob?: Yes

Re: HELP: How to tame monster/pet using OpenKore?

#7 Post by subok13 »

Help! still needs to be done >_<
subok13
Noob
Noob
Posts: 12
Joined: 05 Sep 2009, 16:42
Noob?: Yes

Re: HELP: How to tame monster/pet using OpenKore?

#8 Post by subok13 »

THIS IS NOT YET SOLVED!!! HELP!!
Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: HELP: How to tame monster/pet using OpenKore?

#9 Post by Mushroom »

Delete your openkore and download a new one.
Instanted of manually chaging the files, update using start-autoupdate.exe (search in the stickies for more information).
After updating, make a sure that you got the right server info and extract the recvpackets from the .exe using ROTools (download can be found at the forums). Try agan taming and report back with results.
Quit.
subok13
Noob
Noob
Posts: 12
Joined: 05 Sep 2009, 16:42
Noob?: Yes

Re: HELP: How to tame monster/pet using OpenKore?

#10 Post by subok13 »

finally, i was able to catch a pet after getting a new command code for pet capturing..i think its from the upcoming 2.1

Code: Select all

sub cmdPet {
	my (undef, $args_string) = @_;
	my @args = parseArgs($args_string, 2);

	if (!$net || $net->getState() != Network::IN_GAME) {
		error TF("You must be logged in the game to use this command (%s)\n", 'pet ' . $args[0]);
	} elsif ($args[0] eq "c" || $args[0] eq "capture") {
		# todo: maybe make a match function for monsters?
		if ($args[1] =~ /^\d+$/) {
			if ($monstersID[$args[1]] eq "") {
				error TF("Error in function 'pet capture|c' (Capture Pet)\n" . 
					"Monster %s does not exist.\n", $args[1]);
			} else {
				$messageSender->sendPetCapture($monstersID[$args[1]]);
			}
		} else {
			error TF("Error in function 'pet [capture|c]' (Capture Pet)\n" . 
				"%s must be a monster index.\n", $args[1]);
		}

         }
}

the only problem remaining concerns the "pet capture result"

Code: Select all

sub pet_capture_result {
   my ($self, $args) = @_;

   if ($args->{success}) {
      message T("Pet capture success\n");
   } else {
      message T("Pet capture failed\n");
   }
}
}
this was posted by Technology but i don't know if it's correct

WHY?

openkore 2.0.7 always logs "Pet capture failed" on the console even if i capture or not a monster..and then openkore gets disconnected

i initially thought it has something to do with the packet description..so i tried both the default and Technology's post for 01A0 but still failed to solve the problem..

Code: Select all

'01A0' => ['pet_capture_result', 'C1', [qw(type)]],

Code: Select all

'01A0' => ['pet_capture_result', 'C', [qw(type)]],
ANY SUGGESTIONS?