Jump to content

Ryuuzaki

Community Contributors
  • Content Count

    34
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Ryuuzaki

  1. My client refuses to allow negative cash, will also state that you don't have enough kafra points. Thanks for the warning though ^^ Edit: But yeah, you can also spoof packets to skip the client checks..
  2. Hi hercules devs, here is the code for working kafra & free cash points. void clif_parse_CashShopOpen(int fd, struct map_session_data *sd) { WFIFOHEAD(fd, 10); WFIFOW(fd, 0) = 0x845; WFIFOL(fd, 2) = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values WFIFOL(fd, 6) = sd->kafraPoints; WFIFOSET(fd, 10); } void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { unsigned short limit = RFIFOW(fd, 4), i, j; int kafra_pay = RFIFOL(fd, 6); // [Ryuuzaki] - These are free cash points (strangely #CASH = main cash curreny for us, confusing) /* no idea what data is on 6-10 */ for(i = 0; i < limit; i++) { int qty = RFIFOL(fd, 14 + ( i * 10 )); int id = RFIFOL(fd, 10 + ( i * 10 )); short tab = RFIFOW(fd, 18 + ( i * 10 )); enum CASH_SHOP_BUY_RESULT result = CSBR_UNKNOWN; if( tab < 0 || tab > CASHSHOP_TAB_MAX ) continue; for( j = 0; j < clif->cs.item_count[tab]; j++ ) { if( clif->cs.data[tab][j]->id == id ) break; } if( j < clif->cs.item_count[tab] ) { struct item_data *data; if( (sd->cashPoints+kafra_pay) < (clif->cs.data[tab][j]->price * qty) ) { // [Ryuuzaki] - Add freecash to your cash points (might need a check? client checks if you have enough free cash, better safe than sorry right?) result = CSBR_SHORTTAGE_CASH; } else if ( !( data = itemdb_exists(clif->cs.data[tab][j]->id) ) ) { result = CSBR_UNKONWN_ITEM; } else { struct item item_tmp; int k, get_count; get_count = qty; if (!itemdb_isstackable2(data)) get_count = 1; pc_paycash(sd, clif->cs.data[tab][j]->price * qty, kafra_pay);// [Ryuuzaki] - Pay cash & kafrapoints for (k = 0; k < qty; k += get_count) { if (!pet_create_egg(sd, data->nameid)) { memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = data->nameid; item_tmp.identify = 1; switch (pc_additem(sd, &item_tmp, get_count, LOG_TYPE_NPC)) { case 0: result = CSBR_SUCCESS; break; case 1: result = CSBR_EACHITEM_OVERCOUNT; break; case 2: result = CSBR_INVENTORY_WEIGHT; break; case 4: result = CSBR_INVENTORY_ITEMCNT; break; case 5: result = CSBR_EACHITEM_OVERCOUNT; break; case 7: result = CSBR_RUNE_OVERCOUNT; break; } if( result != CSBR_SUCCESS ) pc_getcash(sd, clif->cs.data[tab][j]->price * get_count, kafra_pay); //[Ryuuzaki] - Return also free cash if it failed. } } } } else { result = CSBR_UNKONWN_ITEM; } WFIFOHEAD(fd, 16); WFIFOW(fd, 0) = 0x849; WFIFOL(fd, 2) = id; WFIFOW(fd, 6) = result;/* result */ WFIFOL(fd, 8) = sd->cashPoints;/* current cash point */ WFIFOL(fd, 12) = sd->kafraPoints;/* current kafra points */ WFIFOSET(fd, 16); }} Hope this will help you out, thanks for the release again. I added //[Ryuuzaki] with a comment next to it so you can see what exactly i changed.
  3. good job, finally made me switching my heavily customized ra to hercules xD the pain of applying every change i made >.<
  4. SSO login packet is used for transmitting the mac_id of your network card. It was introduced / used when they started using the website based login.
  5. Here some little packet update to equip items: 0x0998,8,equipitem,2:4 You had 0x0998 set to "useitem" instead of "equipitem" @ judas. Edit: Your _J version of the attached client works fine.
  6. as I remember this clients are faulty so don't use it..It can't be fixed via server.. A quick "workaround" is to delete ground unit skills after you change the map, seems like it's only your own skills making your client crash out. Played with the client quite some time back and applied that quick fix near pc_setpos when it checks for a map-change, dropped the client because of having issues getting the skill timer to work properly. @Ontopic, good to see you guys are thinking about suggestions like this.
×
×
  • Create New...

Important Information

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