hi. I hate releasing but this is obsolete and Christmas thread peer pressure is too strong.
for those who don't know what it does, you can collect chocolates and when you have them all you summon a dragon. (DBZ ripoff plz)
RECV OP CODES:
PINKBEAN_CHOCO_OPEN(0x130)
PINKBEAN_CHOCO_SUMMON(0x131)
SEND OP CODES:
PINKBEAN_CHOCO(0xA8)
0xBC for v147 or v148
note before using:
I don't have the actual dragon spawning packet. too bad.
this was made long ago for v117. I don't know if it still exists.
I hope it works because I haven't executed the code in months.
in the second method posted, it looks like 1 boolean can be removed, but since I don't remember why I made it this way, I left it there.
enjoy moving chocolates around =D
for those who don't know what it does, you can collect chocolates and when you have them all you summon a dragon. (DBZ ripoff plz)
PHP:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.channel.handler;
import client.MapleCharacter;
import client.MapleClient;
import net.AbstractMaplePacketHandler;
import tools.data.input.SeekableLittleEndianAccessor;
import tools.packet.CWvsContext;
/**
*
* @author Sai
*/
public class PinkBeanChocoHandler extends AbstractMaplePacketHandler {
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
MapleCharacter chr = c.getPlayer();
if (chr == null || chr.hasBlockedInventory()) {
return;
}
// 0x1: First chocolate, 3994200
int flag = 0;
for (int i = 0, j = 0x1; i < 9; i ++, j *= 2) {
if (chr.haveItem(3994200 + i)) {
flag |= j;
}
}
c.getSession().write(CWvsContext.sendPinkBeanChoco(true, false, flag));
}
}
PHP:
public static byte[] sendPinkBeanChoco(boolean open, boolean close, int flag) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendPacketOpcode.PINKBEAN_CHOCO.getValue());
mplew.writeInt(0);
mplew.write(open ? 1 : 0); // 1 = open, 0 = update
mplew.write(close ? 1 : 0); // close = 1
mplew.write(flag == 0x1FF ? 1 : 0); // boolean, 1 = all full
mplew.writeInt(flag);
return mplew.getPacket();
}
RECV OP CODES:
PINKBEAN_CHOCO_OPEN(0x130)
PINKBEAN_CHOCO_SUMMON(0x131)
SEND OP CODES:
PINKBEAN_CHOCO(0xA8)
0xBC for v147 or v148
note before using:
I don't have the actual dragon spawning packet. too bad.
this was made long ago for v117. I don't know if it still exists.
I hope it works because I haven't executed the code in months.
in the second method posted, it looks like 1 boolean can be removed, but since I don't remember why I made it this way, I left it there.
enjoy moving chocolates around =D