- Joined
- Jun 30, 2008
- Messages
- 3,451
- Reaction score
- 1,616
PHP:
public static MaplePacket startCPQ() {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_START.getValue());
mplew.write(0); //team
mplew.writeShort(0); //Obtained CP - Used CP
mplew.writeShort(0); //Total Obtained CP
mplew.writeShort(0); //Obtained CP - Used CP of the team
mplew.writeShort(0); //Total Obtained CP of the team
mplew.writeShort(0); //Obtained CP - Used CP of the team
mplew.writeShort(0); //Total Obtained CP of the team
mplew.writeShort(0); //Probably useless nexon poop
mplew.writeLong(0); //Probably useless nexon poop
return mplew.getPacket();
}
public static MaplePacket obtainCP() {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_OBTAINED_CP.getValue());
mplew.writeShort(0); //Obtained CP - Used CP
mplew.writeShort(0); //Total Obtained CP
return mplew.getPacket();
}
public static MaplePacket obtainPartyCP() {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_PARTY_CP.getValue());
mplew.write(0); //Team where the points are given to.
mplew.writeShort(0); //Obtained CP - Used CP
mplew.writeShort(0); //Total Obtained CP
return mplew.getPacket();
}
public static MaplePacket CPQSummon() {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_SUMMON.getValue());
mplew.write(0); //Tab
mplew.write(0); //Number of summon inside the tab
mplew.writeMapleAsciiString(""); //Name of the player that summons
return mplew.getPacket();
}
public static MaplePacket CPQDied() {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_SUMMON.getValue());
mplew.write(0); //Team
mplew.writeMapleAsciiString(""); //Name of the player that died
mplew.write(0); //Lost CP
return mplew.getPacket();
}
/**
* Sends a CPQ Message
*
* Possible values for <code>message</code>:<br>
* 1: You don't have enough CP to continue.
* 2: You can no longer summon the Monster.
* 3: You can no longer summon the being.
* 4: This being is already summoned.
* 5: This request has failed due to an unknown error.
*
* @param message Displays a message inside Carnival PQ
**/
public static MaplePacket CPQMessage(byte message) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_MESSAGE.getValue());
mplew.write(message); //Message
return mplew.getPacket();
}
public static MaplePacket leaveCPQ() {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MONSTER_CARNIVAL_LEAVE.getValue());
mplew.write(0); //Something?
mplew.write(0); //Team
mplew.writeMapleAsciiString(""); //Player name
return mplew.getPacket();
}
PHP:
MONSTER_CARNIVAL_START(0x121),
MONSTER_CARNIVAL_OBTAINED_CP(0x122),
MONSTER_CARNIVAL_PARTY_CP(0x123),
MONSTER_CARNIVAL_SUMMON(0x124),
MONSTER_CARNIVAL_MESSAGE(0x125),
MONSTER_CARNIVAL_DIED(0x126),
MONSTER_CARNIVAL_LEAVE(0x127),
v75:
PHP:
MONSTER_CARNIVAL_START(0x103),
MONSTER_CARNIVAL_OBTAINED_CP(0x104),
MONSTER_CARNIVAL_PARTY_CP(0x105),
MONSTER_CARNIVAL_SUMMON(0x106),
MONSTER_CARNIVAL_MESSAGE(0x07),
MONSTER_CARNIVAL_DIED(0x108),
MONSTER_CARNIVAL_LEAVE(0x109),
v62:
PHP:
MONSTER_CARNIVAL_START(0xE3),
MONSTER_CARNIVAL_OBTAINED_CP(0xE4),
MONSTER_CARNIVAL_PARTY_CP(0xE5),
MONSTER_CARNIVAL_SUMMON(0xE6),
MONSTER_CARNIVAL_MESSAGE(0xE7),
MONSTER_CARNIVAL_DIED(0xE8),
MONSTER_CARNIVAL_LEAVE(0xE9),
Someone requested them. Checked all of them, and found out that some packets were missing.
Thanks Zygon, for letting me recheck the leave CPQ packet. Thanks
Good Luck coding CPQ, won't be hard by the way. And no I did not include the spawn CPQ monster packet. Get it yourself.
Last edited: