[FUN/MECH] Gambling - Cards, Dice, and Signs [740]

Discussion in 'Inactive/Unsupported Plugins' started by Heytherejake, May 1, 2011.

  1. Offline

    Heytherejake

    Gambling - Cards, Dice, and Shops!
    Version 1.0 - Released 5/2/2011

    Download the newest version (1.0) here: http://cl.ly/6OmO

    [​IMG]

    Gambling allows you to play card games, dice games, and create special no-hassle Casino Signs all with simple commands within Minecraft! Host poker games, play Blackjack, or just watch your money skyrocket!

    Gambling requires iConomy 4.x, as well as Permissions 2.x. If you wish to enable casino signs, you will need a SQL database. Gambling does not have any support for flatfile, and likely never will. (However, cards still work without a SQL connection).

    To install, drag Gambling.jar into your plugins folder. Reload your server, and Gambling will create all the necessary database and configuration files.

    Features
    -Fully featured card system with betting and payment.
    -Automatic casino signs for quick and easy gambling
    -Dice rolls with very random output

    Configuration
    If you are not planning on using casino signs, change the key "sqlEnabled" in plugins/Gambling/settings.properties to false. Otherwise, set maxGames to the maximum number of games you wish to allow a player to make, and set maxSigns to the maximum number of signs per game. If a key is set to 0, it will not limit the maximum.

    In your root folder, set mysql.properties to the necessary values to connect to your SQL database. (If you've used hMod, the values should be the same or very similar to the ones there)

    Usage

    Casino Signs
    Players with the permissions key "gambling.casinosign" can place and edit casino signs.
    New games can be created with /game create [Name].
    After creating a new game, type /game edit [Name] to edit a game.
    To add a rule to the game, type /game rule add [Minimum] [Multiplier]. Game rules work such that when the game rolls from 1-100, if the number returned is above [Minumum], it pays out [Multiplier] times your bet. (e.g. /game rule add 60 2 would pay out 2x the bet if the player rolls above 6).
    To remove a rule, type /game rule remove [Minimum]
    To list all rules, type /game rule list
    To place a game, type /game place [Bet]. Then, right-click on a block while holding nothing to place the game. Placing a game sign requires two signs. Note: Due to a bug in Bukkit, sign text will not display until the player relogs.
    To cancel placement, type /game cancel.
    To stop editing a game, type /game count.
    To delete a game, type /game delete. This will destroy all game signs, and return the signs used.
    To display a list of commands, type /game help.

    To use a casino sign, left or right click the sign. The sign will then automatically display what the player rolled, and pay out if necessary. Players cannot use a casino sign if they cannot afford the listed bet, or if the owner cannot payout the maximum possible winnings.

    Dice
    Players with the permissions key "gambling.roll" can use the command /roll [Minimum] [Maximum], which rolls a random number and displays it to all players in range.

    Cards
    Players with the permissions key "gambling.deck" can use deck commands. All deck commands display information to players with 20 blocks.
    /deck displays the number of cards remaining.
    /deck deal [Player] (Amount) deals one or more cards to a player's hidden hand.
    /deck draw draws a card and displays it to the local players.
    /deck burn discards the top card of the deck.
    /deck shuffle shuffles the deck and clears all hands.
    /deck add <Amount> adds more sets of 52 cards to the deck, for games like Blackjack.
    /deck pay [Player] pays out 95% of the current bets to a player, and 5% to the dealer, then clears the pot.
    /deck help displays a list of commands.

    All players can use /hand commands.
    /hand displays a player's hand.
    /hand show displays a hand to all players closeby, then discards it.
    /hand fold removes a hand without showing it.
    /hand toss [Number] discards a certain card from the hand.
    /hand reveal shows a hand without clearing it. (This is useful for dealers to use their own hand for the "on-table" cards)
    /hand pot displays the amount of money in the pot.
    /hand call automatically bets to meet the current highest bet.
    /hand bet displays the amount of money you have bet.
    /hand bet [Amount] bets an amount of money.
    /hand help displays a list of commands.

    Like the plugin? Donate to my coffee fund!

    Changelog
    Version 1.0
    • Initial Release
     
  2. Offline

    Plague

    You are missing the header and put the picture somewhere under download, not at the top
     
  3. Offline

    Heytherejake

    Fixed as far as I know.
     
  4. Offline

    NEO

    @Heytherejake

    Looks really nice, im going to test it out :D
     
  5. Offline

    Plague

    Edited the thread title.
     
  6. Offline

    Craftee

    is this plugin a RAM eater? or is it a light plugin? :)
     
  7. Offline

    Thanks4trying

    Seems to be broken? :(
    Code:
    [SEVERE] String index out of range: -1 loading Gambling v1.0 (Is it up to date?)
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    	at java.lang.String.substring(Unknown Source)
    	at com.studio878.heytherejake.Gambling.PropertiesReader.createNewFile(PropertiesReader.java:23)
    	at com.studio878.heytherejake.Gambling.PropertiesReader.<init>(PropertiesReader.java:16)
    	at com.studio878.heytherejake.Gambling.Gambling.getDatabaseConnection(Gambling.java:111)
    	at com.studio878.heytherejake.Gambling.Gambling.onEnable(Gambling.java:72)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:124)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:102)
    	at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:295)
    	at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:201)
    	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    	at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
    	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:394)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:379)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  8. Offline

    Heytherejake

    You don't have mysql.properties configured correctly then.
     
  9. Offline

    DJ_Idol

    Where exactly is the mysql.properties file supposed to be created? I've checked my /root (Where craftbukkit.jar, etc. etc. is), and it's not there. I've also checked /plugins and /plugins/Gambling/ and it's not there either. Also, is there a way to limit using dice only to signs?
     
  10. Offline

    Heytherejake

    It should have automatically created itself in root.
    Otherwise, it should look similar to:
    Code:
    user=root
    pass=
    driver=com.mysql.jdbc.Driver
    db=jdbc\:mysql\://localhost\:3306/minecraft
    
     
  11. Offline

    Trainerdusk

  12. Offline

    Thanks4trying

    Ok i got the plugin to work,
    but gambling signs arn't working
    when i type /game
    it says invalid command
    ------------------------------------------
    Edit:So am i going to get help? Please i really want this plugin
     
  13. Offline

    NotoriousPyro

    iConomy 5 support?
     
  14. Offline

    Naucoo

    I would love to see a video of this, if someone have it!
    And can we get iConomy 5 support?

    edit: I'm trying it anyways. I'll give a feedback...
    Report:
    Easy to understand and set up. Making "Coin-Bandits" was easy(even I cant check if it works=P). Deck and Hand is easy to use, as is Roll.
    Makes for an awesome plug-in for my server when it's compatible.
    Great work! Keep it coming...

    Some problems:
    After dealing 3 cards to a player, the command /hand toss 3 returns "Invalid number.".

    And then some that might be related to me using iConomy 5.x

    /hand bet returns "Pot has already been paid." same goes for pot and call.
    Casino signs on right click returns:
     
  15. Offline

    Heytherejake

    Going to port this to iConomy 5 soon hopefully, kind of have a ton of projects atm.
     
    kahlilnc likes this.
  16. Offline

    MasDaddy

    Hi,

    I setup the Plugin and it works Great on its own. I wanted to play around with the sign feature so I created a database. I am unsure where to input my database details. My "Gambling" directory only contains one file, settings .properties which is blank.

    I tried to enter the following details into the file:

    db=gambling
    user=gambling
    pass=***************
    driver=com.mysql.jdbc.Driver
    sqlEnabled=true

    But I still get a "Internal Error" from Minecraft.

    Any help would be greatly appreciated.
     
  17. Offline

    kahlilnc

    So mysql database name is gambling? It should be user: root. And password: (nothing) by default unless you changed the user and password yourself. But you should try that.

    EDIT: I can't wait till update.
     
  18. Offline

    SierraDelta

    I'm waiting for an update too. Although the plugin loads just fine using iConomy 5. I haven't tried gambling since updating to iConomy 5 though.
     
  19. Offline

    MasDaddy

    I created a new user for the database. I never use the root user as it can be un secure. The database details are correct, I just don't know where to paste it.
     
  20. Offline

    SierraDelta

    Could you add Texas Hold'em and Liar's Dice to this, as they are currently unplayable. If you ever update this plugin that is. :p
     
  21. Offline

    MiHo

    Could you update it or at least make it opensource?
     
  22. Offline

    Glacksy

    when i make a bet sign, and someone with enough money right clicks it, they won't lose money, but they can win money, so they can play ultimate, how can i fix it?
     
  23. Offline

    bruceweed

    does this work with sqllite?
     
  24. Offline

    Juze

    #740 inactive, also, if you decide to update, please don't use a shortened URL.
     
  25. Offline

    tha d0ctor

    have you tried to de-compile it and rebuild?
     
  26. Offline

    Evilhaunting

    Thanks so much I've been looking everywhere for a gambling plugin
    P.S Its been so long its me Evilhaunting *Former Buxville player :D* stop by some time? 99.72.226.178
     
  27. Offline

    dbizzzle

    Hey, you should post the source code :)
     
  28. Offline

    McSushi

    #Wed Aug 17 08:28:59 BST 2011
    sqlEnabled=true

    is that all of the config?
     
  29. Offline

    franckie20

    Does this plugin even work ?? Atm , because it doesn't for me , it gives some internal errors and i dunno how to fix/
     
  30. Offline

    Iceman4391

    A video containing tutorials for this plugin I think should be on this just because it is very confusing to understand at first, but easier if you have a video to watch. This is just a suggestion. Try someone like Samico or Torrent if you can,
    =)
    Good plugin by the way. Just what I'm looking for. But I will test it out as soon as possible.
     

Share This Page