Jump to content
MakeWebGames

bloodless2010

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by bloodless2010

  1. It's REALLY easy to change the login layout, the ingame has the same FEATURES EXACTLY. What other engine has Fed Jail in the exact same font + colour, size, layout? Do some investigating yourself. It is mccodes v2.
  2. Go on it; howaboutno password (username password) It's definately McCodes v2. (Nevermind the account got fed jailed - DEFINATELY McCodes v2!!)
  3. Hi, I have reported the website http://pimpcityrpg.com (via http://license.mccodes.com/index.php) And I just wanted to reported it here to make sure, It's definately a copy of V2, and it's not using a liscence. The user is on here too, his username is : http://makewebgames.io/member.php/68706-Razor42 and skype is : aaron.razor42 Thank you for your time.
  4. My host have cronjobs but the they wont work, I'm using unix timestamp for the 1min & 5min. But my daily one is broken (cronjob) so I'm going to use unix_timestamp instead, but the code is a bit more complicated.. So here's my 1min unix timestamp code: <?php ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $result = mysql_query("SELECT * FROM `updates` WHERE `name` = '1min'"); $result = mysql_fetch_assoc($result); $hla = time() - $result['last']; if($hla > (60)) { $hphp = $ir['maxhp'] / 6.6; $n = floor($hla / 60); $hospital = (1 * $n); $jail = (1 * $n); $hp = ($hphp * $n); $val = (1 * $n); $pt = (1 * $n); $cht = (1 * $n); $query_hos = sprintf("UPDATE users SET hospital = hospital - %u WHERE hospital <> 0", $hospital); $query_jail = sprintf("UPDATE users SET jail = jail - %u WHERE jail <> 0", $jail); $query_hp = sprintf("UPDATE users SET hp = hp + %u WHERE hp <> maxhp", $hp); $query_val = sprintf("UPDATE users SET validation = validation - %u WHERE validation <> 0", $val); $query_prot = sprintf("UPDATE users SET protection = protection - %u WHERE protection <> 0", $pt); $query_canh = sprintf("UPDATE users SET canhire = canhire - %u WHERE canhire <> 0", $cht); mysql_query($query_hos); mysql_query($query_jail); mysql_query($query_hp); mysql_query($query_val); mysql_query($query_prot); mysql_query($query_canh); mysql_query("UPDATE `users` SET `hospital` = 0 WHERE `hospital` < 0"); mysql_query("UPDATE `users` SET `jail` = 0 WHERE `jail` < 0"); mysql_query("UPDATE `users` SET `hp` = `maxhp` WHERE `hp` > `maxhp`"); mysql_query("UPDATE `users` SET `validation` = 0 WHERE `validation` < 0"); mysql_query("UPDATE `users` SET `protection` = 0 WHERE `protection` < 0"); mysql_query("UPDATE `users` SET `canhire` = 0 WHERE `canhire` < 0"); $time = time(); mysql_query("UPDATE `updates` SET `last` = ".$time." WHERE `name` = '1min'"); $floor = $time - (floor($time / 60) * 60); if($floor > 0) { $newUpdate = time() - $floor; mysql_query("UPDATE `updates` SET `last` = ".$newUpdate." WHERE `name` = '1min'"); } } ?> and here's my cron_day.php <?php /* MCCodes FREE crons/cron_day.php Rev 1.1.0 Copyright (C) 2005-2012 Dabomstew This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ require_once "mysql2.php"; require_once "global_func.php"; $cron_code = 'xxxxxxxxxxxxxxxxxx'; if ($argc == 2) { if ($argv[1] != $cron_code) { exit; } } else if (!isset($_GET['code']) || $_GET['code'] !== $cron_code) { exit; } mysql_query("UPDATE `fedjail` SET `fed_days` = `fed_days` - 1", $c); mysql_query("UPDATE `users` SET `turns` = 100", $c); $q = mysql_query("SELECT * FROM `fedjail` WHERE `fed_days` <= 0", $c); $ids = array(); while ($r = mysql_fetch_assoc($q)) { $ids[] = $r['fed_userid']; } mysql_free_result($q); if (count($ids) > 0) { mysql_query( "UPDATE `users` SET `fedjail` = 0 WHERE `userid` IN(" . implode(",", $ids) . ")", $c); } mysql_query("DELETE FROM `fedjail` WHERE `fed_days` <= 0", $c); mysql_query("UPDATE `users` SET `dreward` = 1", $c); mysql_query("UPDATE `users` SET `datotal` = 0", $c); mysql_query("UPDATE users SET canrate = 1 WHERE donatordays = 0", $c); mysql_query("UPDATE users SET canrate = 2 WHERE donatordays > 1", $c); mysql_query("UPDATE users SET noobprotection=noobprotection-1 WHERE noobprotection > 0", $c); mysql_query("UPDATE users SET sbban=sbban-1 WHERE sbban > 0",$c); mysql_query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $user_update_query = "UPDATE `users` SET `daysold` = `daysold` + 1, `mailban` = `mailban` - IF(`mailban` > 0, 1, 0), `donatordays` = `donatordays` - IF(`donatordays` > 0, 1, 0), `cdays` = `cdays` - IF(`course` > 0, 1, 0), `bankmoney` = `bankmoney` + IF(`bankmoney` > 0, `bankmoney` / 50, 0), `cybermoney` = `cybermoney` + IF(`cybermoney` > 0, `cybermoney` / 100 * 7, 0)"; mysql_query($user_update_query, $c); $q = mysql_query( "SELECT `userid`, `course` FROM `users` WHERE `cdays` <= 0 AND `course` > 0", $c); $course_cache = array(); while ($r = mysql_fetch_assoc($q)) { if (!array_key_exists($r['course'], $course_cache)) { $cd = mysql_query( "SELECT `crSTR`, `crGUARD`, `crLABOUR`, `crAGIL`, `crIQ`, `crNAME` FROM `courses` WHERE `crID` = {$r['course']}", $c); $coud = mysql_fetch_assoc($cd); mysql_free_result($cd); $course_cache[$r['course']] = $coud; } else { $coud = $course_cache[$r['course']]; } $userid = $r['userid']; mysql_query( "INSERT INTO `coursesdone` VALUES({$r['userid']}, {$r['course']})", $c); $upd = ""; $ev = ""; if ($coud['crSTR'] > 0) { $upd .= ", us.strength = us.strength + {$coud['crSTR']}"; $ev .= ", {$coud['crSTR']} strength"; } if ($coud['crGUARD'] > 0) { $upd .= ", us.guard = us.guard + {$coud['crGUARD']}"; $ev .= ", {$coud['crGUARD']} guard"; } if ($coud['crLABOUR'] > 0) { $upd .= ", us.labour = us.labour + {$coud['crLABOUR']}"; $ev .= ", {$coud['crLABOUR']} labour"; } if ($coud['crAGIL'] > 0) { $upd .= ", us.agility = us.agility + {$coud['crAGIL']}"; $ev .= ", {$coud['crAGIL']} agility"; } if ($coud['crIQ'] > 0) { $upd .= ", us.IQ = us.IQ + {$coud['crIQ']}"; $ev .= ", {$coud['crIQ']} IQ"; } $ev = substr($ev, 1); mysql_query( "UPDATE `users` AS `u` INNER JOIN `userstats` AS `us` ON `u`.`userid` = `us`.`userid` SET `u`.`course` = 0{$upd} WHERE `u`.`userid` = {$userid}", $c); event_add($userid, "Congratulations, you have completed the {$coud['crNAME']} course and gained {$ev}!", $c); } mysql_free_result($q); I'm not sure how I can make the cron_day work properly, if anyone could help me or start me off I would really appreciate it.. There's atleast one person playing every day, so I was wondering if this could be simple-ised (lol) Instead of making it * $n it could just only execute once a day? How can I make the code only execute once per day using timestamps? thanks.
  5. Didn't mean for it to sound angry, sorry. Could you please explain a bit more then? the action is being checked towards 2 things (Give or Take) otherwise nothing will happen.
  6. First of all, I'm using $_GET['u'] = abs((int) $_GET['u']); already, and second of all, I don't need to secure $_GET['action'] because it isn't being inserted into the database at all. And yes I'm using the 1 rate or 2 rate per day because that's how I like it to be, I wouldn't want users rating a bunch of people every day. I think it's fair like that
  7. Hi! I made this feature in V1, but I'm pretty sure it should work fine (mostly) in V2, if anyone can convert, would be awesome! About this mod - Quite a simple mod that allows users to either +1 or -1 a user daily, normal users can rate a user once a day, but donators can rate twice. First of all, go into phpmyadmin and run these 2 SQL's alter table users add rate not null default 0; and alter table users add canrate not null default 1; -Rate is the current users rating -Canrate is the amount of ratings a user can currently give giverate.php; <?php // Give a rate // Mod by bloodless2010 // Please keep this here session_start(); 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']); $cm = money_formatter($ir['crystals'], ''); $lv = date('F j, Y, g:i a', $ir['laston']); $h->userdata($ir, $lv, $fm, $cm); $h->menuarea(); $_GET['u'] = abs((int) $_GET['u']); if (!$_GET['u']) { print "No user selected!"; die($h->endpage()); } if (!$_GET['action']) { print "No action selected!"; die($h->endpage()); } $q = mysql_query("SELECT userid FROM users WHERE userid={$_GET['u']}", $c); if (mysql_num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; die($h->endpage()); } if (!$_GET['action'] && !$_GET['u']) { print "Incorrect use of file"; die($h->endpage()); } if ($ir['canrate'] == 0) { print "You cannot give any more ratings today! 1 per day for non-donators, and 2 per day or donators!"; die($h->endpage()); } if ($_GET['u'] == $ir['userid']) { print "You can't give yourself a rating!"; die($h->endpage()); } if ($_GET['action'] == "give") { mysql_query("UPDATE users SET rate=rate+1 WHERE userid={$_GET['u']}", $c); mysql_query("UPDATE users SET canrate=canrate-1 WHERE userid={$ir['userid']}", $c); $b = mysql_query("SELECT username,rate FROM users WHERE userid={$_GET['u']}", $c); $a = mysql_fetch_array($b); print "You have given 1 rating to {$a['username']}!<br /> Their rating is now {$a['rate']}!"; die($h->endpage()); }else if ($_GET['action'] == "take") { mysql_query("UPDATE users SET rate=rate-1 WHERE userid={$_GET['u']}", $c); mysql_query("UPDATE users SET canrate=canrate-1 WHERE userid={$ir['userid']}", $c); $b = mysql_query("SELECT username,rate FROM users WHERE userid={$_GET['u']}", $c); $a = mysql_fetch_array($b); print "You have taken 1 rating from {$a['username']}!<br /> Their rating is now {$a['rate']}!"; die($h->endpage()); }else{ print "Unknown action!"; die($h->endpage()); } $h->endpage(); Add this to viewuser.php where you want it; if ($r['rate'] == 0) { $rate = "<font color='blue'>{$r['rate']}</font>"; }else if ($r['rate'] > 0) { $rate = "<font color='green'>{$r['rate']}</font>"; }else if ($r['rate'] < 0) { $rate = "<font color='red'>{$r['rate']}</font>"; } print "Rating: [<a href='giverate?u={$r['userid']}&action=take'>-</a>] {$rate} [<a href='giverate?u={$r['userid']}&action=give'>+</a>]<br/>"; And finally, you want to make it so they can rate again at the end of the day ! :) add this to your daily cron file; mysql_query("UPDATE users SET canrate = 1 WHERE donatordays = 0", $c); mysql_query("UPDATE users SET canrate = 2 WHERE donatordays > 1", $c); If you used, feel free to say thank you below :) Also - If you guys want, I can post the hall of fame code for it! (for most ratings and lowest ratings) :p
  8. Hi! So recently I was looking through the archive and I saw someone asking how to put the seconds left in the message where it says your jail/hospital time, he got a bunch of replies saying use unix timestamp, but I instantly thought, why would you need that? This came into my head straight away: Cronjobs are usually synched with the server time, as I'm using timestamps to update my minutes on my game (instead of cronjobs) it's perfectly in synch with the time. So I did this very simple code: In header.php: if($ir['jail'] > 0){ $jtest = date("s"); $jailsec = 60 - $jtest; echo "<center><b>You are currently in jail for {$ir['jail']} minutes and $jailsec seconds.</b></center>";} if($ir['hospital'] > 0){ $htest = date("s"); $hospsec = 60 - $htest; echo "<center><b>You are currently in hospital for {$ir['hospital']} minutes and $hospsec seconds.</b></center><br />";} It's so simple, you don't need to do add any unix timestamps to use with the minutes, this is perfect and simple! and a nice little addition, Please let me know if it works fine with cronjobs! :) This is my first mod, but hey, everyone has got to start somewhere?   -- I made this in V1, it should work in V2, If it doesn't, could someone please convert it? :)
  9. I don't really need the (*) but I just used it to try and make it work just incase that was it, forgot to mention that it only gives the error if you're the highest jobrank that you can get, SELECT * FROM jobranks WHERE jrPAY > 0 AND jrSTRN <= 10 AND jrLABOURN <= 10 AND jrIQN <= 10 AND jrJOB =1 ORDER BY jrPAY DESC LIMIT 1 returns Showing rows 1 - 0 ( 1 total, Query took 0.0004 sec) [jrPAY: 250 - 250] jrID jrNAME jrJOB jrPAY jrIQG jrLABOURG jrSTRG jrIQN jrLABOURN jrSTRN 1 Recruit 1 250 1 2 4 5 10 10 The second query returns the same thing.
  10. Okay I have a small problem: I get this error: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/royal857/public_html/job.php on line 126 function job_promote() { global $ir,$c,$userid,$h; $getjobq = mysql_query("SELECT * FROM jobranks WHERE jrJOB={$ir['jobrank']}", $c); $getjob = mysql_fetch_array($getjobq); $queryjob = mysql_query("SELECT * FROM jobranks WHERE jrPAY > {$getjob['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1", $c); $jobthing = mysql_num_rows($queryjob); if($jobthing > 0) { $r = mysql_fetch_array($queryjob); mysql_query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid", $c); print "Congratulations, you have been promoted to {$r['jrNAME']}<br /> <a href='job.php'>> Back</a>"; } else { print "Sorry, you cannot be promoted at this time.<br /> <a href='job.php'>> Back</a>"; } } Line #126 is $jobthing = mysql_num_rows($queryjob); Thank you!
  11. Well in my opinion it isn't worth £5, goodluck with sales.
  12. Looks like, but I don't really think it's worth £5.. I bought a proffesional epic template from Razor for £10 (Which is major CSS, proffesion gfx, and it has login ect and ingame) Not worth £5 though, sorry.
  13. OKAY, so on my criminal.php page I want the table to have like the percentage of EXP you will gave for doing that crime, I currently have: $EXP = (int) ($r2['crimeSUCCESSMUNY'] / 25); //$1,000 / 25 = 40 EXP $needexp = (int) (($ir['level'] + 1) * ($ir['level'] + 1) * ($ir['level'] + 1) * 2.2); //6036.8 EXP need to level to level 14 $EXP2 = (int) $needexp / 100 * $EXP; // 2414.72 $EXP = "$EXP2%"; but it returns a crazy amount like 2414.72%, which would level the user up like 24 times. (Whereas it's only meant to be like 2/4%) Your support is much appreciated thank you EDIT: Nevermind sorry I have done it myself was using the wrong sum!
  14. Yeah, I was thinking of that, but I don't want to edit ALL of my files, I don't fancy that ATM, Is it possible to check the URL that it's running at and die / continue from there, i.e if the URL is my domain then it can run, else die.
  15. Hey there. I have a question about the MySQL.php file, Isn't it possible someone can include the file from your website (In this case the mysql.php) and then use it to connect to your database? Is it possible to stop this? I.e hotlink protection maybe? Thanks.
  16. Hey, I just want to know if this blacklist.php is fixed: <?php /* MCCodes FREE blacklist.php Rev 1.1.0b Copyright (C) 2005-2012 Dabomstew This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ session_start(); 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']); $cm = money_formatter($ir['crystals'], ''); $lv = date('F j, Y, g:i a', $ir['laston']); $h->userdata($ir, $lv, $fm, $cm); $h->menuarea(); if ($ir['donatordays'] == 0) { die("This feature is for donators only."); } print "<h3>Black List</h3>"; switch ($_GET['action']) { case "add": add_enemy(); break; case "remove": remove_enemy(); break; case "ccomment": change_comment(); break; default: black_list(); break; } function black_list() { global $ir, $c, $userid; print "<a href='blacklist.php?action=add'>> Add an Enemy</a><br /> These are the people on your black list. "; $q_y = mysql_query("SELECT * FROM blacklist WHERE bl_ADDED=$userid", $c); print mysql_num_rows($q_y) . " people have added you to their list.<br />Most hated: ["; $q2r = mysql_query( "SELECT u.username,u.username_color,count( * ) as cnt,bl.bl_ADDED FROM blacklist bl LEFT JOIN users u on bl.bl_ADDED=u.userid GROUP BY bl.bl_ADDED ORDER BY cnt DESC LIMIT 5", $c) or die(mysql_error()); $r = 0; while ($r2r = mysql_fetch_array($q2r)) { $r++; if ($r > 1) { print " | "; } print "<a href='viewuser.php?u={$r2r['bl_ADDED']}'><font color='{$r2r['username_color']}'>{$r2r['username']}</font></a>"; } print "] <table width=90%><tr style='background:gray'> <th>ID</th> <th>Name</th> <th>Mail</th> <th>Attack</th> <th>Remove</th> <th>Comment</th> <th>Change Comment</th> <th>Online?</th></tr>"; $q = mysql_query( "SELECT bl.*,u.* FROM blacklist bl LEFT JOIN users u ON bl.bl_ADDED=u.userid WHERE bl.bl_ADDER=$userid ORDER BY u.username ASC", $c); while ($r = mysql_fetch_array($q)) { if ($r['laston'] >= time() - 15 * 60) { $on = "<font color=green><b>Online</b></font>"; } else { $on = "<font color=red><b>Offline</b></font>"; } $d = ""; if ($r['donatordays']) { $d = "<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; } if (!$r['bl_COMMENT']) { $r['bl_COMMENT'] = "N/A"; } print "<tr> <td>{$r['userid']}</td> <td><a href='viewuser.php?u={$r['userid']}'><font color='{$r['username_color']}'>{$r['username']}</font></a> $d</td> <td><a href='mailbox.php?action=compose&ID={$r['userid']}'>Mail</a></td> <td><a href='attack.php?ID={$r['userid']}'>Attack</a></td> <td><a href='blacklist.php?action=remove&f={$r['bl_ID']}'>Remove</a></td> <td>{$r['bl_COMMENT']}</td> <td><a href='blacklist.php?action=ccomment&f={$r['bl_ID']}'>Change</a></td> <td>$on</td></tr>"; } } function add_enemy() { global $ir, $c, $userid; $_POST['ID'] = abs((int) $_POST['ID']); $_POST['comment'] = mysql_real_escape_string( nl2br( htmlentities(stripslashes($_POST['comment']), ENT_QUOTES, 'ISO-8859-1')), $c); if ($_POST['ID']) { $qc = mysql_query( "SELECT * FROM blacklist WHERE bl_ADDER=$userid AND bl_ADDED={$_POST['ID']}", $c); $q = mysql_query( "SELECT * FROM users WHERE userid={$_POST['ID']}", $c); if (mysql_num_rows($qc)) { print "You cannot add the same person twice."; } else if ($userid == $_POST['ID']) { print "You cannot be so lonely that you have to try and add yourself."; } else if (mysql_num_rows($q) == 0) { print "Oh no, you're trying to add a ghost."; } else { mysql_query( "INSERT INTO blacklist VALUES(NULL, $userid, {$_POST['ID']}, '{$_POST['comment']}')", $c) or die(mysql_error()); $r = mysql_fetch_array($q); print "<font color='{$r['username_color']}'>{$r['username']}</font> was added to your black list.<br /> <a href='blacklist.php'>> Back</a>"; } } else { $_GET['ID'] = (isset($_GET['ID']) && is_numeric($_GET['ID'])) ? abs(intval($_GET['ID'])) : ''; print "Adding an enemy!<form action='blacklist.php?action=add' method='post'> Enemy's ID: <input type='text' name='ID' value='{$_GET['ID']}' /><br /> Comment (optional): <br /> <textarea name='comment' rows='7' cols='40'></textarea><br /> <input type='submit' value='Add Enemy' /></form>"; } } function remove_enemy() { global $ir, $c, $userid; $_GET['f'] = abs((int) $_GET['f']); mysql_query( "DELETE FROM blacklist WHERE bl_ID={$_GET['f']} AND bl_ADDER=$userid", $c); print "Black list entry removed!<br /> <a href='blacklist.php'>> Back</a>"; } function change_comment() { global $ir, $c, $userid; $_POST['f'] = abs((int) $_POST['f']); $_POST['comment'] = mysql_real_escape_string( nl2br( htmlentities(stripslashes($_POST['comment']), ENT_QUOTES, 'ISO-8859-1')), $c); if ($_POST['comment']) { mysql_query( "UPDATE blacklist SET bl_COMMENT='{$_POST['comment']}' WHERE bl_ID={$_POST['f']} AND bl_ADDER=$userid", $c); print "Comment for enemy changed!<br /> <a href='blacklist.php'>> Back</a>"; } else { $_GET['f'] = abs((int) $_GET['f']); $q = mysql_query( "SELECT * FROM blacklist WHERE bl_ID={$_GET['f']} AND bl_ADDER=$userid", $c); if (mysql_num_rows($q)) { $r = mysql_fetch_array($q); $comment = str_replace('<br />', "\n", $r['bl_COMMENT']); print "Changing a comment.<form action='blacklist.php?action=ccomment' method='post'> <input type='hidden' name='f' value='{$_GET['f']}' /><br /> Comment: <br /> <textarea rows='7' cols='40' name='comment'>$comment</textarea><br /> <input type='submit' value='Change Comment' /></form>"; } else { print "Stop trying to edit comments that aren't yours."; } } } print "</table>"; $h->endpage(); Atleast I think it is, I just want to know from the pros xD Thanks!
  17. Too modified to be GL, Definatelly not MCC, Or GRPG, Looks a lot like Way of The Mafia script, but the template is modified.
  18. Works like a charm, thanks!
  19. I did forget to mention I did try the other peoples version of the 5min cron on the thread I posted, but the loop it uses stops my page from loading at all, it keeps loading and loading I'll try that thread you posts Kyle, hope it works :)
  20. Hey guys. I managed to remove 1minute cronjob for my game, But I'm having problem with the 1day and 5minute ones now. http://makewebgames.io/archive/index.php/t-32642.html Is the thread I used; I am currently using this: (It only works if a person clicks every 5 minutes, so you could leave for 20 and click and it would only update once) $result = mysql_query("SELECT * FROM `updates` WHERE `name` = '5min'"); $result = mysql_fetch_assoc($result); $hla = time() - $result['last']; if($hla > (300)) { $n = floor($hla / 300); $allusers_query = "UPDATE `users` SET `brave` = LEAST(`brave` + ((`maxbrave` / 10) + 0.5), `maxbrave`), `hp` = LEAST(`hp` + (`maxhp` / 3), `maxhp`), `will` = LEAST(`will` + 10, `maxwill`)"; mysql_query($allusers_query, $c); //enerwill update $en_nd_query = "UPDATE `users` SET `energy` = LEAST(`energy` + (`maxenergy` / 12.5), `maxenergy`) WHERE `donatordays` = 0"; $en_don_query = "UPDATE `users` SET `energy` = LEAST(`energy` + (`maxenergy` / 6), `maxenergy`) WHERE `donatordays` > 0"; mysql_query($en_nd_query, $c); mysql_query($en_don_query, $c); $time = time(); mysql_query("UPDATE `updates` SET `last` = ".$time." WHERE `name` = '5min'"); $floor = $time - (floor($time / 300) * 300); if($floor > 0) { $newUpdate = time() - $floor; mysql_query("UPDATE `updates` SET `last` = ".$newUpdate." WHERE `name` = '5min'"); } } I need it to update properly like, if I don't click for 20 minutes and do, it increases it 4 times, if you understand what I mean. Thanks!
  21. Sorry Illusions :l The error is on global_func though. It's the function that returns the rank, it does work, but it still returns the WARNING. I can just make the WARNINGS go away, but I don't want to do that because I feel like it's the lazy way out, I want to remove the actual thing, I'm just looking for help, I did look at that link you sent me and tried to re-do the function but I had no luck.
  22. I already tried illusions, whenever I search it always returns irrelevant threads.
  23. Okay, In my gym I get a few of these... Warning: mysql_result() expects parameter 1 to be resource, boolean given in /var/www/global_func.php on line 269 The line 269 is part of this function: function get_rank($stat, $mykey) { global $ir, $userid, $c; $q = mysql_query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0",$c); return mysql_result($q, 0, 0) + 1; }
  24. You have my support :p
  25. Does anyone know of a inventory system for V1 that's like V2? with the equipt primary or secondary, and equipt armor, and possibly for the attack too, but I can make the attack one if it isn't there, I don't fancy making the inventory thing though and I'm pretty sure someone else has made it in the time, If anyone knows of a script please let me know! Thanks. Also, sorry if this is in the wrong place.
×
×
  • Create New...