use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method sendFamilyJoinResponse.
public static byte[] sendFamilyJoinResponse(boolean accepted, String added) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.FAMILY_JOIN_REQUEST_RESULT.getValue());
mplew.write(accepted ? 1 : 0);
mplew.writeMapleAsciiString(added);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getMiniGameNewVisitor.
public static byte[] getMiniGameNewVisitor(MapleCharacter c, int slot) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
mplew.write(PlayerInteractionHandler.Action.VISIT.getCode());
mplew.write(slot);
addCharLook(mplew, c, false);
mplew.writeMapleAsciiString(c.getName());
mplew.writeInt(1);
mplew.writeInt(c.getMiniGamePoints("wins", true));
mplew.writeInt(c.getMiniGamePoints("ties", true));
mplew.writeInt(c.getMiniGamePoints("losses", true));
mplew.writeInt(2000);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method showOXQuiz.
public static byte[] showOXQuiz(int questionSet, int questionId, boolean askQuestion) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(6);
mplew.writeShort(SendOpcode.OX_QUIZ.getValue());
mplew.write(askQuestion ? 1 : 0);
mplew.write(questionSet);
mplew.writeShort(questionId);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method guildNotice.
public static byte[] guildNotice(int gid, String notice) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
mplew.write(0x44);
mplew.writeInt(gid);
mplew.writeMapleAsciiString(notice);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getOwlMessage.
// 0: Success
// 1: The room is already closed.
// 2: You can't enter the room due to full capacity.
// 3: Other requests are being fulfilled this minute.
// 4: You can't do it while you're dead.
// 7: You are not allowed to trade other items at this point.
// 17: You may not enter this store.
// 18: The owner of the store is currently undergoing store maintenance. Please try again in a bit.
// 23: This can only be used inside the Free Market.
// default: This character is unable to do it.
public static byte[] getOwlMessage(int msg) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
mplew.writeShort(SendOpcode.SHOP_LINK_RESULT.getValue());
// depending on the byte sent, a different message is sent.
mplew.write(msg);
return mplew.getPacket();
}
Aggregations