
http://rathena.org/wiki/Packets'Mysterious' said:Can you share the packets for that cash shop icon? D:! I wanna have thattt!!
This is kRO Main client, and this is another example of the power in this tool,'Mysterious' said:On a side note, what exact client are you using?.. Since you have a Cash shop button.
it was simple to capture and understand the packets in this new cash shop![]()
'malufett', on 21 Jun 2012 - 04:03, said:
it works on a packet level, so unless some server uses some strange packets or encryption, it should work or could be made to work'malufett' said:>>>>style="padding: 0px; ">does it work to all official servers??
this is not inside kRO-RE client, because that is test server, there is no cash shop in test server ;P
you need to change to using kRO main client, ragexe.exe.
but this will be hard for you, for some reasons.
1) you need to write some code to manage the cash shop window packets. (Worry about)
2) kRO main client changes alot of connection packets each week. (Don't think we have to worry about this)
3) kRO main client has a small packet encryption system. (Don't think we have to worry about this)
Yom
By looking at the shots, it feels like it's using the same pathway for items such as the item icons and their collection image. For the storing of the items, I believe they'll be held in a SQL table.What is on my mind also, is can someone explain where those items come from. I wonder where those items will be called/managed.
The images used is from where? Are they placed in the data/grf file?
when you open the map server, does anything appear in the console when you open this shop? Im really thinking it'll be placed in a SQL Table OR if possible, make it into a .txt file like the mob_db, item_db, etc. which then gets parsed into the shop.I think this is the farthest I can go. I need to know how the itemlist can get filled up. Anyway, good progress for this month =)
I don't think the existing implementation will work (for cashshop). Since you have to click on the npc for it to work (open the itemlist).struct PACKET_ZC_PC_CASH_POINT_ITEMLIST {
/* this+0x0 */ short PacketType
/* this+0x2 */ short PacketLength
/* this+0x4 */ unsigned long CashPoint
/* this+0x8 */ struct PURCHASE_ITEM itemList[...] { // Size 11
/* this+0x0 */ int price
/* this+0x4 */ int discountprice
/* this+0x8 */ unsigned char type
/* this+0x9 */ unsigned short ITID
}
}
/// List of items offered in a cash shop (ZC_PC_CASH_POINT_ITEMLIST).
/// 0287 <packet len>.W <cash point>.L { <sell price>.L <discount price>.L <item type>.B <name id>.W }*
/// 0287 <packet len>.W <cash point>.L <kafra point>.L { <sell price>.L <discount price>.L <item type>.B <name id>.W }* (PACKETVER >= 20070711)
void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd)
{
int fd,i;
#if PACKETVER < 20070711
const int offset = 8;
#else
const int offset = 12;
#endif
nullpo_retv(sd);
nullpo_retv(nd);
fd = sd->fd;
sd->npc_shopid = nd->bl.id;
WFIFOHEAD(fd,offset+nd->u.shop.count*11);
WFIFOW(fd,0) = 0x287;
WFIFOW(fd,2) = offset+nd->u.shop.count*11;
WFIFOL(fd,4) = sd->cashPoints; // Cash Points
#if PACKETVER >= 20070711
WFIFOL(fd,8) = sd->kafraPoints; // Kafra Points
#endif
for( i = 0; i < nd->u.shop.count; i++ )
{
struct item_data* id = itemdb_search(nd->u.shop.shop_item.nameid);
WFIFOL(fd,offset+0+i*11) = nd->u.shop.shop_item.value;
WFIFOL(fd,offset+4+i*11) = nd->u.shop.shop_item.value; // Discount Price
WFIFOB(fd,offset+8+i*11) = itemtype(id->type);
WFIFOW(fd,offset+9+i*11) = ( id->view_id > 0 ) ? id->view_id : id->nameid;
}
WFIFOSET(fd,WFIFOW(fd,2));
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.