PetManagerService
This service allows you to get information about your pets and perform actions with them like walking or attacking.
getPets
Returns a list with your current pets.
// Request
{
"service": "PetManagerService",
"method": "getPets",
"params": {}
}
// Response
{
"status": "ok":
"result": {
"pets": [
{
"position": {
"x": 5,
"y": 8,
},
"dest_pos": {
"x": 10,
"y": 15,
},
"state": 1,
"pet": {
// NPC information
}
}
// pet 1,
// pet 2,
// [...]
]
}
}
The pet
field is an NPC object with the structure described in the Entities chapter.
getCurrentPet
Returns your current pet information.
// Request
{
"service": "PetManagerService",
"method": "getCurrentPet",
"params": {}
}
// Response
{
"status": "ok",
"result": {
// Pet information
}
}
getCurrentPartner
Returns your current partner information.
// Request
{
"service": "PetManagerService",
"method": "getCurrentPartner",
"params": {}
}
// Response
{
"status": "ok",
"result": {
// Partner information
}
}
setPetState
Changes the pet state to the specified state. This allows you to change the "letter" state of your pet like A, S, D, F. This are the states values that I've found that can be helpful:
D :
0
S:
5
F:
7
Walk after S:
8
A:
12
After pressing A and clicking:
15
S state after using A or F:
17
// Request
{
"service": "PetManagerService",
"method": "setPetState",
"params": {
"pet_id": 4421,
"state": 5
}
}
// Response
{
"status": "ok",
"result": {}
}
walk
Walks with all your current pets unless you put them on S state.
// Request
{
"service": "PetManagerService",
"method": "walk",
"params": {
"x": 5,
"y": 8
}
}
// Response
{
"status": "ok",
"result": {}
}
autoAttack
Auto attack with all your current pets unless you put them on S state.
// Request
{
"service": "PetManagerService",
"method": "autoAttack",
"params": {
"entity_type": 2,
"entity_id": 2610
}
}
// Response
{
"status": "ok",
"result": {}
}
petAttack
Uses a pet skill on the specified target. If you want to use a skill that doesn't need a target you can set entity_type
and entity_id
to 0.
// Request
{
"service": "PetManagerService",
"method": "petAttack",
"params": {
"entity_type": 2,
"entity_id": 2610,
"skill_id": 3
}
}
// Response
{
"status": "ok",
"result": {}
}
partnerAttack
Uses a partner skill on the specified target. If you want to use a skill that doesn't need a target you can set entity_type
and entity_id
to 0.
// Request
{
"service": "PetManagerService",
"method": "partnerAttack",
"params": {
"entity_type": 2,
"entity_id": 2610,
"skill_id": 1
}
}
// Response
{
"status": "ok",
"result": {}
}
Last updated