[MECH] Mystery Box v1.4 - Create Mystery Box's Like In COD Zombies [935]

Discussion in 'Inactive/Unsupported Plugins' started by Jayjay110, Jun 1, 2011.

     
  1. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Mystery Box - Create Mystery Box's Like In COD Zombies!:

    Current Version: 1.4

    Basically this plugin allows you to create Mystery Box's like in black ops zombies etc. To use a Mystery Box right or left click it twice within 2 seconds and you can buy a random item that you specify in the config file. One thing you will notice is there are probabilities, technically the only way they become probabilities if all the items probabilities in the config file, add up to 100%, else it will just create a random guess will close probabilities but not direct ones.

    Mystery Box's are Chests! (Just so you know lol :p)

    To use type /mb or /mysterybox it doesnt matter:
    /mb create <name> - This creates Mystery Boxes, type this then place or click on a chest
    /mb remove - Toggles Removing Mode
    /mb toggle - Globally toggles Mystery Box's On and Off (Still protects Mystery Boxes from breaking)
    /mb list - List all Mystery Box's


    Features:
    • Allows you to create Mystery Box's
    • Permissions
    • iConomy 4 & 5 Support
    • BOSE Economy Support
    • Essentials Economy Support
    • Op Defaulting
    • Console command support (Toggle only!)
    • Config File Support
    • MySQL and SQLite Support
    • Multi-World Support
    • Saving and Loading of different items to use
    • Automatic Config Generation
    • Cool lightning effect on purchase
    • Ability to modify price, items, amounts and probabilities :D Special thanks to @garbagemule who helped me with doing the items :D
    • Auto-Updating Built in :)
    • Choice to enable or disable lightning effect!
    • Customizable messages! (Includes the colour coding system :D!)
    • When you are in range of a mystery box you get a delightful message :p
    • Enabling or Disabling Economy / Permissions
    • Allows you to set the box's access to free
    Config:


    PHP:

    Enabled On Startup
    true
    Permissions
    ?: false
    Use An Economy Plugin?(False means everythings free!): false
    Price
    950.0
    Item Velocity
    0
    Database Settings
    :
        
    MySQLfalse
        Host
    Localhost
        User
    MysteryBox
        Pass
    '12345'
        
    DatabaseMysteryBox
    Lightning Effect
    ?: false
    Messages
    :
        
    'You do not have enough money, you need: ''§cYou do not have enough money, you
            need: '
        'Creation of Mystery Box''s - Started! Name: '
    '§bCreation of Mystery Box''s
            - Started! Name: '
        
    Creation of Mystery Box's - Stopped!: §cCreation of Mystery Box'Stopped!
        
    'Creation of Mystery Box''s - Complete! Name: ''§aCreation of Mystery Box''s
            - Complete! Name: '
        
    Removing of Mystery Box's - Started!: §bRemoving of Mystery Box'Started!
        
    Removing of Mystery Box's - Stopped!: §cRemoving of Mystery Box'Stopped!
        
    You have successfully removed a Mystery Box!: §cYou have successfully removed a Mystery Box!
        
    You forgot to specify a name for the Mystery Box!: §cYou forgot to specify a name for the Mystery Box!
        
    Your Mystery Box name may not contain spaces!: §cYour Mystery Box name may not contain spaces!
        
    That block is already a Mystery Box!: §cThat block is already a Mystery Box!
        
    There is already a Mystery Box with that nameplease choose another!: §cThere is already a Mystery Box with that nameplease choose another!
        
    Stop Creating Mystery Box's First!: §cStop Creating Mystery Box's First!
        
    Stop Removing Mystery Box's First!: §cStop Removing Mystery Box's First!
        
    'To Create Mystery Box''s Type: ''To Create Mystery Box''s Type: '
        'To Toggle The Mystery Box''s Plugin Type: '
    'To Toggle The Mystery Box''s Plugin
            Type: '
        'To Remove Mystery Box''s Type: '
    'To Remove Mystery Box''s Type: '
        'You just got the item: '
    '§aYou just got the item: '
        'For: '
    '§aFor: '
        'You are currently near the Mystery Box: '
    '§aYou are currently near the Mystery
            Box: '
        'Hit the box again to confirm your purchase! (It costs: '
    '§bHit the box again
            to confirm your purchase! (It costs: '
    Items:
        
    STONE:
            
    Amount'1'
            
    Probability'1'
        
    GRASS:
            
    Amount'1'
            
    Probability'1'


    Permissions:

    • MysteryBox.Toggle - Gives access to /mb toggle
    • MysteryBox.Create - Gives access to /mb create
    • MysteryBox.Remove - Gives access to /mb remove
    • MysteryBox.Use - Gives access to using Mystery Boxes
    • MysteryBox.List - Gives access to /mb list



    Download

    Source Code





    • No permissions, when permissions isn't enabled!
    • Null pointer on player interact :3
    • Command errors
    • Permission errors
    • Stupid block got destroyed by non permission players
    • Hashmap concurrent error thingy Thankyou to @rcjrrjcr for helping on this :D


    Changelog:
    Version 1.4:
    • Fixed a silly bug on block breaking
    • Added free box use
    • Added economy and permission choice
    • Added item velocity fun!
    • Small code fixes
    Version 1.3:
    • MAJOR UPDATE*
    • Fixed tons of bugs
    • Added Auto-Updating script
    • Support for Bose Economy and Essentials Economy
    • More Options

    Version 1.4:
    • Fixed a silly bug on block breaking
    • Added free box use
    • Added economy and permission choice
    • Added item velocity fun!
    • Small code fixes
    Version 1.3:
    • MAJOR UPDATE*
    • Fixed tons of bugs
    • Added Auto-Updating script
    • Support for Bose Economy and Essentials Economy
    • More Options
    Version 1.2:

    • Fixed Null pointer exception :p
    Version 1.1:

    • Fixed No Permissions bug
    Version 1.0:

    • Initial Release
    rdemanta, NEO and kahlilnc like this.
  2.  
  3. Offline

    Tux2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    What do you mean by price? Does it hook into something like iConomy?
  4. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Shit thanks forgot to mention that lol
  5. Offline

    kahlilnc

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Lol. I like the idea.
  6. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Dw im still working on the shooting ranges!
  7. Offline

    Trevor_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Jayjay110
    Code:
     [SEVERE] Could not pass event PLAYER_INTERACT to MysteryBox
    java.lang.NullPointerException   at com.servegame.n1p.MysteryBox.MysteryBoxPlayerListener.onPlayerInteract(MysteryBoxPlayerListener.java:170)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:299)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:133)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:791)
        at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    I'll just leave this here. This happens when I left click with my compass.

    Edit:
    Happens when you do left click/right click with anything, even bare hand.
  8. Offline

    TheNander

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This would be an interesting piece to add to Mob Arena. Has anyone tried this?
    TruffleDucks likes this.
  9. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ah sorry about that forgot a null check :p updated it :D
  10. Offline

    Trevor_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thank you Jayjay110, now I can continue onward with my server configuration. :3
  11. Offline

    Trevor_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Still Occuring
  12. Offline

    TruffleDucks

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    If only there was a gun plugin
  13. Offline

    0otf

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    looks awesome ill try it out

    Edit: Can you add boseconomy support?
  14. Offline

    charlie k-j

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    There is, SDK's gun mod, its god SMP support too! ^_^
  15. Offline

    Trevor_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The error is still occurring on left-click usage.
    Here is the error again:
    Code:
    [SEVERE] Could not pass event PLAYER_INTERACT to MysteryBox
    java.lang.NullPointerException
        at com.servegame.n1p.MysteryBox.MysteryBoxPlayerListener.onPlayerInteract(MysteryBoxPlayerListener.java:170)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:299)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:133)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:524)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
  16. Offline

    azngamerzer

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    does it even work with bukkit? :confused:
  17. Offline

    Trevor_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Nope
  18. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    grrr Idk why, ill fix it in about an hour k :)
  19. Offline

    embty

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I installed the plugin, and all the chests in the server turned into mystery boxes lol. And when i try using /mb remove <name> I get the massage that this name is already used for another mystery box. Using bukkit 818
  20. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    doesnt seem possible for it to make all the chests in the world myster boxes, and you dont type /mb remove <name> u just type /mb remove, Im fixing the errors now tho sorry :)
  21. Offline

    embty

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Well as soon as i installed the plugin, the whole server started shouting. WHAT IS MYSTERY BOX WE CANT USE CHEST! lol
  22. Offline

    embty

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Tried re-installing again for the third time, the same problem. A conflict with other plugins perhaps?
  23. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    thats wierd?
  24. Offline

    embty

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Happens as soon as I install the plugin, didnt toggle or make any mystrey box.
  25. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    hmmm im rewriting the command enabling , I think I butchered it hold on :O
  26. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    HUZZAH I fixed the error of the illusion of all chests being mystery boxes... i think :D, ill release it once im finished this update!
  27. Offline

    Trevor_

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Jayjay110
    Stick around after the release, I'll test all the features for you real quick.
  28. Offline

    rdemanta

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Actually, I have. Unfortuanetly it won't work for me because i don't have iConomy.
  29. Offline

    rdemanta

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I have a question. Do you thing that you could make it so that you don't need iConomy to use this plugin. I have essentials economy and i like it, so that would work to.
  30. Offline

    Jayjay110

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Sure ill add it in this next release :p
  31. Offline

    TruffleDucks

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Bleh... I hate server mods. They take forever to download and they don't even work once you get downloading.

Share This Page