Random Items in Chests

Discussion in 'Plugin Requests' started by KyllianGamer, Nov 7, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    KyllianGamer

    Hey! I'm looking for a plugin where you can add chest locations with a command and set an "Item Chest". And when you execute a certain command all the chests that were added get a random item out of the Item Chest.
    An item of the item chest can't be given 2x or more to a chest though. I didn't find any plugin that does this? So please let me know if you know one!
     
  2. Offline

    KarimAKL

    @KyllianGamer May i ask why you don't try creating it yourself?
    Btw, some questions:
    1. which version are you looking for?
    2. do i understand correctly that an "Item Chest" should have other chests that it fills once the command is executed?
    3. What should the command be named, what should the usage be, and what should the permission be?
    4. If a stack of items has an amount higher than 1, should it add the whole stack, or just one of that item?
     
  3. Offline

    KyllianGamer

    Oh hey you caught me once again! Haha

    Ok I'll explain a bit more.
    (btw I don't do it myself cause im in like a school rampage so I have to do alooooooooooot)
    so look at these screens:
    [​IMG]
    [​IMG] https://imgur.com/Zdivs0R
    https://imgur.com/bXFNoss
    so the main command would be /randomchests or /rc
    at the first picture you see 8 chests and a "itemchest"
    you have to set the item chest with /rc setsource
    (sets the chest where the items come from)
    the 8 other chests has te be set with /rc addchest
    then whenever a command like /rc randomize is executed
    all 8 chests get a random item out of the chest (like 2nd picture)
    only 1 item
    and none of the chests can have the same item unless there's less unique items in the itemchest then there's chests

    this is btw for a event on a server where I'm staff we're gonna play a community game called "werewolfs"
    and I need this plugin to give papers with the role that a player is in a chest in their house

    if you have any questions pls ask :p
     
  4. Offline

    ASchneider

    I'm eyeballing this project, but I had a quick question. When you say:
    what do you mean? Are you saying the source chest shouldn't be able to contain duplicate items, recipient chests can't contain duplicate items, or no two recipient chests should receive the same item? Also, are you wanting each recipient chest to get exactly one item, or are you wanting the items in the source chest to be evenly divided up between recipient chests? This only makes a difference because if you want each recipient chest to have one item, then the source chest should only contain a number of items equal to how many recipient chests there are.

    Below is what I've imagined the plugin to look like. Tell me if this is close to what you were thinking:

    Code:
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    Creates a chest group. Used to store information on a source chest and any recipient chests
        /randomchests creategroup [chestGroupName]
            {randomchests.creategroup}
    OR
        /rc creategroup [chestGroupName]
            {randomchests.creategroup}
    
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    Deletes a chestgroup when given a valid name
        /randomchests deletegroup [chestGroupName]
            {randomchests.deletegroup}
    OR
        /rc deletegroup [chestGroupName]
            {randomchests.deletegroup}
    
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    List chest group names for use in creation and deletion commands
        /randomchests listgroups
            {randomchests.listgroups}
    OR
        /rc listgroups
            {randomchests.listgroups}
    
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    Source chest feeds all other chests. Designated by looking at chest and running command.
        /randomchests setsource [chestGroupName]
            {randomchests.setsource}
    OR
        /rc setsource [chestGroupName]
            {randomchests.setsource}
    
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    Remove source chest from chest group. Removed by looking at chest and running command.
        /randomchests removesource [chestGroupName]
            {randomchests.removesource}
    OR
        /rc removesource [chestGroupName]
            {randomchests.removesource}
    
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    Recipient chests are fed a random item from the Source Chest. Designated by looking at chest and running command.
        /randomchests addchest [chestGroupName]
            {randomchests.addchest}
    OR
        /rc addchest [chestGroupName]
            {randomchests.addchest}
    
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    Remove recipient chest from chest group. Removed by looking at chest and running command.
        /randomchests removechest [chestGroupName]
            {randomchests.removechest}
    OR
        /rc removechest [chestGroupName]
            {randomchests.removechest}
    
    =-=-=-=-=-=-=-=-=-=-=-=-=
    
    Item distribution is performed after running command:
        /randomchests randomize [chestGroupName]
            {randomchests.randomize}
    OR
        /rc randomize [chestGroupName]
            {randomchests.randomize}
    
    
    
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Notes:
    
        - A check should be done to make sure that each chest group has at least one source chest and two recipient chests
        - Group names should be checked against each other to make sure there aren't any duplicate names
        - Adding a chest to a chest group should make sure the chest group name is valid
        - Removing a chest from a chest group should require a valid chest group name as well as making sure the designated chest is actually a part of said group
    
     
Thread Status:
Not open for further replies.

Share This Page