Jump to content
MakeWebGames

Pieces

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Everything posted by Pieces

  1. Re: Buy House with level I understood a small minority of your post...
  2. Re: [MC Codes V2] Paged Hospital & Jail   What's the point? It just has numbers that you click depending on how many people are in hospital....I'll give you an idea of what it looks like... [1][2][3] No screenies needed now.   Good job Karlos! :-D Ahh I see what you mean :)
  3. Re: [MC Codes V2] Paged Hospital & Jail Screenies? :-)
  4. Re: Energy bar Thank you
  5. Re: Energy bar Sorry for being stupid but where do i put it? I tried it in header but just got errors :| if ($ir['maxpower']==0) { $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); }   I replaced the end of that with what you gave me but no luck :?
  6. Hey, could anyone help me in changing the energy bars to 100/100 rather than 100% I have tried but can't seem to figure it out, I expect it's fairly simple and I'm being stupid, but anyway yeah if you can help please do. Thanks
  7. Re: Will,Brave and energy When you ran the installer php you were giving some codes, these were your crons, they look somethinf like this curl http//www.yourgamename.co.uk-somelongasscode
  8. Re: Will,Brave and energy Your crons aren't working.
  9. Re: [mccode v2] Advanced(isher) Level Upgrade Mod. Is it possible to only make the upgrade button appear when they have enough exp. to level up? If so please help xD
  10. Re: [mccode v2] Faction with Armoury   I am attempting this but I'm not gunna promise anything, I'm a newb to coding so... And does your best chain work? and does the chain end after a period of time?
  11. Re: [mccode lite / V1] Basic Forums     <?php session_start(); include "globals.php"; print "<font face='Arial' size='4'>Forums</font><hr width='90%'>"; if ($ir['forum_ban']) { die (" You are banned from the forums for ".number_format($ir['forum_ban'])." more days. The reason for this is {$ir['forum_reason']}. <hr width='90%'>> [url='explore.php']Back[/url]<hr width='90%'>"); } switch ($_GET['view']) { case 'topic': view_topic(); break; case 'section': view_section(); break; case 'reply': reply_forum(); break; case 'edit': edit_reply(); break; case 'editpost': edit_message(); break; case 'newtopic': create_topic(); break; case 'newsect': create_section(); break; default: forums_index(); break; } function forums_index() { global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM `forums_sections` fs LEFT JOIN `users` u ON (u.userid = fs.fsCREATOR) ORDER BY fs.fsID DESC"); $sql = mysql_query($sql); if ($ir['user_level'] == '2') { print "[[url='forums.php?view=newsect']Create Section[/url]] "; } print "<table width='90%' cellspacing='1'><tr bgcolor='#AAAAAA'><td colspan='4'>[b]Public Forums[/b]</td></tr>"; while($r = mysql_fetch_array($sql)) { print "<tr><td width='50%'>[url='forums.php?view=section&ID={$r[']{$r['fsNAME']}[/url] [size="1"][i]{$r['fsDESC']}[/i][/size]</td> <td width='25%'>Started by [url='viewuser.php?u={$r[']{$r['username']}[/url]</td> <td width='25%'>{$r['fsPOSTS']} Topics</td></tr>"; } print "</table><hr width='90%'>"; } function view_section() { global $ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $sql = sprintf("SELECT * FROM `forums_topics` ft LEFT JOIN `users` u ON (u.userid = ft.ftUSER) LEFT JOIN `forums_sections` fs ON (fs.fsID = ft.ftFORUM) WHERE (ft.ftFORUM = %u)", $_GET['ID']); $sql = mysql_query($sql); print "[[url='forums.php?view=newtopic']Create Topic[/url]] "; print "<table width='90%' cellspacing='1'><tr bgcolor='#AAAAAA'><td colspan='3'>[b][url='forums.php']Public Forums[/url][/b]</td></tr>"; while($r = mysql_fetch_array($sql)) { print "<tr><td width='50%'>[url='forums.php?view=topic&ID={$r[']{$r['ftNAME']}[/url] [size="1"][i]{$r['ftDESC']}[/i][/size]</td> <td width='25%'>Started by [url='viewuser.php?u={$r[']{$r['username']}[/url]</td> <td width='25%'>{$r['ftPOSTS']} Posts</td></tr>"; } print "</table><hr width='90%'>"; } function view_topic() { global $ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $sql = sprintf("SELECT * FROM `forums_posts` fp LEFT JOIN `users` u ON (u.userid = fp.fpUSER) LEFT JOIN `forums_topics` ft ON (ft.ftID = fp.fpTOPIC) LEFT JOIN `forums_sections` fs ON (fs.fsID = ft.ftFORUM) WHERE (fp.fpTOPIC = %u)", $_GET['ID']); $sql = mysql_query($sql); print "<table width='90%' cellspacing='1'>"; while($r = mysql_fetch_array($sql)) { print "<tr bgcolor='#AAAAAA'><td colspan='4'>[b][url='forums.php']Public Forums[/url] >> [url='forums.php?view=section&ID={$r[']{$r['fsNAME']}[/url] >> {$r['ftNAME']}[/b]</td></tr> <tr><td width='10%' valign='top'>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}] Level {$r['level']} {$r['posts']} Posts </td> <td width='90%' valign='top'> [b]Subject: [/b]{$r['fpSUBJECT']} "; if ($r['fpUSER'] == $ir['userid']) { print "[[url='forums.php?view=editpost&ID={$r[']Edit[/url]]"; } print " [i]Posted at >".date('F j Y, g:i:s a',$r['fpTIME'])."[/i] <hr />{$r['fpPOST']} </td> </tr>"; } print "</table> <form action='forums.php?view=reply' method='post'> [b]Reply to this Topic:[/b] <input type='hidden' name='ID' value='{$_GET['ID']}' /> Subject <input type='text' name='subject' /> Message <textarea name='message' cols='40' rows='7'></textarea> <input type='submit' value='Reply' /></form> <hr width='90%'>"; } function create_section() { global $ir,$c,$userid,$h; if($ir['user_level'] != '2') { print " You are not permitted to access this area of the forums. <hr width='90%'>> [url='explore.php']Back[/url]<hr width='90%'>"; } else if($_POST['name'] AND $_POST['description']) { $sql = sprintf("INSERT INTO `forums_sections` (`fsID`, `fsNAME`, `fsDESC`, `fsCREATOR`, `fsPOSTS`) VALUES ('NULL','%s', '%s', '%d', '%d')", mysql_real_escape_string($_POST['name']), mysql_real_escape_string($_POST['description']), $userid, 0); mysql_query($sql); print " The {$_POST['name']} forum section was successfully created. <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } else { print " <form action='forums.php?view=newsect' method='post'> Create Forum Section: Name <input type='text' name='name' /> Description <textarea name='description' cols='40' rows='7'></textarea> <input type='submit' value='Create' /></form> <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } } function create_topic() { global $ir,$c,$userid,$h; if($_POST['name'] AND $_POST['description'] AND $_POST['section'] AND $_POST['subject'] AND $_POST['message']) { $_POST['section'] = abs((int) $_POST['section']); $sql = sprintf("INSERT INTO `forums_topics` (`ftID`, `ftFORUM`, `ftNAME`, `ftDESC`, `ftUSER`) VALUES ('NULL','%d', '%s', '%s', '%d')", $_POST['section'], mysql_real_escape_string($_POST['name']), mysql_real_escape_string($_POST['description']), $userid); mysql_query($sql); $i = mysql_insert_id($c); $fm = sprintf("INSERT INTO `forums_posts` (`fpID`, `fpTOPIC`, `fpSUBJECT`, `fpPOST`, `fpUSER`, `fpTIME`) VALUES ('NULL','%d', '%s', '%s', '%d', '%d')", $i, mysql_real_escape_string($_POST['subject']), mysql_real_escape_string($_POST['message']), $userid, time()); mysql_query($fm); $upd = sprintf("UPDATE `forums_sections` SET fsPOSTS = fsPOSTS + 1 WHERE (`fsID` = %u)", $_POST['section']); mysql_query($upd); print " The {$_POST['name']} forum topic was successfully created. <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } else { print " <form action='forums.php?view=newtopic' method='post'> Create Forum Topic: Name <input type='text' name='name' /> Forum <select name='section' type='dropdown'> <option value='0'>None</option>"; $q = sprintf("SELECT * FROM `forums_sections`",$c); $q = mysql_query($q); while($r = mysql_fetch_array($q)) { print "<option value='{$r['fsID']}'>{$r['fsNAME']}</option>"; } print "</select> Description <textarea name='description' cols='40' rows='7'></textarea> [b]First Message:[/b] Subject <input type='text' name='subject' /> Message <textarea name='message' cols='40' rows='7'></textarea> <input type='submit' value='Create' /></form> <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } } function reply_forum() { global $ir,$c,$userid,$h; if($_POST['subject'] AND $_POST['message'] AND $_POST['ID']) { $_POST['ID'] = abs((int) $_POST['ID']); $sql = sprintf("INSERT INTO `forums_posts` (`fpID`, `fpTOPIC`, `fpSUBJECT`, `fpPOST`, `fpUSER`, `fpTIME`) VALUES ('NULL','%d', '%s', '%s', '%d', '%d')", $_POST['ID'], mysql_real_escape_string($_POST['subject']), mysql_real_escape_string($_POST['message']), $userid, time()); mysql_query($sql); $upd = sprintf("UPDATE `forums_topics` SET ftPOSTS = ftPOSTS + 1 WHERE (`ftID` = %u)", $_POST['ID']); mysql_query($upd); $upda = sprintf("UPDATE `users` SET posts = posts + 1 WHERE (`userid` = %u)", $ir['userid']); mysql_query($upda); print " Your reply was successfully posted. <hr width='90%'>> [url='forums.php?view=topic&ID={$_POST[']Back[/url]<hr width='90%'>"; } else { print " You missed one or more of the required fields. Go back and try again. <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } } function edit_message() { global $ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $sql = sprintf("SELECT * FROM `forums_posts` WHERE (fpID = %u)", $_GET['ID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if ($ir['userid'] != $r['fpUSER']) { print " You are not the owner of this message. <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } else { print "<form action='forums.php?view=edit&ID={$_GET['ID']}' method='post'> [b]Edit Message:[/b] Subject <input type='text' name='subject' value='{$r['fpSUBJECT']}' /> Message <textarea name='message' cols='40' rows='7'>{$r['fpPOST']}</textarea> <input type='submit' value='Edit' /></form> <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } } function edit_reply() { global $ir,$c,$userid,$h; $_GET['ID'] = abs((int) $_GET['ID']); $sql = sprintf("SELECT * FROM `forums_posts` WHERE (fpID = %u)", $_GET['ID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if ($ir['userid'] != $r['fpUSER']) { print " You are not the owner of this message. <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } else if($_POST['subject'] AND $_POST['message'] AND $_GET['ID']) { $edit = sprintf("UPDATE `forums_posts` SET `fpSUBJECT` = '%s', `fpPOST` = '%s' WHERE (`fpID` = %u)", mysql_escape_string($_POST['subject']), mysql_escape_string($_POST['message']), $_GET['ID']); mysql_query($edit); print " Your post was successfully edited. <hr width='90%'>> [url='forums.php?view=topic&ID={$_GET[']Back[/url]<hr width='90%'>"; } else { print " You missed one or more of the required fields. Go back and try again. <hr width='90%'>> [url='forums.php']Back[/url]<hr width='90%'>"; } } $h->endpage(); ?>   I think that's right...
  12. Re: [mccode v2] Faction with Armoury I have sorted the above, but found another problem, Best chain does not work i.e the count doesn't go up it just stays at zero, there is also no time limit for you to attack i.e current chain never resets back to zero.
  13. Re: [mccode v2] Faction with Armoury Could someone post the full manage faction? And the working attackwon and attacklost.php I also noticed you can not declare war...
  14. Re: [mccode v2] Lottery Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dynamic/public_html/lottery.php on line 26 :?
  15. Re: Donator Gym V2   Thanks
  16. Re: [mccodes]Updated Education Into V2...i think Please correct it if i have done it wrong :wink:   <?php session_start(); include "globals.php"; if($ir['hospital']) { print"You are in the hospital you cant do an education course now"; } else if($ir['jail']) { print"You are in jail you cant do an education course now"; } else { print "<h3>Grounds Of War Course's</h3>"; // Fix for negative training days if($ir['cdays'] < 0) { mysql_query("UPDATE users SET course=0 ,cdays=0 WHERE userid=$userid",$c); } if($ir['course'] > 0) { $cd=mysql_query("SELECT * FROM courses WHERE crID={$ir['course']}",$c); $coud=mysql_fetch_array($cd); print "You are currently doing the {$coud['crNAME']}, you have {$ir['cdays']} days remaining."; } else { if($_GET['cstart']) { $_GET['cstart'] = abs((int) $_GET['cstart']); //Verify. $cd=mysql_query("SELECT * FROM courses WHERE crID={$_GET['cstart']}",$c); if(mysql_num_rows($cd) == 0) { print "You are trying to start a non-existant course!"; } else { $coud=mysql_fetch_array($cd); $cdo=mysql_query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid={$_GET['cstart']}",$c); if($ir['money'] < $coud['crCOST']) { print "You don't have enough money to start this course."; $h->endpage(); exit; } if(mysql_num_rows($cdo) > 0) { print "You have already done this course."; $h->endpage(); exit; } mysql_query("UPDATE users SET course={$_GET['cstart']},cdays={$coud['crDAYS']},money=money-{$coud['crCOST']} WHERE userid=$userid",$c); print "You have started the {$coud['crNAME']}, it will take {$coud['crDAYS']} days to complete."; } } else { //list courses print "Here is a list of available courses."; //FITNESS courses $qf=mysql_query("SELECT * FROM courses WHERE crCAT='Fitness' ",$c); print " <table width=70% class='forumline'><tr style='background:gray;'><th colspan=3>Fitness Course's</th></tr><tr style='background:gray;'><th>Course</th><th>Cost</th><th>Take</th></tr>"; while($fit=mysql_fetch_array($qf)) { $cdo=mysql_query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid={$fit['crID']}",$c); if(mysql_num_rows($cdo)) { $do="Done</a>"; } else { $do="[url='education.php?cstart={$fit[']Take[/url]"; } print "<tr><td>{$fit['crNAME']}</td><td>\${$fit['crCOST']}</td><td>$do</td>"; } //MANUAL LABOUR COURSES $qm=mysql_query("SELECT * FROM courses WHERE crCAT='Manual Labour' ",$c); print "<tr style='background:gray;'><th colspan=3>Manual Labour Course's</th></tr> <tr style='background:gray;'><th>Course</th><th>Cost</th><th>Take</th></tr>"; while($man=mysql_fetch_array($qm)) { $cdo=mysql_query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid={$man['crID']}",$c); if(mysql_num_rows($cdo)) { $do="Done</a>"; } else { $do="[url='education.php?cstart={$man[']Take[/url]"; } print "<tr><td>{$man['crNAME']}</td><td>\${$man['crCOST']}</td><td>$do</td></tr>"; } print " "; $qi=mysql_query("SELECT * FROM courses WHERE crCAT='Intelligence' ",$c); print "<tr style='background:gray;'><th colspan=3>Intelligence Course's</th></tr> <tr style='background:gray;'><th>Course</th><th>Cost</th><th>Take</th></tr>"; while($intel=mysql_fetch_array($qi)) { $cdo=mysql_query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid={$intel['crID']}",$c); if(mysql_num_rows($cdo)) { $do="Done</a>"; } else { $do="[url='education.php?cstart={$intel[']Take[/url]"; } print "<tr><td>{$intel['crNAME']}</td><td>\${$intel['crCOST']}</td><td>$do</td></tr>"; } $qmi=mysql_query("SELECT * FROM courses WHERE crCAT='Miscellaneous' ",$c); print "<tr style='background:gray;'><th colspan=3>Miscellanous Course's</th></tr> <tr style='background:gray;'><th>Course</th><th>Cost</th><th>Take</th></tr>"; while($mis=mysql_fetch_array($qmi)) { $cdo=mysql_query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid={$mis['crID']}",$c); if(mysql_num_rows($cdo)) { $do="Done</a>"; } else { $do="[url='education.php?cstart={$mis[']Take[/url]"; } print "<tr><td>{$mis['crNAME']}</td><td>\${$mis['crCOST']}</td><td>$do</td></tr>"; } print "</table>"; } } } $h->endpage(); ?>
  17. Re: Donator Gym V2   There's quite a few around this forum or just make your own. If i could make my own i would but I'm a total newb at coding :?
  18. Re: Simple Template V2 Oops just looked at the code saw the .css and assumed..and apart from having to change 'stuff' to 'class' it works fine :)
  19. Re: Simple Template V2 Need the css....
  20. Re: Donator Gym V2 In my opinion you already gain far too much stat wise in the standard Mccode gym but that's just me...anybody got a decent gym I could have?
  21. Re: [mccode v2] Stock Market. Working + Secured +1...Had the old stock market which didn't work so thanks :-)
×
×
  • Create New...