Crate script

Share scripts you wrote for Denizen-Bukkit here!
Post Reply
Icecapade
Regular
Regular
Posts: 9
Joined: December 12th, 2019, 10:17 am

Crate script

Post by Icecapade » June 12th, 2020, 9:35 am

Hellow Fellows.

This is a crate script. It lets you create crates and keys.
To remove a crate simply break the ender_chest.
You can configure what the crates can drop.
It uses weighted chance, so you can easily use percentages.

The admin player need the permission

Code: Select all

icecapade.crates
. Other players don't need it.
The Syntax for the command is:

Code: Select all

/crates [light/medium/heavy] (key) (<#>)
Optionally specify key to receive a key instead of a crate. Defaults to 8 if no number is given.
If a player places a crate it will act like a normal ender_chest.

Made for Denizen Release 1711+
You find the latest stable releases here: https://ci.citizensnpcs.co/job/Denizen/[/b]

Script:
V1.0.6 https://one.denizenscript.com/haste/71515

old Screenoreeno:
Image
Notes:
- [1.0.6] added option to customize chest display names
- [1.0.5] removed object notation in data storage container
- [1.0.5] using maptags for data script
- [1.0.5] shorted the script (used repeat for firework / shortened events / removed redundant defaults)
- [1.0.5] now the right chest will be animated
- [1.0.5] added narration when receiving keys
- [1.0.1] fix firework color (cyan -> aqua) [1.0.1]
Last edited by Icecapade on June 27th, 2020, 11:54 pm, edited 7 times in total.

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

Re: Crate script

Post by mcmonkey » June 12th, 2020, 8:04 pm

(Regarding https://one.denizenscript.com/haste/70598 )
- Script contains raw object notation ([email protected], etc) - get rid of that.
- Script contains yaml_key lists used as maps... use MapTag!
- Duplicate events for light/medium/heavy could be very easily shortened into a single event that parses what type of key it is.
- - animatechest <[enderchest]> close sound:false <player> is rather arbitrary manual specification of defaults
Denizen lead developer. On Discord as mcmonkey#6666.

Icecapade
Regular
Regular
Posts: 9
Joined: December 12th, 2019, 10:17 am

Re: Crate script

Post by Icecapade » June 14th, 2020, 4:48 am

Thank You!

Changed in 1.0.5.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests