new users will join random gangs.
in register.php somewhere
$gang = mysql_query("SELECT `gangid` FROM `gangs);
$xx = mysql_num_rows($gang);
$which = mt_rand(1,$xx);
on the INSERT INTO users query find the 0 that it inserts for gangID and enter $which
Done.
---
2. new users protected from being attack.
To stop new users from being attacked just put this in the attack script
if($odata['daysold'] < 5)
{
echo "You cannot attack this player, they are to new!");
$h->endpage();
exit;
}
Make sure to add it after the $odata query

---
users protected from being attack more than 5 times/day.
ALTER TABLE `users` ADD `dailyattacks` TINYINT(4) NOT NULL;
add into attack.php where the fight is won and the users are updated.
mysql_query("UPDATE `users` SET `dailyattacks`=`dailyattacks`+1 WHERE `userid`=".$odata['userid']."");
Then below the $odata QUERY near the top add
if($odata['dailyattacks'] > 4)
{
echo "You can only be attacked 5 times per day, this person has already reached their daily limit";
$h->endpage();
exit;
}
4. maximum gang will alow max 20 users.
There is a column in gangs that determines how many users per gang, you can change from 5 to 20 for start off gangs in the creatgang.php file.
5. setting range allow to attack with level value 80%~125% from our level (ie. my level 200, so i only can attack users with level 160~250).
Bit more tricky for myself, as I havent worked with original attack script in awhile >,<
6. additional bot people for each level, each bot can (produce $$$, spend money, add armor, add defence, or armor and defence). bot will add little by little/hour.
Can use crons to increase NPCs stuff, the rest is manipulated in battletent.php
8. gangs allow to declare war to another gangs for 7 days only. after war they will be in peace from war for 2 days. (no one can attack them for 2 days).
Again, a bit more tricky as I beleive the default mccodes, more than 1 gang can war you at a time, look into the explode/implode functions.
9. gangs allow to declare war to gangs with total level arround 80~125 of their level.
Would suggest working out the first bit before dabbling with second.
10. cant attack another users if not enemy we war
$blah = mysql_query("SELECT * FROM `gangswars` WHERE `warDECLARER `=".$ir['gang']." OR `warDECLARED`=".$ir['gang']."");
if(mysql_num_rows($blah < 1)
{
echo "You are not in a war with anyone so you cannot attack anyone";
$h->endpage();
exit;
}
$usergang = mysql_fetch_array($blah);
$wee = mysql_query("SELECT * FROM `gangswars` WHERE `warDECLARER `=".$odata['gang']." OR `warDECLARED`=".$odata['gang']."");
if(!mysql_num_rows($wee))
{
echo "This persons clan is currently not at war with anyone, so you cannot attack them";
$h->endpage();
exit;
}
$og = mysql_fetch_array($wee);
This will stop them from being able to fight if their clan is not in a war with anyone at all, just woke up, i'll have to look at the actual scripts to determine how to go about checking vs the gangs that are at war with them.
Will look at the rest in a few, just some "ideas" to get you started.
Nothing above has been tested, i just woke up saw the posts and wrote a few things out to guide you in the appropriate direction.