Lootbox
12/17/15 - NOTE: A re-work in the process. A working version is currently privately available and is waiting on public release. Please note that, on the outside, it will be less dynamic than the current version and quite a bit buggier. Unfortunately, this does tend to happen with code re-writes. Please stay tuned as the project is turned over to BETA and updates will be released accordingly. More to come this following week...
12/29/15 The re-work is near completion! Expect a release on New Years' Eve
1/1/2016: Happy New Years! Enjoy the update.
Lootbox
About
Lootboxes, mystery crates, loot chests, loot boxes, loot crates, whatever you call them! Reward your players for finding them & their keys (configurable) for epic loot!
Lootbox is like opening a chest, but it's in your inventory! You can configure it so that you can have multiple lootboxes that may or may not require keys to open. When they are opened, they can execute commands from the console and/or give items to the player. This will probably be the best drop party gift you could give your players or one of the most desired quest items! The possibilities are endless!
Lootboxes are, by default, chests with a special name and lore. They can be opened either by themselves or by a key (tripwire hook) as determined by the config.yml. They can be used in the following and more: Quests, treasure chests, drop party items, trade, donations! But really, the possibilities are endless.
Youtube Tutorial
https://www.youtube.com/watch?v=uZrnOAiY6-I
Commands
- /lootbox help <admin> - Displays the in-game help page.
- /lootbox open - Have the lootbox in slot 1 and key in slot 2. Then use this command to open.
- /lootbox reload - Reloads the config.yml
- /lootbox give <username> <key/lootbox> <UUID of lootbox/key> - Gives a player a specified key/lootbox.
- /lootbox preview - Previews with a virtual inventory what is inside a lootbox.
- /lootbox info - See a list of keys/lootboxes that can be used on the key/lootbox in hand.
- /lootbox list <keys/lootboxes> <e> - Lists all keys/lootboxes on the server. Add an 'e' on the end to see an expanded list.
Nodes
- /lootbox help - lootbox.help
- /lootbox open - lootbox.open
- /lootbox help admin - lootbox.admin.help
- /lootbox reload - lootbox.admin.reload
- /lootbox give - lootbox.admin.give
- /lootbox preview - lootbox.preview
- /lootbox list <keys/lootboxes> <e> - lootbox.list
- /lootbox info - lootbox.info
Configuration
Example config.yml: http://pastebin.com/H0sZhuA3
EID List:
- Names are case-sensitive
The chat options should be self explanatory.
Suggested Plugins
- http://dev.bukkit.org/bukkit-plugins/otherdrops/ - Set a drop to the lootbox name and lore and now mobs can drop lootboxes! Remember, the lore and name are case-sensitive!
- http://dev.bukkit.org/bukkit-plugins/treasurechest/ - Put lootboxes in these stationary treasure chests for better rewards!
- http://dev.bukkit.org/bukkit-plugins/event/ - Host drop parties and events where you give away lootboxes!
- http://dev.bukkit.org/bukkit-plugins/quester/ - Give lootboxes to players for completing quests!
- http://dev.bukkit.org/bukkit-plugins/loot-crates/ - An alternative, similar plugin.
Final Notes
Make sure that players have enough room are online and have room in their inventory when using the /lootbox give command. If they aren't online it won't be given to them and if their inventory is full it will drop at their feet, prime time for others to steal it. Please notify me about suggestions or bugs through the comments/tickets! Any comments are welcomed. :)
@TheOatBaron
Cant wait for the tutorial! I really need one XD
I finally made a tutorial, just 6 months late! :P I also have a cold so my voice is all messed up ;_; Should be easy enough to understand though.
It is currently being uploaded (1 mbps for a 683 mb file ;-;)
@TheOatBaron
Thank you, it works great now! :)
@StompedOn
Ah, YAML Configuration doesn't like apostrophes in strings (Around line 72). I replaced it with the Stash of Eldon. This is a working configuration: http://pastebin.com/kHN78r62
As a side note, http://yaml-online-parser.appspot.com/ is a good tool for diagnosing this.
Everytime I reload or restart the server the config file remakes itself... It deletes all my editing and goes back to it's original typing. Here is my config. http://pastebin.com/Fg8RtaUj Help me please...
@Boaike
That could do it, I have the plugin set to cancel the placement of a lootbox/key at ALL times. It might conflict with some of your plugins. :/ It is supposed to return to your inventory. Could you post a list/picture of your plugins?
I know you are not supposed to "use" or place the lootbox, but when players do that in an area they are not allowed to build in (worldguard flag) the chest just disappears.
Fixable?
-edit- It seems like you still keep it in your inventory. After it disapears, I switched worlds and ported back. That made the chest/crate reappear in my inventory. I am using Multinv though, so I'm not sure what it would do without an inventory plugin.
@BuzzSmooth
You could sell the lootbox/key in a store for money. A lootbox is defined by it's item (chest), name and lore (case & color specific). You just need to find a shop plugin, there's dozens, that supports selling items with a name and lore. As for creating random items, you can use the min-items and max-items options in combination with the 'chance' feature per item, reference http://dev.bukkit.org/paste/10311/
@TheOatBaron
but I mean to touch you money, etc. Only to open it .Random
@BuzzSmooth
Well, when you open the chest you can get items in the "items" category. Before opening the chest you can use the /lootbox preview command to see what's in it.
@TheOatBaron
that when you open the chest can touch you items, but not commands
Sorry for the late responses!
@DominateCraft
/lootbox open will be a part of of 1.5! It will open the chest in hand.
@PancakeCandy
What do you mean? I think that the permission nodes would apply like any other plugin (I might be totally off, I have never used this plugin before).
@BuzzSmooth
'Prize touch a command' Sorry, I don't understand what you mean by this.
@KaskadekingDE
Yep, a syntax errors mean you typed the command in wrong.
@CaptainLink_
What you would do is give yourself a lootbox (and key if applicable) via the /lootbox give command and put it into the chest. Make that chest a treasure chest (look at their command help) and then when the player opens up the treasure chest they can take the lootbox/key and use it.
As a side note, stationary chests are going to be a feature of 1.5 due to all the requests.
Could anyone explain to me how to use Treasurechests, to make it stationary? I am having trouble with it, and have no idea how..
If i try to execute a command (PermissionsEX) then i get following error: Error in command syntax. Check command help.
If in execute the command in-game then it works.
EDIT: After i changed a command it works o.o
@TheOatBaron
I am referring to that prize touch a command, not to open the chest
Does this have Multi-Verse / MultiWorld Support?
@BuzzSmooth
Already a feature :)
Lines 7 & 8 http://dev.bukkit.org/paste/10311/
@TheOatBaron
Could you put that when you open the chest you have possibilities to execute a command?
@TheOatBaron
Would it be possible to allow users to open a loot box with a command. For example /lootbox open chest1 ? Thanks!
@Expodium
As of now, it is a chest and/possibly key in your inventory to open up the chest. I am looking at a possible additional stationary chest setup as well.