public static byte[] addAttackInfo(int type, int cid, int tbyte, int skill, int level, int display, byte speed, List<AttackPair> damage, int lvl, byte mastery, byte unk, int charge, Point pos, int ultLevel) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        if (type == 0) {
            mplew.writeShort(SendPacketOpcode.CLOSE_RANGE_ATTACK.getValue());
        } else if (type == 1 || type == 2) {
            mplew.writeShort(SendPacketOpcode.RANGED_ATTACK.getValue());
        } else if (type == 3) {
            mplew.writeShort(SendPacketOpcode.MAGIC_ATTACK.getValue());
        } else {
            mplew.writeShort(SendPacketOpcode.ENERGY_ATTACK.getValue());
        }
        if (type == 3) {
            mplew.write(0);
        }
        mplew.writeInt(cid);
        mplew.write(tbyte);
      //  System.out.println(tbyte + " - tbyte");
        mplew.writeShort(lvl); // Changed to short in v149.3 ?
        if ((skill > 0) || (type == 3)) {
            //mplew.write(level); // Deleted in v148.2 I think (Need to check) // skill level
            if (level > 0) {
                mplew.writeInt(skill);
            }
        } else if (type != 2 && type != 3) {
            mplew.write(0);
        }

        if (GameConstants.isZero(skill / 10000) && skill != 100001283) {
            short zero1 = 0;
            short zero2 = 0;
            mplew.write(zero1 > 0 || zero2 > 0); //boolean
            if (zero1 > 0 || zero2 > 0) {
                mplew.writeShort(zero1);
                mplew.writeShort(zero2);
                //there is a full handler so better not write zero
            }
        }

        if (type == 2) {
            mplew.write(ultLevel);
            if (ultLevel > 0) {
                mplew.writeInt(3220010);
            }
        }
        if (skill == 40021185 || skill == 42001006) {
            mplew.write(0); //boolean if true then int
        }
        if (type == 0 || type == 1) {
            mplew.write(0);
        }
        mplew.write(unk);//always 0? changed to short in v148.2
        if ((unk & 2) != 0) {
            mplew.writeInt(0);
            mplew.writeInt(0);
        }
        mplew.writeShort(display);
        mplew.write(speed);
        mplew.write(mastery);
        mplew.writeInt(charge);
        for (AttackPair oned : damage) {
            if (oned.attack != null) {
                mplew.writeInt(oned.objectid);
                mplew.write(7);
                mplew.write(0);
                mplew.write(0);
                if (skill == 42111002) {
                    mplew.write(oned.attack.size());
                    for (Pair eachd : oned.attack) {
                        mplew.writeInt(((Integer) eachd.left));
                    }
                } else {
                    for (Pair eachd : oned.attack) {
                        mplew.write(((Boolean) eachd.right) ? 1 : 0);
                        mplew.writeInt(((Integer) eachd.left));
                    }
                }
            }
        }
        if (skill == 2321001 || skill == 2221052 || skill == 11121052) {
            mplew.writeInt(0);
        } else if (skill == 65121052 || skill == 101000202 || skill == 101000102) {
            mplew.writeInt(0);
            mplew.writeInt(0);
        }
        if (skill == 42100007) {
            mplew.writeShort(0);
            mplew.write(0);
        }
        if (type == 1 || type == 2) {
            mplew.writePos(pos);
        } else if (type == 3 && charge > 0) {
            mplew.writeInt(charge);
        }
        if (skill == 5321000
                || skill == 5311001
                || skill == 5321001
                || skill == 5011002
                || skill == 5311002
                || skill == 5221013
                || skill == 5221017
                || skill == 3120019
                || skill == 3121015
                || skill == 4121017) {
            mplew.writePos(pos);
        }
        mplew.writeZeroBytes(130);//test

        return mplew.getPacket();
    }