$max_charakter = mysql_num_rows(mysql_query("SELECT id FROM chars WHERE rasse!='NPC' LIMIT 250"));
$npc_race = getRaceTypeName('NPC'); // do not remove npc (there is a separate setting for this)
$races = getRacesByType($npc_race); // remove all NPC
foreach($races as $race) {
$exclude_race_ids[] = '\''.$race['id'].'\'';
}
$max_charakter = mysql_num_rows(mysql_query('SELECT id FROM chars WHERE rasse NOT IN ('.implode(',', $exclude_race_ids).') LIMIT 250'));
if($max_charakter<250){
if($max_charakter<250){
exit;
exit;
}
}
$charakter = mysql_query("SELECT name, id FROM chars WHERE rasse!='NPC' ORDER BY level DESC LIMIT $max_charakter");
$charakter = mysql_query('SELECT name, id FROM chars WHERE rasse NOT IN '.implode(',', $exclude_race_ids).' ORDER BY level DESC LIMIT '.$max_charakter);
$max_charakter = mysql_num_rows(mysql_query("SELECT id FROM chars WHERE rasse!='NPC' LIMIT 500"));
$npc_race = getRaceTypeName('NPC'); // do not remove npc (there is a separate setting for this)
$races = getRacesByType($npc_race); // remove all NPC
foreach($races as $race) {
$exclude_race_ids[] = '\''.$race['id'].'\'';
}
$max_charakter = mysql_num_rows(mysql_query('SELECT id FROM chars WHERE rasse NOT IN ('.implode(',', $exclude_race_ids).') LIMIT 500'));
if($max_charakter<500){
if($max_charakter<500){
exit;
exit;
}
}
$charakter = mysql_query("SELECT name, id FROM chars WHERE rasse!='NPC' ORDER BY level DESC LIMIT $max_charakter");
$charakter = mysql_query('SELECT name, id FROM chars WHERE rasse NOT IN '.implode(',', $exclude_race_ids).' ORDER BY level DESC LIMIT '.$max_charakter);