letstry Posted March 18, 2016 Group: Members Topic Count: 87 Topics Per Day: 0.02 Content Count: 219 Reputation: 0 Joined: 05/03/12 Last Seen: September 15, 2023 Share Posted March 18, 2016 Hi guys I would like to ask for some help to modify @storeall which will include cart. I've tried modifying it but it still doesn't read the cart. Here's my current @storeall mod. Thanks! ACMD_FUNC(storeall) { int i; nullpo_retr(-1, sd); if (sd->state.storage_flag != 1) { //Open storage. if( storage_storageopen(sd) == 1 ) { clif_displaymessage(fd, "You can't open the storage currently."); return -1; } } // Cart for (i = 0; i < MAX_CART; i++) { if (sd->status.cart[i].amount) { if(sd->status.cart[i].equip != 0) pc_unequipitem(sd, i, 3); storage_storageadd(sd, i, sd->status.cart[i].amount); } } // Inventory for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount) { if(sd->status.inventory[i].equip != 0) pc_unequipitem(sd, i, 3); storage_storageadd(sd, i, sd->status.inventory[i].amount); } } storage_storageclose(sd); clif_displaymessage(fd, "It is done"); return 0; } Quote Link to comment Share on other sites More sharing options...
0 nitrous Posted March 18, 2016 Group: Developer Topic Count: 4 Topics Per Day: 0.00 Content Count: 141 Reputation: 46 Joined: 08/14/12 Last Seen: April 5 Share Posted March 18, 2016 storage_storageadd() gets items from your inventory, not the cart. There is a storage_storageaddfromcart() function, which you would use instead. 1 Quote Link to comment Share on other sites More sharing options...
0 letstry Posted March 18, 2016 Group: Members Topic Count: 87 Topics Per Day: 0.02 Content Count: 219 Reputation: 0 Joined: 05/03/12 Last Seen: September 15, 2023 Author Share Posted March 18, 2016 Thanks! Quote Link to comment Share on other sites More sharing options...
Question
letstry
Hi guys I would like to ask for some help to modify @storeall which will include cart.
I've tried modifying it but it still doesn't read the cart.
Here's my current @storeall mod.
Thanks!
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.