DropChest
DropChest
What it does?
DropChest allows you to select a chest, what ever you put in the chest can then be dropped by Monsters as long as the item is in the chest. The drops will be exact copy of the item in chest, this allows making monsters drop player written books or custom items.
How to install
Installing the plugin happens by dropping DropChest.jar in the plugins folder.
Features
+Change Monster drops by simply dropping items you want them drop in a chest
+Supports making Monsters drop copies of enchanted items and copies of player made books.
+Supports changing probabilities for additional drops
Usage
You place an items in the chest assigned with the plugin. When Monster is killed by player there is certain probability for it to drop any item found in the chest. The plugin will pick a random slot from the chest so more the same item you got in it, more likely it is to drop. If plugin picks empty slot nothing will be dropped.
You should change the default values of chest location or this plugin is pretty useless You can use /DropChest location x y z to set new chest location, or edit the location in the config.yml.
The probability something is dropped at all is selected by "chance" the default value of chance is 95, the formula to choose whether or not to drop additional items is: if randomnumber 0-100 is larger then chance, proceed to pick the item from the chest. In all simplicity, if chance is 95 there is 5% chance on each Monster killed to drop additional drops defined in the chest.
Commands
/DropChest chance int
This will change the chance value assigned with the plugin, since no configs are saved the value will revert if plugin is reloaded or server restarted. chance -1 = pick drop on every monster kill, 101 = never make additional drops.
/DropChest location x y z
Set the location of Chest used as the DropChest
Permissions
DropChest.DropChest - Allow usage of /DropChest
Future ideas
+Allow adding more chests
+Make possible to select the chest with WE
@Melekaiah
Being lazy as i am haven't done anything towards the additions we talked about earlier, but about how i do it? https://github.com/Allu2/DropChest.git GPL so feel free to fork and tweak around ;)
@Allu2
Mm, Sounds like a good Idea, But if you have to fit all monster drops for each monster type. Then wont you run out of space VERY quickly?
I was thinking more of having the config file have one chest for each monster type? (youd have to set up a room somewhere on the server where the admin could play around with monster dropds in game though. ) either connect each chest with a sign that says the name of the mob. Or.. if slot1.content == dirt then dirt(stackvalue)==monsterid then do the drop selection based on entire chest minus the first slot.
but hmm youd also have to call that everytime a monster dies? not sure how your doing it now. my coding is not exactly great. i know some theory back from school but its been years.
when mob dies - youd have to compare the ID of specific Chest,
Either that, or you just code the plugin with each monster ID. and assign chest via command?
ie /monsterdrop set zombie while looking at chest, chest will be regiestered and contents will be set for all zombies only?.. just thinking out loud
I am getting an error that says, "you don't have ChestDrop.Dropchest. Would appreciate any help and thanks
@Melekaiah
Should be possible but with my level of effort.. :P I think it wouldn't be too hard to make code-wise..
Basically this part should in code should be edited so that instead of a random slot in the chest, it would check first which mob was killed, and then based on that decide random number from "slot a to slot b" instead of a random slot between all slots. This way you could arrange certain rows or colums of slots for each mob type.
Actually i think i might do this later today or tomorrow :P
Could this be made so that you could for example, have one chest for each monster type? ie zombies baby zombies or what not?
perhaps you could have the first slot use some like a stack of dirt to select which monster should be affected?. ie 1 dirt = zombie 2 dirt = skeleton.
or something like that?
@jasonavx
Seems you're right, apparently what i did was specify in which world the chest is in, instead in which world it is active, I fixed it now, didn't test it yet though, I update the plugin here after some testing. The changes made and the sources can be found at github and is under GPL, so if you want you can compile them yourself already and make edits you need :)
Great plugin. Very helpful. But I think the specific world config isn't working at the moment. It seems to make mob drops the loot on every world in our server. And also, the explanation is a little bit confusing, perhaps rewrite it a bit to make it clear. Thanks.
Maybe have different chests for different mobs? For example Chest 1, made for creepers can drop diamond swords, while Chest 2, made for zombie can drop Iron Swords... Good idea for a plugin.. Sounds very convenient.