Jump to content
MakeWebGames

SpEcKs

Members
  • Posts

    152
  • Joined

  • Last visited

    Never

Everything posted by SpEcKs

  1. Re: [Mccodes V2] Top 5 Users No this one doesent work it shows the whole login normally but where the top 5 users is meant to be it says this error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/specks/public_html/login.php on line 198 # Username Level
  2. Re: [Mccodes V2] Top 5 Users I have posted my login at the top please can one of you just edit it and post it back please
  3. Re: [MOD V2] Send Users Secret Messages.... this is good but whats the point in it why not just send them a mail its only staff who can read the mails that have been sent anway
  4. Re: [Mccodes V2] New Jobs thanks it only took about 10 minutes
  5. Re: [Mccodes V2] Top 5 Users POG's one doesent work i put it under the 'contact us' and it comes up with this error: Parse error: syntax error, unexpected T_STRING in /*******/******/**********/login.php on line 190 Any ideas
  6. Re: [mccodes v2]New and improved inventory code sources for free! Yeh but i actually have Where it has pictures and the more you use the weapons the worse the weapons look and you have to repair them :)
  7. Re: [Mccodes V2] Top 5 Users But will that look like that in a table 1. Username | Level 2. Username | Level 3. Username | Level 4. Username | Level 5. Username | Level And i do not want it to show NPC's
  8. does anyone know how i would put the top 5 users onto my login page like this 1. Username | Level 2. Username | Level 3. Username | Level 4. Username | Level 5. Username | Level Here is my login if you want to edit and post back here.   <?php session_start(); include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); $q=$db->query("SELECT userid FROM users"); $membs=$db->num_rows($q); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $q=$db->query("SELECT userid FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); $r1=$db->num_rows($q); print <<<EOF <html> <head> <title>The Corrupt Life</title> <style type="text/css">textarea,input,select { font-family: tahoma; color: #ffffff; font-weight: bold; color: #ffffff; background-image:url(baa.jpg); background-color: black;a border-width: 1; border-color: #ffffff; border-style: Solid; font-size: 13px; } body { background-color: black; } a:visited,a:active,a:link { color: black;text-decoration: underline; } a:hover {color: red;text-decoration: underline; } table,tr,td { font-family:Tahoma, Tahoma, Tahoma, Tahoma;font-size: 10pt; } img { border:none; } textarea { font-family:Tahoma;font-size:10pt;color: black; } table { font-family: Tahoma;font-size:10pt;color: black; background-repeat: no-repeat; } h5.desc_abs { position:absolute; left:510px; top:325px } h5.copyright_abs { position:absolute; left:420px; top:470px } span.highlight { background-color:#202020 } .ur{background: url(loginpass.png); width: 180px; height: 25px; border: none; padding-left: 3px; padding-right: 3px; padding-top: 5px;} .loginbutton{background: url(loginbutton.png); width: 70px; height: 25; padding-bottom: 2px; cursor: pointer; border: none;} img{border: none;} </style></head> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie('player') != null) { usr.value = GetCookie('username') pw.value = GetCookie('password') if (GetCookie('save') == 'true') { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie('username', usr.value, expdate); SetCookie('password', pw.value, expdate); SetCookie('save', 'true', expdate); } if (sv[1].checked) { DeleteCookie('username'); DeleteCookie('password'); DeleteCookie('save'); } } else { alert('You must enter a username/password.'); return false; } } </script> </head> EOF; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("[b]<font color=red size=+1>Your IP has been banned!/font>[/b]</body></html>"); } print " <center> <table width=805 height=231 border=0 cellpadding=0 cellspacing=0 align=center> <tr><td background='blank top.png' width='805'></td></tr> </table> <table width=805 height=363 border=0 cellpadding=0 cellspacing=0 align=center> <tr background='bottom.png' width='805' height='363' valign='top'><td width='103'></td><td width='110'><center> [b][url='login.php']Login[/url] [url='#']Register <font color='red'>[Not Open][/url] [url='#']Screenshots[/url] [url='#']Forgot Password[/url] [url='#']Contact Us[/url][/b] </td><td width='20'></td> <td> <form action=authenticate.php method=post name=login onsubmit=\"return saveme();\"><center> The Corrupt Life is an MMORPG with lots of potential. There's no sign up fee and you can play for absolutely free. Register now to see if you can be the strongest and most respected player! Username <input class=ur type=text name=username> Password <input class=ur type=password name=password> Remember me? <input type=\"radio\" value=\"ON\" name=\"save\">Yes <input type=\"radio\" name=\"save\" value=\"OFF\" checked>No <input type=submit value=LOGIN class=loginbutton ></form></td></tr></table> "; print <<<OUT </body></html> OUT; ?>   IF YOU CAN DO THIS PLEASE CAN YOU PUT IT UNDER MY 'CONTACT US' PLEASE THANKS
  9. Re: [mccode v2] ADVANCED USERSONLINE MOD i used this and its good
  10. Re: [mccodes v2]New and improved inventory code sources for free! This is a good mod but i wont beusing this as i have a better inventory
  11. This is like my 2nd ever mod so please dont post anything bad about it It is for people who cant be bothered to edit their own job.php all you do is replace job.php with this <?php $jobquery=1; include "globals.php"; $_GET['interview'] = abs((int) $_GET['interview']); if(!$ir['job']) { if(!$_GET['interview']) { print "You do not yet have a job. A list of jobs is available below. "; $q=$db->query("SELECT * FROM jobs"); while($r=$db->fetch_row($q)) { print "<table width='500' cellspacing=1 class='table'><tr style='background:gray;'><th><center>{$r['jNAME']}</th></table><table width='500' cellspacing=1 class='table'><tr style='background:gray;'><td><center>{$r['jDESC']}</td></table><table width='500' cellspacing=1 class='table'><tr style='background:gray;'><td><center>[url='job.php?interview={$r[']Go to interview[/url]</td></table> "; } } else { $q=$db->query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID={$_GET['interview']}"); $r=$db->fetch_row($q); print "{$r['jOWNER']}: So {$ir['username']}, you were looking for a job with us? {$ir['username']}: Yes please! "; if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;"); print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow. {$ir['username']}: Thanks! [url='job.php']:)[/url]"; } else { print "{$r['jOWNER']}: Sorry {$ir['username']}, you're not far enough in the game to work in this job. You'll need:"; if($ir['strength'] < $r['jrSTRN']) { $s=$r['jrSTRN']-$ir['strength']; print " $s more strength, "; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; print " $s more labour, "; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; print " $s more IQ, "; } print "before you'll be able to work here! [url='index.php']:'([/url]"; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $db, $ir,$c,$userid,$h; print "<h3>Your Job</h3> You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} each day at 5pm! You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour! <table width=50% cellspacing=1 class='table'><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table> [b]Job Ranks[/b] <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th></tr>"; $q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>"; } print "</table> [url='job.php?action=promote']> Try To Get Promoted[/url] [url='job.php?action=quit']> Quit[/url]"; } function job_promote() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"); if($db->num_rows($q) == 0) { print "Sorry, you cannot be promoted at this time. [url='job.php']> Back[/url]"; } else { $r=$db->fetch_row($q); $db->query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid"); print "Congrats, you have been promoted to {$r['jrNAME']} [url='job.php']> Back[/url]"; } } function quit_job() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET job=0,jobrank=0 WHERE userid=$userid"); print "You have quit your job! [url='job.php']> Back[/url]"; } $h->endpage(); ?> And thats it, hope you like it
  12. Re: [mccode v2] Lottery   <?php include ("./config.php"); global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; include("./global_func.php"); $sql = $db->query("SELECT * FROM `lottery`"); $rows = $db->num_rows($sql); $row = $db->fetch_row($sql); $winner = rand(3,$rows); $winnerq = sprintf("SELECT `userid` FROM `lottery` WHERE `id` = %d", $winner); $winnerq1 = $db->query($winnerq); $user = $db->fetch_row($winnerq1); $user2 = $db->fetch_row($winnerq1); $user3 = $db->fetch_row($winnerq1); $1win = $row['jackpot'] / 2 ; $2win = $row['jackpot'] / 2 ; $3win = $row['jackpot'] / 2 ; $credit = sprintf("UPDATE `users` SET `money` = `money` + %d WHERE `userid` = (%u)", $row['jackpot'], $user['userid']); event_add($user['userid'],"You came 1st in the weekly lottery and were credited \$$1win",$c); event_add($user2['userid'],"You came 2nd in the weekly lottery and were credited \$$2win",$c); event_add($user3['userid'],"You came 3rd in the weekly lottery and were credited \$$3win",$c); $db->query("INSERT INTO announcements VALUES('User ID {$user['userid']} won the weekly lottery. Well done!', unix_timestamp())"); $db->query("UPDATE users SET new_announcements=new_announcements+1"); $db->query("UPDATE `users` SET `lottery` = 0"); $db->query("TRUNCATE TABLE `lottery`"); $update = sprintf("UPDATE `lottery` SET `jackpot` = %d", 500000); $db->query($update); ?>   Cron_weekly.php this does not work but does anyone have anything which will make there be three winners
  13. Re: [mccode v2] Lottery It would be good aswell if you could make a page where it had the recent winners of the lottery and the money they won
  14. Re: [mccode v2] Index.php Update Good Good Index.php it would be better if it had the attack record as well :wink:
  15. Re: [mccode v2] Lottery So can anyone do that where there is three winners and they split it like say the jackpot is $10,000,000 1st - $5,000,000 of the full jackpot 2nd - $2.5,000,000 of the full jackpot 3rd - $1,000,000 of the full jackpot
  16. Re: [v1]Attack Stats FREE[v1] so does this work ?
  17. Re: Simple Trades [V2] and also does this stop multi's from trading because this is just like sending things
  18. Re: Simple Trades [V2] this is good but some people might just do this to look at the other persons inventory
  19. Re: [Free V2] Lottery anyone
  20. Re: [Free V2] Lottery   can someone please reply coz i am a N0OB ???
  21. Re: [Free V2] Lottery anyone ???????
  22. Re: [V2] SafeHouse it would be good if you could hire like an assassin to find them and attack them for you but it would cost alot of money :)
  23. Re: [Free V2] Lottery how would i make it so there is 3 winners so like the person who comes first gets 1/2 of the amount, then the person who comes second gets 1/3 of the amount, then the person who come third gets 1/5 of the amount and then the money left over goes to the next weeks jackpot ? can it be done ??? ---------------------------- and also how do i make it so the jackpot starts at $500,000 every week, would i add this to the cron_weekly.php? $db->query("UPDATE `lottery` SET `jackpot` = 500000");
  24. Re: Ajax Chat my edition dont work when tyou try to add the text that you want to say ??? any idea's
  25. Re: [Free V2] Lottery thanks m8 that is good thanks :-)
×
×
  • Create New...