public static final void PetCommand(final SeekableLittleEndianAccessor slea, final MapleClient c, final MapleCharacter chr) {
	final byte petIndex = chr.getPetIndex(slea.readInt());
	if (petIndex == -1) {
	    return;
	}
	MaplePet pet = chr.getPet(petIndex);

	slea.skip(5);
	final byte command = slea.readByte();
	final PetCommand petCommand = PetDataFactory.getPetCommand(pet.getPetItemId(), (int) command);

	boolean success = false;
	if (Randomizer.nextInt(99) <= petCommand.getProbability()) {
	    success = true;
	    if (pet.getCloseness() < 30000) {
		int newCloseness = pet.getCloseness() + petCommand.getIncrease();
		if (newCloseness > 30000) {
		    newCloseness = 30000;
		}
		pet.setCloseness(newCloseness);
		if (newCloseness >= ExpTable.getClosenessNeededForLevel(pet.getLevel() + 1)) {
		    pet.setLevel(pet.getLevel() + 1);
		    c.getSession().write(PetPacket.showOwnPetLevelUp(petIndex));
		    chr.getMap().broadcastMessage(PetPacket.showPetLevelUp(chr, petIndex));
		}
		c.getSession().write(PetPacket.updatePet(pet, true));
	    }
	}
	chr.getMap().broadcastMessage(chr, PetPacket.commandResponse(chr.getId(), command, petIndex, success, false), true);
    }