RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] BlackJack [RMRK+]

0 Members and 4 Guests are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
BlackJack
Version: 2.0
Author: modern algebra
Date: November 10, 2007

Version History


  • Version 2.0: Converted to RMRK+ Format. Double option appears only on First draw. Proper reward for BlackJack given. Now possible to black out the screen with a switch. Numerous style and structure changes.
  • Version 1.2: Bug fixes
  • Version 1.0: Original. Included hit, stand, and double.


Description


This event system allows you to play BlackJack. To replace the default card set with your own, save over each card with the new graphic.

Features

  • Includes Double, Hit and Stand
  • Dealer stands on Hard 17
  • Very easy to plug into your game (RMRK+ Format)

Screenshots







Instructions

Download the demo. Make sure you have your maximum variable count in your project to greater then 546. Then, all you have to do is paste the event from the demo into your game at all the places you want to play BlackJack. You can also set the Self-Switch D to determine whether you want to black the screen out or not

Credit


  • modern algebra

Support


I will provide support here. Be sure to tell me of any bugs and I will fix them for the next release. I may not add a function, even if you request it.

Author's Notes

This is actually a very old script. Having to go through it for the purpose of converting it to RMRK+ Format, I changed a few things here and there, but was too lazy to fix the rather clumsy-ish structure. It still works very well though. It was my first event system that I released I believe.

RMRK+ Format

This script is RMRK+ Format.

Variables Used

  • 527-528:: Location X & Y: Tracks the pixel placement for drawing each card.
  • 529-530:: Player & Dealer Score: Tracks the value of each hand
  • 531-539:: Card Values: track each card already drawn. These ensure no cards are drawn more then once per game.
  • 540:: Bet: The amount of Gold bet by the player
  • 541-542:: Suit & Value: These represent the suit and value of the card currently to be drawn
  • 543-544:: Player & Dealer Draws: Number of times each player has drawn. Convenience, mostly.
  • 545-546:: Player & Dealer Aces: Number of aces each player has drawn. Makes it convenient to calculate score

Demo


Attached
« Last Edit: February 23, 2014, 04:18:18 PM by modern algebra »

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
i THINK it looks kick ass! sweet idea for a battle system with events!
Watch out for: HaloOfTheSun

***
Rep:
Level 89
Koopa Troopa!
Nice job! Btw, the game got stuck, I got 20 and the dealer used 5 cards and then nothing happened, but my character in the background could move around O_o

*
I love Firerain
Rep:
Level 97
=D
Very good algebric eventing! :P

lol, nice job man.
Arlen is hot.

*****
Ancient Mummy
Rep:
Level 90
Lol is this normall to happen ?




But anyways its really nice !

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It looks all right Snailer. I'm not quite sure what the problem is... Did it get stuck there?

I noticed a few glitches on my own so V. 1.2 is out now. Remember to post if you encounter any problems  :)

*
Rep:
Level 102
2014 Biggest Narcissist Award2014 Biggest Forum Potato2014 Best Non-RM Creator2013 Best Game Creator (Non-RM)2013 Best IRC ChatterboxParticipant - GIAW 112012 Most Successful Troll2012 Funniest Member2012 Best Use Of Avatar and Signature space2012 Best IRC ChatterboxSecret Santa 2012 ParticipantProject of the Month winner for November 2009For being a noted contributor to the RMRK Wiki2010 Most Successful Troll2010 Biggest Forum Couch Potato2010 Best IRC Chatterbox
You should have a counter to count what your number is, so that the player won't have to keep counting.

Lol is this normall to happen ?




You won  19 to 18

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
That's a good idea. But, because of the Ace, it wouldn't be as simple as just displaying the variable which contains the Player Score. I'd have to change the way it counts aces, so I'll include it if I decide to make a version 2.0, since I'd have to change some stuff around to include the Split function anyway. It's a good idea though and I'll definitely do it if I can find the time.

***
Rep:
Level 87
Sorry to revive this, but how would this be used in RM2k3? Sorry for the silly question if it is one.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
In the same way, though you would have to translate the event. Do they have labels in 2k3? I may consider making a version in 2k3, but my experience with 2k3 is lousy, at best, so we'll see :P

***
Rep:
Level 87
Can you run through it in RM2k3 for me?
I'm really happy with my work so far, and I believe some minigames will make it even better.

pokeball QigOffline
***
Rep:
Level 87
In the same way, though you would have to translate the event. Do they have labels in 2k3? I may consider making a version in 2k3, but my experience with 2k3 is lousy, at best, so we'll see :P
Labels are in rm2k3
Working on world of sorrow again.

********
Licks
Rep:
Level 91
Sexual Deviant
If you are still having the problem where you don't have those two cards, you could do this.
Make all the number cards, then make a spade, clubs, diamonds, and hearts card back. Then make a king, queen and jack. What this will do is that all the kings queens and jacks will looks the same but all the cards will be there.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
That would involve doing a check to see which draw you are on though
« Last Edit: October 17, 2007, 03:32:18 AM by modern algebra »

********
Licks
Rep:
Level 91
Sexual Deviant
That is understandable, but couldn't you tell it to produce both images? And doesn't it check for draw anyway?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
You can tell it to use both images yes, but the thing is that when you show picture, you give it a label. If you show any picture after it with the same label, then the first picture is erased. Right now, the system is:

If Ace of Hearts
Show Picture 1: Ace of Hearts
If 2 of Hearts
Show Picture 2: 2 of Hearts
etc...

The way you are suggesting would be like this:

If Ace of Hearts
   If First Draw
      Show Picture 1: Heart Card Back
      Show Picture 2: Ace Card
   If Second Draw
      Show Picture 3: Heart Card Back
      Show Picture 4: Ace Card
   If Third Draw
      Show Picture 5: Heart Card Back
      Show Picture 6: Ace Card
   If Fourth Draw
      Show Picture 7: Heart Card Back
      Show Picture 8: Ace Card
   If Fifth Draw
      Show Picture 9: Heart Card Back
      Show Picture 10: Ace Card
   If Sixth Draw
      Show Picture 11: Heart Card Back
      Show Picture 12: Ace Card
   If Seventh Draw
      Show Picture 13: Heart Card Back
      Show Picture 14: Ace Card
   If Eighth Draw
      Show Picture 15: Heart Card Back
      Show Picture 16: Ace Card
   If Ninth Draw
      Show Picture 17: Heart Card Back
      Show Picture 18: Ace Card
   If Tenth Draw
      Show Picture 19: Heart Card Back
      Show Picture 20: Ace Card
   End
etc...

While that would work, and allow for all cards, it is the problem I was specifically trying to avoid when I first designed my system. In any case, if I were to work on this system again I would either script it or hybrid it to add in the extra cards. Thanks for the suggestion though.

********
Licks
Rep:
Level 91
Sexual Deviant
Im not trying to be a pain in the butt, but what about different labels, is that possible? And only do it for a few, you know what I mean?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Not really. I was talking about the labels. If you mean give a few of the cards different possible labels based on what cards are already out there, that would be somewhat annoying and result in about 9 extra conditional branches for each card that I give two possible labels to the picture. Even then, it may not work. The fact is, I don't really give a shit about three cards. It doesn't effect the game in any significant way.

********
Licks
Rep:
Level 91
Sexual Deviant
Thats cool.

As an alternative, just make like one card appear twice
Like if your missing a king, make one king appear twice

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
I'm not sure I understand. Anyway:

New version is up. The main difference is I converted the system to RMRK+ Format and commented it.

********
Licks
Rep:
Level 91
Sexual Deviant
Here, I'll look at the event and fix it up.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
knock yourself out  ;D

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
This looks cool, but shouldn't the dealer's cards be hidden? That's half the game of blackjack, you don't know if you cards are higher than theirs and vice versa.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Whenever I've played Blackjack, it's always been one card up one card down ... Maybe there are different variations?

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Whenever I've played Blackjack, it's always been one card up one card down ... Maybe there are different variations?

Nm, you're right. For some reason I thought that card that was face down was right side up. -_- My bad. Great event! :D
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."