1 Attachment(s)
Website based Gamble stuff
This is pretty old stuff i had finished long back and i really coded it bad, works good though. you can use it with 07 files xD.
Used Mpog web, u can integrate it with your website by looking at the source
Releasing coz i dont need it anymore and i think its going to be of no use.
Btw i recently removed few stuff from the scripts so you may have to fix it yourself
Using the gamble snippet
PHP Code:
$BLBIDName = antisql($_POST['BLBIDName']);
$Confirm = antisql($_POST['Confirm']);
$aid = antisql($_SESSION['AID']);
$query0 = mssql_query("SELECT * FROM BuyLuckyBox WHERE BLBID = '$BLBIDName'");
$result0 = mssql_fetch_assoc($query0);
$LBID = $result0[LBID];
$query1 = mssql_query("SELECT * FROM LuckyBox WHERE BoxItemID = '$LBID'");
$result1 = mssql_fetch_assoc($query1);
if ($Confirm == 'YES') {
if ($LBID == '500') // This is LuckBox Item ID 500
{
$random = array("1","2","3",); //The LBIID which contains the Item ID and these are the random Id's available for LBID 500
$rand_keys = array_rand($random,2);
$LBIID = $random[$rand_keys[0]];
$fk9 = mssql_query("SELECT * FROM LuckyBox WHERE LBIID = '$LBIID'");
$a1=mssql_fetch_assoc($fk9);
$ItemID = $a1[ItemID];
print("Random word is: $ItemID"); // can be removed , used it for testing purposes :P
mssql_query("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [RentHourPeriod], [Cnt])VALUES('$ItemID', '$aid', '$ItemID', GETDATE(), 360, 0)");
mssql_query("UPDATE BuyLuckyBox SET Used = 1 WHERE AID = '".$_SESSION['AID']."' AND BLBID = $BLBIDName");
}
if ($LBID == '501') // Similarly 501 you need to add extra and soo On
{
$random = array("4","5",);
$rand_keys = array_rand($random,2);
$LBIID = $random[$rand_keys[0]];
$fk9 = mssql_query("SELECT * FROM LuckyBox WHERE LBIID = '$LBIID'");
$a1=mssql_fetch_assoc($fk9);
$ItemID = $a1[ItemID];
print("Random word is: $ItemID");
mssql_query("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [RentHourPeriod], [Cnt])VALUES('$ItemID', '$aid', '$ItemID', GETDATE(), 360, 0)");
mssql_query("UPDATE BuyLuckyBox SET Used = 1 WHERE AID = '".$_SESSION['AID']."' AND BLBID = $BLBIDName");
}
}
Re: Website based Gamble stuff
Thanks a lot but, why did you remove stuff from the scripts which would have to make us fix it :O?
Re: Website based Gamble stuff
Thx but waiting for thoses images.
Re: Website based Gamble stuff
Quote:
Originally Posted by
phoenix_147
Thanks a lot but, why did you remove stuff from the scripts which would have to make us fix it :O?
those were pretty useless and i dint test after removing
hmm u can compare the Mod_itemshop and fix the gamble shop, not hard too.:P:@ micro i am sorry dont have screenshots i can list the stuff this has
Buy Gamble item with Bounty in mod_luckyshop.php
Buy Gamble Item with Cash in mod_luckyshop.php
Use Gamble item in mod_gamble.php
P.s
as this was made b4 the the 08 Files i had to make my own tables, this can be made even more better now with the existing one.
Re: Website based Gamble stuff
I didn't saw in the source but you just made an array and used the rand function to get the ItemID? And an Update statement so they will lose bounty?:)
Re: Website based Gamble stuff
Quote:
Originally Posted by
eele
I didn't saw in the source but you just made an array and used the rand function to get the ItemID? And an Update statement so they will lose bounty?:)
yea and loosing bounty is when u buy the Item not when you use it
Re: Website based Gamble stuff
Good job maxteam, very useful, thank'd :D
Re: Website based Gamble stuff