Jump to content
  • 0

CASH SHOP.. HELP!


Critica

Question


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

I CANT USE MY CASHSHOP!!! IM USING 20111122 CLIENT.. UUGHH..

IS THERE A FIX FOR 3CEAM 661 FOR THIS....??? =((

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  02/12/12
  • Last Seen:  

Maybe this work:

Open your msgstringstable.txt in your data folder, and in line 1254 , replace for :

Do you really want to purchase the selected items? %d points will be deducted from your total Kafra Credit Points.#

<Make a backup before change it>

Save, open your client & check if it works.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  12/11/11
  • Last Seen:  

Special Thank you: zephyrus_cr and judas

On npc.c add:

/*==========================================
* Cash Shop Buy List
*------------------------------------------*/
int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short* item_list)
{
int i, j, nameid, amount, new_, w, vt;
struct npc_data *nd = (struct npc_data *)map_id2bl(sd-&amp;amp;amp;amp;amp;gt;npc_shopid);
if( !nd || nd-&amp;amp;amp;amp;amp;gt;subtype != CASHSHOP )
return 1;
if( sd-&amp;amp;amp;amp;amp;gt;state.trading )
return 4;
new_ = 0;
w = 0;
vt = 0; // Global Value
// Validating Process ----------------------------------------------------
for( i = 0; i &amp;amp;amp;amp;amp;lt; count; i++ )
{
nameid = item_list[i*2+1];
amount = item_list[i*2+0];
if( !itemdb_exists(nameid) || amount &amp;amp;amp;amp;amp;lt;= 0 )
return 5;
ARR_FIND(0,nd-&amp;amp;amp;amp;amp;gt;u.shop.count,j,nd-&amp;amp;amp;amp;amp;gt;u.shop.shop_item[j].nameid == nameid);
if( j == nd-&amp;amp;amp;amp;amp;gt;u.shop.count || nd-&amp;amp;amp;amp;amp;gt;u.shop.shop_item[j].value &amp;amp;amp;amp;amp;lt;= 0 )
return 5;
if( !itemdb_isstackable(nameid) &amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp; amount &amp;amp;amp;amp;amp;gt; 1 )
{
ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!n", sd-&amp;amp;amp;amp;amp;gt;status.name, sd-&amp;amp;amp;amp;amp;gt;status.account_id, sd-&amp;amp;amp;amp;amp;gt;status.char_id, amount, nameid);
amount = item_list[i*2+0] = 1;
}
switch( pc_checkadditem(sd,nameid,amount) )
{
case ADDITEM_NEW:
new_++;
break;
case ADDITEM_OVERAMOUNT:
return 3;
}
vt += nd-&amp;amp;amp;amp;amp;gt;u.shop.shop_item[j].value * amount;
w += itemdb_weight(nameid) * amount;
}
if( w + sd-&amp;amp;amp;amp;amp;gt;weight &amp;amp;amp;amp;amp;gt; sd-&amp;amp;amp;amp;amp;gt;max_weight )
return 3;
if( pc_inventoryblank(sd) &amp;amp;amp;amp;amp;lt; new_ )
return 3;
if( points &amp;amp;amp;amp;amp;gt; vt ) points = vt;
// Payment Process ----------------------------------------------------
if( sd-&amp;amp;amp;amp;amp;gt;kafraPoints &amp;amp;amp;amp;amp;lt; points || sd-&amp;amp;amp;amp;amp;gt;cashPoints &amp;amp;amp;amp;amp;lt; (vt - points) )
return 6;
pc_paycash(sd,vt,points);
// Delivery Process ----------------------------------------------------
for( i = 0; i &amp;amp;amp;amp;amp;lt; count; i++ )
{
struct item item_tmp;
nameid = item_list[i*2+1];
amount = item_list[i*2+0];
memset(&amp;amp;amp;amp;amp;amp;item_tmp,0,sizeof(item_tmp));
if( !pet_create_egg(sd,nameid) )
{
item_tmp.nameid = nameid;
item_tmp.identify = 1;
pc_additem(sd,&amp;amp;amp;amp;amp;amp;item_tmp,amount);
}
if( log_config.enable_logs&amp;amp;amp;amp;amp;amp;0x20 )
log_pick_pc(sd, "S", nameid, amount, NULL);
}
return 0;
}

On npc.h add:

int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, unsigned short* item_list)

And on clic.c replace with:

void clif_parse_cashshop_buy(int fd, struct map_session_data *sd)
{
int fail = 0;
struct npc_data *nd;
nullpo_retv(sd);
if( sd-&amp;amp;amp;amp;gt;state.trading || !sd-&amp;amp;amp;amp;gt;npc_shopid )
fail = 1;
else
{
#if PACKETVER &amp;amp;amp;amp;lt; 20101116
short nameid = RFIFOW(fd,2);
short amount = RFIFOW(fd,4);
int points = RFIFOL(fd,6);
fail = npc_cashshop_buy(sd, nameid, amount, points);
#else
int len = RFIFOW(fd,2);
int points = RFIFOL(fd,4);
int count = RFIFOW(fd,8);
unsigned short* item_list = (unsigned short*)RFIFOP(fd,10);
if( len &amp;amp;amp;amp;lt; 10 || len != 10 + count * 4)
{
ShowWarning("Player %u sent incorrect cash shop buy packet (len %u:%u)!n", sd-&amp;amp;amp;amp;gt;status.char_id, len, 10 + count * 4);
return;
}
fail = npc_cashshop_buylist(sd,points,count,item_list);
#endif
}
clif_cashshop_ack(sd,fail);
}

And by last, on packet_db.txt

//2010-11-24aRagexeRE
packet_ver: 26
+0x0288,-1,cashshopbuy,4:8
0x0436,19,wanttoconnection,2:6:10:14:18

NOTE: The msgstringtable.txt may be needed to bypass any gravity errors when purchasing through cash shop.

Attached File(s)

Edited by Arcenciel
Codeboxed
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

Tnx a lot guyS, it worked.. /ok

Uhhmm i got this warning.. btw

srcmapclif.c(13796) : warning C4101: 'nd' : unreferenced local variable

im not sure if it really affects the game.. but it seems ok tho.. no problem atm..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

yeah its not harmful, you can probably take that out and it would compile fine

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...