This mod works with MCCODE V2.
Works 100%! Ok here we go..
Run these SQL.
ALTER TABLE `users` ADD `attacklimit` int(11) NOT NULL default '20'
After you can imported the file, open attack.php
find..
<?php
$menuhide=1;
$atkpage=1;
include "globals.php";
$_GET['ID'] == (int) $_GET['ID'];
if(!$_GET['ID'])
{
print "WTF you doing, bro?";
$h->endpage();
exit;
}
else if($_GET['ID'] == $userid)
{
print "Only the crazy attack themselves.";
$h->endpage();
exit;
}
else if ($ir['hp'] <= 1)
{
print "Only the crazy attack when their unconscious.<br />
<a href='index.php'>Back</a>";
$h->endpage();
exit;
after add..
}
else if ($ir['attacklimit'] <= 0)
{
print "You can attack only 20 times/ day!<br />
<a href='index.php'>Back</a>";
$h->endpage();
exit;
}
Next open attackbeat.php
find..
$db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Hospitalized by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}");
after add
$db->query("UPDATE users SET attacklimit=attacklimit-1 WHERE userid=$userid");
Open attaclost.php
find..
$db->query("UPDATE users SET exp=0 WHERE exp<0");
after add
$db->query("UPDATE users SET attacklimit=attacklimit-1 WHERE userid=$userid");
Open attacktake.php
find..
$db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Left by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}");
after add
$db->query("UPDATE users SET attacklimit=attacklimit-1 WHERE userid=$userid");
Open attackwon.php
find..
$db->query("UPDATE users SET hp=1,money=money-$stole,hospital=$hosptime,hospreason='Mugged by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}");
after add
$db->query("UPDATE users SET attacklimit=attacklimit-1 WHERE userid=$userid");
And now open cron_day.php
find..
$db->query("UPDATE users SET reward_done=0");
after add
$db->query("UPDATE users SET attacklimit=20");
hope this helps ya out.