Source : Acernis
I use the Item[ALIEN_SOCKET_CREATOR]
then I got Error code : 5
And then I am going to check my source
These are my PacketsCode:SendPacketOpcode : ALIEN_SOCKET_CREATOR(0x341), RecvPacketOpcode : USE_ALIEN_SOCKET (0xA1)
And It handles this way
I just go to check packet and look for what they areCode:public static final void UseAlienSocket(final LittleEndianAccessor slea, final MapleClient c) { c.getPlayer().updateTick(slea.readInt()); c.getPlayer().setScrolledPosition((short) 0); final Item alienSocket = c.getPlayer().getInventory(MapleInventoryType.USE).getItem((byte) slea.readShort()); final int alienSocketId = slea.readInt(); final Item toMount = c.getPlayer().getInventory(MapleInventoryType.EQUIP).getItem((byte) slea.readShort()); if (alienSocket == null || alienSocketId != alienSocket.getItemId() || toMount == null || c.getPlayer().hasBlockedInventory()) { c.getSession().write(InventoryPacket.getInventoryFull()); return; } // Can only use once-> 2nd and 3rd must use NPC. final Equip eqq = (Equip) toMount; if (eqq.getSocketState() != 0) { // Used before c.getPlayer().dropMessage(1, "This item already has a socket."); } else { c.getSession().write(CSPacket.useAlienSocket(false)); eqq.setSocket1(0); // First socket, GMS removed the other 2 MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, alienSocket.getPosition(), (short) 1, false); c.getPlayer().forceReAddItem(toMount, MapleInventoryType.EQUIP); } c.getSession().write(CSPacket.useAlienSocket(true)); //c.getPlayer().fakeRelog(); //c.getPlayer().dropMessage(1, "Added 1 socket successfully to " + toMount); } public static byte[] useAlienSocket(boolean start) { MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(); mplew.writeShort(SendPacketOpcode.ALIEN_SOCKET_CREATOR.getValue()); mplew.write(start ? 0 : 2); return mplew.getPacket(); }
A1 00 // Header
1E 1D 37 00 //Tick
01 00 // slot(AlienSocketCreator)
50 B5 2C 00 ItemID(AlienSocketCreator)
01 00 // slot(Equip)
00 00 00 00 //unknow
00 00//unknow
I think there isn't any error about this....
So I check it in V117 source And I find
there isn't, So I try to hide this line in V144 sourceCode:c.getSession().write(MTSCSPacket.useAlienSocket(false));
But I still got error code 5 ...
Please someone help me ...



Reply With Quote

