Ragnar Posted April 8, 2008 Share Posted April 8, 2008 Version 2, but shouldn't be hard to convert. Don't like those annoying hard to see verification images or think some one might still be using an auto-refreasher and geting around it? Use logs. mySQL.... CREATE TABLE `trainlogs` ( `tlogID` int(11) NOT NULL auto_increment, `tlogTRAINERID` int(11) NOT NULL default '0', `tlogSTATS` varchar(255) NOT NULL default '0', `tlogAMOUNT` int(11) NOT NULL default '0', `tlogTIME` int(20) NOT NULL default '0', PRIMARY KEY (`tlogID`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; -- -- Dumping data for table `trainlogs` -- CREATE TABLE `crimelogs` ( `crimID` int(11) NOT NULL auto_increment, `crimPLAYERID` int(11) NOT NULL default '0', `crimTIME` int(20) NOT NULL default '0', PRIMARY KEY (`crimID`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; -- -- Dumping data for table `crimelogs` -- In docrime.php replace $_GET['c']=abs((int) $_GET['c']); with $_GET['c']=abs((int) $_GET['c']); $db->query("INSERT INTO crimelogs VALUES('',$userid,unix_timestamp());",$c); In gym.php replace if($ir['jail']) { $gain/=2; } with if($ir['jail']) { $gain/=2; } $db->query("INSERT INTO trainlogs VALUES('',$userid,'$stat',$gain,unix_timestamp());",$c); In staff_logs.php add case 'traininglogs': view_training_logs(); break; case 'crimelogs': view_crime_logs(); break; then at the end of the file right before $h->endpage(); ?> add function view_training_logs() { global $ir,$c,$h,$userid; print "<h3>Train Logs</h3> <table width=75% border=1> <tr> <th>ID</th> <th>Time</th><th>Trainer</th> <th>Amount</th> <th>Stats</th></tr>"; $q=mysql_query("SELECT * FROM trainlogs ORDER BY tlogID ASC",$c); while($r=mysql_fetch_array($q)) { print"<tr><td>{$r['tlogID']}</td> <td>".date('F j, Y, g:i:s a',$r['tlogTIME'])."</td><td>{$r['tlogTRAINERID']}</td><td>{$r['tlogAMOUNT']}</td><td>{$r['tlogSTATS']}</a></td> </tr>"; } } function view_crime_logs() { global $ir,$c,$h,$userid; print "<h3>Crime Logs</h3> <table width=75% border=1> <tr> <th>ID</th> <th>Time</th><th>Player</th></tr>"; $q=mysql_query("SELECT * FROM crimelogs ORDER BY crimID ASC",$c); while($r=mysql_fetch_array($q)) { print"<tr><td>{$r['crimID']}</td> <td>".date('F j, Y, g:i:s a',$r['crimTIME'])."</td><td>{$r['crimPLAYERID']}</td> </tr>"; } } In smenu.php add the links to the logs section. > Training Logs > Crime Logs "; If you get.... Parse error: syntax error, unexpected '&' in /public_html/smenu.php on line 58 Make sure only the last link has the "; at the end. Now, since people use crime and training a *LOT*, the logs will get big *FAST*!! In cron_day.php, add $db->query("DELETE FROM trainlogs WHERE tlogTIME < (unix_timestamp() -864000)",$c); $db->query("DELETE FROM crimelogs WHERE crimTIME < (unix_timestamp() -864000)",$c); Logs older than 10 days will be deleted. For 20 days and older, use 1728000. For 30 days and older, use 2592000. Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted April 8, 2008 Share Posted April 8, 2008 Re: [mccodes] Training and crime logs. mate, you are PURE genious! :D Quote Link to comment Share on other sites More sharing options...
Analog Posted April 8, 2008 Share Posted April 8, 2008 Re: [mccodes] Training and crime logs. Really thats not a good way to tell if a refresher is being used. All you are doing is storing the time that the code was ran. Someone could simply set up a refresher to run every 10 seconds making it less obvious. Likewise a player can easily appear to be using a refresher when there not simply by training quickly. Basing your judgment on time alone is not an effective way to prevent refreshers. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted April 8, 2008 Share Posted April 8, 2008 Re: [mccodes] Training and crime logs. It can be done however, I ran a test script that had a pretty high confidence level of auto-refresh detection (~95%) however, I discovered the obvious flaw -- random time interval refresh. Best bet is something that forces the user to take a different path - perhaps the occasional random event... Quote Link to comment Share on other sites More sharing options...
Ishy Posted April 8, 2008 Share Posted April 8, 2008 Re: [mccodes] Training and crime logs. Hmm... Please tell me if I am wrong but however, you think of how many people will train in a day and how many people will do crimes and the more data in being imported and exported out of the Database increaes the Data Transfer on your site don't it and may cause the site to lag? Quote Link to comment Share on other sites More sharing options...
Halo Posted April 9, 2008 Share Posted April 9, 2008 Re: [mccodes] Training and crime logs. Hmm... Please tell me if I am wrong but however, you think of how many people will train in a day and how many people will do crimes and the more data in being imported and exported out of the Database increases the Data Transfer on your site don't it and may cause the site to lag? True, but this is a good way to catch gym hackers, nice mod Quote Link to comment Share on other sites More sharing options...
KDawg08 Posted April 10, 2008 Share Posted April 10, 2008 Re: [mccodes] Training and crime logs. I would just look through the forums personally and use the log user script if u wanna find out... Anyone that u see running 5/10/15minute refreshers will be reloading the same page or 2 automatically... Simple solution to a simple problem. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted December 25, 2010 Share Posted December 25, 2010 I like the mod.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.