Inactive [FUN] Casino v2.1 - A casino games suite for Minecraft {Supports iConomy} [1060]

Discussion in 'Inactive/Unsupported Plugins' started by JorganPubshire, Jun 24, 2011.

  1. Offline

    JorganPubshire

    Casino games for Minecraft:
    Version: v2.1

    This is a casino games suite for Minecraft, eventually it will contain up to 5 different games, but right now it has only blackjack and basic slot machines. I am open to suggestions as to which game to add once slot machines are completed.

    This is a full blackjack game which includes:
    • Betting
    • Hitting
    • Staying
    • Teleportation (if you don't want teleportation, turn off block-based gameplay)
    • Up to 5 players (any additional players will be placed in a waiting queue)
    • Block-based gameplay (optional)
    • And many more!
    • NOW WITH SLOT MACHINES (Alpha phase)
    If you plan on having block-based gameplay turned on, READ THIS SETUP GUIDE! Please stop asking me why you fall through the map when you /blackjack as it is described in the setup below!
    Block-based (open)


    To use block-based gameplay:
    1. Place two signs. (More if desired)
    2. On one of them put "[HIT]" and on the other put "[STAY]". Make sure that both are put on line two the the signs without quotation marks.
    3. If a player left clicks on the [HIT] sign, they will issue the /hit command
    4. If a player left clicks on the [STAY] sign, they will issue the /stay command
    5. If a player right clicks on the [HIT] sign, they will issue the /double command
    6. Place two more signs
    7. Aim at the first sign and chat /blackjack <SlotNumber> 1
    8. Aim at the second sign and chat /blackjack <SlotNumber> 2
    9. Repeat steps 6, 7, and 8 using the numbers 1-5 to replace <SlotNumber>
    10. Player's cards will now be displayed on the signs set up in steps 6-9
    11. BRAND SPANKIN' NEW FEATURE: During the betting phase, the signs that display the player's card will also be use for betting.
    12. If the player punches the first sign (Which will have [BET] on it) they will bet the amount shown on the second sign
    13. If they punch the second sign, the number on it will increase 1
    14. If they right click the second sign, the number on it will decrease 1
    15. Stand where you want players to be teleported to upon game start and use /blackjack <SlotNumber>, where SlotNumber is the numbers 1-5
    16. If you do not set the teleport points, do not ask me for help when you fall into the map


    Slot Machines (open)

    Slot machines are very simple to set up and use. Here's how:

    To set up:
    1. Place a diamond block
    2. Put a switch on it
    3. Place a dispenser under the diamond block
    4. DONE!
    To use:
    1. Activate the switch
    2. DONE!
    Currently a player is charged 10 dollars to play, they break even if the bottom two blocks match, and they profit 10 if all three blocks match.Because slot machines are not fully developed, they fall short in many ways.
    • They are in no way configurable
    • They could already exist on your server where you do not want them
    • They don't work if you don't have iConomy
    • They don't spin like a slot machine
    • They are all the same
    Don't worry, these things will be fixed soon. I am planning on adding a third block to the setup of the slot machines to reduce the likelihood of them already existing on your server.
    I will add different types of slot machines (with different win probabilities) and configurable winning amounts. I will add item rewards for non-iConomy users. I will work on better simulating a slot machine. And any other things requested that I find suitable to add in.



    Downloads:
    Download/Source Code
    TODO (I swear I'll make a video soon ... maybe)

    Changelog

    v1.5:
    • Fixed some bugs
    • Removed some debug text
    • Began block-based gameplay
    v1.6:
    • Finished block-based gameplay
    • Added Slot object
    • Minor bugfixes
    v1.7:
    • Added betting to block-based gameplay (maybe officially finished with block-based)
    v1.8:
    • Added a toggle option for block-based and console-based gameplay
    • Plugin now prevents players from building and breaking blocks (if block-based gameplay is on)
    • Removed some debug text
    • Hitting (or right-clicking) a fence makes you leave the game
    v1.9:
    • Fixed a bug in block-based gameplay setup caused by client
    • Added draw/push
    • Added a configurable starting amount for non-iConomy users
    • Dealer's hand is now shown to players
    Full CHANGELOG

    v2.0:
    • Added very basic slot machines (much work to be done yet)
    • Added maximum bet to blackjack
    • Fixed how currency displays through the plugin
    • Slightly modified betting signs for blackjack
    • Usual bugfixes
    v2.1:
    • Added slot machine protection
    • Changed how slot machines are built
    • Added separate levels of winning
     
    ColbyM and NEO like this.
  2. Offline

    JorganPubshire

    Step one: Read the plugin's instructions on the top of this thread.

    There is a description of how to setup the plugin on the top of this page. Since you did not setup the plugin properly, all of your teleport points are set to (0,0,0) by default. This is why you are getting stuck in the ground until it kills you. There is a command to end the game, use /leave.

    Step two: Be more detailed.

    Telling me that there is an error in the program DOES NOT HELP! If you want me to fix the problem you will have to be more detailed about what went wrong. Exactly when does it happen? What did you type to the console before it happened? What does the console say? e.printStackTrace() or gtfo! My guess to what happened is that you didn't set up block-gameplay and tried to use the plugin despite the giant red warning on the top of the page.

    Step three: Wait.

    I am planning on making a video walkthrough of the plugin's setup to prevent this exact kind of problem. If reading my setup guide does not work and this message does not work, then just wait until I can get that video made and posted. I will make it extremely detailed and walk you through everything step by step.

    Step four: Change your ways.

    Never just start randomly testing a plugin without reading how to use it. That can lead to dire consequences such as plugin failures, server crashes, and data corruption. (And worst of all, it annoys the plugin developer to no end) Always know what you are doing with a plugin. I've crashed my server once and my client once by using plugins improperly because I didn't know what I was doing, I have always learned how to use a plugin before installing it ever since.

    Step five: Actual answers.

    The 1 & 2 for each slot number is for the card display, if the player in slot 1 is dealt a jack of hearts and a three of spades, his signs will read:
    Code:
    --------------- ----------------
       Jack of           Hearts
      Three of           Spades
     
    --------------- -----------------
    The hit and stay signs are independent of the plugin and do not need special commands to set them up.

    There is not multiple games, I'm building this to all work around one central casino.

    ___________________________________________________________________________

    I think that covers all of it. Let me know if you have any more questions and keep watching for that video.
     
  3. Offline

    DivineKyuuji

    I followed all the instructions exactly. Using /leave doesn't do anything, some of the commands I used didn't do anything at all, and all of the signs don't do anything when I click them. It happens when I use /blackjack, it could be happening before that but I don't know. And yes I set up block gameplay.

    The signs never showed any cards.

    I'm looking through the server log but don't find anything relating to Casino.
     
  4. Offline

    JorganPubshire

    You probably just made a small mistake somewhere, I do it all the time while testing and that one mistake can ruin everything. It's also possible that you downloaded a version that had a bug in it and you never updated to the newest one.

    I just posted an updated version that is seemingly free of bugs and that should work out fine. Try installing the new version and try it again.
     
  5. Offline

    alfskan

    I`m still waiting for none teleport version :'(
     
  6. Offline

    JorganPubshire

    There already is a no-teleport version. Just download the latest version and, in the config file that it generates, set block-based to false. Voila! No teleporting.
     
  7. Offline

    alfskan

    OMG!

    Dunno that:'(

    sry! Im idiot..

    I`ll check it immediatley!
     
  8. Offline

    JorganPubshire

    It's not your fault, I think that I forgot to say that. I'll put it in the description somewhere.
     
  9. Offline

    Dec64

    Ok i have been over this many times, i place two signs, with [HIT] and one with [STAY] on the second line, i type /blackjack 1, i then add the signs 1 - 5, with /blackjack 1 1, ect but when i type /blackjack, it puts my in position, 1st sign shows Bet, and second shows 1, but it gives me an internal error, and the console shows

    And hitting signs will not work, i am unable to leave, but saying "money" displays my cash.

    Any help as to where i can begin to troubleshoot what i have done wrong?
     
  10. Offline

    Cypsteel

    I usually lurk and don't post to these addon's but this one has so much promise...I feel obligated to give feedback:

    1.) I am having the exact same problem as DEC64 when I have block mode enabled. I have followed your instructions over and over again. I will go through them here incase I am misinterpreting something:
    1. Make two signs in the ground with nothing but [HIT] and [STAY] on the second line of each sign.
    2. Make two other signs (I put might behind the first 2 on the wall). I stand directly infront of the 1st sign and type /blackjack 1 1 Then I stand in front of the second and type /blackjack 1 2 Then I back up so I can see all four signs and type /blackjack 1 for the teleport spot.
    3. When I type /blackjack to test, i get an internal error and nothing works including either hit/stay sign, typing hit, stay in chat, or even /leave. In addition, I can't post blocks anymore because I am in a "session". I end up having to kill the server at this point. It DOES show Bet: in the first box and 1 in the second.
    4. I have disabled all my addon's except for iconomy and no difference. iConomy 5.01 and craftbukkit build 1000
    I turned off block mode and tested via commands. Pretty slick but two suggestions:

    2. ) Make it to where a push results in no change in money. Should be pretty easy logic to add there. Dealer and I have 18, I get my bet back.

    3.) Show the cards the dealer took to get his final number. It just shows "You have 18 and dealer had 3 showing and now has 18." How did that happen?

    4.) Occasionally when the dealer has a card showing, it will say (20) beside it. It was like Jack of diamonds or something. Normally if the dealer has a 3 showing, it says Dealer has a 3 of hearts showing (3). But one of the Jacks or Queens was showing a (20).

    Good luck and I am really looking forward to this one!
     
  11. Offline

    JorganPubshire

    I have been testing and I managed to replicate your situation. The issue is occurring in the setup of the plugin. It is no fault of your's but in the Minecraft client. Sometimes when you are aiming at a sign and save it to the plugin, Minecraft will actually give the plugin the block behind it. I am working on making the game not run in block-based mode unless all of the signs are verified to be valid signs. Hopefully this will solve the issue.

    I think that I have fixed the issue. I added a message that confirms that a sign was properly saved, made slight modifications to the sign saving code, and made a catch for the nullPointerException. If that error still gets thrown, the game can progress as normal, but any signs that were not properly saved will not show anything.

    The loss of all the other commands were caused by the nullPointer, solving that should solve the other issues.

    I will release an update later tonight with the official bugfix and two new features (the ones suggested by Cypsteel).

    Once I have posted the update, please upgrade to it, test it, and let me know if there are anymore issues.

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

    Dec64

  13. Offline

    JorganPubshire

    Just posted the update! My next update will take a little while, but it will contain slot machines!:D
     
  14. Offline

    Dec64

    Works perfect! very nice plugin, cant wait for slot machines.
     
  15. Offline

    JorganPubshire

    Thank you. It's nice to know that there is someone who not only appreciates my work, but anticipates its future.
    Thank you for helping me find and fix that bug and please feel free to offer comments, criticism, and suggestions about this and all my other plugins(past, present, and future).
     
  16. Offline

    NEO

    @jorganpunshire

    Wonder full plugin, any chance of adding permissions support?
     
  17. Offline

    JorganPubshire

    I'm not sure yet if I want to add permissions or not, I'll definitely make sure that only admins an use the setup commands, but if that is all that permissions would be used for, then I'll just build that in rather than worrying about properly implementing another jar.

    Unless there is popular demand for the use of permissions in all of these areas:
    • Admin commands
    • Joining a game
    • Playing future games (Slots, craps, etc.)
    Then I will probably just use a simple built-in system. But if everyone demands permissions to join games, then I'll add it in when I'm working on slot machines.

    Vote here to let me know if you want permissions or not. Voting will only be open for one week and you can only vote once, pick your decision wisely.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  18. I love this plugin! As addictive as real life blackjack, and I simply can't wait for more games!

    There's just a little problem though, me and another friend of mine began playing. I just kept betting all my money, because I could. Suddenly it ended with me having about 576000 dollars, which is a bit overkill.

    Not only that but everytime I betted them all, it kept saying me and the dealer had tied. Even though I was busted and he had 21. That meaning I kept earning money without losing.

    That being said, I hope you can fix it and sooner or later maybe add iConomy support, so you can earn the money.

    Thank you!

    EDIT: I just noticed that it actually had iConomy support, not only that but it ended with me having over million and million of iConomy money. Not good :(
     
  19. Offline

    JorganPubshire

    You might be overloading the int value in java. If you get too much money, you will not only break the plugin, but iConomy as well. I'll look into it.

    Do you like the idea of a maximum bet amount? (it would be optional, if set to 0 there would be no limit)
     
  20. Offline

    alfskan

    Hi

    I love the none teleport version:D

    But there is some prob.

    1.I got 7clubs,10hearts
    and dealer got 9spades,king diamonds.

    But it said "You tied!(0)":confused:

    2.what is the meaning of "(0)"?

    3.I win the game too many times.:oops:

    EDIT: oh I didnt see the above post. I bet 1000000 dollars when prob happened.
    And I agree with maximum bet amount function.
     
  21. Offline

    JorganPubshire

    Found and fixed bug (I hope). The version number has not changed, but the jar has. Please update and test it again.

    There is no win and no loss, zero dollars have changed.

    That is just the nature of the game, It is statistically the game that Casinos lose the most money on.
    Hopefully the maximum bet will slow the rate that players increase their money.
     
  22. Offline

    alfskan

    It seems like fixed:p

    but I found another little prob.

    when I type "/leave", it leaved after initiate the game. of course there is no bet.
    (I use only command based game)
     
  23. Offline

    JorganPubshire


    That's exactly what it's supposed to do.
     
  24. Offline

    alfskan

    omg

    it happened again.

    I bet 2000000 dollars.

    Im busted and dealer got 18.

    but it siad "you tied!(0)":'(
     
  25. That's exactly what it did to us too, and yes I would like the idea of a changeable maximum bet in the config.

    If I need to renact what happened, it's exactly like alfskan said.

    You have few money, you bet everything. Even though you lose, you get "You tied! (0)" and you earn lots of money. If you just keep betting all you have, you have no way to lose money. It just keeps saying "You tied! (0)" and you earn double, triple maybe even quadruple your money.
     
  26. Offline

    JorganPubshire

    It happened to me last night too, I can't figure out how it starts, but once it his some certain condition it will do that for every hand. WAIT! I JUST FIGURED IT OUT! I know this sounds crazy, but I literally just thought of what is happening. There is a list of names of players that tied the dealer, but it never gets cleared. Once you tie the dealer once, you always tie! I will fix it immediately. I can't believe that I overlooked such a simple error.

    It is fixed! (I really hope) This should be the end all fix. To be sure, keep playing until you tie the dealer legit, then purposefully lose the next hand, if it doesn't say "you tied" then the fix worked. If it still says "you tied" then I am thoroughly confused. Once again the version number and source code is unchanged so just re-download and test as normal. Thanks for bearing with me through this! I really am trying to get it fixed.



    p.s. Those quotes are just to alert you of the update.

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

    locutus

    About when are you likely to release the slot functionality? I'd love to have slot machines, and i'd code it myself, but if you'll finish adding slots to your plugin soon, we don't have to compete.
     
  28. Offline

    chelben9

    This is a good mod i like the idea but too many bugs to even be closed to finished
    1.i type /blackjack and it spawns me in the ground then drops me under the world
    2.i give myself $10000000000000000000 ad it says i have no money then sets my money to 0 or like 1 3 billion
    it occasionaly works but it still spawns me under the world and i get negative amounts of money when i leave
     
  29. Offline

    niugnip

    Hey, just a *very* small request:
    A /roll command (maybe /roll <min> <max>)
    +broadcast in chat (maybe 30 blocks radius)

    /roll (Random number from 1-6)
    /roll <number> (Random number from 1-<number>)
    /roll <number1> <number2> (Random number from <number1>-<number2>)
    /!roll <1> <2> (like above, but global broadcast)
    Broadcast: <Player> rolled a <number>

    Permissions:
    casino.roll
    casino.roll.global

    Thank you :)
     
  30. Offline

    JorganPubshire

    I'm currently on vacation so I won't be working on it a lot, but I'll be working on it constantly after the 30th. Who said we were competing?

    :mad:Are you kidding me...:confused:

    I like to be nice to my end users, but not only is two bugs not a lot, but they're not even bugs... They're caused by you. Read the post to set up the plugins or read the comments that follow said post and you will learn that if you don't set up the plugin properly, it will spawn you underground (at the point (0,0,0) to be exact). Others have had this problem, and I have told them the same thing. As for giving yourself a ridiculous amount of money: If you knew anything about Java you would know that the maximum value of an int is 2,147,438,647 which is less than 10,000,000,000,000,000,000. This is no fault of my plugin, but merely the limitations of Java, which is what Minecraft is written in. But I digress. Next time you want to let me know that there is "too many bugs in my plugin" please check to make sure that they are my problem and not your's. Thanks! :D

    p.s. If you go above the maximum amount of an int, it turns negative! Imagine that all three things are caused by you. :p


    I like the idea, but unfortunately it is not relevant to this plugin. I want all aspects of my plugin to be games, not just gaming utilities. I may however make it in its own individual plugin for you if you'd like.

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

    chelben9

    i am so srry if i made u mad im just new to all this and wasnt sure so thnx
     

Share This Page