Well this is my first release, i know this source is Old but i started to begin with this, so here's the fix for the reason that you cannot buy Equips due an incorrect gender on the items in the CS:
CashItem:
below > private final int category, subcategory, parent, sn, itemid, flag, price, discountPrice, quantity, expire, gender, likes;
add:
private final short mesoSell;
below > this.likes = likes; add:
this.mesoSell = mesoSell;
Below > public int getLikes() { return likes; }
add:
public int MesoSell() { return mesoSell; }
In CashItemFactory replace > CashItem item = new CashItem(rs.getInt("category"), rs.getInt("subcategory"), rs.getInt("parent"), rs.getString("image"), rs.getInt("sn"), rs.getInt("itemid"), rs.getInt("flag"), rs.getInt("price"), rs.getInt("discountPrice"), rs.getInt("quantity"), rs.getInt("expire"), rs.getInt("gender"), rs.getInt("likes"));
for:
CashItem item = new CashItem(rs.getInt("category"), rs.getInt("subcategory"), rs.getInt("parent"), rs.getString("image"), rs.getInt("sn"), rs.getInt("itemid"), rs.getInt("flag"), rs.getInt("price"), rs.getInt("discountPrice"), rs.getInt("quantity"), rs.getInt("expire"), rs.getInt("gender"), rs.getInt("likes"), rs.getShort("mesoSell"));
and Finally replace in CSPacket:
addCSItemInfo code with
public static void addCSItemInfo(MaplePacketLittleEndianWriter mplew, CashItem item) {
mplew.writeInt(item.getCategory());
mplew.writeInt(item.getSubCategory());
mplew.writeInt(item.getParent());
mplew.writeMapleAsciiString(item.getImage());
mplew.writeInt(item.getSN());
mplew.writeInt(item.getItemId());
mplew.writeInt(1);
mplew.writeInt(item.getFlag());
mplew.writeInt(0);
mplew.writeInt(0);
mplew.writeInt(item.getPrice());
mplew.write(HexTool.getByteArrayFromHexString("00 80 22 D6 94 EF C4 01"));
mplew.writeLong(PacketHelper.MAX_TIME);
mplew.write(HexTool.getByteArrayFromHexString("00 80 22 D6 94 EF C4 01"));
mplew.writeLong(PacketHelper.MAX_TIME);
mplew.writeInt(item.getPrice());
mplew.writeInt(0);
mplew.writeInt(item.getQuantity());
mplew.writeInt(item.getExpire());
mplew.writeShort(1);
mplew.writeShort(1);
mplew.writeShort(1);
mplew.writeShort(item.MesoSell());
mplew.writeShort(1);
mplew.writeInt(item.getGender());
mplew.writeInt(item.getLikes());
mplew.writeInt(0);
mplew.writeInt(0);
mplew.writeInt(0);
mplew.writeInt(0);
List pack = CashItemFactory.getInstance().getPackageItems(item.getSN());
if (pack == null) {
mplew.writeInt(0);
} else {
mplew.writeInt(pack.size());
for (int i = 0; i < pack.size(); i++) {
mplew.writeInt(100000677);
mplew.writeInt(1072443);
mplew.writeInt(1);
mplew.writeInt(3600);
mplew.writeInt(2880);
mplew.writeInt(0);
mplew.writeInt(1);
mplew.writeInt(0);
mplew.writeInt(2);
}
}
}
You can edit categories of the cashshop in your DB (cashshop_categories)
and the items you want to put in the cashshop (cashshop_items).
Here's a special tool (its from the src of MapleXMLReader) modified to dump all the equips IDsfor Cash items in the xml files which has the list of categories (located in CategoryItems.txt) with their own ID.
and the item ids will be in (comodity.sql).
Just put it on your source files where the WZ are located.
CashItem:
below > private final int category, subcategory, parent, sn, itemid, flag, price, discountPrice, quantity, expire, gender, likes;
add:
private final short mesoSell;
below > this.likes = likes; add:
this.mesoSell = mesoSell;
Below > public int getLikes() { return likes; }
add:
public int MesoSell() { return mesoSell; }
In CashItemFactory replace > CashItem item = new CashItem(rs.getInt("category"), rs.getInt("subcategory"), rs.getInt("parent"), rs.getString("image"), rs.getInt("sn"), rs.getInt("itemid"), rs.getInt("flag"), rs.getInt("price"), rs.getInt("discountPrice"), rs.getInt("quantity"), rs.getInt("expire"), rs.getInt("gender"), rs.getInt("likes"));
for:
CashItem item = new CashItem(rs.getInt("category"), rs.getInt("subcategory"), rs.getInt("parent"), rs.getString("image"), rs.getInt("sn"), rs.getInt("itemid"), rs.getInt("flag"), rs.getInt("price"), rs.getInt("discountPrice"), rs.getInt("quantity"), rs.getInt("expire"), rs.getInt("gender"), rs.getInt("likes"), rs.getShort("mesoSell"));
and Finally replace in CSPacket:
addCSItemInfo code with
public static void addCSItemInfo(MaplePacketLittleEndianWriter mplew, CashItem item) {
mplew.writeInt(item.getCategory());
mplew.writeInt(item.getSubCategory());
mplew.writeInt(item.getParent());
mplew.writeMapleAsciiString(item.getImage());
mplew.writeInt(item.getSN());
mplew.writeInt(item.getItemId());
mplew.writeInt(1);
mplew.writeInt(item.getFlag());
mplew.writeInt(0);
mplew.writeInt(0);
mplew.writeInt(item.getPrice());
mplew.write(HexTool.getByteArrayFromHexString("00 80 22 D6 94 EF C4 01"));
mplew.writeLong(PacketHelper.MAX_TIME);
mplew.write(HexTool.getByteArrayFromHexString("00 80 22 D6 94 EF C4 01"));
mplew.writeLong(PacketHelper.MAX_TIME);
mplew.writeInt(item.getPrice());
mplew.writeInt(0);
mplew.writeInt(item.getQuantity());
mplew.writeInt(item.getExpire());
mplew.writeShort(1);
mplew.writeShort(1);
mplew.writeShort(1);
mplew.writeShort(item.MesoSell());
mplew.writeShort(1);
mplew.writeInt(item.getGender());
mplew.writeInt(item.getLikes());
mplew.writeInt(0);
mplew.writeInt(0);
mplew.writeInt(0);
mplew.writeInt(0);
List pack = CashItemFactory.getInstance().getPackageItems(item.getSN());
if (pack == null) {
mplew.writeInt(0);
} else {
mplew.writeInt(pack.size());
for (int i = 0; i < pack.size(); i++) {
mplew.writeInt(100000677);
mplew.writeInt(1072443);
mplew.writeInt(1);
mplew.writeInt(3600);
mplew.writeInt(2880);
mplew.writeInt(0);
mplew.writeInt(1);
mplew.writeInt(0);
mplew.writeInt(2);
}
}
}
You can edit categories of the cashshop in your DB (cashshop_categories)
and the items you want to put in the cashshop (cashshop_items).
Here's a special tool (its from the src of MapleXMLReader) modified to dump all the equips IDsfor Cash items in the xml files which has the list of categories (located in CategoryItems.txt) with their own ID.
and the item ids will be in (comodity.sql).
You must be registered to see links
Just put it on your source files where the WZ are located.
Last edited: