use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method showChair.
public static byte[] showChair(int characterid, int itemid) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SHOW_CHAIR.getValue());
mplew.writeInt(characterid);
mplew.writeInt(itemid);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getPlayerShopChat.
public static byte[] getPlayerShopChat(MapleCharacter c, String chat, boolean owner) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
mplew.write(PlayerInteractionHandler.Action.CHAT.getCode());
mplew.write(PlayerInteractionHandler.Action.CHAT_THING.getCode());
mplew.write(owner ? 0 : 1);
mplew.writeMapleAsciiString(c.getName() + " : " + chat);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method closeRangeAttack.
/*
public static byte[] summonAttack(int cid, int summonSkillId, byte direction, List<SummonAttackEntry> allDamage) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
//b2 00 29 f7 00 00 9a a3 04 00 c8 04 01 94 a3 04 00 06 ff 2b 00
mplew.writeShort(SendOpcode.SUMMON_ATTACK.getValue());
mplew.writeInt(cid);
mplew.writeInt(summonSkillId);
mplew.write(direction);
mplew.write(4);
mplew.write(allDamage.size());
for (SummonAttackEntry attackEntry : allDamage) {
mplew.writeInt(attackEntry.getMonsterOid()); // oid
mplew.write(6); // who knows
mplew.writeInt(attackEntry.getDamage()); // damage
}
return mplew.getPacket();
}
*/
public static byte[] closeRangeAttack(MapleCharacter chr, int skill, int skilllevel, int stance, int numAttackedAndDamage, Map<Integer, List<Integer>> damage, int speed, int direction, int display) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CLOSE_RANGE_ATTACK.getValue());
addAttackBody(mplew, chr, skill, skilllevel, stance, numAttackedAndDamage, 0, damage, speed, direction, display);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method removeTV.
/**
* Removes TV
*
* @return The Remove TV Packet
*/
public static byte[] removeTV() {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(2);
mplew.writeShort(SendOpcode.REMOVE_TV.getValue());
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method CPQMessage.
/**
* Sends a CPQ Message<br>
*
* Possible values for <code>message</code>:<br> 1: You don't have enough CP
* to continue.<br> 2: You can no longer summon the Monster.<br> 3: You can
* no longer summon the being.<br> 4: This being is already summoned.<br> 5:
* This request has failed due to an unknown error.<br>
*
* @param message Displays a message inside Carnival PQ
*/
public static byte[] CPQMessage(byte message) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_MESSAGE.getValue());
// Message
mplew.write(message);
return mplew.getPacket();
}
Aggregations