Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Gender issue on Cash Shop ([v145] Acernis)

Junior Spellweaver
Joined
Feb 18, 2018
Messages
117
Reaction score
10
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:p:

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.
 
Last edited:
Newbie Spellweaver
Joined
Aug 5, 2014
Messages
15
Reaction score
0
Can u show me how add item to cash shop? i did but the items is not show on cash shop. this is my facebook:
Facebook.com/rivan4896
My skype: +16692346764
 
Junior Spellweaver
Joined
Feb 18, 2018
Messages
117
Reaction score
10
Thats because in the SQL script in the ¨SN¨ column is not filled in the values, i recommend you to add the SN with the help of the notepad ++
 
Last edited:
Junior Spellweaver
Joined
Feb 18, 2018
Messages
117
Reaction score
10
go to your cashshop_items table and in the "sn" column, you need to set a number for each item lol
 
Back
Top