Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Website based Gamble stuff

Elite Diviner
Joined
Aug 27, 2007
Messages
410
Reaction score
118
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:
		$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");
   					}
				}
 

Attachments

You must be registered for see attachments list
Last edited:
Elite Diviner
Joined
Aug 27, 2007
Messages
410
Reaction score
118
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:mad: 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.
 
Last edited:
Status: Pooping
Joined
Jul 16, 2008
Messages
861
Reaction score
25
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?:)
 
Elite Diviner
Joined
Aug 27, 2007
Messages
410
Reaction score
118
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
 
Back
Top