
Solid Snake
Members-
Posts
184 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Solid Snake
-
Re: [mccode v2] Lucky Bags here you go <?php require('./globals.php'); switch($_GET['action']) { case 'open': open(); break; case 'buy': buy(); break; default: index(); break; } function index() { global $db, $ir, $userid; echo'Welcome to the Lucky Bag center. You have <font color = "red">' .$ir['luckybags']. '</font> luckybags. Below, you can buy upto 2 grab bags for $2,000 each. Every bag will contain a random amount of cash, crystals or an item. Will it be your lucky day today? Click the link below to buy a lucky bag. <center><a href = "luckybag.php?action=buy">Buy a Lucky Bag</a> <a href = "luckybag.php?action=open">Open your Lucky Bag</a></center>'; } function buy () { global $db, $ir, $userid; if($_POST['buy']) { $cost = $_POST['qty'] * 2000; if(!is_numeric($_POST['qty'])) { die('Your quantity must be numeric'); } if(!isset($_POST['qty'])) { die('You must enter how many bags you would like to purchase'); } if($ir['money'] < $cost) { die('You do not have enough money to buy this amount of bags!'); } if($ir['luckybags'] == 2) { die('You can only have 2 Lucky Bags at once'); } $db->query(sprintf("UPDATE `users` SET `money` = `money` - '%d', `luckybags` = `luckybags` + '%d' WHERE `userid` = ('%u')", $cost, $_POST['qty'], $userid)); echo'You have purchased ' .$_POST['qty']. ' Lucky Bags'; } else { echo' <form action = "luckybag.php?action=buy" method = "post"> Quantity: <input type = "text" value = "" name = "qty"> <input type = "submit" value = "Buy Lucky Bags" name = "buy"> </form>'; } } function open() { global $db, $ir, $userid; if($ir['luckybags'] == 0) { die('You do not have any Bags to open'); } else { $rand = rand(1,3); if($rand == 1) { $money = rand(0,2400); $bag = ($ir['luckybags']); $db->query(sprintf("UPDATE `users` SET `money` = `money` + '%d', `luckybags` = `luckybags` - '%d' WHERE `userid` = ('%u')", $money, 1, $userid)); echo'You opened a Lucky Bag and gained $' .$money. ' from it'; } if($rand == 2) { $crystals = rand(0,100); $db->query(sprintf("UPDATE `users` SET `crystals` = `crystals` + '%d', `luckybags` = `luckybags` - '%d' WHERE `userid` = ('%u')", $crystals, 1, $userid)); echo'You opened a Lucky Bag and gained ' .$crystals. ' crystals from it'; } if($rand == 3) { $query = $db->query("SELECT * FROM `items` WHERE `itmid` > 'item IDs here for what items you wan to be given out'"); $num = $db->num_rows($query); $item = rand(1,$num); $sql = sprintf("SELECT `itmname` FROM `items` WHERE `itmid` = ('%u')", $item); $itm = $db->fetch_row($db->query($sql)); $db->query(sprintf("UPDATE `users` SET `luckybags` = `luckybags` - '%d' WHERE `userid` = ('%u')", 1, $userid)); $db->query("INSERT INTO inventory VALUES('',$item,$userid,1)",$c); echo'You opened a Lucky Bag and received the item: ' .$itm['itmname']. ' from it'; } } } $h->endpage; ?>
-
Right for all of you who have or are just made a game and dont want anyone to register yet just make this file and call it registeroff.php <html> <head> <title>Faction Wars</title> <style> body { background-color: black; background-image: url("back.png"); margin-top: 0; margin-bottom: 0; font-family: Tahoma;font-size:10pt;color: white; } table { font-family: Tahoma;font-size:10pt;color: white; } </style></head><body> <table width=700><tr><td width=5></td> <td background='middle.png'><center>[url='login.php']Login[/url]</center></td> <td background='middle.png'><center>[url='register.php']Register[/url]</center></td> <td background='middle.png'><center>[url='tos.php']TOS[/url]</center></td> <td background='middle.png'><center>[url='privacy.php']Privacy Policy[/url]</center></td> <td background='middle.png'><center>[url='screenshots.php']Screenshots[/url]</center></td> <td background='middle.png'><center>[url='contact.php']Contact Us[/url]</center><td background='middle.png'></td></tr></table></center></td></center> </tr> <table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0><tr valign=middle><td align=center> <table width=600 width=600 border=0 cellpadding=0 cellspacing=0><tr><td width=600 height=600 background="logingraphic.png" class='nomargin'> <table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0> <tr height=108><td height=108></td></tr> <tr height=385 valign=top><td width=19></td><td width=334> <center><u>Welcome To Faction Wars -- Registration Disabled</u></center> <center>Registration Disable Reason: For site updates and matainance Owned and operated by Joseff And Madogdan </td><td width=18></td><td width=207><center> <form action='authenticate.php' method='POST'> Date Back Up: Saturday 1st November all it is the my login screen with the login stuff taken off and some text shoved in the tables so not much atm all i know it works for V2 not sure about V1 or lite
-
Re: [mccode v2] House Images <?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np=$db->fetch_row($npq); if($ir['maxwill'] == 100) { print "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); print "You sold your {$np['hNAME']} and went back to your shed."; } } else { print "<center>Your current property: <font color=blue>[b]{$mp['hNAME']}[/b]</font> The houses you can buy are listed below. Click a house to buy it. "; print "[url='estate.php?sellhouse']Sell Your House[/url] "; if($ir['willmax'] > 100) { } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print " <table cellspacing=2 class='table'><tr style='background:gray;'><th>House</th><th>House Price</th><th>House Will</th><th>Image</th><th>Buy?</th></tr>"; $hq=mysql_query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC",$c); while($r=$db->fetch_row($hq)) { print "<tr><td>{$r['hNAME']}</a></td><td>\$$t".money_formatter($r['hPRICE'],'')."</td> <td>{$r['hWILL']}</td> <td>[img=hsepics/{$r[]</td> <td><a href='estate.php?property={$r['hID']}'>Buy</tr>"; } print "</table>"; } } $h->endpage(); if($ir['married']) { die("You cannot manage your estate agent while your being married!"); } ?> thats the one with images which is yours
-
Re: [mccode v2] House Images my estate doesnt show images as i have not added it i took your to see if i coul fix it and its fine
-
Re: [mccode v2] House Images lol i have uploaded it to mine and its fine it shows images for me
-
Re: [mccode] Screenshots lol i had very little had about 30mins but it took me about 2hours :| to get it fixed aswell as i couldnt figure out why it was only showing about 30% of the screenshot thats the only reason why it is in fullscreen not in little clickable images lol
-
Re: [mccode] login/register addon lol im not good with CSS but ill give it a shot cheers
-
Re: [mccode] login/register addon lol the reason the <center> is there because when it wasnt it knacked up lol
-
Re: [mccode v1] CrystalShop Mod!! Free!! it would be cool if you made 1 extra with a table in it asking you which shop you would like to goto :D
-
Re: [mccode] Screenshots Thanks and btw if i had a hell of alot of more time i would of made it alot better but with the time i have atm i cant so ill update this when i get the chance
-
Re: [V2 (maybe V1)] login/register addon hm also that puts the menu in a list i was putting it as a bar example below login register TOS screenshots contact us
-
Re: [V2 maybe V1] Screenshots Thank you for that i would of used jpg if it wasnt 2am lol
-
Re: [V2 (maybe V1)] login/register addon Thanks MD looks like im still way behind lol and thanks for the update i now know what to use lol
-
Re: CrystalShop Mod!! Free!! lol thats what he has called his crystal shop just edit weapons.php to whatever you named your file
-
Here is a addon to my login/register addon create file called screenshots.php and insert: <html> <head> <title>Your Game Name</title> <style> body { background-color: black; background-image: url("back.png"); margin-top: 0; margin-bottom: 0; font-family: Tahoma;font-size:10pt;color: white; } table { font-family: Tahoma;font-size:10pt;color: white; } </style></head><body><center> <table width=700><tr><td width=5></td> <td background='middle.png'><center>[url='login.php']Login[/url]</center></td> <td background='middle.png'><center>[url='register.php']Register[/url]</center></td> <td background='middle.png'><center>[url='tos.php']TOS[/url]</center></td> <td background='middle.png'><center>[url='privacy.php']Privacy Policy[/url]</center></td> <td background='middle.png'><center>[url='screenshots.php']Screenshots[/url]</center></td> <td background='middle.png'><center>[url='contact.php']Contact Us[/url]</center><td background='middle.png'></td></tr></table></center></td></center> </tr> <table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0><tr valign=middle><td align=center> <table width=600 width=600 border=0 cellpadding=0 cellspacing=0><tr><td width=600 height=600 background="logingraphic.png" class='nomargin'> <table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0> <tr height=108><td height=108></td></tr> <tr height=385 valign=top><td width=19></td><td width=334> <center><u>Welcome To Your Game Name - Screenshots Below</u></center> <center>[url='screenshot1.php']Screenshot 1[/url] Owned and operated by Joseff And Madogdan now create a file called screenshot1.php and insert: <html> <head> <title>Faction Wars</title> <style> body { background-image: url("screenshot1.bmp"); background-image: url("screenshot1.bmp"); margin-top: 0; margin-bottom: 0; font-family: Tahoma;font-size:10pt;color: white; } table { font-family: Tahoma;font-size:10pt;color: white; } </style></head><body> <table width=700><tr><td width=5></td> <td background='middle.png'><center>[url='login.php']Login[/url]</center></td> <td background='middle.png'><center>[url='register.php']Register[/url]</center></td> <td background='middle.png'><center>[url='tos.php']TOS[/url]</center></td> <td background='middle.png'><center>[url='privacy.php']Privacy Policy[/url]</center></td> <td background='middle.png'><center>[url='screenshots.php']Screenshots[/url]</center></td> <td background='middle.png'><center>[url='contact.php']Contact Us[/url]</center><td background='middle.png'></td></tr></table></center></td></center> </tr> take a screenshot and paste it into paint or whatever you use and save it as screenshot1.bmp NOTE: please note that these were done very quick (but took ages for the menu bar at the top)
-
I was so bored so i decided to make a little feature for your login screen, register screen and where else you want to put it first open login.php and register.php and locate: </style></head><body> Below it add: <table width=700><tr><td width=5></td> <td background='middle.png'><center>[url='login.php']Login[/url]</center></td> <td background='middle.png'><center>[url='register.php']Register[/url]</center></td> <td background='middle.png'><center>[url='tos.php']TOS[/url]</center></td> <td background='middle.png'><center>[url='privacy.php']Privacy Policy[/url]</center></td> <td background='middle.png'><center>[url='screenshots.php']Screenshots[/url]</center></td> <td background='middle.png'><center>[url='contact.php']Contact Us[/url]</center><td background='middle.png'></td></tr></table></center></td></center> </tr> and download the attachment below. NOTE: Contact Us, Screenshots, Privacy and TOS coming soon.
-
Re: [LITE][FREE] Bank I dont see anything wrong with the code but in PHPMyAdmin have you added this SQL ALTER TABLE `users` ADD `bankmoney` INT( 11 ) NOT NULL DEFAULT '0';
-
Re: [mccode v2] Lucky Bags Here is a LITTLE update to it as your players can earn millions within a few seconds and its now fixed <?php require('./globals.php'); switch($_GET['action']) { case 'open': open(); break; case 'buy': buy(); break; default: index(); break; } function index() { global $db, $ir, $userid; echo'Welcome to the Lucky Bag center. You have <font color = "red">' .$ir['luckybags']. '</font> luckybags. Below, you can buy upto 1,000 grab bags for $2,000 each. Every bag will contain a random amount of cash, crystals or an item. Will it be your lucky day today? Click the link below to buy a lucky bag. <center><a href = "luckybag.php?action=buy">Buy a Lucky Bag</a> <a href = "luckybag.php?action=open">Open your Lucky Bag</a></center>'; } function buy () { global $db, $ir, $userid; if($_POST['buy']) { $cost = $_POST['qty'] * 2000; if(!is_numeric($_POST['qty'])) { die('Your quantity must be numeric'); } if(!isset($_POST['qty'])) { die('You must enter how many bags you would like to purchase'); } if($ir['money'] < $cost) { die('You do not have enough money to buy this amount of bags!'); } if($ir['luckybags'] == 1000) { die('You can only have 1000 Lucky Bags at once'); } $db->query(sprintf("UPDATE `users` SET `money` = `money` - '%d', `luckybags` = `luckybags` + '%d' WHERE `userid` = ('%u')", $cost, $_POST['qty'], $userid)); echo'You have purchased ' .$_POST['qty']. ' Lucky Bags'; } else { echo' <form action = "luckybag.php?action=buy" method = "post"> Quantity: <input type = "text" value = "" name = "qty"> <input type = "submit" value = "Buy Lucky Bags" name = "buy"> </form>'; } } function open() { global $db, $ir, $userid; if($ir['luckybags'] == 0) { die('You do not have any Bags to open'); } else { $rand = rand(1,3); if($rand == 1) { $money = rand(0,2400); $bag = ($ir['luckybags']); $db->query(sprintf("UPDATE `users` SET `money` = `money` + '%d', `luckybags` = `luckybags` - '%d' WHERE `userid` = ('%u')", $money, 1, $userid)); echo'You opened a Lucky Bag and gained $' .$money. ' from it'; } if($rand == 2) { $crystals = rand(0,100); $db->query(sprintf("UPDATE `users` SET `crystals` = `crystals` + '%d', `luckybags` = `luckybags` - '%d' WHERE `userid` = ('%u')", $crystals, 1, $userid)); echo'You opened a Lucky Bag and gained ' .$crystals. ' crystals from it'; } if($rand == 3) { $query = $db->query("SELECT * FROM `items` WHERE `itmid` > 'item IDs here for what items you wan to be given out'"); $num = $db->num_rows($query); $item = rand(1,$num); $sql = sprintf("SELECT `itmname` FROM `items` WHERE `itmid` = ('%u')", $item); $itm = $db->fetch_row($db->query($sql)); $db->query(sprintf("UPDATE `users` SET `luckybags` = `luckybags` - '%d' WHERE `userid` = ('%u')", 1, $userid)); $db->query("INSERT INTO inventory VALUES('',$item,$userid,1)",$c); echo'You opened a Lucky Bag and received the item: ' .$itm['itmname']. ' from it'; } } } $h->endpage; ?> You will have to edit the items part as you will have to put your own IDs in because at the moment when you got an item it could of been a will potion or if you got DPs/SPs as items the users could get free DPs/SPs
-
Re: Chavster! lol i liked this
-
Re: [mccodes V2] Bounty Hunter Game anyway its a brilliant mod i really like it :D keep up the great work :D
-
Re: [Other] Free chat mod im wondering if the ce irc is still up