vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBookie for vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=94128)

VerkroostJ 02-23-2006 07:59 AM

Thanks for mod; it's very nice.

However, there is a fundamental problem with the odds. When you enter the normal odds format, e.g. 2/1 the odds are also displayed in decimal format, e.g. 2.0.

The problem is that the coversion is not correct. 2/1 is 3.0 in decimal odds, not 2.0 as it currently displays. The conversion formula is divide and add one.

Decimal odds reflect your total payback based on a bet of 1 unit, so if you were to bet £1 at decimal odds of 3.0, if your bet won you would receive £3 back; effectively £2 in winnings and your £1 stake.

Normal odds don't take into account the stake returned, so 2/1 means for every 1 unit bet you will receive 2 units in winnings. However, you will also receive your stake back. Thus, if you were to bet £1 at odds of 2/1, if you bet won you would receive £2 in winnings and your £1 stake; £3 total

RGSMDNR 02-23-2006 12:30 PM

Quote:

Originally Posted by cdorka
i had the same prob
i didnt see an email about this problem and fix with version 107

1.0.6 was new version
1.0.7 released shortly after

redownload the files and upload them. you should be good to go.

i have tried that.. didnt work.

virtualraceday 02-23-2006 10:16 PM

Quote:

Originally Posted by VerkroostJ
Thanks for mod; it's very nice.

However, there is a fundamental problem with the odds. When you enter the normal odds format, e.g. 2/1 the odds are also displayed in decimal format, e.g. 2.0.

The problem is that the coversion is not correct. 2/1 is 3.0 in decimal odds, not 2.0 as it currently displays. The conversion formula is divide and add one.

Decimal odds reflect your total payback based on a bet of 1 unit, so if you were to bet ?1 at decimal odds of 3.0, if your bet won you would receive ?3 back; effectively ?2 in winnings and your ?1 stake.

Normal odds don't take into account the stake returned, so 2/1 means for every 1 unit bet you will receive 2 units in winnings. However, you will also receive your stake back. Thus, if you were to bet ?1 at odds of 2/1, if you bet won you would receive ?2 in winnings and your ?1 stake; ?3 total

This is correct.........I hope it will be an easy fix :) the payout amounts don't change, the display of the decimal odds just needs to have a "+ 1". Maybe someone who's handy in php can find where this bit of code is and show us how to do it.

An unrelated question, if I want to use vCash, where can I manually add funds to users accounts? Let's say I am running a weekly comp, and I want to reset everyone to 1000 each week for example....

Andreas 02-23-2006 10:28 PM

2/1 is 2.0.
For every 1 $ placed you win 2 $ + you get your stake back, so that's 3 $ in total.

virtualraceday 02-23-2006 11:01 PM

Quote:

Originally Posted by Andreas
2/1 is 2.0.
For every 1 $ placed you win 2 $ + you get your stake back, so that's 3 $ in total.

Hey Andreas,

In sports betting, all decimal pricing includes the "initial stake".

With fraction odds, you get to see "2 parts" in the X/Y format:

5/1
X = 5 = profit
Y = 1 = Initial stake
Total = 6

Because in decimal pricing, there is only "1 part", it includes both X + Y so that the user knows if they bet 1 unit, they will get back X + Y total

I hope this makes sense, I've been gambling too long so this part I am definitely sure of :)

I just want to say thanks so much for this! I'm busy setting up a forum with it in use :D

p.s. I just found the Wiki entry for it, I hope it helps to confirm:

http://en.wikipedia.org/wiki/Fixed-odds_gambling

Andreas 02-23-2006 11:24 PM

Well, i'ts just a matter of how to skin the cat ;)
Doesn't affect payouts so it isn't a big deal, is it?

[high]* Andreas doesn't have any clue of betting nor did I ever use this Hack, so sorry for my lack of knowlegde.[/high]

virtualraceday 02-24-2006 12:01 AM

Quote:

Originally Posted by Andreas
Well, i'ts just a matter of how to skin the cat ;)
Doesn't affect payouts so it isn't a big deal, is it?

[high]* Andreas doesn't have any clue of betting nor did I ever use this Hack, so sorry for my lack of knowlegde.[/high]

Hey it's a good thing you don't bet...it's no good losing money. Which is why this mod is great because it's all virtual :rolleyes:

Do you know where I can change the code to add the 1? My forum is going to be for gamblers and they are definitely going to complain lol...

Andreas 02-24-2006 12:11 AM

** No guarantees **

In Plugin vBookie: Show Events in Showthread
PHP Code:

$decimal_odds = (float)$outcomes[$i]['odds_against']/(float)$outcomes[$i]['odds_for']; 

PHP Code:

$outcome['odds_decimal'] = sprintf("%0.2f", ((float)$outcome['odds_against']/(float)$outcome['odds_for'])); 


In vbookie.php (each bit might appear multiple times)
PHP Code:

$decimal_odds = (float)$outcomes[$i]['odds_against']/(float)$outcomes[$i]['odds_for']; 

PHP Code:

$bet['odds_decimal'] = sprintf("%0.2f", ((float)$bet['bet_odds_against']/(float)$bet['bet_odds_for'])); 

PHP Code:

$outcomes[$i]['odds_decimal'] = sprintf("%0.2f", ((float)$outcomes[$i]['odds_against']/(float)$outcomes[$i]['odds_for'])); 

Add 1 to all those bits.

virtualraceday 02-24-2006 01:54 AM

Quote:

Originally Posted by Andreas
** No guarantees **

In Plugin vBookie: Show Events in Showthread
PHP Code:

$decimal_odds = (float)$outcomes[$i]['odds_against']/(float)$outcomes[$i]['odds_for']; 

PHP Code:

$outcome['odds_decimal'] = sprintf("%0.2f", ((float)$outcome['odds_against']/(float)$outcome['odds_for'])); 


In vbookie.php (each bit might appear multiple times)
PHP Code:

$decimal_odds = (float)$outcomes[$i]['odds_against']/(float)$outcomes[$i]['odds_for']; 

PHP Code:

$bet['odds_decimal'] = sprintf("%0.2f", ((float)$bet['bet_odds_against']/(float)$bet['bet_odds_for'])); 

PHP Code:

$outcomes[$i]['odds_decimal'] = sprintf("%0.2f", ((float)$outcomes[$i]['odds_against']/(float)$outcomes[$i]['odds_for'])); 

Add 1 to all those bits.


It worked!!! :)

Thanks so much for your time..... I really appreciate it!

dxguru 02-24-2006 05:11 AM

Quote:

Originally Posted by dxguru
A quick question ...
If I upgrade from 1.0.5 build 6 to 1.0.7, will there be any effect of my current unsettled events?

Would an alternative be to wait for all events to be settled and then upgrade?

Anybody, please?

Don't worry ... upgraded anyway.


All times are GMT. The time now is 02:22 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.03163 seconds
  • Memory Usage 1,772KB
  • 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
  • (10)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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