Mystery crates

Discussion in 'Archived: Plugin Requests' started by samuel123abc, May 16, 2014.

  1. Offline

    samuel123abc

    Plugin category: Fun

    Suggested name: MysteryBoxes

    What I want: I basically want a plugin which allows you to open mystery boxes. They are given once upon a command. I want it to be customizable with choosing the name of the item in the box and choose a percentage on how often they will spawn in a mystery box. I would also like to customize the enchantment of the item. Notice, I do not want the boxes to appear on the ground such in the hive survival games.

    Ideas for commands:
    /mb open - Opens a mystery box if a player has one
    /mb give [player] [amount] - Gives a specified player the specified amount of boxes.
    /mb set [player] [amount] - This is optional, however it would set the specified amount of mystery boxes a player has to the specified amount.

    Ideas for permissions:
    mb.set
    mb.give
    mb.open

    When I'd like it by: Take your time, as soon as possible.

    Please don't post "This plugin is already created" since I have looked around and have not found a single one with such a high customizability where you can change the percentage on how often they will spawn and so on.

    Sincerely,

    Sam
     
  2. Will look into it. May take a bit of time.

    samuel123abc What items would be in the box? Would they be random, or would they be pulled from a config? Also, would there be more than one item?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  3. Offline

    samuel123abc

    ZonalYewHD They would be pulled from a config where I specify how often they spawn in a bow, which enchantments there are and what name they'd have. There wold be more than one item. Just don't forget to implement the percentage bit :) Thanks
     
  4. Offline

    au2001

    samuel123abc
    I already did a plugin a bit like this!
    You type /luckydip <player> and it gives him what would be inside the crate
    I'll adapt it to what you asked and i'll give you the link

    samuel123abc
    Okay, finished! Download it here.

    samuel123abc
    I added a /mb balance command to see how many crates you have.
    And to do /mb set, just go in the config and change the number (it's stored in UUIDs).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  5. au2001 I think he wanted it to open a chest, without the chest block, so that you grab the items.
     
  6. Offline

    xEpicTaco


    That would be incredibly easy to add, he should if he sees this. just make a new inventory, iterate through the dropped items and addItem() them into the inventory, then use openInventory() on the player
     
  7. Offline

    au2001

  8. Offline

    samuel123abc

    au2001 Could you tell me a little bit more how the config works, how do I add custom names, enchantments? Thanks alot. Also, ZonalYewHD xEpicTaco I would not want the inventory. Thanks anyways :)
     
  9. Offline

    au2001

    samuel123abc
    Normally, it's in the config...
    Try to delete it and reload the server
     
  10. Offline

    AoH_Ruthless

    au2001
    He's asking how he can do it (he needs help with the config).
     
  11. Offline

    au2001

    AoH_Ruthless I know :

    samuel123abc If you can't find it here's what was supposed to be written :
    Code:
    # -------------- HOW TO CREATE A KIT -------------- #
    # Just put "kit" and a number and then ":"
    # Percentage of change, here like that : "-0-" this would be 0%
    # Each part is separated by a " x " with the spaces!
      # First part : the item like diamond
      # Second part (Separated by a "-"!!) : Enchantments with there level at the end
        # NOTE : You can have several enchantments like this : "diamond-loot_bonus_blocks1000-loot_bonus_blocks1000"
        # NOTE : If the item is "player_head", this will be the owner of the head
      # Third part : The number of items
      # Forth part : The data of the item, the number after ":" in the ids
      # Fifth part : The name of the item like : "&cBest&bDiamond&aEver" with "&" for color codes
      # Sixth part : The first line of lore
      # Seventh part : The second line of lore
      # Eighth part : The third line of lore etc.
    # -------------- HOW TO CREATE A KIT -------------- #
    EDIT : you can also look at the examples in the default config

    killerbigmacs
    I am going to add so that when you right click a sign, you pay, and it opens you a crate.
    I will also add something in the config to open the crate in a virtual chest.
    Re-doing all the plugin would be long and as I often say these days, I'm really busy right now...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  12. Offline

    samuel123abc

    au2001 When I delete a kit from the config and reload in game, I still get a kit that is not in the config when I type /mb open. In the config, I do not want kits, I would just want one item in every box. When I then type /mb open it prints a message to the whole server:

    "[Name] got a(n) [item] from a mystery crate!"
    Where name is the name of the player that gets the reward and item is the reward, for example:

    "Samuel123abc got a(n) god sword with Sharpness 5, Looting 3 and Unbreaking 3 on it!"

    That would be amazing.

    Also, do you mind trying to make the config a little bit more readable? Example down below:

    Code:
    godsword:
      enchantments: 31,1 #Enchantment id and level.
      name: &4&lGod Sword.
      id: 276
      data: 0 #0 is basically no data value.
      message: {Name} got a god sword! #Message when player wins the god sword, {name} is replaced with the players name!
    
     
  13. Offline

    Venexor

    I am too looking for a plugin basically exactly like this. If you guys could make it into a format stated above, that would be great. Optionally a cool thing would be to add is a hook on to vault where some of the prizes are like $2000 or of something similar.
     
  14. Offline

    au2001

    samuel123abc Venexor
    If I have time, I will do that...

    @any_developper
    If you wish to help, you can decompile the code edit it, and recompile and post it here...
    That would really help me because I have a lot of thing to do these days (ik I say that often :D)

    EDIT :
    samuel123abc
    For the bug, I don't have any idea why it's doing that... did you reload everything correctly?
     
  15. Offline

    Venexor

    Yes if anyone could take this project up, it would be highly appreciated because this current config is usable but not as user-friendly as people would like it. I did take the time to de-compile to see if I could try anything but the scope of file configuration is beyond my knowledge.
     
  16. Offline

    TheOatBaron

Share This Page