[FUN/MECH] RandomGlass v0.7 - Item & Money Slot Machine Plugin [1000]

Discussion in 'Inactive/Unsupported Plugins' started by dkramer, Jul 23, 2011.

  1. Offline

    dkramer

    <font color="rgb(128, 0, 0)">RandomGlass, an Item and Money Slot Machine Plugin</font>
    <font color="rgb(0, 51, 0)">Version: 0.7</font>

    Description:
    iConomy and BOSEconomy are optional since this plugin can use items as currency too. This is a slot machine plugin where clicking on a chosen block with the correct item in hand makes the block drop random loot (money and/or blocks, it depends on how it's customized) in exchange for the player's money in iConomy/BOSEconomy currency or items. Multiple machine blocks can be created with a whole new sets of configuration. Everything can be customized by the server admin. The default blocks are a gold block and a glass block, and the default item to hold is an arrow.


    These videos are a bit out of date: instead of bringing up block IDs, now this plugin brings up the real item/block names.

    Example of a machine that takes money:


    Example of a machine that takes items:


    Download:
    <font color="rgb(255, 0, 0)">If you are updating to a more recent version, do not overwrite previous RandomGlassSettings.yml unless stated.</font>

    <font color="rgb(255, 0, 0)">If you are coming from version 0.6 or earlier, you will need to replace your RandomGlassSettings.yml.</font>

    v0.7 http://dl.dropbox.com/u/36326695/RandomGlass0.7.zip

    Older Versions:
    v0.65 <font color="rgb(16, 97, 179)">http://dl.dropbox.com/u/36326695/RandomGlass0.65.zip</font>
    v0.6 <font color="rgb(16, 97, 179)">http://dl.dropbox.com/u/36326695/RandomGlass0.6.zip</font>
    v0.5 <font color="rgb(16, 97, 179)"><Edit by Moderator: Redacted mediafire url>
    v0.3 <Edit by Moderator: Redacted mediafire url>
    v0.25 <Edit by Moderator: Redacted mediafire url>
    v0.2 <Edit by Moderator: Redacted mediafire url>

    Installation:
    Extract RandomGlass.zip. Insert RandomGlass.jar and RandomGlassSettings.yml into your plugins folder.

    Commands:
    There is just one command: "/slots".
    It brings up a list of all blocks that are slot machines

    Customizing:
    RandomGlassSettings.yml is where all of your customizing will take place. The file itself explains most things.

    Things to note:
    * This .yml will only accept block ID numbers for the "item#:"s.
    * Use an "item#:" of 0 (the number zero) to denote money, and the "item#dropnumber" will be how much money it will vend if it lands on it
    * You can add or subtract the amount of "item#:" and "item#dropnumber:", just make sure to edit the "numberofitems:" variable
    * You can have more "item#:" and "item#dropnumber:" than you have "numberofitems:", they just won't be included
    * Although you can probably gather this from the .yml, multiple machine blocks can be created if you copy and paste from "whatdropsrandomly" to the last "item#dropnumber" you have. Just make sure to change "machine#" to the correct one.
    * I just threw in some blocks and money for the loot to be, so please customize this yourself. This also goes for how much money it costs.


    Changelog:
    0.7:
    * changed the ID# messages into true block/item names for convenience (finally found the code for it)
    * added the command "/slots"

    0.65:
    * Fixed a nasty infinite loot bug that 0.6 caused
    * Made the .yml a lot easier to manipulate


    Show Spoiler
    0.6: Added support for items to be currency too, just hold the item while clicking the slot machine
    0.5:
    * added support for multiple slot machines that can have different loot, cost, item needed to held, everything
    * Fixed up the .yml comments

    0.3:
    * formatted messages to display money with two decimal places
    * added support for both items and money to be vended
    * Changed wording a bit more

    0.25: Changed message wording, fixed typos, cleaned up code a bit
    0.2:
    * added not enough money error message
    * added message telling which item should be held
    * added message saying how much was debited and the remaining balance

    0.1: Release
     
    Last edited by a moderator: Nov 13, 2016
  2. Offline

    Plague

    you need a direct link for non-members
     
  3. Offline

    dkramer

    Sorry bout that, did I fix it correctly?
     
  4. Offline

    dkramer

    Major update to support vending of money. Please give me comments or suggestions so I know which way to take this.
     
  5. Offline

    noahwhygodwhy

    different prices/rewards for clicking with different items? maybe?
     
  6. Offline

    dkramer

    Hey, that's a good idea. I'll see if I can implement that!
     
  7. Offline

    captainawesome7

    No. Mediafire isn't direct.
     
  8. Offline

    dkramer

    Oh! Understood, my bad. I'm working on getting it correct.

    Anywho, I added support for multiple machines and loot.
     
  9. Offline

    Hopium

    doesnt say if it requires and economy plugin, i use gold for currency on my server without any economy plugin and would like to maybe use this, can it be configured to require an item to use instead of "money"
     
  10. Offline

    dkramer

    I'll see if that's possible while still keeping it lightweight!
     
  11. Offline

    Plague

    Mediafire IS taken as a direct link for non-members as far as submissions are concerned. Not the first misinformation coming for you, infraction material :p
    yes
     
  12. Offline

    dkramer

    I added support for items. The .yml explains how to use them: they're pretty simple.

    Awesome, thanks :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  13. Offline

    Hopium

    thanks bro downloading now
     
  14. Offline

    dkramer

    Please report any bugs since I tried to get that version out quickly.

    There's an error with the item code. It seems if you have one item and it costs one, you can get infinite resources *embarrassed*.I'll try to get a patch out quickly.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  15. Offline

    captainawesome7

    But, mediafire sucks :'(
     
  16. Offline

    Plague

    Oh that is true ;)
     
  17. Offline

    dkramer

    Patch is out, you'll need to update your .yml (sorry again) since I updated it to be easier to manipulate, see, and add more machines/items.
     
  18. Offline

    DestinysCourage

    Hi, DK! I love your idea, but can you tell me how to install it? I'm not much of a bukkit-plugins installer, so..yeah, can you help me out? Thanks!
     
  19. Offline

    dkramer

    Surely! Unzip the file, and you'll get two things from inside. One will be RandomGlass.jar, and another will be RandomGlassSettings.yml. You place these two inside the "plugins" folder (which can be located in the same folder your craftbukkit.jar is). Then, open up the RandomGlassSettings.yml with a text editor and you are ready to customize. The RandomGlassSettings.yml explains pretty much everything. Hope this helped.
     
  20. Offline

    DestinysCourage

    Ah, okay! Thanks! :)
     
  21. Offline

    dkramer

    No problem, tell me if you have any other issues.

    Updated to 0.7. The major features are:
    • changed the messages to say the true block or item name, not the IDs
    • added the command "/slots" to show which blocks are slot machines
     
  22. Offline

    ReVurb

    Ah, Awesome!
    I'm about to test out your plugin, but if it works as explained it is EXACTLY what i'm looking for!

    Alongside the default essentials economy, I created some fun events to participate that give a certain item as a reward.. so I was looking for a plugin that will take this item and exchange it for something random!

    Nice work :)

    EDIT: Got it to work like a charm! Thank you!
     
    dkramer likes this.
  23. Offline

    zExtaZee

    Hi, i made a account just for this ^^ Here is one thing i want added to the plugin -> Admins should be able to collect the "money" or inserted items :)
     
  24. Offline

    dkramer

    Thanks you thank you! I love feedback.

    :D
    Hmm that will take a lot of tweaking... after I'm done with my latest plugin I will see if I can do that.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  25. Offline

    olimoli123

    How about a machine that actually looks like a slot machine
    with 3 rows and columns

    For example, you win a prize if.
    [O] [D] [P]
    [O] [P] [D] [L]
    [O] [P] [D]

    The [O] = Obsidian, just an example
    The [P] = Pumpkin
    The [D] = Diamond
    The obsidian wins.

    The [L] Is the lever to trigger the machine,
    Make an ironblock border or something
     
  26. Offline

    Freezy

    Does this plugin change every single block into a slot machine?
    Or does it track which blocks are toggled?

    I would like to create a casino, but don't want to give players the ability to create their own slot machines at home.

    The following Permissions would be nice as well:
    Slots.Use //allows the use of slot machines
    Slots.Admin //allows the config, creation and destruction of slot machines

    Flatfile for a small amount (100-200 slot machines) would be fine.

    I also liked the idea of random changing wall of 3 x 3 that would definetly give you more of a slot machine feel.
     
  27. Offline

    dkramer

    @Freezy
    Every block would be a slot machine. I'll think over some of your ideas, but I've moved on to bigger projects recently, thanks!
     
  28. Offline

    CraftyMclovin

    I attempted to use this plugin but i kept getting the same error message,
    [SEVERE] Could not pass event PLUGIN_ENABLE to RandomGlass
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
    at com.nomnom.register.payment.methods.iCo4.isCompatible(iCo4.java:54)
    at com.nomnom.register.payment.Methods.createMethod(Methods.java:58)
    at com.nomnom.register.payment.Methods.setMethod(Methods.java:90)
    at me.dalton.randomglass.server.onPluginEnable(server.java:42)
    at org.bukkit.plugin.java.JavaPluginLoader$47.execute(JavaPluginLoader.java:569)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:948)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:174)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:157)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  29. Offline

    micler12

    Thank you for the plugin but i have a problem
    When i hold an arrow and i right click the gold block
    the server says
    Could not pass PLAYER_INTERACT to RandomGlass pls help
    and i have the same problem with my portals for the nether

    [SEVERE] Could not pass event PLAYER_INTERACT to RandomGlass
    java.lang.NullPointerException
    at me.dalton.randomglass.BasicPlayerListener.onPlayerInteract(BasicPlaye
    rListener.java:67)
    at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.j
    ava:330)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:339)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:171)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.j
    ava:265)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:592)
    at net.minecraft.server.Packet15Place.a(SourceFile:57)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :500)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    >
     
  30. Offline

    Docdecdoc

    this plufgin sucks so bad
     

Share This Page