public Packet equip(int slot, int epart)
    {
        Packet packet = new Packet();
        //packet.addHeader((byte)0xE4, (byte)0x2E);
        switch (epart)
        {
            case 1:
                packet.addHeader((byte) 0xE4, (byte) 0x2E);
                break;
                
            case 2:
                packet.addHeader((byte) 0x19, (byte) 0x2F);
                break;

            case 3:
                packet.addHeader((byte) 0x1B, (byte) 0x2F);
                break;
            
        }
        try
        {
            int aid = this.getInvent(slot);
            if (aid == 0)
            {
                packet.addPacketHead((byte) 0x00, (byte) 0x60);
                return packet;
            }

            ResultSet rs = item.getItemInfo(aid);
            rs.next();
            if (rs.getInt("reqlevel") > this.level)
            {
                packet.addPacketHead((byte) 0x00, (byte) 0x65);
                return packet;
            }
            int bott = rs.getInt("bot");
            if (bott != this.bottype && bott != 0)
            {
                packet.addPacketHead((byte)0x00, (byte)0x60);
                return packet;
            }
            int part = rs.getInt("part")-1;

            if (part == 17)
            {
                epart = 4;
                part = 0;
            }
            else
            if (part == 18)
            {
                epart = 4;
                part = 1;
            }

            int old = this.getEquip(epart, part);

            if (part == 15)
            {
                if (old != 0)
                {
                    int old2 = this.getEquip(epart, part+1);
                    if (old2 == 0){
                        old = 0;
                        part++;
                    }
                }

            }

            if (old != -1)
            {
                if (old == 0)
                {
                    this.setInvent(0, slot);
                    this.setEquip(aid, epart, part);
                    //packet.addPacketHead((byte) 0x01, (byte) 0x00);
                    packet.setPacket(this.getpacketcinfo());
                    return packet;
                }
                this.setInvent(old, slot);
                this.setEquip(aid, epart, part);
                //packet.addPacketHead((byte) 0x01, (byte) 0x00);
                packet.setPacket(this.getpacketcinfo());
                return packet;
            }
            packet.addPacketHead((byte)0x00, (byte)0x60);
            return packet;
        } catch (Exception e)
        {
            debug(e.getMessage());
        }
        packet.addPacketHead((byte)0x00, (byte)0x60);
        return packet;
    }