Jump to content

Judas

Community Contributors
  • Content Count

    576
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by Judas


  1. yeah, if possible. So far I'm not able to equip weapons, and I can't use alt+W with the cart on. So those are some mysteries I haven't figured out yet.

     

    Also make a list of of hex patches we need

     

     

    EDIT: above I edited my main post to show the hex strings available so far


  2. nothing pops up.

     

    According to the packets, we have to modify this:

     

    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
    }
    }

    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).

     

    You're probably right, that we have to manage it by parsing. SQL/db file or something

     

    Existing Implementation:

     

    /// 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));
    }

  3. Yeah that's pretty much it.

     

    I'm just trying to find reference posts right now. Yommy stated before that:

     

     

    'Mysterious', on 22 Jun 2012 - 23:51, said:snapback.png

    Can you share the packets for that cash shop icon? D:! I wanna have thattt!!

    http://rathena.org/wiki/Packets
    look around 0x287, these have been public for ages

     

    So if the packets are already available, just the managing the code is what we have to do

     

     

    On a side note, what exact client are you using?.. Since you have a Cash shop button.


    This is kRO Main client, and this is another example of the power in this tool,
    it was simple to capture and understand the packets in this new cash shop smile.png

    'malufett', on 21 Jun 2012 - 04:03, said:snapback.png

    >>>>style="padding: 0px; ">does it work to all official servers??

    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 

     

     

     

    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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.