XenaNyx Posted May 7, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 131 Reputation: 8 Joined: 02/08/12 Last Seen: May 30, 2021 Share Posted May 7, 2012 i use old npc for eathena to check item in player cart but i can't use this npc with rathena how to check item in cart like eathena? hope this feature add to rathena server Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted May 7, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Share Posted May 7, 2012 that command isn't even in eAthena, it is just a source mod, you need to apply it into rAthena in order to use it Quote Link to comment Share on other sites More sharing options...
XenaNyx Posted May 7, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 131 Reputation: 8 Joined: 02/08/12 Last Seen: May 30, 2021 Author Share Posted May 7, 2012 really? i think it's have in eathena, maybe i forgot it i find in script.c /*================================================ * Check how many items/cards in the list are * in the user's cart [Zohan] *------------------------------------------------*/ BUILDIN_FUNC(cartcountitem) { int nameid, i; int count=0; struct script_data *data; TBL_PC* sd = script_rid2sd(st); if (!sd) { script_pushint(st,0); return 0; } data = script_getdata(st,2); get_val(st,data); if( data_isstring(data) ) { const char* name = conv_str(st,data); struct item_data* item_data; if((item_data = itemdb_searchname(name)) != NULL) nameid = item_data->nameid; else nameid = 0; } else nameid = conv_num(st,data); if (nameid < 500) { ShowError("wrong item ID : countitem(%i)n", nameid); script_reportsrc(st); script_pushint(st,0); return 1; } for(i = 0; i < MAX_CART; i++) { if(sd->status.cart[i].nameid == nameid) { count += sd->status.cart[i].amount; } } script_pushint(st,count); return 0; } BUILDIN_DEF(cartcountitem,"i"), thx for answer Quote Link to comment Share on other sites More sharing options...
Question
XenaNyx
i use old npc for eathena to check item in player cart but i can't use this npc with rathena
how to check item in cart like eathena?
hope this feature add to rathena server
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.