
Scorpio
Members-
Posts
85 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Scorpio
-
Seriously... He was the owner of MCCodes?
-
If you have Ajax Gang/Channel Chat System by Dave Macaulay. I have interigated it with another chat by Dayo. There are 5 files altogether. But I have a problem. On the chat only the userid shows not the username, may someone help me out please. Recieve is the file that needs to be edit to show the username, I tried my best to make it show but I couldn't do it. ajch.css #errordivision { position: absolute; top: 40%; left: 35%; height: 170px; width: 300px; border: 2px solid; } #chatresp { border: 1px solid; background-color:#777777; overflow: auto; height: 400px; width: 400px; position: relative; font-family: Arial,Verdana,Helvetica,sans-serif,monospace; font-size: 12px; } chat.php <?php include 'globals.php'; // the staff functions if ($ir['user_level']>1) { // Delete post if ($_GET['action']=='del' && isset($_GET['chat_id'])) { mysql_query("DELETE FROM `chat_box` WHERE `chat_id`=".abs(intval($_GET['chat_id']))); } } else {echo 'Nope that dont work!';} ?> <script type="text/javascript" src="send.js"></script> <link rel="stylesheet" type="text/css" href="ajch.css"> <form name="chatform" onSubmit="send();return false;"> <!--<textarea name="chatresp" cols="50" rows="10" id="chatresp" readonly="readonly"></textarea><br>--> <div id="chatresp" name="chatresp"></div> <input type="hidden" name="guestname" id="name" size="7"> <input type="text" name="chatext" style="width:325px" id="chatext"><input type="submit" value="Send" style="width:75px" onClick="send();return false;"> </form> <div style="width:400px; text-align:left"><small style="color:red;"><b>[bB-Code ~ Enabled]</b></small></div> <?php $h->endpage(); ?> recieve.php <?php session_start(); $userid=$_SESSION['userid']; include "config.php"; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; require_once('global_func.php'); $db = new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $is=$db->query("SELECT * FROM `users` WHERE `userid`='".$userid."'"); $ir=$db->fetch_row($is); // Mass Delete posts after X hours X mins X seconds $time=time() - (24*60*60); mysql_query("DELETE FROM `chat_box` WHERE `chat_time`<".$time); class bbcode { function code_box($text) { $output = "<div class=\"code\"><h6>Code</h6>\\1</div>"; return $output; } function quote($text) { $output = "<blockquote><h6>Quote:</h6>\\1</blockquote>"; return $output; } function htmlout($text) { $text = stripslashes($text); $text = htmlspecialchars($text); $text = nl2br($text); return $text; } function parse($text) { // First: If there isn't a "[" and a "]" in the message, don't bother. $text = " " . $text; if (! (strpos($text, "[") && strpos($text, "]")) ) { return $text; } else { // de uiteindelijke code $text = $this->htmlout($text); $text = preg_replace("/\\[b\\](.+?)\[\/b\]/is",'<b>\1</b>', $text); $text = preg_replace("/\\[i\\](.+?)\[\/i\]/is",'<i>\1</i>', $text); $text = preg_replace("/\\[u\\](.+?)\[\/u\]/is",'<u>\1</u>', $text); $text = preg_replace("/\[s\](.+?)\[\/s\]/is",'<s>\1</s>', $text); // Un advised bb code we advise you dont use the folowing bb code if you want to use it use at your own risk // $text = preg_replace("/\[code\](.+?)\[\/code\]/is","".$this->code_box('\\1')."", $text); // $text = preg_replace("/\[quote\](.+?)\[\/quote\]/is","".$this->quote('\\1')."", $text); // $text = eregi_replace("\\[img]([^\\[]*)\\[/img\\]","<img src=\"\\1\">",$text); // $text = eregi_replace("\\[size([^\\[]*)\\]([^\\[]*)\\[/size\\]","<font size=\"\\1px\">\\2</font>",$text); $text = eregi_replace("\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]","<font color=\"\\1\">\\2</font>",$text); return $text; } } } $bbcode = new bbcode; $q = mysql_query("SELECT `chat_id` FROM `chat_box` "); $num=mysql_num_rows($q); if ($num < 26) { $limit=$num; $num = 0; } else {$num = $num-26; $limit=26;} $q = mysql_query("SELECT * FROM `chat_box` ORDER BY `chat_id` ASC LIMIT ".$num.", ".$limit); echo '<div align="left">'; while ($c=mysql_fetch_array($q)) { if ($ir['user_level'] > 1) {$staff='[<a href="chat1.php?action=del&chat_id='.$c['chat_id'].'">X</a>] ';} else {$staff='';} echo ' '.$staff.'<strong>'.ucwords($c['chat_user']).':</strong> '.$bbcode->parse(htmlspecialchars($c['chat_text'])).'<br>'; } echo '</div>'; ?> send.php <?php session_start(); $userid=$_SESSION['userid']; include "config.php"; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; require_once('global_func.php'); $db = new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $is=$db->query("SELECT * FROM `users` WHERE `userid`='".$userid."'"); $ir=$db->fetch_row($is); $text = mysql_real_escape_string($_GET['msg']); $name = $ir['username']; global $db,$ir,$c,$h,$userid; if ($_GET['msg']) { $db->query("INSERT INTO chat_box(`chat_user`,`chat_channel`, `chat_text`, `chat_time`) VALUES ('$userid','1',' ".$text."',unix_timestamp())"); } echo 'Sending ...'; ?> send.js function err(text){ body = document.body; var errdiv = document.createElement("div"); errdiv.id = "errordivision"; errdiv.className = "errordivision"; errdiv.innerHTML = text; body.appendChild(errdiv); setTimeout("document.getElementById('errdiv').style.display = 'none'", 3000); } function makeRequest(){ if(window.XMLHttpRequest){ return new XMLHttpRequest(); } else if(window.ActiveXObject){ return new ActiveXObject("Microsoft.XMLHTTP"); } else { err("You browser doesn't support XMLHttpRequestObject"); } } var req = makeRequest(); function send(){ if(req.readyState == 4 || req.readyState == 0){ req.open("GET", "send.php?name="+document.chatform.guestname.value+"&msg="+document.chatform.chatext.value); req.send(null); } document.chatform.chatext.value = ''; } function recieve(){ req.open("GET", "recieve.php"); req.onreadystatechange = handleResp; req.send(null); } function handleResp(){ if(req.readyState == 4 && req.status == 200){ document.getElementById("chatresp").innerHTML = req.responseText; var elem = document.getElementById("chatresp"); elem.scrollTop = elem.scrollHeight; } } function init(){ var num = parseInt(Math.random()*10); var stnum = String(num); var num1 = parseInt(Math.random()*10); var stnum1 = String(num1); var num2 = parseInt(Math.random()*10); var stnum2 = String(num2); var num3 = parseInt(Math.random()*10); var stnum3 = String(num3); document.chatform.guestname.value = "guest"+stnum+stnum1+stnum2+stnum3; setInterval('recieve()', 2000); recieve(); } window.onload = init; [ATTACH=CONFIG]936[/ATTACH] Sorry this is for V2
-
I recommend Impluse Pay.
-
Sniko can you help me out? What is RSS feed
-
I agree BioHazard. Not only that, its rubbish then the normal Mccodes V2. Your rather get Ravens Mafia Script (Only if you have a valid MCCodes License)
-
Might buy 1 or stick with the one I got now. http://www.4templates.com/website-templates/557336977-WT00543/#cyan http://www.4templates.com/website-templates/362564323-WT00800/demo/#red http://www.4templates.com/website-templates/153498923-WT00554/#red http://www.4templates.com/website-templates/114868936-WT00661/#red
-
Game, taken down due to the demo account. Game will be back online. Now that Guest had showed me the site, that I forgot. Im looking for a new tempalte. :D (Sorry on phone atm) Explain properly later why games down.
-
Not only that Monocountry had that template first.
-
Just by its template?
-
Hey all, I've been working on a game for some time now, and everything is in place to go, except...Members, haha. So please visit, look around and possibly even stay at InfamousNation, there are many fun activities to do, hit the gym, do missions, crimes, visit the casino and much, much more! With the game being bug free, all members should have absolutely no issue browsing the site.And of course, its FREE! Join now! Alternative link: http://www.infamousnation.net/login.php Side note, this game is custom made and a demo account has been set (details located on login page) if you choose to look around. Much love, Scorpio!
-
Done, thats all. Hope you guys enjoyed it.
-
Add this into your database CREATE TABLE IF NOT EXISTS `lottery` ( `lot_ID` int(11) NOT NULL AUTO_INCREMENT, `lotPLAYER` varchar(255) NOT NULL, `lot_DON` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`lot_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; Then make a Item called Donator Ticket (Or what ever you want it to be called) Then open up inventory and find: if($i['armor']) { print " [<a href='equip_armor.php?ID={$i['inv_id']}'>Equip as Armor</a>]"; } Below that add: if ($i['itmid'] == 80) { print " [<a href='itemuse2.php?ID=1'>Use</a>]"; } Now save it and close it. Then make a new file called: itemuse2.php and add into it: <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); ///Ticket if($_GET['ID'] == 1) { $itemcheck1=$db->query("SELECT COUNT(*) as amt FROM `inventory` WHERE `inv_userid`={$ir['userid']} and `inv_itemid`=80"); $itemcheck=$db->fetch_row($itemcheck1); if($itemcheck['amt']<1) { print "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>Invalid item ID.<br/><br/> <hr width='50%'><a href='inventory.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } $db->query("INSERT INTO lottery VALUES('',$userid,'0')"); item_remove($ir['userid'], 80, 1); print "<hr width='50%'>Please read the confirmation message.<hr width='50%'><h3>! CONFIRMATION</h3>Donator Ticket used successfully!<br/><br/> <hr width='50%'><a href='inventory.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } // End else { print "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>System error!<br/><br/> <hr width='50%'><a href='inventory.php'>> Go Back</a><hr width='50%'>"; } $h->endpage(); ?> Save that and close. (Remember you gotta change the ID's to the item id you made. Now make a cron_donatordraw.php (You have to edit somethings, to order to make this work) add into it: <?php require_once('globals_nonauth.php'); if ($argc == 2) { if ($argv[1] != $_CONFIG['code']) { exit; } } else if (!isset($_GET['code']) || $_GET['code'] !== $_CONFIG['code']) { exit; } ///Picks at random (The winner) $query=$db->query("SELECT * FROM lottery WHERE lotPLAYER = 1"); $sql1=$db->fetch_row($query); $sql1 = $db->query("SELECT * FROM users WHERE userid = {$sql1['lotPLAYER']}"); $result1=$db->fetch_row($sql1); ///This is where the item is added item_add($result1['userid'], 43, 1); ///This is where the event is added event_add($result1['userid'],"Congratulations, you are a winner of this weeks donators draw and have been credited a donator pack - offer 1"); ///This is where the annoucement is added $name="Donator Draw"; $announcement="<font size=3 face=Impact color=orange><u>General Draw</u></font><br /> The winners of this weeks general draw is:<br /><br /> Winner - {$result1['username']} [{$result1['userid']}]<br /> Winner will be credited immediately along with an event notification.<br /><br /> Want to take part?<br /> Login on your account in any one week to be automatically entered.<br /><br /> Prize:<br /> Prize is a free Donator Pack - Offer 1.<br /><br />"; $db->query("UPDATE users SET `new_announcements` = `new_announcements` + 1"); $db->query("INSERT INTO announcements (`announce_NAME`, `announce_TEXT`, `announce_TIME`, `announce_URGENCY`, `announce_TOPIC`, `announce_POSTED`) VALUES ('$name', '$announcement', unix_timestamp(), 'No Urgency', 'General News', 'SYSTEM')"); ///Updates the tables $db->query("TRUNCATE TABLE `lottery`"); Now do the cron job to what ever. and done. Hope you like it. I did it in a rush sorry if I make no sense.
-
Thanks dayo. :D
-
Quite simple nice +1
-
Okay just found a problem, when the board extend. The ball gose stright through the board.
-
Level 2! Looks great! Love the lasers!
-
Hey a_bertrand, the game is great on firefox! I have no problems yet. If I do I'll report back.
-
Well you will need a license for it.
-
I see, you have the raven mafia script.
-
Hey peter, I have used your useronline, and it works great! But then I wanted a new one. As your useronline didnt look nice on mine. As I changed my template. In a second I will update the post .
-
This modfication is for MCCodes V1 & V2 (Not Tested On V1) So first Import these SQL to your Database - CREATE TABLE IF NOT EXISTS `records` ( `rec15` int(11) NOT NULL DEFAULT '0', `rec24` int(11) NOT NULL DEFAULT '0', `rec60` int(11) NOT NULL DEFAULT '0', `recid` int(11) NOT NULL DEFAULT '1' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `records` (`rec15`, `rec24`, `rec60`, `recid`) VALUES (0,0,0,1); Once you have done that. Make a file called usersonline.php And put in - <?php //Modification made by Scorpio// if (file_exists("globals.php")) { // V2 require("globals.php"); } else { // V1 require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); } // Security fix $_GET['time'] = ( isset($_GET['time']) AND in_array($_GET['time'], array('15', '30', '45', '60', '1440')))? $_GET['time'] : '15'; // End if ($_GET['time']) { $time=$_GET['time']; } else { $time=15; } $cn=0; $lk=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-1440*60"); $aa=$db->num_rows($lk); $ll=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-60*60"); $ab=$db->num_rows($ll); $lm=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-45*60"); $ac=$db->num_rows($lm); $ln=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-30*60"); $ad=$db->num_rows($ln); $lo=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60"); $ae=$db->num_rows($lo); $q=$db->query("SELECT * FROM records WHERE recid=1"); $v=$db->fetch_row($q); $q=$db->query("SELECT username FROM users WHERE laston>unix_timestamp()-300*300 ORDER BY laston DESC"); $twsev=$db->num_rows($q); $q=$db->query("SELECT username FROM users WHERE laston>unix_timestamp()-60*60 ORDER BY laston DESC"); $lasthr=$db->num_rows($q); $q=$db->query("SELECT username,userid,laston FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); $fifteen=$db->num_rows($q); if ($v['rec15']<$fifteen) {$db->query("UPDATE records SET rec15=$fifteen WHERE recid=1");} if ($v['rec24']<$twsev) {$db->query("UPDATE records SET rec24=$twsev WHERE recid=1");} if ($v['rec60']<$lasthr) {$db->query("UPDATE records SET rec60=$lasthr WHERE recid=1");} $q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-{$time}*60 ORDER BY laston DESC"); ?> <table border="0" width="95%" cellpading="0" cellspacing="0"> <tr> <td width="35%" valign="top"> <h3>Time Selector</h3> <a href="usersonline.php?time=15">(15 Mins)</a> <a href="usersonline.php?time=30">(30 Mins)</a> <a href="usersonline.php?time=45">(45 Mins)</a> <a href="usersonline.php?time=60">(60 Mins)</a> <a href="usersonline.php?time=1440">(24 Hrs)</a><br /><br /> <h3>Statistics</h3> Users online in the last 15 Mins: <?php print"{$ae}"; ?><br /> Users online in the last 30 Mins: <?php print"{$ad}"; ?><br /> Users online in the last 45 Mins: <?php print"{$ac}"; ?><br /> Users online in the last 60 Mins: <?php print"{$ab}"; ?><br /> Users online in the last 24 Hours: <?php print"{$aa}"; ?><br /><br /> <h3>Records</h3> Record online in 15 mins: <?php print "{$v['rec15']}"; ?><br /> Record online in 60 mins: <?php print "{$v['rec60']}"; ?><br/> Record online in 24 hrs: <?php print "{$v['rec24']}"; ?><br/> <h3>User Legend</h3> Admins = <font color="gold">Gold</font><br /> Secretaries = <font color="blue">Blue</font><br /> Moderators = <font color="green">Green</font><br /> Assistants = <font color="purple">Purple</font><br /> Members = <font color="silver">Silver</font><br /> Staff = <img src='owner.gif' width='12' height='12'><br/> Donators = <img src='donator.gif 'width='12' height='12'><br/> </td> <td width=100% valign="top"> <table cellspacing='1' border='0' cellpadding='1' class='table' width='100%'> <tr> <th><b></b> </td> <th><b><center>Gang</center></b> </td> <th><b><center>User</center></b> </td> <th><b><center>Last</center></b> </td> <th><b>Online</b></th> </td> <th><b>Links</b></th> </td> </tr> <?php $donator = null; $owner = null; $staff = null; while($r=mysql_fetch_assoc($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $cn++; $name=$r['username']; $gangtag=$r['yourgangPREF']; } if($r['user_level'] > 1) { $staff="<img src='owner.gif' width='12' height='12' alt='Staff' title='Staff' />"; } else { $staff=''; } if ($r['user_level']==1) { $color=silver; } if($r['donatordays'] > 0 OR $r['supporterdays'] > 0) { $color=red; } if ($r['user_level']==2) { $color=gold; } if ($r['user_level']==3) { $color=blue; } if ($r['user_level']==4) { $color=green; } if ($r['user_level']==5) { $color=cyan; } if ($r['user_level']==6) { $color=purple; } if($r['donatordays'] > 1) { $r['username'] = "<font color=$color>{$r['username']}</font> "; $d="<img src='donator.gif 'width='12' height='12' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; } else { $d=''; } $r['username']="<a href='viewuser.php?u={$r['userid']}'><font color='{$color}'>{$r['username']} $d $staff </font></a> "; print "<tr> <td class=table> $cn. </td> <td class=table >"; if ($r['gang'] > 0) { print" <a href='gangs.php?action=view&ID={$r['gang']}'><small>[View]</small></a> </td>"; } else { print" <small>No Gang</small> </td>"; } print" <td class=table> {$r['username']} </td> <td class=table> ($la $unit) </td> <td class=table>"; $lb=time()-$r['last_login']; $units="secs"; if($lb >= 60) { $lb=(int) ($lb/60); $units="mins"; } if($lb >= 60) { $lb=(int) ($lb/60); $units="hours"; if($lb >= 24) { $lb=(int) ($lb/24); $units="days"; } } if($r['laston'] <= time()-15*60) { $lb="Offline"; $units=""; } print "{$lb} {$units}</td>"; if($r['hospital'] > 0) { print"<td><small>Hospital</small></td>"; } if($r['jail'] > 0) { print"<td><small>Jail</small></td>"; } if($r['hospital'] == 0 AND $r['jail'] == 0) { print"<td><small>[<a href='attack.php?uid={$r['userid']}'>Attack</a>]</td>"; } print"</tr>"; } ?> </td> </tr> </table> <tr> </table> <?php $h->endpage(); ?> Then save the file and your done! OLD - NEW - Post updated.
-
Upgraded and fix version :D <?php include_once("globals.php"); if($ir['jail']) { print "You are in jail."; $h->endpage(); exit(); } if($ir['hospital']) { print "You are in hospital."; $h->endpage(); exit(); } $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false; switch($_GET['action']) { case 'mine': mine_1(); break; case 'minesub': mine_1_sub(); break; case 'mine2': mine_2(); break; case 'mine2sub': mine_2_sub(); break; case 'mine3': mine_3(); break; case 'mine3sub': mine_3_sub(); break; case 'mine4': mine_4(); break; case 'mine4sub': mine_4_sub(); break; case 'mine5': mine_5(); break; case 'mine5sub': mine_6_sub(); break; case 'mine6': mine_6(); break; case 'mine6sub': mine_6_sub(); break; default: mine_index(); break; } /** ** Calls the cases so mine.php?mine **/ function mine_index() { global $db, $c, $ir, $set; echo " <br /><br /><br /><u><font size=3><b>Mining</u></font><br /><br /></b> A place to do some mining and find lost treasures.<br /><br /> <hr width=60%> Current Mining Power: {$ir['power']}/{$ir['maxpower']}<br /> Mining Level: {$ir['mine_level']}<br /> Mining Experience: {$ir['mine_exp']}/{$ir['mine_needed']}<br /> <hr width=60%> <br /><u><font size=3><b>Crystals Mine</u></font><br /><br /></b> [<a href='mine.php?action=mine'>Level 1 mine</a>]<br /> [<a href='mine.php?action=mine2'>Level 10 mine</a>]<br /> [<a href='mine.php?action=mine3'>Level 20 mine</a>]<br /> [<a href='mine.php?action=mine4'>Level 30 mine</a>]<br /> [<a href='mine.php?action=mine5'>Level 40 mine</a>]<br /> [<a href='mine.php?action=mine6'>Level 60 mine</a>]<br /> <hr width=60%>"; $h->endpage(); exit; } if ($ir['jail'] > 0) { echo "<center>You are in Jail</center>"; $h->endpage(); exit; } if ($ir['hospital'] > 0) { echo "<center>You are in Hospital</center>"; $h->endpage(); exit; } // -- CODE function cavein() { global $db, $c, $ir, $set; $HOSPTIME=rand(5,10); // HOSPITAL TIME mysql_query("UPDATE users SET hospital=$HOSPTIME, hospreason='Cave-in while searching Mines' WHERE userid=$userid"); echo "After a few minutes of searching the ground begins to rumble...the walls begin to collapse around you! You barely escape and wake up at the Hospital."; $h->endpage(); exit; } function nothing() { global $db, $c, $ir, $set; echo "You did not find anything while searching the mines. [<a href='mine.php?action=mine'>Mine again</a>]"; $h->endpage(); exit; } function mine_1() { global $db, $c, $ir, $set; if($ir['power'] < 10) { echo "You need 10 power to mine here, and you have ".number_format($ir['power']).""; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-10 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(1,5); $rand_exp = rand(1,3); echo "<center>You begin mining in the level 1 mine and found $rand_gems crystal(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; $h->endpage(); exit; } function mine_2() { global $db, $c, $ir, $set; if($ir['mine_level'] < 10) { echo "<center>You need to be mining level 10 to mine here, and you are mining level ".number_format($ir['mine_level'])."</center>"; $h->endpage(); exit; } if($ir['power'] < 15) { echo "<center>You need 15 power to mine here, and you have ".number_format($ir['power'])."</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-15 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(5,25); $rand_exp = rand(1,7); echo "<center>You begin mining in the level 10 mine and found ".number_format($rand_gems)." Crystal(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine2'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; $h->endpage(); exit; } function mine_3() { global $db, $c, $ir, $set; if($ir['mine_level'] < 20) { echo "<center>You need to be mining level 20 to mine here, and you are mining level ".number_format($ir['mine_level'])."</center>"; $h->endpage(); exit; } if($ir['power'] < 20) { echo "<center>You need 20 power to mine here, and you have {$ir['power']}</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-20 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(15,50); $rand_exp = rand(2,10); echo "<center>You begin mining in the level 20 mine and found ".abs((int) $rand_gems)." Crystal(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine3'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; $h->endpage(); exit; } function mine_4() { global $db, $c, $ir, $set; if($ir['mine_level'] < 30) { echo "<center>You need to be mining level 30 to mine here, and you are mining level ".number_format($ir['mine_level'])."</center>"; $h->endpage(); exit; } if($ir['power'] < 25) { echo "<center>You need 25 power to mine here, and you have {$ir['power']}</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-25 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(25,70); $rand_exp = rand(5,12); echo "<center>You begin mining in the level 30 mine and found ".abs((int) $rand_gems)." Crystal(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine4'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; $h->endpage(); exit; } function mine_5() { global $db, $c, $ir, $set; if($ir['mine_level'] < 40) { echo "<center>You need to be mining level 40 to mine here, and you are mining level ".number_format($ir['mine_level'])."</center>"; $h->endpage(); exit; } if($ir['power'] < 30) { echo "<center>You need 30 power to mine here, and you have {$ir['power']}</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-30 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(30,90); $rand_exp = rand(5,15); echo "<center>You begin mining in the level 40 mine and found ".abs((int) $rand_gems)." Crystal(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine5'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; $h->endpage(); exit; } function mine_6() { global $db, $c, $ir, $set; if($ir['mine_level'] < 60) { echo "<center>You need to be mining level 60 to mine here, and you are mining level {$ir['mine_level']}</center>"; $h->endpage(); exit; } if($ir['power'] < 45) { echo "<center>You need 45 power to mine here, and you have {$ir['power']}</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-45 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(40,150); $rand_exp = rand(1,3); echo "<center>You begin mining in the level 60 mine and found ".abs((int) $rand_gems)." Crystal(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine6'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; $h->endpage(); exit; } ?>
-
$houses = mysql_query(sprintf("SELECT * FROM `owned_houses` LEFT JOIN `users` ON (`userid` = `uhouseTenant`) WHERE `uhouseTenant` > '0'")); while ($r = mysql_fetch_array($houses)) { mysql_query("UPDATE `owned_houses` SET `uhouseRTime` = `uhouseRTime` - '1' WHERE `uhouseRTime` > '0'"); mysql_query("UPDATE `owned_houses` SET `uhouseTenant` = '0' WHERE `uhouseRTime` <= '0'"); mysql_query("UPDATE `owned_houses` SET `uhouseRent` = '0' WHERE `uhouseRTime` <= '0'"); }