- Joined
- Apr 30, 2010
- Messages
- 36
- Reaction score
- 27
I don't really like this forum but I know that if I don't release it here someone will leak it.Flav on KryptoDEV said:Credits go to this smexy guy for pointing it out to me.LightPepsi on KryptoDEV said:You'll have to decode the entire long CS packet first. [It is after the 15 x 4 bytes of teleport rock data]
The first few bytes should be what you'r telling the client to sell on the "sale" or "wanted" list.
In your warpToCS packet there's 1 int after the account name which I'm not sure what it is for. And after that there's a short for the number of modified items. For each modified item you do this:
The 0x400 is a modifier which means that we remove or add an item, the following byte tells the client what we do (0 = remove, 1 = add). There are a couple of other modifiers which I'm not so sure about what they do and how exactly they work, I know that there's one for price discounts and for limitations. Whatever, we find most Cash Items multiple times in Etc.wz/Commodity.img with different prices, so we don't really need the other modifiers.Code:mplew.writeInt(sn); mplew.writeInt(0x400); mplew.write(0);
Anyways, to add or remove items just store them into a List and then use it in your warpToCS packet. Here's a spoonfeed example for leechers:
If you're smart and have an onSale check don't forget to change it for modified items. I'll probably include this in OdinTeh 2 soon where I already have added lots of Cash Shop stuff, then you can leech it out of there.Code:mplew.writeMapleAsciiString(c.getAccountName()); mplew.writeInt(0); mplew.writeShort(CashDataProvider.getModifiedData().size()); for (int sn : CashDataProvider.getModifiedData()) { mplew.writeInt(sn); mplew.writeInt(0x400); mplew.write(CashDataProvider.getItem(sn).isOnSale() ? 1 : 0); }
There's another way to do this, simply modify your Etc.wz file and make your users download it but that's gay.
Last edited: