[RC] Virtual Casino v1.3.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

[RC] Virtual Casino v1.3.0

Post by Brf » Sun Dec 24, 2006 12:14 am

Well... the Mod-Squad still has not acknowledeged my Virtual Casino v1.2.4a, submitted on Nov-29, so I am forging onward to the next stage.

MOD Title: Virtual Casino
MOD Description: Casino games (Slot Machine, Video Poker, Blackjack) for your users to waste their virtual cash.
MOD Version: 1.3.0 Beta

MOD Download: http://castledoom.com/forum/files/Virtu ... o-Beta.zip
Last Stable version: 1.2.4a

Demo Board: http://castledoom.com/forum/
Demo Usernames/Password:
Demo-1/phpbb-1
Demo-2/phpbb-2
Demo-3/phpbb-3

After I added the Cash Mod to my forum, I went looking for some nice casino games. I was quite disappointed with what I found -- especially the way the authors did not use the proper Script/Template format.

Therefore I wrote my own.

This casino is pretty much stand-alone, but I have also added in the correct hooks to display online status properly, so you can tell if your users are playing at all.

This MOD assumes you have installed the Cash Mod found elsewhere on this forum. No particular cash-name or cash-datafield-name is required. The Cash Mod API is used the pull the info for the Cash with ID of "1", unless it it changed in the ACP.

If you delete your currency, and create another, you will need to enter the Control Panel for all four games and submit the new currency, otherwise you will get a non-existant object error when you try to play.

This MOD adds a "gamecookie" field to the user SQL table to store the context of the Blackjack and Poker games. No useful data is stored in the HTML form returned to the user, because that would allow cheats and exploits.

I have created three Demo usernames to avoid the problems with multiple users playing games with the same username. If the gamecookie does not match the returned-form, the user's action will be ignored or his game voided. This is to discourage cheating. If your game is acting "weird", try one of the other Demo- users.

##############################################################
## Author Notes:
##
## This is designed to work with Cash Mod found at phpbb.com
## No particular cash-name or database fieldname is required, because the Cash will be selected
## from each game's control panel.
## If CashMod is not installed, a user database column named "user_points" will be assumed.
## ------------------------------------------------------------------------------------------------
## The original cards images came from the casino mod by aUsTiN-Inc http://austin-inc.com/
## but they were renamed to make them easier to use.
## -----------------------------------------------------------------------------------------------
## The Slot machine image was originally from Microsoft's public online Office Clipart collection.
##############################################################
## MOD History:
##
## 2007-01-01 - Version 1.3.0 Beta
## - Conversion of all games to ajax-updating
## - Each game opens its own window, without headers
## - Fixed a bug when Surrender is allowed anytime and player surrenders after a split.
##
## 2006-11-28 - Version 1.2.4a
## - Minor bug preventing splitting in Blackjack
##
## 2006-11-19 - Version 1.2.4
## - Additional cash object error checking
## - Minor cash-update changes
##
## 2006-11-06 - Version 1.2.3
## - Moved login redirects before page_header
##
## 2006-10-15 - Version 1.2.2
## - Fixed a bug... with misnamed cash configs
##
## 2006-10-01 - Version 1.2.1
## - Fix page-constants and titles for release.
##
## 2006-09-24 - Version 1.2.0
## - user_points compatability tested and released.
## - Added language variable for "Cash_Points"
##
## 2006-09-24 - Version 1.1.0
## - Make compatable with non-CashMod user_points systems.
##
## 2006-09-23 - Version 1.0.1
## - Fixed display of currency names in CP.
##
## 2006-09-16 - Version 1.0.0
## - Add ending slashes to all img, br, and input tags
## - Verify all HTTP inputs are purified.
##
## 2006-09-14 - Version 0.7.1
## - Correct keno_admin cash button.
## - Login redirect for vcasino menu.
##
## 2006-09-09 - Version 0.7.0
## - Replaced all text with language strings.
##
## 2006-08-21 - Version 0.6.2
## - Dont allow playing Keno with no cash.
##
## 2006-08-20 - Version 0.6.1
## - Corrected Keno Currency Problem
##
## 2006-08-20 - Version 0.6.0
## - Added Keno
##
## 2006-08-16 - Version 0.5.2
## - Added Blackjack hand point-total display and ACP option to display that total while playing
##
## 2006-08-12 - Version 0.5.1
## - Added New options to Blackjack (special hands, surrender, constraints on split, double, hit on soft-17)
## - Re-Fixed width style of blackjack buttons
##
## 2006-08-11 - Version 0.5.0
## - Added New options to Blackjack (special hands, surrender, constraints on split, double, hit on soft-17)
##
## 2006-08-10 - Version 0.4.1
## - Fixed error in new Progressive slot machine jackpot after it wasnt awarded to me :(
##
## 2006-08-09 - Version 0.4.0
## - Added Control panels for all three apps
##
## 2006-08-08 - Version 0.3.1
## - Fixed width style of blackjack buttons
## - Added links back to Index and Casino from within games
##
## 2006-08-07 - Version 0.3.0
## - Replaced short-form Globals
## - Replaced global object references with stricter object calls
##
## 2006-08-06 - Version 0.2.1
## - Added missing images
##
## 2006-08-06 - Version 0.2.1
## - Minor typo: includes/page_header.php changed U_CASINO to U_VCASINO
## - changed width of display field in slot machine from 60 to 60px
##
## 2006-08-05 - Version 0.2.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#

Code: Select all

ALTER TABLE `phpbb_users` ADD `user_gamecookie` TEXT NULL ;
INSERT INTO `phpbb_config` VALUES ('vcasino_bj', '1|2|10|100|0|0|0|0|1|3|1|1');
INSERT INTO `phpbb_config` VALUES ('vcasino_poker', '1|1000|100|25|9|5|4|3|2|1|1|2|10');
INSERT INTO `phpbb_config` VALUES ('vcasino_slot', '1|100|60|40|20|30|20|10|4|5|2|1|1|2|5|10|20|61|1000');

Last edited by Brf on Fri Oct 26, 2007 3:32 pm, edited 6 times in total.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Sun Dec 24, 2006 12:15 am

Screen shots:
Image
Image
Image
Image
Last edited by Brf on Mon Jan 01, 2007 1:16 pm, edited 3 times in total.

User avatar
Elias
Registered User
Posts: 4626
Joined: Sat Feb 25, 2006 4:31 pm
Location: In the Water!
Name: Elias

Post by Elias » Sun Dec 24, 2006 1:48 am

Looking up for this.
Great job!!
"Mystery creates wonder, and wonder is the basis of man's desire to understand." - Neil Armstrong
|Installing Extensions|Writing Extensions|Extension Validation Policy|

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Tue Dec 26, 2006 8:05 pm

Poker done.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Thu Dec 28, 2006 7:12 pm

Keno done.

Blackjack is the tough one though. I will have to totally rewrite the form, so it will take awhile.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Sun Dec 31, 2006 2:07 pm

OK... I think I have the Blackjack working OK. I will probably package it up for beta download later today. Meanwhile, my demo site is working OK.

cj1
Registered User
Posts: 26
Joined: Sun Nov 05, 2006 9:46 am

Post by cj1 » Sun Dec 31, 2006 3:58 pm

Looks great :)

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Mon Jan 01, 2007 1:13 pm

A new zip has been posted for anyone who wants to try this out...

To update from any version from 1.2.1 or later, simply replace the included files.

slick50
Registered User
Posts: 3
Joined: Thu Jan 04, 2007 12:36 am

Post by slick50 » Sun Jan 07, 2007 12:14 am

I got this on my site and the members love it :)
All it needs now is Craps and Roulette and maybe scratch cards.

Thank you for all you hard work.

Rizzn.
Registered User
Posts: 264
Joined: Wed Dec 28, 2005 9:53 am
Contact:

Post by Rizzn. » Sun Jan 07, 2007 2:07 am

slick50: I hate to advertise another MOD in Brf's thread, but I don't think he'll mind after all the help he's put into it.

The Store MOD has a usable item system that's pretty extensive, and the demo item it comes with just happens to be a Scratch Card. You can find some other usable items (including some made by Brf) here.


Brf: I haven't found any major bugs in this version so far. I'll try to get some more extensive testing done when I can get more time to sit down and actually try to break the system ;)

Also, I'll remove the above advert if you want.
[Alpha] Store MOD (phpBB3)
- Support site forthcoming -
--------------------------------------
[RC1] wGEric Store MOD (phpBB2)
Additional Usable Items and Store MOD Support Forums (separate site)

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Sun Jan 07, 2007 3:17 pm

The lotto scratch card I wrote for wGEric Store works fine as far as I know...
Here is a screen shot of that:

Image

I had throught of adding Craps and Roulette.... but both have Multiple ways of betting and complicated graphics if I want them to look cool.

tHe LiNk
Registered User
Posts: 158
Joined: Sat Jan 11, 2003 3:26 am
Contact:

Post by tHe LiNk » Tue Jan 09, 2007 12:49 am

Interesting seeing what's being done with the slot machine / gaming concept in phpBB these days. Come a long way since http://www.phpbb.com/phpBB/viewtopic.php?t=131862 and others like it. Lookin' good!

yunebug
Registered User
Posts: 3
Joined: Tue Jan 09, 2007 8:44 am
Location: CA

Post by yunebug » Tue Jan 09, 2007 8:49 am

Wrong thread... sorry!

User avatar
yexusbeliever
Registered User
Posts: 586
Joined: Mon Dec 08, 2003 8:49 pm
Location: Olympus phpBB3

Post by yexusbeliever » Wed Jan 10, 2007 7:08 pm

How do you upgrade from 1.2.4a?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51889
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Wed Jan 10, 2007 7:55 pm

yexusbeliever wrote: How do you upgrade from 1.2.4a?


Just replace the files: The 5 main phps and the 5 main templates. None of the admin stuff, or support files have changed.

Post Reply

Return to “[2.0.x] MODs in Development”