vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - Casino (w/ 10 player poker) (https://vborg.vbsupport.ru/showthread.php?t=159151)

bhen13 10-03-2007 02:39 PM

what about more games?

Andrew Green 10-03-2007 02:41 PM

Quote:

Originally Posted by bhen13 (Post 1352164)
what about more games?


More games are coming, got to get all the issues with these sorted out first ;)

Anyways, I'm sending you something to try out.

bhen13 10-03-2007 02:47 PM

ok , thanks

Mark.B 10-03-2007 02:49 PM

The "main" templates start with
Code:

<html>
<head>

This should actually be:
Code:

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>

It seems to cause some issues with styles otherwise.

Devil Woman 10-03-2007 06:30 PM

This may sound daft but how do I get this to work with vbcredits?

I have searched but can't find the setting to add to make it work with vbcredits.

Any help is greatly appreciated.

Andrew Green 10-03-2007 06:33 PM

In the admincp you can set the field that it uses for cash. By default this is "casino_credits" but can be changed, just change it to what vbcredits uses. (vbcredits maybe? I don't use it so thats just a guess)

nickster 10-03-2007 08:22 PM

At the top of my page it says

Code:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /global.php(237) : eval()'d code on line 2
http://keybase.org/forum/casino.php

any help?

Andrew Green 10-03-2007 08:38 PM

Quote:

Originally Posted by nickster (Post 1352347)
At the top of my page it says

Code:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /global.php(237) : eval()'d code on line 2
http://keybase.org/forum/casino.php

any help?

That's a strange one, I'll register on your site tonight and poke around in it, and see what global.php might be trying to do at that point, My guess is it's conflicting with something else in there.

I see to <body> tags on that page, which should not be happening, so something is going funny somewhere in there.

sandt38 10-03-2007 10:52 PM

Quote:

Originally Posted by Devil Woman (Post 1352297)
This may sound daft but how do I get this to work with vbcredits?

I have searched but can't find the setting to add to make it work with vbcredits.

Any help is greatly appreciated.

Quote:

Originally Posted by Andrew Green (Post 1352298)
In the admincp you can set the field that it uses for cash. By default this is "casino_credits" but can be changed, just change it to what vbcredits uses. (vbcredits maybe? I don't use it so thats just a guess)

Should just be "credits" actually, not vBCredits ;)

I edited this on my board and it worked great

sandt38 10-03-2007 11:10 PM

For the video poker i get the following errors:
Quote:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /casino/vidpok_redeal.php on line 151

Warning: Wrong parameter count for max() in /casino/vidpok_redeal.php on line 187

Warning: Wrong parameter count for min() in /casino/vidpok_redeal.php on line 187
Line 151-71 in the casino/vidpok_redeal.php file reads:

Quote:

while($row=mysql_fetch_array($result)) {
$f[$i] = $row['card'] % 13;
$s[$i] = floor($row['card']/13);
$f2 = $f[$i];
$s2 = $s[$i];
$fcount[$f2]++;
$scount[$s2]++;
if($s2==0)$cardfile = "casino/cards/spades-";
else if($s2==1)$cardfile = "casino/cards/diamonds-";
else if($s2==2)$cardfile = "casino/cards/hearts-";
else if($s2==3)$cardfile = "casino/cards/clubs-";

if($f2+2<11)$cardfile .= ($f2+2) . "-150.png";
else if($f2+2==11)$cardfile .= "j-150.png";
else if($f2+2==12)$cardfile .= "q-150.png";
else if($f2+2==13)$cardfile .= "k-150.png";
else if($f2+2==14)$cardfile .= "a-150.png";

eval('$t_cards .= "' . fetch_template('casino_vidpoker_cards') . '";');
$i++;
}
line 186-8 reads:

Quote:

{
if ((max($f) - min($f)) == 4) $straight = max($f)+1;
}

cuphongle 10-03-2007 11:19 PM

sweet, thanks!

Andrew Green 10-04-2007 02:03 AM

Quote:

Originally Posted by sandt38 (Post 1352437)
For the video poker i get the following errors:


Line 151-71 in the casino/vidpok_redeal.php file reads:



line 186-8 reads:


There is a little error in there

This:

Code:

while($row=mysql_fetch_array($result)) {
should be this:

Code:

while($row=$db->fetch_array($result)) {
Which might solve that, otherwise I have to do a little more digging into it.

sandt38 10-04-2007 11:00 AM

Yeah Andrew, that worked. I also wound up with an unexpected error in line 152 after resolving the error in line 151 which was easily remedied by removing the first "&" in the line (line 152 I mean). But everything looks good right now.

It was:
Quote:

while($row=$db->fetch_array($result)) {
&nbsp;$f[$i] = $row['card'] % 13;
But the repaired code is:
Quote:

while($row=$db->fetch_array($result)) {
nbsp;$f[$i] = $row['card'] % 13;
Works great too, in my first hand I got a full house, Jacks over 7s.

sandt38 10-04-2007 11:06 AM

Also, it would be great if we could add some larger chip denominations. maybe 50s, 100s, 500s, and 1000s. I do have a lot of bettors on my board, and they rake in the cash on my bookie.

They are dying for a multiplayer poker too... in house tourneys would be awesome. I know it is in the works, I just wanted you to know how much I, and my board, are anticipating it.

Andrew Green 10-04-2007 12:57 PM

Higher chip amounts is on the to do list for this weekend.

Vi3t4Lov3 10-04-2007 02:54 PM

how can I increase the bet money 1,5,10 too small
can you change to 10,50,100 or 100,500,1000 please thank you

Andrew Green 10-04-2007 02:55 PM

Quote:

Originally Posted by Vi3t4Lov3 (Post 1352842)
how can I increase the bet money 1,5,10 too small
can you change to 10,50,100 or 100,500,1000 please thank you

Quote:

Originally Posted by Andrew Green (Post 1352788)
Higher chip amounts is on the to do list for this weekend.


wait for it ;)

dyna88 10-04-2007 03:33 PM

Blackjack allows you double down after you have already received a card and you can also hit even if you have 21.....

Andrew Green 10-04-2007 03:43 PM

double down rules vary, I choose to allow it at any time. Any number of cards, any total, and after splits. Splitting can be done more then once as well.

Mark.B 10-04-2007 03:58 PM

In IE the Javascript that displays your tickets from a previous draw doesn't work...it's got a yellow exclamation mark in the browser and clicking the link on the date of the draw does nothing. Seems to work in FF though.

Andrew Green 10-04-2007 04:09 PM

breaks in Opera too... added to todo list for the weekend...

Globe 10-04-2007 04:56 PM

is this compatible with vB credits?

Richard1964 10-04-2007 05:18 PM

Quote:

Originally Posted by Globe (Post 1352935)
is this compatible with vB credits?

YES, it is.

Mark.B 10-04-2007 06:43 PM

Quote:

Originally Posted by Andrew Green (Post 1352908)
breaks in Opera too... added to todo list for the weekend...

Thanks.

Please don't think me critical in pointing out the things I have, I like this modification and my aim is only to help you iron out the bugs.

Each time I find something I just throw it into the thread.

Andrew Green 10-04-2007 06:46 PM

not at all, I can't fix things if I don't know about them :)

Bug reports are always helpful, this is my first attempt at doing anything using the VB product system / api, so I'm still learning as I go :D

sandt38 10-04-2007 06:52 PM

Quote:

Originally Posted by Globe (Post 1352935)
is this compatible with vB credits?

In the setup change the cash field to credits. Even if you have renamed your cash, just change it to credits. I use both on my board and they work great together.

evesve 10-04-2007 07:00 PM

This is a great mod!

Some small questions in Black Jack and Video Poker.
Can you make it to show points after each card (BJ)?
Can you make the cards 25% smaller?(BJ and VP, Maybe a option to show diffrent size??)
How can I manually give members "money"?
How can I change from 500 to ??? from start?
I would give members diffrent value depends on the membergroup.
I have it as a test now, how can I reset the points to default?

Andrew Green 10-04-2007 07:08 PM

Quote:

Originally Posted by evesve (Post 1353005)
This is a great mod!

Some small questions in Black Jack and Video Poker.
Can you make it to show points after each card (BJ)?

Probably, it is calculated, just not displayed. So it shouldn't be hard.

Quote:

Can you make the cards 25% smaller?(BJ and VP, Maybe a option to show diffrent size??)
Once again, not much of a problem, just involves resizing the image files. Something I plan to seperate in a seperate file with the next update for ease of downloading. No need to redownload all the images every time.

Quote:

How can I manually give members "money"?
Admincp, user profile. It's at the bottom of the first column.

Quote:

How can I change from 500 to ??? from start?
A reset everyone to ___ will sneak in there soon, you could manually update it through phpmyadmin or some other mysql interface if you really needed to:

UPDATE ___user SET casino_cash = ____;

just add your table prefix and the amount you want to change it to in there.

Quote:

I would give members diffrent value depends on the membergroup.
Hadn't really planned that one, I'll definitely consider adding a option to give extra to everyone in a user group. Maybe as a monthly allowance for certain groups? (ex. supporting members)


Quote:

I have it as a test now, how can I reset the points to default?
SQL query above for now, in admincp in the near future.

Mark.B 10-04-2007 07:27 PM

A question I'm getting asked quite a lot by members relates to the sports betting feature.

People want to know what the odds are, what they will win, etc etc, and I'm afraid I haven't managed to work that out yet.

Any advice greatly appreciated.

evesve 10-04-2007 07:39 PM

Quote:

Originally Posted by Andrew Green (Post 1353011)
Probably, it is calculated, just not displayed. So it shouldn't be hard.


Once again, not much of a problem, just involves resizing the image files. Something I plan to seperate in a seperate file with the next update for ease of downloading. No need to redownload all the images every time.


Admincp, user profile. It's at the bottom of the first column.



A reset everyone to ___ will sneak in there soon, you could manually update it through phpmyadmin or some other mysql interface if you really needed to:

UPDATE ___user SET casino_cash = ____;

just add your table prefix and the amount you want to change it to in there.



Hadn't really planned that one, I'll definitely consider adding a option to give extra to everyone in a user group. Maybe as a monthly allowance for certain groups? (ex. supporting members)




SQL query above for now, in admincp in the near future.

...and I love mod with REAL support!
Thanks! :up:

Andrew Green 10-04-2007 08:06 PM

Quote:

Originally Posted by Mark.B (Post 1353028)
A question I'm getting asked quite a lot by members relates to the sports betting feature.

People want to know what the odds are, what they will win, etc etc, and I'm afraid I haven't managed to work that out yet.

Any advice greatly appreciated.


I added a more detailed description to the initial post, hopefully that helps. Basically its a pool, everyone puts there money in, and the winners divide the pot based on the portion they put in on the winning outcome. Putting in 15, when 100 had been bet in total on the winner gives you 15% of the total bet on all possible outcomes.

evesve 10-04-2007 08:30 PM

SQL query:
Code:

UPDATE vb3_user SET casino_cash = 1000
Code:

UPDATE vb3_user SET casino_cash = 1000 where usergroupid = 6
works fine!!!

Mark.B 10-04-2007 08:47 PM

Quote:

Originally Posted by Andrew Green (Post 1353050)
I added a more detailed description to the initial post, hopefully that helps. Basically its a pool, everyone puts there money in, and the winners divide the pot based on the portion they put in on the winning outcome. Putting in 15, when 100 had been bet in total on the winner gives you 15% of the total bet on all possible outcomes.

Thanks...I have actually added most of that to the Sports Pool template so people know what's going on...as per screenshot below. Hope that's ok.

Andrew Green 10-04-2007 09:40 PM

not a problem at all, I might even steal the idea and add a explanation to the template as well ;)

Robp57 10-04-2007 09:58 PM

Good Job Andy............My staff and members wont leave me alone with questions.......
Looking forward to your updates......
Works fine and they all love it.....
Thanx

Andrew Green 10-05-2007 02:41 AM

.12 should clean up a few little things and add some of the requested options.

stangger5 10-05-2007 02:50 AM

The cards reduced.zip still look like there are 150X215...

Andrew Green 10-05-2007 02:54 AM

and so they do... uploaded the wrong folder :D

Fixed it though ;)

Greek Wizard 10-05-2007 06:17 AM

This is a great mod, nice to see another Canadian make it too.

thanks.

However one bug report.

in blackjack, when the dealer has two cards in the begining, one is hidden and one is shown, BUT the total is shown for both cards (thus making the hidden card known)

I have attached an image.

Also, it works fine with vbbux (gasp, yes I am still using it), however when it comes up it has 4 decimal points, while the rest of my site only uses two. Alos, I am not sure how it is sorting the top 10, but it's not by value, seems to be user_id.

Would like to see a roulette (maybe from the other less polished casino), and some other games if possible, but IMO you are off to an awesome start.

https://vborg.vbsupport.ru/external/2011/02/1.gif

Globe 10-05-2007 10:46 AM

Quote:

Originally Posted by Richard1964 (Post 1352948)
YES, it is.

:) ok THX i tested :)


All times are GMT. The time now is 12:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02490 seconds
  • Memory Usage 1,844KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete