Page 1 of 1

Simple Backpack

Posted: November 26th, 2019, 7:54 am
by Xeane
This is a simple backpack system, that is relatively easy to add new backpacks, of different sizes.

script: https://one.denizenscript.com/haste/62356

Re: Simple Backpack

Posted: November 26th, 2019, 10:01 am
by mcmonkey
- use "- inventory adjust ..." or the "item.with[...]" tag, not adjust+save+inventory set
- You forgot to disable debug on one of the scripts
- Don't use player flags to track data for an inventory script. Just make a generic inventory script (or straight up use "generic[size=9]") and apply the dynamic bits later via mechanisms.
- Don't blindly set an item into the player's held item slot. What if they moved an item into that slot while the inventory was open?

Re: Simple Backpack

Posted: November 26th, 2019, 10:26 am
by Xeane
"- You forgot to disable debug on one of the scripts" Whoops.
"- Don't blindly set an item into the player's held item slot. What if they moved an item into that slot while the inventory was open?" They can't change their held item while it's open.

Re: Simple Backpack

Posted: November 26th, 2019, 10:49 am
by Xeane
Updated!