Simple Backpack

Share scripts you wrote for Denizen-Bukkit here!
Post Reply
Xeane
New
New
Posts: 8
Joined: October 21st, 2019, 1:46 pm

Simple Backpack

Post by Xeane » November 26th, 2019, 7:54 am

This is a simple backpack system, that is relatively easy to add new backpacks, of different sizes.

script: https://one.denizenscript.com/haste/62356
Last edited by Xeane on November 26th, 2019, 11:40 am, edited 3 times in total.

User avatar
mcmonkey
Site Admin
Site Admin
Posts: 236
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Re: Simple Backpack

Post by mcmonkey » November 26th, 2019, 10:01 am

- 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?
Denizen lead developer.
http://mcmonkey.org

Xeane
New
New
Posts: 8
Joined: October 21st, 2019, 1:46 pm

Re: Simple Backpack

Post by Xeane » November 26th, 2019, 10:26 am

"- 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.

Xeane
New
New
Posts: 8
Joined: October 21st, 2019, 1:46 pm

Re: Simple Backpack

Post by Xeane » November 26th, 2019, 10:49 am

Updated!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests