The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBookie for vBulletin 3.5 Details »» | |||||||||||||||||||||||||
vBookie
Introduction This is a Port of the original vBookie Hack created by tdjrico; full credits to him for the idea and the kind permission to port his work A t t e n t i o n This Hack is unsopported and incompatible with vBulletin 3.6+ You are hereby advised to not use it. Please do not ask me about support and/or updates - there will be none. Supporters / CoAuthors Show Your Support
|
Comments |
#722
|
|||
|
|||
Quote:
https://vborg.vbsupport.ru/showpost....&postcount=250 |
#723
|
|||
|
|||
Psybernaut:i tried to settle a test bet,the payout was supposed to be more than what the bookie's vcash have in hand.the result is the bookie have a huge enormous value of vcash instead.any ideas?
|
#724
|
|||
|
|||
Quote:
psybernaut:if i'm using vcash,would i still need to carry those other hacks below as well? |
#725
|
||||
|
||||
Quote:
|
#726
|
|||
|
|||
Quote:
geo1 - sorry about that problem, vcash is an unsigned int so it wraps to a large number instead of going negative. Here's a fix that will set the bookies cash to 0 instead of going negative. NOTE: a bookie can exploit this by putting all their cash in the bank (for vbbux/ebux/ucash) before settling bets, so it's not perfect! This applies to all cash systems, just replace the entire vbookie_take_bookie_cash() function. In includes/functions_vbookie.php, find: Code:
// psybernaut mod function vbookie_take_bookie_cash($userid, $amount) { global $vbulletin; switch ($vbulletin->options['vbookiecash']) { case 'vcash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=vbookie_cash-$amount WHERE userid=$userid"); break; case 'ucash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=ucash-$amount WHERE userid=$userid"); break; case 'ebux': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=ebux-$amount WHERE userid=$userid"); break; case 'custom': ($hook = vBulletinHook::fetch_hook('vbookie_take_bookie_cash')) ? eval($hook) : false; } } Code:
// psybernaut mod function vbookie_take_bookie_cash($userid, $amount) { global $vbulletin; $bookie = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=$userid"); switch ($vbulletin->options['vbookiecash']) { case 'vcash': if($amount > $bookie['vbookie_cash']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=vbookie_cash-$amount WHERE userid=$userid"); } break; case 'ucash': if($amount > $bookie['ucash']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=ucash-$amount WHERE userid=$userid"); } break; case 'ebux': if($amount > $bookie['ebux']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=ebux-$amount WHERE userid=$userid"); } break; case 'custom': ($hook = vBulletinHook::fetch_hook('vbookie_take_bookie_cash')) ? eval($hook) : false; } } Code:
// take the bookies money $bookie = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=$userid"); if($amount > $bookie['vbbux']) { $amount = $amount - $bookie['vbbux']; $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=0 WHERE userid=$userid"); if($amount > $bookie['vbbank']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbank=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbank=vbbank-$amount WHERE userid=$userid"); } } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=vbbux-$amount WHERE userid=$userid"); } Quote:
I'll update my original post to include these changes, so only make this change if you already made the mod previously and need to fix the 'paying out more that you have' issue. EDIT: Updated the vbbux hook to deduct money from the bookie's bank account if they don't have enough cash on hand. |
#727
|
||||
|
||||
The question is... If I want to use the bookie option so they can go broke... will this mod work with vcash? I do not have any other cash methods installed..
Thanks in advance, Psybernaut! Catsgot9 |
#728
|
|||
|
|||
Quote:
|
#729
|
|||
|
|||
does this work with 3.54?
|
#730
|
|||
|
|||
Quote:
|
#731
|
|||
|
|||
Thanks psybernaut!i'll correct that once i've reach home...
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|