
gurpreet
Members-
Posts
834 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by gurpreet
-
Hi, someone got admin in my game via the 50/50 chance as they told me that it was in this file. However, they didn't tell me how, they just said it was in the 50/50 file. I honestly don't know how they could via this file. <?php include "globals.php"; $minbet=100; $maxg=10; echo "<big>50 / 50 Chance Game</big> "; function add_game() { global $ir,$c,$userid, $db, $minbet, $maxg; if(!isset($_POST['amt'])) { echo "<big>Adding a game</big> <form action='chance.php?add=1' method='post'> Amount $<input type='text' name='amt' size=10 maxlength=10> <input type='submit' value='Add!'></form> ($maxg games max per user) [url='chance.php']Back[/url]"; } else { $_POST['amt'] = abs((int) $_POST['amt']); if($_POST['amt'] < $minbet){echo "The minimum bet is $minbet [url='chance.php?add=1']Back[/url]";exit;} $checkcount=$db->query("SELECT logID FROM chance WHERE userID={$ir['userid']} and active=1"); if($db->num_rows($checkcount) > ($maxg-1)){echo "There is a maximum of $maxg games per user. [url='chance.php']Back[/url]";exit;} if($ir['money'] < $_POST['amt']){echo "You cannot afford that amount. [url='chance.php']Back[/url]";exit;} $db->query("UPDATE users SET money = money - {$_POST['amt']} WHERE userid = {$ir['userid']}"); $ir['money']=$ir['money'] - $_POST['amt']; $db->query("INSERT INTO chance VALUES ('', {$ir['userid']}, {$_POST['amt']}, 1)"); echo "Your game has been set. Good Luck. [url='chance.php']Back[/url]"; } } function view_games() { global $ir,$c,$userid, $db, $maxg; $q=$db->query("SELECT c.*, u.username FROM chance c left join users u on u.userid = c.userID WHERE c.active = 1 ORDER BY c.logID ASC"); echo "[url='chance.php?add=1']Add Game[/url] Table of users awaiting a challenge <table class='table' width=50%><tr><th><font color=grey>Game ID</font></th><th><font color=grey>User</font></th><th><font color=grey>Amount</font></th><th><font color=grey>Challenge</font></th><th><font color=grey>Cancel</font></th></tr>"; if($db->num_rows($q) < 1){echo "<tr><td colspan=5>There are currenly no challenges</td></tr>";} while($r=$db->fetch_row($q)) { echo "<tr><td>{$r['logID']}</td><td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userID']}]</td><td>".money_formatter($r['amount'])."</td><td>[url='chance.php?chal={$r[']Challenge[/url]</td><td>"; if($ir['userid']==$r['userID']){echo "[url='chance.php?cancel={$r[']Cancel[/url]";} echo "</td></tr>"; } echo "</table>"; } function dogame() { global $ir,$c,$userid, $db; $_GET['chal'] = abs((int) $_GET['chal']); $q=$db->query("SELECT c.*, u.username from chance c LEFT JOIN users u ON c.userID = u.userid Where c.logID={$_GET['chal']} AND c.active = 1 LIMIT 1"); if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); if($ir['money'] < $r['amount']){echo "You cannot afford the challenge amount. [url='chance.php']Back[/url]";exit;} if($ir['userid'] == $r['userID']){echo "You cannot accept your own challenge. [url='chance.php']Back[/url]";exit;} $rand=rand(1,2); if($rand == 1) { $winner=$r['userID']; $loser=$ir['userid']; $winnername=$r['username']; $losername=$ir['username']; $tstring="Sorry, you Lost. Better luck next time. [url='chance.php']Back[/url]"; $db->query("UPDATE users SET money = money - {$r['amount']} WHERE userid={$ir['userid']}"); $db->query("UPDATE users SET money = money + ({$r['amount']} * 2) WHERE userid={$r['userID']}"); } else { $winner=$ir['userid']; $loser=$r['userID']; $winnername=$ir['username']; $losername=$r['username']; $tstring="You Won! Congratulations! You Won ".money_formatter($r['amount'])." [url='chance.php']Back[/url]"; $db->query("UPDATE users SET money = money + {$r['amount']} WHERE userid={$ir['userid']}"); } event_add($winner, "The game of ".money_formatter($r['amount'])." challenged by [url='viewuser.php?u={$r[']{$r['username']}[/url] was won by [url='viewuser.php?u={$winner}']{$winnername}[/url].", $c); event_add($loser, "The game of ".money_formatter($r['amount'])." challenged by [url='viewuser.php?u={$r[']{$r['username']}[/url] was won by [url='viewuser.php?u={$winner}']{$winnername}[/url].", $c); $db->query("UPDATE chance SET active = 0 WHERE logID={$_GET['chal']}"); echo $tstring; } else { echo "This game has either been cancelled or someone played before you got the chance. [url='chance.php']Back[/url]"; exit; } } function cancel() { global $ir,$c,$userid, $db; $_GET['cancel'] = abs((int) $_GET['cancel']); $q=$db->query("SELECT * from chance where logID={$_GET['cancel']} AND active = 1"); if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); $db->query("UPDATE users SET money = money + {$r['amount']} WHERE userid = {$ir['userid']}"); $ir['money']=$ir['money'] + $r['amount']; $db->query("UPDATE chance SET active = -1 WHERE logID = {$_GET['cancel']}"); echo "The game has been cancelled, and your money has been returned. [url='chance.php']Back[/url]"; } else { echo "This game has already been canceled, does not exist, or someone already played. [url='chance.php']Back[/url]"; } } if(isset($_GET['cancel'])){cancel();} elseif(isset($_GET['chal'])){dogame();} elseif(isset($_GET['add'])){add_game();} else{view_games();} $h->endpage(); ?> Could someone point out where they could do it and/or how.
-
I saw this posted up a while ago, but can't find it via search. I would like it so that if someone sends a mail containing www. .com .co.uk or any of the prefixes/suffixes of websites, it won't allow them to send a mail. If possible, I would like it to send a mail/warning to user ID 1 that blah sent to blah containing www. My mailbox is the following: <?php include(DIRNAME(__FILE__) . '/globals.php'); include_once(DIRNAME(__FILE__) . '/includes/bbcode/mailbbcode.php'); $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; $_GET['ID'] = abs(@intval($_GET['ID'])); $act = $_GET['action']; if($ir['mailban']) { die(sprintf("<font color=red><h3>! ERROR</h3> You have been mail banned for %s days. [b]Reason: %s</font>[/b]", number_format($ir['mailban']), stripslashes($ir['mb_reason']))); } $header = (DIRNAME(__FILE__) . '/includes/mail/header.php'); $archive = (DIRNAME(__FILE__) . '/includes/mail/function_archive.php'); $compose = (DIRNAME(__FILE__) . '/includes/mail/function_compose.php'); $delete = (DIRNAME(__FILE__) . '/includes/mail/function_delete.php'); $delete_all = (DIRNAME(__FILE__) . '/includes/mail/function_delete_all.php'); $delete_all_read = (DIRNAME(__FILE__) . '/includes/mail/function_delete_all_read.php'); $delete_all_saved = (DIRNAME(__FILE__) . '/includes/mail/function_delete_all_saved.php'); $delete_saved = (DIRNAME(__FILE__) . '/includes/mail/function_delete_saved.php'); $inbox = (DIRNAME(__FILE__) . '/includes/mail/function_inbox.php'); $massdel = (DIRNAME(__FILE__) . '/includes/mail/function_massdel.php'); $outbox = (DIRNAME(__FILE__) . '/includes/mail/function_outbox.php'); $read_saved = (DIRNAME(__FILE__) . '/includes/mail/function_read_saved.php'); $save = (DIRNAME(__FILE__) . '/includes/mail/function_save.php'); $saved_box = (DIRNAME(__FILE__) . '/includes/mail/function_saved_box.php'); $send = (DIRNAME(__FILE__) . '/includes/mail/function_send.php'); $view = (DIRNAME(__FILE__) . '/includes/mail/function_view.php'); $cases = (DIRNAME(__FILE__) . '/includes/mail/cases.php'); if(file_exists($header)) { include($header); } else { error('header'); } if(file_exists($compose)) { include($compose); } else { error('compose'); } if(file_exists($delete)) { include($delete); } else { error('delete'); } if(file_exists($delete_all)) { include($delete_all); } else { error('delete_all'); } if(file_exists($delete_all_read)) { include($delete_all_read); } else { error('delete_all_read'); } if(file_exists($delete_all_saved)) { include($delete_all_saved); } else { error('delete_all_saved'); } if(file_exists($delete_saved)) { include($delete_saved); } else { error('delete_saved'); } if(file_exists($inbox)) { include($inbox); } else { error('inbox'); } if(file_exists($massdel)) { include($massdel); } else { error('massdel'); } if(file_exists($outbox)) { include($outbox); } else { error('outbox'); } if(file_exists($read_saved)) { include($read_saved); } else { error('read_saved'); } if(file_exists($archive)) { include($archive); } else { error('archive'); } if(file_exists($save)) { include($save); } else { error('save'); } if(file_exists($saved_box)) { include ($saved_box); } else { error('saved_box'); } if(file_exists($send)) { include($send); } else { error('send'); } if(file_exists($view)) { include($view); } else { error('view'); } if(file_exists($cases)) { include($cases); } else { error('cases'); } function error($file) { global $h; echo "The mailbox is being updated, please check back in a few seconds. File missing: <u>".$file."</u>"; $h->endpage(); exit; } echo "<font class='tdcenter'> Mail count mixed up? Click [url='fix.php']Here[/url] to fix</font>"; $h->endpage(); ?>
-
[MMCODE V2] Set Sell Price of houses after they are Purchased...
gurpreet replied to Uridium's topic in Free Modifications
Re: [MMCODE V2] Set Sell Price of houses after they are Purchased... How would I get it into this: <?php require_once "globals.php"; echo <<<EOFS1 <style type="text/css"> .success { color: green; } .fail { color: red; } table { text-align: center; } #housing th { border: thin solid; } #housing td { border: thin dotted; } </style> EOFS1; $housesConfig = array('DEFAULTHouse' => 'Shed', 'DEFAULTHouseMaxWill' => 100, 'listingStyle' => 'LIST'); // Make sure to change these to your // default house's name, and that house's // Options for listingStyle // will. // are LIST or TABLE $currentHouse = sprintf("SELECT `hNAME`, `hWill` FROM `houses` WHERE (`hWILL` = %d)", $ir['maxwill']); $mpq = mysql_query($currentHouse); if($mpq === FALSE) { echo "".mysql_error().""; } $mp = $db->fetch_row($mpq); $_GET['property']= (!empty($_GET['property']) && ctype_digit($_GET['property']) && isset($_GET['property']) ? ($_GET['property']) : FALSE); $_GET['sellhouse'] = (!empty($_GET['sellhouse']) && ctype_digit($_GET['sellhouse']) && isset($_GET['sellhouse']) ? $_GET['sellhouse'] : FALSE); if($_GET['property']) { $getProperties = sprintf("SELECT `hWILL`, `hNAME`, `hPRICE` FROM `houses` WHERE (`hID` = %d)", $_GET['property']); $npq = mysql_query($getProperties); if($npq === FALSE) { echo "".mysql_error().""; } $np = $db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { echo "<h3 class='fail'> You cannot go backwards in houses! </h3>"; } else if ($np['hPRICE'] > $ir['money']) { printf("<h3 class='fail'> You do not have enough money to buy the %s </h3>", $np['hNAME']); } else { $updateHouses = sprintf("UPDATE `users` SET `money` = `money` - %d, `will` = 0, `maxwill` = %d WHERE (`userid` = %u)", ($np['hPRICE']), ($np['hWILL']), ($userid)); mysql_query($updateHouses); printf("<h3 class='success'> Congrats, you bought the %s for \$%d!", stripslashes($np['hNAME']), ($np['hPRICE'])); } } else if ($_GET['sellhouse']) { $getProperties = sprintf("SELECT `hPRICE`, `hNAME` FROM `houses` WHERE (`hWILL` = %d)", ($ir['maxwill'])); $npq = mysql_query($getProperties); if($npq === FALSE) { echo "".mysql_error().""; } $np = $db->fetch_row($npq); if($ir['maxwill'] == $housesConfig['DEFAULTHouseMaxWill']) { echo "You already live in the lowest property!"; } else { $beginnerHouse = sprintf("UPDATE `users` SET `money` = `money` + %d,`will` = 0, `maxwill` = %d WHERE (`userid` = %u)", abs($np['hPRICE']), $housesConfig['DEFAULTHouseMaxWill'], abs(@intval($userid))); $do_beginnerHouse = mysql_query($beginnerHouse); if($do_beginnerHouse === FALSE) { echo "".mysql_error().""; } printf("<h3 class='success'> You sold your %s and went back to your %s </h3>", stripslashes($np['hNAME']), $housesConfig['DEFAULTHouse']); } } else { printf("<h4 style='padding-bottom:25px;'> Your current property is <span style='font-weight:bold;'> %s </span>", stripslashes($mp['hNAME'])); echo "<h5 style='padding-bottom:10px;'> The houses you can buy are listed below. Click a house to buy it </h5>"; $sellHouse = ($ir['maxwill'] > $housesConfig['DEFAULTHouseMaxWill'] ? "[url='estate.php?sellhouse=1'] Sell Your House [/url]" : FALSE); if(isset($sellHouse)) { echo $sellHouse; } $houseList = sprintf("SELECT `hID`, `hNAME`, `hPRICE`, `hWILL` FROM `houses` WHERE (`hWILL` > %d) ORDER BY `hWILL` ASC", ($ir['maxwill'])); $hq = $db->query($houseList); if($hq === FALSE) { echo "".mysql_error().""; } if($housesConfig['listingStyle'] == 'LIST' || strlen($housesConfig['listingStyle']) < 1 || !in_array($housesConfig['listingStyle'], array('LIST', 'TABLE'))) { $styles = array('style' => array("<ul stlye='list-style-type:none;line-height:2em;'>", "[/list]"), 'stylechild' => array("[*]", ""), 'styleseperator' => array("<span style='padding-left:25px;padding-right:25px;'>", "</span>")); } else { $styles = array('style' => array("<table style='width:75%;border-spacing:1;' id='housing'>", "</table>"), 'trow' => array("<tr>", "</tr>"), 'stylechild' => array("<td>", "</td>")); } echo $styles['style'][0]; if($housesConfig['listingStyle'] == 'TABLE') { echo "<tr>"; echo "<th> House Name </th>"; echo "<th> House Price </th>"; echo "<th> House Will </th>"; echo "</tr>"; } while($r = $db->fetch_row($hq)) { echo $styles['stylechild'][0]; printf("[url='estate.php?property=%d'] %s [/url]", $r['hID'], stripslashes($r['hNAME'])); if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][0]; } if(isset($styles['styleseperator'][0])) { echo $styles['styleseperator'][0]; } printf("Cost: \$%s", number_format($r['hPRICE'],'')); if(isset($styles['styleseperator'][1])) { echo $styles['styleseperator'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][0]; } printf("Will Bar: %d", ($r['hWILL'])); echo $styles['stylechild'][1]; if(isset($styles['trow'][1])) { echo $styles['trow'][1]; } } echo $styles['style'][1]; } $h->endpage(); ?> $db->query("UPDATE users SET money=money+'{$np['hSELLPRICE']}',will=150,maxwill=150 WHERE userid=$userid",$c); print "You sold your {$np['hNAME']} for \$$j".money_formatter($r['hSELLPRICE'],'')." Minus Lawyer fees and went back to your shed."; That messes up the sale, you get 0 back. I have no clue where to put the <tr><td>{$r['hNAME']}</a></td><td>\$$t".money_formatter($r['hPRICE'],'')."</td> <td>\$$j".money_formatter($r['hSELLPRICE'],'')."</td> <td>{$r['hWILL']}</td> Any help? -
Re: Link colors <font color=colorhere>Linkname</font>
-
Re: Assistant and Admin name colors? just edit the user: <font color=blue>Admin</font> Etc
-
[MMCODE V2] Set Sell Price of houses after they are Purchased...
gurpreet replied to Uridium's topic in Free Modifications
Re: [MMCODE V2] Set Sell Price of houses after they are Purchased... +1 very helpful. Like in real life, you could set the buy price to say 10,000 and the sell price to 5,000 which would keep the economy fine. -
Re: View Gang Surrender Thanks so much Zero! Needed this for ages!
-
Re: [mccode] Free Starter Pack Well your hostin F'd up :P
-
Re: Crimes too hard. That's what he said. I couldn't resist Haha made me laugh in real life. +1
-
Re: [V2] New Small Accuracy Mod [V2] $acc= $ir['totalhits'] / ($ir['totalhits']+$ir['totalmisses']) *100; echo 'Accuracy: $acc%'; Just throwing it out there...Probably won't work
-
Re: Crimes too hard. Decreate *0.8 to say 1.5 and 4 to say 2 100x1.5 = 150 / 2.5 = 60. + 20/2 = 10 60 + 10 = 70 Nearly double the original formula. Just play with them :)
-
Re: [V2] Disturbed City please join this game: www.disturbedcity.com its new so get a low number id today! thanks to the permission of the owner If you join, he will spam your game with ads. Fuck this guy
-
Re: Stupid Idiots Yeh, I've seen the stuff. It's friggin awesome..Is it like 1 guy or a whole team? If it's 1 guy he's fuckin sick.
-
Re: Stupid Idiots I can afford that in a few years once I get a job rofl :P
-
Re: Stupid Idiots Piracy will happen...People just need to be honest when saying "I will not distribute or resell this"... On here, i think 1/2 of the people do this, 1/2 don't. Off topic: I'm looking for a good GFX designer for an in-game and out of game layout (register + login) and I will not redistribute or resell this. PM me, my budget is around $50. RPGstyle does good stuff, but he's too busy to do one for me.
-
mccode-v2 100% Working Copy Enhanced Schooling
gurpreet replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Why drop your users table? -
mccode-v1 Stock Market. Working + Secured
gurpreet replied to Haunted Dawg's topic in Free Modifications
Re: [mccode v2] Stock Market. Working + Secured Oh so it's the change from the last 5 minutes, not overall change? -
Re: [review] Godfathers United You need to accept the Terms of Service in order to play Gangster Basics. Your game isn't called Gangster Basics?
-
mccode-v1 Stock Market. Working + Secured
gurpreet replied to Haunted Dawg's topic in Free Modifications
Re: [mccode v2] Stock Market. Working + Secured I'm guessing that's not right? -
Re: [mccode v2] Estate Recode Been up for nearly 600 days, and the highest priced house that someone has atm is 20 billion, considering removing the others.
-
Re: [mccode v2] Estate Recode If I sell any house above 2.1 billion, just refunds 2.1 billion. So in theory, with the best house on my game if you sold it you stand to lose like..497.9 billion.
-
Re: [mccode v2] Estate Recode Bump
-
Re: [mccode v2] Estate Recode Ok thanks, +1 for that. How would I make it so it doesn't cap off at 2.1 billion (make it bigint). I tried changing int to bigint but i got errors # Private Space Shuttle Cost: $500000000Will Bar: 787 # Artificial Orbiting Moon Cost: $1000000000Will Bar: 823 # Private Artifical Orbiting Moon Cost: $2000000000Will Bar: 878 # Villa Cost: $2147483647Will Bar: 900 # Private Villa Cost: $2147483647Will Bar: 946 # The Moon Cost: $2147483647Will Bar: 1000
-
Re: [mccode v2] Estate Recode # Artificial Orbiting Moon Cost: $1000000000Will Bar: 823 # Private Artifical Orbiting Moon Cost: $2000000000Will Bar: 878 # Villa Cost: $-1794967296Will Bar: 900 # Private Villa Cost: $1205032704Will Bar: 946 # The Moon Cost: $1410065408Will Bar: 1000 # Lysithea Cost: $-769803776Will Bar: 1050 # Earth Cost: $-1539607552Will Bar: 1112 # Mars Cost: $445948416Will Bar: 1300 # Jupiter Cost: $1661700608Will Bar: 1500 # Sun Cost: $57321984Will Bar: 1750 # Milky Way Cost: $1783793664Will Bar: 2250 It messed up after 20 billion. The numberformat doesn't work properly either
-
Re: [mccode v2] Estate Recode Those are the 3 best houses, sposed to cost 500 billion for the last one, 305b for sun, 225B for jupiter. It's the problem strats had, wanna post up your whole new Estate? I put in the new thing you posted 2 or 3 posts back but still nothing