PDA

View Full Version : vbCasino 2


adamgessel
07-31-2005, 10:00 PM
I'm releasing this because waza sent it to me, now he is on vacation, people have been asking for it, and a couple of other reasons. I take credit only for a small part of the coding of this. I have fixed quite a few things in the version he sent me, and everything seems to work fine. Pretty much all credit goes to waza.

When waza gets back, another version will most likely be released.

Right now, if you have any problems this is supported by me, and when waza gets back, also supported by him. As far as I know, there are no known bugs.

I have installed vbCasino on a board that you can test it on, report bugs, give modifications and plugins, and get help. You can find the URL at the bottom.

I posted this in the BETA releases, but this isn't really a BETA release because I have already tested it... it is more considered as a release canidate. It didn't look like I could post it anywhere else. Moderators are free to delete that post. However, if the moderators feel that this is more like a BETA, they are free to move this post to the BETA forum.

Anyways... what's new in vbCasino?

*On/Off switch for every game
*A lot more games
*Master on/off switch
*Set which row in the user table the money comes from (so you can use it with petz, ucash or other)
*Set how much winners the lottery has to take
*The staggering in percents for the lottery winners (like the first wins 90% of the jackpot, second 50% and third 20%)
*Staggering per 5 guesses in for higher/lower game
*Set per usergroup what the price of a lottery ticket is
*Set per usergroup, per game if they are allowed to play it
*Set per usergroup or they can view the casino
*Set per usergroup or they can buy multiple lottery tickets (from reset to reset)
*PM function for lottery winners
*Verified to work with vBulletin 3.0.8
*Installer now works right.
*Installer now uninstalls BETA 1.
*Fully phrased

SCREENSHOTS:

Screenshots are available at the DEMO Board. They are too big to post here.

DEMO BOARD:

http://www.a-d-a-m.com/forum

You can login with username: test and password: test

PLEASE NOTE THAT THE CASINO IS NOT COMPLETELY INSTALLED ON HERE. It should be working later today. You can go here anyways to report bugs, give us ideas, and create plugins and modifications for it.

If you installed the first BETA, this includes instructions and script to uninstall it easily!

PLEASE CLICK INSTALL!!!

UPDATE: EVERYTHING NOW WORKS GREAT. ALL REPORTED BUGS WERE FIXED.

adamgessel
08-01-2005, 05:35 PM
More problems in install file were found... updating...

nexialys
08-01-2005, 05:51 PM
would be good to have a registration-free demo, we're not going to register on your site just for a demo, aren't we ?!

a demo username/pass would do the trick...

adamgessel
08-01-2005, 05:52 PM
I was actually going to, haven't had time yet...

adamgessel
08-01-2005, 05:53 PM
Having problems with phrases, will update the file ASAP. You won't have to install again, just update your file if you have already tried to install.

adamgessel
08-01-2005, 06:05 PM
For some reason it's not calling the phrases right, even though when I look at the code it looks like everything is correct. If anyone sees a problem in the code involving phrases, please post here.

wwesn1
08-01-2005, 06:31 PM
you can just use the account I made on there test/test but the casino doesn't work!

adamgessel
08-01-2005, 06:46 PM
Just give me a little while, trying to figure out why the phrases don't work. As soon as I get those working, everything should be fine.

nexialys
08-01-2005, 07:24 PM
... next time, release it in the BETA forum, even if you're sure it is correct... i'm sure you're stressing here because something goes wrong... beta give you peace of mind...

Gemma
08-01-2005, 07:42 PM
Manually going into the Phrases Manager and saving all the casino_phrases makes most of them appear ;)

Sleepyk
08-01-2005, 09:46 PM
wont work this should be in beta

slim cutty
08-02-2005, 09:30 AM
Database error in vBulletin 3.0.7:

Invalid SQL:
INSERT INTO `lottery_settings` VALUES (1, 0, 'uttpoints', 3, '50,30,10', 1, 1, 1, 1, 1, '1,2,5,10', 1);

mysql error: You have an error in your SQL syntax near ';
' at line 2

mysql error number: 1064

Any Idea how I can fix this?

slim cutty
08-02-2005, 09:40 AM
I installed... everything seems to be working great

except for the winners and slots
seems to be the same as the older version

doesn't display winners and the slots are all still reading zero?

I guess this will be fixed soon ?

adamgessel
08-02-2005, 03:22 PM
Sorry guys, I would have put it in BETA but waza made it sound like it all worked and all I had to do was fix a few things... he didn't mention this not working, so I fixed some stuff and released it. Didn't think phrases would be a problem. Anyways, if someone sees a problem with the code, please tell me. I've looked at it and can't understand why it won't work. I'll try just putting everything so it doesn't use phrases for now, but it could take awhile because there are so many.

adamgessel
08-02-2005, 03:26 PM
@slim_cutty: I will work on that. I thought waza said he fixed that, but in a few days another will be released, hopefully the final version where everything works.

Anyways, I'd like to hear how you got everything working, it could save everyone a lot of trouble. Also please post which vBulletin version you have. Thanks!

slim cutty
08-02-2005, 04:47 PM
Well, I'm running My SQL 3.23... I've been getting errors with the new hacks for some reason... syntax at line blah blah blah... don't understand why... at anyrate...

INSERT INTO `lottery_settings` VALUES (1, 0, 'uttpoints', 3, '50,30,10', 1, 1, 1, 1, 1, '1,2,5,10', 1);

I had to add manually into the database... it worked.. it just didn't work when I installed it from the install.php file... what I did which probably wasn't save was deleted that line in the install.php file and it finished installing. After that I went and added that line above manually. And it worked... as far as the casino_redirect... I just changed that to what it was looking for in the phrase to casino_cp_redirect... eventhough it didn't say that it saved it... it did

and that is it. It seems to work and deduct points and all, however the slots game still shows all zeros and never updates wins or anything at all... every other game works to say the least.

*EDIT... whoops.. it seems this has been updated I guess... can somebody delete this?

micheal332001
08-02-2005, 07:36 PM
Well, I'm running My SQL 3.23... I've been getting errors with the new hacks for some reason... syntax at line blah blah blah... don't understand why... at anyrate...

INSERT INTO `lottery_settings` VALUES (1, 0, 'uttpoints', 3, '50,30,10', 1, 1, 1, 1, 1, '1,2,5,10', 1);

I had to add manually into the database... it worked.. it just didn't work when I installed it from the install.php file... what I did which probably wasn't save was deleted that line in the install.php file and it finished installing. After that I went and added that line above manually. And it worked... as far as the casino_redirect... I just changed that to what it was looking for in the phrase to casino_cp_redirect... eventhough it didn't say that it saved it... it did

and that is it. It seems to work and deduct points and all, however the slots game still shows all zeros and never updates wins or anything at all... every other game works to say the least.

*EDIT... whoops.. it seems this has been updated I guess... can somebody delete this?


Hi there i know what you got this error you see in this code

INSERT INTO `".TABLE_PREFIX."lottery_settings` VALUES (1, 0, '".$cashrow."', 3, '50,30,10', 1, 1, 1, 1, 1, '1,2,5,10', 1);

it has the `".TABLE_PREFIX."

but in the CREATE TABLE it had this

$DB_site->query("
CREATE TABLE `lottery_settings` (
`active` int(1) NOT NULL default '0',
`multiple` tinyint(2) NOT NULL default '0',
`cashrow` varchar(20) NOT NULL default '',
`winners` tinyint(3) NOT NULL default '0',
`winamount` varchar(100) NOT NULL default '',
`pm` tinyint(2) NOT NULL default '0',
`slotsactive` tinyint(2) NOT NULL default '0',
`lotteryactive` tinyint(2) NOT NULL default '0',
`pickactive` tinyint(2) NOT NULL default '0',
`guessactive` tinyint(2) NOT NULL default '0',
`gstaggering` varchar(50) NOT NULL default '',
`rouletteactive` tinyint(2) NOT NULL default '0'
) TYPE=MyISAM
");

But should have been this

$DB_site->query("
CREATE TABLE `".TABLE_PREFIX."lottery_settings` (
`active` int(1) NOT NULL default '0',
`multiple` tinyint(2) NOT NULL default '0',
`cashrow` varchar(20) NOT NULL default '',
`winners` tinyint(3) NOT NULL default '0',
`winamount` varchar(100) NOT NULL default '',
`pm` tinyint(2) NOT NULL default '0',
`slotsactive` tinyint(2) NOT NULL default '0',
`lotteryactive` tinyint(2) NOT NULL default '0',
`pickactive` tinyint(2) NOT NULL default '0',
`guessactive` tinyint(2) NOT NULL default '0',
`gstaggering` varchar(50) NOT NULL default '',
`rouletteactive` tinyint(2) NOT NULL default '0'
) TYPE=MyISAM
");

so the INSERT INTO could not insert it in the right place.

Also in the

lottery_slots_stats

there need to be a insert too as this is why some people are not seeing the jackpot and the others show as 0

like this

$DB_site->query("
INSERT INTO `".TABLE_PREFIX."lottery_slots_stats` VALUES (1, 1, 1, 1, 1, 1, 1);
");

i have updated the install file but have not tested it so please feel free to download it and see if this works for you.

soniceffect
08-02-2005, 08:37 PM
Used the new installer .. I just get the casino jpg up, when I go to lottery.php ... how you get in?

micheal332001
08-02-2005, 09:33 PM
Hi there

You will need to edite all the $vbphrase to get the casino to work.
There seams to be a problem calling them even know they are installed.

This goes in the root of you forums i have taken out all the $vbphrase
and put in english ones.
But you will need to update all your templates too by taking out all the $vbphrase and changing then from this

$vbphrase['Casino_Index']; to "casino index"

The casino is all working on my site and its very good but i will be making changes to the casino to sute my site.

MauriceReed
08-02-2005, 10:59 PM
im gonna hang back until i see this working properly, sounds like a top hack tho mate....

adamgessel
08-02-2005, 11:12 PM
Within the next 24 hours, I will update the files and have everything working. Thanks to everyone who tried to help get things working...

adamgessel
08-03-2005, 03:10 AM
FILE UPDATED. All known bugs were resolved. The test board also now works. Sorry it took so long, I have been kind of busy. Anyways, enjoy!

I am working on some new features and will release something soon.

Mr. Brian
08-03-2005, 07:05 AM
And it seem like the installer isn't working though.


Invalid SQL:
ALTER TABLE usergroup ADD lotteryticketprice INT UNSIGNED DEFAULT '10' AFTER pmunread

mysql error: Unknown column 'pmunread' in 'usergroup'

mysql error number: 1054

Date: Wednesday 03rd of August 2005 03:02:39 AM
Script: http://www.xxx.com/forums/admincp/casino_install.php
Referer: http://www.xxx.com/forums/admincp/casino_install.php
Username: xxx
IP Address: xxx

micheal332001
08-03-2005, 07:56 AM
Oh there is another error if you look at your templates you will see that the one for the lottery winners is spelt wrong.
The template is lotter_winners should be lottery_winners

this is why you will not be able to see any winners to the lotter till you change that.

pepel13
08-03-2005, 01:30 PM
WoW ... I think micheal332001 should be in the contributers list , Hein ?

;) Well... I'll will wait until all the bugs are fixed

http://www.a-d-a-m.com/forum/

user: test

pass: test

adamgessel
08-03-2005, 04:46 PM
Actually found that before, thought I changed it, but I guess I didn't save it. Anyways, file will be updated in a few minutes, I've almost got everything worked out...

adamgessel
08-03-2005, 04:52 PM
Found out I actually put the wrong installer in the zipped file. I have uploaded the new one and everything should be fixed.

Kirk Y
08-03-2005, 07:17 PM
Great hack, any plans on porting to 3.5? Definately worth an install from me! By the way... the demo board, did you buy a seperate license for that or what? (If you didn't know, test boards cannot be publicly accesible ;) )

adamgessel
08-03-2005, 08:03 PM
@acidburn0520: Thanks for the install! Also, I forgot that I had to buy a seperate license... lol. It slipped my mind. Anyways, I'll take down the board for right now and work on getting a license for that one.

Also, right now I'm looking into importing it into 3.5. Once the final comes out, vbcasino should be ready to install on that too.

If anyone has a board that we can use to demo, please post the URL here. For right now, the other board will close, except for private testing (which no one will be able to see obviously).

Gizmo5h1t3
08-03-2005, 10:03 PM
right...gimme a clue.
installed EXACTLY as the install instructuions said...files EXACTLY as the file edits say.....ok.
now....admin cp shows the "CASINO" button......fine.
but....NOTHING on the actual board????

nowhere?

oh, and btw, when i try to update options in the admin cp...i get a "could not find phrase casino_cp_redirect" error??

**edit**

when i direct the browser to the lottery page, i get the page, eaxctly as it was on the test board...ie...just the page saying welome to the blah blah lottery, with the jpeg piccy...nothing else....

HELP!!

Confusion
08-04-2005, 12:49 AM
How can I make this use reputation instead of usin' uCash??

Confusion
08-04-2005, 01:51 AM
Also, how come you can't go back in your browser to get to lottery.php?

BTW, I'm usin' vb version 3.0.7.

Confusion
08-04-2005, 02:04 AM
How do you settle individual lottery's?

adamgessel
08-04-2005, 02:49 AM
Wow wow wow... lots of questions...

Anyways, to answer your first, it never occured to me that someone might want to use reputation... it seems kind of useless to me because I don't know who would want to bet all of their reputation points away... maybe if you can better explain why you would want to make it go off of reputation I could code something that would make it go off of reputation.

Not sure what you mean by you can't go back in your browser back to the lottery. I can and it seems fine.

Maybe we'll include something later to end lotteries and stuff, but right now it is just one lottery. Maybe there will be multiple later.

Tomorrow I'll release vbCasino BETA 3, which fixes all known bugs and adds a link or two and a few new features and some placeholds for features in the future. I could release it now but I think vbulletin.org would get mad, because they don't want to see vbcasino up every single day... I just have had to update it too much lately... ;)

The good part with BETA 3 is that no one will have to do more file edits on this one as far as I know.

If you are having problems in BETA 2 with not seeing any links on the top, try editing a phrase or a template. I changed a few templates for BETA 3 and all of the sudden the DEMO board started working, so I'm thinking I either changed something or it was just the fact that I edited something. Sometimes that's the case. If not, tomorrow's BETA should do the trick.

adamgessel
08-04-2005, 02:52 AM
Forgot to add... the new BETA 3 also fixes over a dozen spelling errors.

redspider
08-04-2005, 03:02 AM
any way to make the casino run with own money ?
I dont have petz or ucash and I wish there was a way to use this hack with out have to install others hacks.

TIA

adamgessel
08-04-2005, 03:03 AM
You bet. It can run off of any points system you have.

adamgessel
08-04-2005, 03:03 AM
If you don't have one, you can make your own, but it can run off of any points system out there.

redspider
08-04-2005, 03:06 AM
sorry maybe is because my english is not so good but what I trying to say is make the casino have own money system with out no out side point system.
that way people like me dont be force to install petz or ucash.

adamgessel
08-04-2005, 03:14 AM
You could... if you got your own points system you could use this with it.

adamgessel
08-04-2005, 03:15 AM
Remember to click install ;)

adamgessel
08-04-2005, 03:21 AM
Once I get the test board licensed, I will write a tutorial on how to make your own points system, but if you already know how its very easy to integrate this with it.

cuphongle
08-04-2005, 05:20 AM
i installed and everything is good....
but on the forum, theres no link to get to the "casino"

cuphongle
08-04-2005, 05:23 AM
so i try to go to the lottery.php
theres just an image, and nothing else

adamgessel
08-04-2005, 01:32 PM
Try editing a template and some phrases.

adamgessel
08-04-2005, 03:06 PM
In a few minutes I will release BETA 3, which will fix ALL problems with phrases. It will be extremely easy to install too.

waza
08-06-2005, 04:09 PM
I'm back.

micheal332001
08-06-2005, 06:57 PM
To fix this ( casino_cp_redirect ) Phrase login as admin in your admincp
goto Languages & Phrases then click on phrase manager
then click add new phrase and enter in this

Phrase Type control panel stop message

Varname casino_cp_redirect

Text Casino Settings Updated

then click save thats it very easy to do

micheal332001
08-06-2005, 07:16 PM
WoW ... I think micheal332001 should be in the contributers list , Hein ?

;) Well... I'll will wait until all the bugs are fixed

http://www.a-d-a-m.com/forum/

user: test

pass: test


Thanks for the nice words m8

I will be releasing a addon hack to this later today
This hack will give you the options in the admincp of the casino to set the points won for each fruit, and when someone gets the 3 stars ( jackpot ) it will reset to a default amout you have set it too.

tuanluu
10-06-2005, 02:33 PM
when will this hack convert to vb 3.5?

DrewzR/T
10-13-2005, 08:55 PM
OK i'm still new to hacks but have done about 10 with no problem. I'd like to know what exactly this is and how do I do it!!!! I have everything done up to this just gonna wait for an answer on it!! Thanks

"Also add a cron job to includes/cron/lottery_cron.php choose a date, whenever you want the lottery to be reset."

platnum
10-14-2005, 04:19 AM
Everything worked ok, but I have no options on the casino for the games? Anyone else get this?

And Drew... AdminCP > Scheduled Tasks > Add New Scheduled Task

DrewzR/T
10-21-2005, 03:04 PM
Everything worked ok, but I have no options on the casino for the games? Anyone else get this?

And Drew... AdminCP > Scheduled Tasks > Add New Scheduled Task

So.....I add.... that filename in like so and then I can just make everything up to what I want?

Title

Day of the Week (Note: this overrides the 'day of the month' option)

Day of the Month

Hour

Minute

Log Entries
Yes No
Filename : includes/cron/lottery_cron.php

waza
10-23-2005, 11:11 AM
Hey, we don't give support in this thread anymore, please go here:
https://vborg.vbsupport.ru/showthread.php?t=93600&highlight=casino