Hanashi Posted November 3, 2016 Posted November 3, 2016 (edited) same function as @dropall but it drops all item in cart Edited November 3, 2016 by AshiHanna Quote
0 anacondaq Posted November 4, 2016 Posted November 4, 2016 (edited) Note: The command works the same like @storeall one, but instead of storing item to storage, you will store items to cart (if you can cart only and have free slot and weight in cart) add to src/custom/atcommand.inc next code function: ACMD_FUNC(cartstoreall) { int i; nullpo_retr(-1, sd); if ( !pc_iscarton(sd) ) { clif_displaymessage(fd, "Sorry, but you don't have a cart."); return 1; } 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); pc_putitemtocart(sd, i, sd->status.inventory[i].amount); } } clif_displaymessage(fd, "All items from inventory stored at cart."); // All items stored. return 0; } Then, add to src/custom/atcommand_def.inc next code function: ACMD_DEF(cartstoreall), Recompile, and have fun. I did few tests related to cart sizes / weight / cart overflow, and everything works fine, no errors, no problems, no item drop to the ground -> just errors if something wrong with cart will be shown to the player. P.S. if you experience any issues with adding atcommand, you can try to use this diff patch. Edited November 4, 2016 by Anacondaqq Quote
Question
Hanashi
same function as @dropall but it drops all item in cart
Edited by AshiHanna2 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.