Simple modification here, it checks if the opponents level is 5 or more levels lower that the attackers level,this could be used to prevent farming and attack bunny's or abuse.
Sorry if this has been posted before!
Add this where ever you want in attack.php
if ($oppattack['level'] <= $myattack['level']) {
$levelcheck = $myattack['level'] - $oppattack['level'];
}
then add this code anywhere in attack.php where your checks are made
if ($levelcheck >= 5) {
print "You can't attack a user that's 5 or more levels below your level!
[url='index.php']Back[/url]";
$h->endpage();
exit;
Comments are welcome!