Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBookie - vBulletin Betting Hack Details »»
vBookie - vBulletin Betting Hack
Version: 1.00, by tjdrico tjdrico is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 06-03-2004 Last Update: Never Installs: 359
 
No support by the author.

vBookie

Introduction

vBookie is a 'bookmakers' or betting extension to vBulletin. It enables authorised members to post Events and Outcomes that forum members can bet on. Each Outcome has its own set of odds, and odds can be modified through the life of an Event (bets that are placed are stored with the prevailing odds, so even if the odds change, your users are paid at the correct rate).

Once the results are known, Events can be settled and forums members awarded their winnings.

vBookie uses its own vCash by default, but this has no more use than as 'bragging rights'. However, vBookie also comes with a built-in switch to allow it to use either uCash or Petz money instead. That means that all bets are paid for and settled using uCash or Petz money, making betting even more attractive than just for fun on forums with uShop/Petz installed. Although vBookie does not have any built-in facility to integrate with any other store hacks, it's a very simple job to hack vBookie itself to integrate it with any store/points system you care to use.

Features
  • master switch to turn vBookie off
  • option to use uCash
  • option to use Petz money
  • settings to restrict the creation of Events to specific user groups
  • settings to restrict which user groups can bet on Events
  • settings to restrict which user groups can edit or settle other people's Events
  • per-Event, specify whether punters may bet on more than one outcome
  • optional 'charity mode' so that the poorest members of the forum always have something to play with
  • supplied with a module for vBadvanced

Please click if you install this hack, thanks. Please also let me know - send me an email or a PM. If you'd let me know the forum URL too that'd be cool!

vBookie is free, and will remain free.

Updates

1.0.0 -> 1.0.1

- adds the ability to delete Events. See this post for upgrade instructions if you already have 1.0.0

1.0.1 -> 1.0.2

Corrected a minor bug with the charity mode when using uCash. See this post for manual upgrade instructions from 1.0.1.

1.0.2 -> 1.0.3

Corrected a minor bug with the richest people display when using uCash. Just overwrite includes/functions_vbookie.php with the one from the new Zip file.

1.0.3 -> 1.0.4

Corrected some date display problems when using "Detailed" dates. For manual update instructions, see this post.

Corrected Petz bug whereby all winnings were paid to the bet's owner rather than individual winners. To upgrade from 1.03 or earlier, see this post or overwrite includes/functions.vbookie.php with the 1.0.4 version.

Problems?

-> Petz - If you are using Petz there is a bug in all versions up to and inclusing 1.0.3. Your players won't get paid their winning, and all payouts will end up in the account of the person that posted the Event. To correct this, please see this post. This fix will be incororated into 1.0.4 onwards.

-> If you can't post Events, or can't bet on them make sure you have set your user permissions

-> If you have an SQL error Invalid SQL: UPDATE SET =25 WHERE <25 make sure you are using version 1.0.3 or later.

-> If you have any other general problems, please check the installation/hack instructions and make sure you have carried out all the steps and also check that you made the changes correctly

Anything else, ask in this thread.

Other Stuff

-> If you are using Detailed Date & Time display and have a problem with Event dates appearing as '1 Minute Ago', see this post.

-> If you want to use poster 'Reputation' as the currency for vBookie, see this post.

About Odds

Odds of "5/1" are "amount won per amount placed". This means that I would win 5 for every 1 placed. Of course, if I win, I get my stake back as well. Odds of "1/5" means that I win 1 for every 5 placed. I'd have to place 25 to win just 5.

Decimal Odds

Decimal odds are just another way of displaying the same information. 2.0 is the same as 2/1. 0.2 is the same as 1/5. vBookie only lets you specify odds in terms of x/y, but if you think in terms of decimal you can still work out what odds to provide. Simply think of your decimal odds as "2.0 / 1.0" or "0.5 / 1.0" and then multiply each side through by 10 or 100 until there are only zeros to the right of the decimal point, then just take the whole number part.

2.0 / 1.0 has no decimals, so this is the same as 2/1

0.5 / 1.0 has a 0.5, so multiply both parts by 10 to get 5.0 / 10.0. Then you can specify your odds as 5 / 10. You might also realise that this is the same as 1/2. The technique is a simple way to work out any odds you may need to specify.

Odds of 0.65 -> 0.65 / 1.0 -> 65.0 / 100.0 or 65/100. Then you can divide through by 5 to get to 13 / 20, although this step isn't necessary.


_______________________________________

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #722  
Old 07-18-2006, 08:46 PM
adranix adranix is offline
 
Join Date: Jan 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having the same problem as haknet when ever I change the permissions so administrators can add new events (Can Post vBookie Events) I click YES for all 3 options and save and it says it was successfully but then I go in it again and they are all on NO.

PLEASE HELP, my email is aranshaw@aol.com

Thanks.
Reply With Quote
  #723  
Old 08-05-2006, 10:59 PM
dhh dhh is offline
 
Join Date: Aug 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adranix
I'm having the same problem as haknet when ever I change the permissions so administrators can add new events (Can Post vBookie Events) I click YES for all 3 options and save and it says it was successfully but then I go in it again and they are all on NO.

PLEASE HELP, my email is aranshaw@aol.com

Thanks.
I just installed this as well and im having the same problem i set to yes and save when i go bac its default to no again are there other setting that need to be changed

Thanks
Reply With Quote
  #724  
Old 09-07-2006, 02:04 PM
webgod webgod is offline
 
Join Date: Sep 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this today and want to set it up for todays NFL game

I'm confused as to how to set it up (the bet)

Here's the info:

Miami Dolphins @ Pittsburgh Steelers - Thursday, September 7, 2006

Competitor: Miami Dolphins
Point Spread : -1½
Total Score: 34½

Competitor: Pittsburgh Steelers
Point Spread : +1½
Total Score: 34½

How do I set up the vBookie Event to bet for this game?

Please help ASAP

Thanks in advance!
Reply With Quote
  #725  
Old 09-07-2006, 03:32 PM
webgod webgod is offline
 
Join Date: Sep 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK I figured it out

use 1 to 1 odds and set each outcome as a bet i.e.

Dolphins -1.5
Steelers +1.5
Under 34.5
Over 34.5



here's a hack I did that may interest some.. because there are about 32 bets possible every week in the NFL ~ 16 games, winner & Over/Under bets I wanted to institue a maximum bet per game

I edited vbookie.php

Find the following
PHP Code:
$q "INSERT INTO " TABLE_PREFIX "vbookie_bets_placed (option_id, item_id, userid, bet_amount_placed, bet_odds_against, bet_odds_for, bet_private) VALUES ($k$item_id$bbuserinfo[userid]$v, "
and above it add:

PHP Code:
// MAXIMUM STAKE HACK
            
if ((int)$v 25)
            {
                
$v 25;
            }
            
// END MAXIMUM STAKE HACK 
Find the following
PHP Code:
if ((int)$v 0)
        {
            
standard_error(fetch_phrase('vbookie_negative_amount'PHRASETYPEID_ERROR,  ''truefalse0));
        } 
and bellow it add:

PHP Code:
// MAXIMUM STAKE HACK
            
if ((int)$v 25)
            {
                
$v 25;
            }
            
// END MAXIMUM STAKE HACK
// Now let's check to see if he's already made that bet in the past
            
$alreadybet $DB_site->query_first("SELECT option_id from " TABLE_PREFIX "vbookie_bets_placed where userid=$bbuserinfo[userid] and option_id=$k");
            if (
$alreadybet['option_id'])
            {
                
standard_error(fetch_phrase('vbookie_not_allowed_multiple'PHRASETYPEID_ERROR,  ''truefalse0));
            }
            
//END 
change the 25 to whatever you want your max to be
Reply With Quote
  #726  
Old 09-07-2006, 07:38 PM
webgod webgod is offline
 
Join Date: Sep 2002
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another hack for the stats page I just implemented....

Because I only allow a max wager of 25 per outcome, the total vCash movement is small, and there will be a lot of people hovering at or near the initial 500 mark..

so in order to only display people that have placed a wager as the "richest people" on the stats page I made the following change:

functions/functions_vbookie.php

find:
PHP Code:
$q "SELECT username, vbookie_cash AS cash FROM " TABLE_PREFIX "user ORDER BY cash DESC LIMIT 5"
and replace it with:


PHP Code:
$q "SELECT Distinct usr.username, usr.vbookie_cash AS cash FROM " TABLE_PREFIX "user as usr        
                LEFT JOIN " 
TABLE_PREFIX "vbookie_bets_placed AS bets ON bets.userid=usr.userid
                Where bets.userid=usr.userid
                ORDER BY cash DESC LIMIT 20"


note you can change LIMIT 20 to the number of people you want to display, I chose 20, but can set it to whatever you want
Reply With Quote
  #727  
Old 09-20-2006, 07:18 PM
Foxsake Foxsake is offline
 
Join Date: Apr 2006
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im using vbookie (vcash) and want to display the top 10 richest, however changing the figure to 10 in functions_vbookie.php does nothing? only the original 5 are seen - can someone guide my on this one?


Cheers
Reply With Quote
  #728  
Old 09-23-2006, 03:53 PM
pdcimc1's Avatar
pdcimc1 pdcimc1 is offline
 
Join Date: Jan 2006
Location: Tampa, FL
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone tell me how I can either completely disable private bets or how I can just make it so that admin can atleast see them?

I use my vBookie to run contests and for some reason when someone bets as "private" no one can see their bet and the money doesnt get automatically paid out if they win when the bet is settled.

Thank you in advance. I know someone out tehre must have a fix for this.
Reply With Quote
  #729  
Old 09-30-2006, 02:33 PM
JamieLee2k's Avatar
JamieLee2k JamieLee2k is offline
 
Join Date: Sep 2006
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Call me thick but I have installed it and the option is in the threads where I have to tick to use but how do I create the bets?
Reply With Quote
  #730  
Old 10-05-2006, 10:37 AM
radarhunter radarhunter is offline
 
Join Date: Jul 2006
Location: Punjab, India
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does this work on 3.6.2

Or do you have a version for that
Reply With Quote
  #731  
Old 10-07-2006, 10:21 AM
adranix adranix is offline
 
Join Date: Jan 2006
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have VB 3.6.2 and uploaded all the file but when I try to install it, it says:

Fatal error: Call to a member function on a non-object in /home/adranix/public_html/forum/admincp/vbookie_install.php on line 1176

I havent got a clue what that means, does anyone know?

Thanks, Adam
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04803 seconds
  • Memory Usage 2,341KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete