Inactive [FUN/ECON] AnCasino v2.0 - Real slot machines for your server [1.1-R1]

Discussion in 'Inactive/Unsupported Plugins' started by Darazo, Dec 16, 2011.

  1. Offline

    Darazo

    [​IMG]
    AnCasino
    version: v2.0

    More information and downloads on the BukkitDev page

    This plugin depends on Vault. Get Vault here if you do not already have it.

    Description:
    In all my time of playing Minecraft I have seen a great many things. But I have never seen any proper slot machines. Troubled at this fact, I set out to put together the definite plugin for all your gambling needs, all in the comfort of your own Minecraft server.
    AnCasino allows you to easily set up interactive and proper block-based slot machines anywhere in your world. Nearly every aspect of these slot machines can be customized to your needs, including block types, costs and prizes, winning chances and more. The slot machines are compact and elegant, designed to give you large amounts of freedom to sculpt them any way you'd like.

    Features:
    • Animated, block-based slot machines, including audio
    • Highly customizable
    • Tracks statistics
    • Costs and prizes supported through practically all economy plugins
    • Configurable custom prizes and actions upon winning
    • Permissions (superperms)


    Screenshots (open)
    [​IMG]
    [​IMG]
     
    JoneKone, RaydarScan and DrAgonmoray like this.
  2. Offline

    Lay295

    Hey cool plugin! Looks better than the others :p
     
  3. Offline

    TopGear93

    Awesome! hopefully this plugin will stay! @Crash raged on his Slot machine plugin and i havent seen one since.
     
    NeonJ and IIGoldII like this.
  4. Offline

    Darazo

    Thanks. I am actively continuing development, and will probably be adding in more gambling games in later versions as well.

    Plugin has also been updated to v1.1.2 a short time ago, with a couple of bug fixes.
     
  5. Offline

    Phantom Index

    Ok I have a similar plugin towards yours, but this one gives you a broader way of designing it in your own way. so I can share you some info or you can add a dispenser and an option in config for a chance to win items that will be shot out of the dispenser

    Here's another idea

    This new slot Idea requires the slot machine to have a very high chance of winning and a random chance for scoring a good win. Why?

    Because let's say a player just won $25 after inserting $50 into the slot machine. The Slot machine will ask a question with a 15 second or less time limit. "Hit lever to continue for a better reward or just wait 15 seconds to claim your current winnings"

    Since you inserted $50 you'd want to try and win a higher prize right? You hit the lever again and it takes another $50 and this time you won $120 and now have $145, you play again, but this time lose. You lose all your collected winnings.

    This idea makes the slot machines very fun, I'm sure it takes a lot to code this, but it's a damn fun idea.

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

    Darazo

    That does sound like an interesting concept, a quit or double kind of thing if I understand you correctly. It is probably not something I'd implement (at least not at this stage), however. The very nature of my slot machines makes it difficult to achieve a high win percentage, and I'm not looking to re-code those bits at this time.

    As for the dispenser idea, I had that in mind early on, as an idea to make your winnings seem more "tactile". I decided not to, however, to allow for more freedom in the design of your slot machines. I might add it in the future as an optional thing, however.
     
  7. Offline

    Phantom Index

    as well :/ Coudln't hurt to try it. I really like them since they're custamizable
     
  8. Offline

    spunkiie

    @Darazo

    Amazing plugin! Good job :)

    Btw: Think you forgot to add message customization for: "currency removed from your account."

    Please add it if possible, thank you!
     
  9. Offline

    Jdbye

    This plugin is pretty cool, but I have a few feature requests:
    - Configurable amount of rows and columns.
    - 3 in a row diagonally gives a prize.
    - Configuration options for valid combinations, like prizes if you get a certain amount of a specific block anywhere on the game area, and prizes if you get 2 in a row of a specific block, etc.
    - Support for actual "reels", meaning a set sequence of blocks per-machine, and not just randomized.
    - Choosable bet by punching the block multiple times then right clicking to spin, e.g. 1x bet for 1 row, 2x bet for 2 rows, etc.

    These things would make playing it more fun. The way the plugin works now, I can't really increase win chances without decreasing the chance of high winnings, but if you could win by getting 2 in a row of a specific block, it would increase win chances, thereby making it more fun, without increasing actual winnings too much, and without touching the win chance of higher prizes.
     
  10. Offline

    Rahazan

    Great demonstrational video and a nice plugin.
     
  11. Offline

    Jdbye

    I actually went ahead and implemented most of the features I requested.
    What I didn't implement is a choosable bet and a configurable amount of rows and columns, but I added everything else. As a bonus I increased the scroll speed a little because it was too slow for a slot machine. Plus, I added displaying which row the prize was on, and total winnings for each round.
    Here's the download in case anyone wants it: http://www.thedepthsmc.com/bukkit/AnCasino.jar
    Edit: Uploaded another new version, that can have unlimited defined slot machine types (reel/rewards) that existing and new slot machines can easily be set to without editing the slots.yml with the new configuration manually. Simply add a "slottypes:" entry to the config.yml, followed by type names and then reels/rewards, like this:
    There is also a new command in /casino edit to change the type, and a new optional parameter in /casino add to set a custom type when adding, as well as /casino types to list available types. These all require the ancasino.admin permission.

    Winnings are a lot fairer now (at least using my settings, shown above). People win quite often, but usually low prizes, like the 2 coal and 1 diamond prizes, which isn't enough to outweigh the loss, but is still enough to keep the game fun. Also the addition of diagonal rows means winning is easier too, and potential winnings per round can be much higher.

    It should be bug free (as bug free as the original, at least), I tested it thoroughly. The format of the config files changed a bit, reels are now a comma separated list instead of multiple entries, ex. reel: 15,15,16,16,16,46,14,15,16,16,73,73,56,14 - and rewards have the addition of a required amount in a row next to the ID, so what was '15' for 3 in a row of iron is now '15,3', and both single block rewards and 2 in a row rewards work as you'd expect.
    Here's an example from my slots.yml file:
    @Darazo
    The source is in the jar, so you can easily implement the features as well if you want. Feel free to create a diff patch from it so you can see what changes i made (they weren't huge, but I did have to completely rewrite some parts of the code, most of the changes were in checkWinner. I only modified SlotManager.java.)
    Sorry if you feel like I'm hijacking your thread, that's not my intention. I modified it for use on my own server and thought other people might want it, but if you ask me to remove it I will.
     
  12. Offline

    Phantom Index

    Nice
     
  13. Offline

    Darazo

    @Jdbye

    Cool to see someone taking interest, and it looks like you've got some good ideas as well.

    Slot types and diagonal rewards are both things I've been meaning to add myself, but it looks like you beat me too it :p. Nevertheless, I'm sure I'll have that added for my next update. Choosable bets are also something I'd like to add in the future, although . Customizable amounts of columns and rows are a bit further up the horizon, but might make it in eventually.

    As for your new reward detection. The fact that it can give players more small rewards to keep their spirits up is nice, but it just strikes me as goofy and unintuitive that some blocks give rewards by simply being present in the reel, while others do not. I wish to keep my design as simple and intuitive as possible, and I feel that such a system makes things unnecessarily complicated.

    Early on, my initial plan was to have actual reels rotating as you describe, however I concluded that a semi-random block distribution would be better for gameplay purposes. See, if you have a set reel rotating in the slot machine, you would need to vary the spinning length for each spin in order to achieve randomized results. I felt that the better solution was to simply randomize the distribution, keeping the spin times static.

    On a completely unrelated note, I would like to improve the victory jingle, and I'd appreciate it if anyone had suggestions for a simple melody.
     
  14. Offline

    jazzman170

    I am getting this with latest recommende craft bukkit build:

    2011-12-21 17:49:27 [SEVERE] Could not pass event PLAYER_INTERACT to AnCasino
    java.lang.NoSuchMethodError: net.milkbowl.vault.economy.Economy.has(Ljava/lang/String;D)Z
    at me.darazo.ancasino.AnCasinoPlayerListener.onPlayerInteract(AnCasinoPlayerListener.java:46)
    at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:335)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:178)
    at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:498)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:208)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     
  15. Offline

    Jdbye

    Blocks giving rewards by just being present in the reel is optional, of course, but some people might want it, and I saw no reason to purposively not allow that since the way I implemented it, it just works with any defined amount of blocks in a row. Another thing I might add is combinations of different block types, like diamond,coal,coal.
    As for achieving randomized results with set reels, my way just starts the reels at a random position on every spin. I tried having it remember the reel position first but it wasn't random enough.

    I don't have any suggestions for a victory jingle but I agree with you that it could use some improvement. The current one isn't bad either though.
     
  16. Offline

    jazzman170



    solved, i updated vault
     
  17. Offline

    robinq97

    Please someone help i have installed it correctly. When i type in /casino in chat it says unknown command. type ''help'' for help. Someone please HELP! me
     
  18. Offline

    rawringlemon

    http://pastie.org/3060028
    That's the error I get
    I can't make the casinos either, that might be related to the error
    please fix this :/
    - rawr
     
  19. Offline

    Darazo

    You both need to get vault.

    Version 1.2 has now been released!

    Changelog:
    • Slot machines are no longer customized individually, but are based on customizable types. See the updated configuration page for more information.
    • New commands to edit slot machines and types
    • Slot machine winnings are now detected diagonally as well.
    • Fixed a bug where note blocks could no longer be used properly
    • Several performance improvements
    • Code cleanup

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

    spunkiie

    @Darazo

    Please make diagonal toggleable
     
  21. Offline

    o0AzzA0o

    +1
     
  22. Offline

    Darazo

    Sure. I'll add it in when I inevitably have to push some bug fixes.

    Edit: I might as well just leave it <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 11, 2016
  23. Offline

    spunkiie

  24. Offline

    Phantom Index

     
    Last edited by a moderator: Nov 11, 2016
  25. Offline

    spunkiie

    @Darazo

    The version <Edit by Moderator: Redacted mediafire url>

    Code:
    08:32:07 [WARNING] Task of 'AnCasino' generated an exception
    java.lang.NullPointerException
            at me.darazo.ancasino.SlotManager.checkWinner(SlotManager.java:114)
            at me.darazo.ancasino.SlotManager$6.run(SlotManager.java:258)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    
    The same doesn't happen with 1.1
     
    Last edited by a moderator: Nov 11, 2016
  26. Offline

    Darazo

    Ah, indeed. Well, just stick with the release version for now, then. I'll have a minor update released soon enough.
     
    Last edited by a moderator: Nov 11, 2016
  27. Offline

    Phantom Index

    can you make the config read custom colors for the reward messages and such??

    also when you win a 3 in a row or diagonal can those 3 blocks light up into lightstone or something?
     
  28. Offline

    Darazo

    Interesting idea with the blocks highlight. I might add an option to make them "flash" to a different block to highlight them in the future.

    As for the text bit, I am adding full customization of chat appearance in the next version. This will include color codes and such.
     
  29. Offline

    Phantom Index

    Excellent. I see this plugin will become the best Casino plugin yet. After this slot machine is good to go. Do you plan to add a different machine?
     
  30. Offline

    domingo15

    I'm getting this severe error, i don't know why and everything seems to be in order.
    I've delete and start over but it still pops up, could you help me out please.
    Thanks!
     

Share This Page