thor1009 9 Posted October 3, 2015 Hi everyone, I have encountered a problem when trying to make a NST_MARKET trader. Some items have a limited amount to be purchased at one time, for example, the itemID 12636, amount cannot exceed 10, otherwise it shows 'Cannot purchase item, You exceeded the weight.' Is there anyway to modify this limit? Thanks in advance. Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted October 3, 2015 That really , that you will be out of weight...... You can modify it via source to allow all items to behave like you told. Or modify item_db and reduce the weight of the item. But I have no idea why you want items to exceed the weight limit. Quote Share this post Link to post Share on other sites
0 thor1009 9 Posted October 3, 2015 That really , that you will be out of weight...... You can modify it via source to allow all items to behave like you told. Or modify item_db and reduce the weight of the item. But I have no idea why you want items to exceed the weight limit. I might not explain that problem clearly. It's not exceeding weight limit, it just show that message. The Malangdo special can (ID 12636) has weight 0 in the database I can purchase 10 cans for 5 times to get 50 cans. But when I try to purchase 50 cans, it shows that error message. This happens only for NST_MARKET type trader, for normal shop script, there is no such limitation. Quote Share this post Link to post Share on other sites
0 ossi0110 200 Posted October 3, 2015 show me your script for the NPC_MARKET shop , maybe you have not the restock correckt , since its a SHOP with autorefill Quote Share this post Link to post Share on other sites
0 Litro 45 Posted October 3, 2015 try using dynamic shop u can set the limit Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted October 3, 2015 That really , that you will be out of weight...... You can modify it via source to allow all items to behave like you told. Or modify item_db and reduce the weight of the item. But I have no idea why you want items to exceed the weight limit. You are here for so long and you still wonder about weird questions / requests? Thats cute. Quote Share this post Link to post Share on other sites
0 thor1009 9 Posted October 3, 2015 (edited) That really , that you will be out of weight...... You can modify it via source to allow all items to behave like you told. Or modify item_db and reduce the weight of the item. But I have no idea why you want items to exceed the weight limit. You are here for so long and you still wonder about weird questions / requests? Thats cute. My bad to be lazy to not show some screenshots, so it leads to so many misunderstandings. This is NOT a WEIRD question/request, please read my reply to him. And here are some screenshots in case the problem is still unclear. As you can see. I cannot buy 10 Anger of Seagod at once, but I can buy 3 Anger of Seagod for 5 times. I have enough zeny, enough weight for it. The weight in database is double-checked, it is really 0. Here it is the simple script for this NST_MARKET trader.- trader Market -,{OnInit: setarray .sellitem[0],12405,607,6489,6423,6417; setarray .sellprice[0],50000,300000,1000000,1500000,5000000; setarray .sellamount[0],200,100,50,40,20; tradertype(NST_MARKET); for(.@i = 0; .@i < getarraysize(.sellitem); ++.@i) sellitem .sellitem[.@i],.sellprice[.@i],.sellamount[.@i]; end;OnMyResupply: for(.@i = 0; .@i < getarraysize(.sellitem); ++.@i) { if( shopcount(.sellitem[.@i]) < 1 + .sellamount[.@i]/2 ) sellitem .sellitem[.@i],.sellprice[.@i],.sellamount[.@i]; } end;} show me your script for the NPC_MARKET shop , maybe you have not the restock correckt , since its a SHOP with autorefill Yes, it is shown. Since there is nothing related to the one-time purchase limit in the script, and in the item database there is also no such setting. I think it might be some client-side limitation, just like the buying store item list. So this is why I post it here. By the way, I am using 2015-05-13 client. Edited October 3, 2015 by thor1009 Quote Share this post Link to post Share on other sites
0 Anisotropic Defixation 18 Posted November 3, 2015 https://github.com/HerculesWS/Hercules/issues/720 Same issue here. Quote Share this post Link to post Share on other sites
0 Shortcut 0 Posted May 3, 2016 I found some behavier about item weight and shoptype.If charactor have weight == 0 , max_weight == 4000and itemid = 501 (Red_Potion) weight 7 (70)I can buy stuff about 80 ea (max_weight/itemid) not 571 ea for real weight ( max_weight/item_weight )But anyone can fix it. goto clif.c line round 18240 in function clif_npc_market_open /* NPC Market (by Ind after an extensive debugging of the packet, only possible thanks to Yommy <3) */ void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { #if PACKETVER >= 20131223 struct npc_item_list *shop; unsigned short shop_size, i, c; nullpo_retv(sd); nullpo_retv(nd); shop = nd->u.scr.shop->item; shop_size = nd->u.scr.shop->items; npcmarket_open.PacketType = npcmarketopenType; for(i = 0, c = 0; i < shop_size; i++) { struct item_data *id = NULL; if (shop[i].nameid && (id = itemdb->exists(shop[i].nameid)) != NULL) { npcmarket_open.list[c].nameid = shop[i].nameid; npcmarket_open.list[c].price = shop[i].value; npcmarket_open.list[c].qty = shop[i].qty; npcmarket_open.list[c].type = itemtype(id->type); // npcmarket_open.list[c].view = ( id->view_id > 0 ) ? id->view_id : id->nameid; << comment old one npcmarket_open.list[c].view = itemdb_weight(id->nameid); << add new one c++; } } npcmarket_open.PacketLength = 4 + ( sizeof(npcmarket_open.list[0]) * c ); clif->send(&npcmarket_open,npcmarket_open.PacketLength,&sd->bl,SELF); #endif } Quote Share this post Link to post Share on other sites
Hi everyone,
I have encountered a problem when trying to make a NST_MARKET trader.
Some items have a limited amount to be purchased at one time, for example, the itemID 12636, amount cannot exceed 10, otherwise it shows
Share this post
Link to post
Share on other sites