Esempio n. 1
0
  public static byte[] stopControllingMonster(int oid) {
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

    mplew.write(SendPacketOpcode.SPAWN_MONSTER_CONTROL.getValue());
    mplew.write(0);
    mplew.writeInt(oid);

    return mplew.getPacket();
  }
Esempio n. 2
0
  public static byte[] controlMonster(MapleMonster life, boolean newSpawn, boolean aggro) {
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

    mplew.write(SendPacketOpcode.SPAWN_MONSTER_CONTROL.getValue());
    mplew.write(aggro ? 2 : 1);
    mplew.writeInt(life.getObjectId());
    mplew.writeInt(life.getId());
    mplew.writePos(life.getTruePosition());
    mplew.write(2);
    mplew.writeShort(life.getFh());
    mplew.write(life.getStance());
    mplew.write(newSpawn ? -2 : life.isFake() ? -4 : -1);

    mplew.write(0);
    mplew.writeLong(0);

    return mplew.getPacket();
  }