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;
}