- VERSUS -
data:
$guild1 = $war['guild1'];
$g1c = 0; // kill count
$guild2 = $war['guild2'];
$g2c = 0; // kill count
if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10') {
foreach (($kills ? $kills : array()) as $kill) {
if ($kill['killerguild'] == $guild1)
$g1c++;
else
$g2c++;
}
$green = false;
if ($g1c > $g2c) {
$leading = $war['name1'];
$green = true;
} else if ($g2c > $g1c) $leading = $war['name2'];
else $leading = "Tie";
}
?>
-
War status: .
-
Leading guild: .
-
'. $g1c .'-'. $g2c .'';
else if ($g1c == $g2c)
echo 'Score: '. $g1c .'-'. $g2c .'';
else
echo 'Score: '. $g1c .'-'. $g2c .'';
?>
+
".$death['name']." ";
foreach($killers as $killer)
{
$i++;
if($killer['is_war'] != 0)
{
if($i == 1)
$main_content .= "killed at level ".$death['level']." by ";
else if($i == $count && $others == false)
$main_content .= " and by ";
else
$main_content .= ", ";
if($killer['player_exists'] == 0)
$main_content .= "";
$main_content .= $killer['player_name'];
if($killer['player_exists'] == 0)
$main_content .= "";
}
else
$others = true;
if($i == $count)
{
if($others == true)
$main_content .= " and few others";
$main_content .= ".
";
}
}
}
}
else
$main_content .= "There were no frags on this war so far.";
echo $main_content;
// END BORROWED FROM GESIOR
}
}
} else {
// Display current wars.
// Fetch list of wars
if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10') $wardata = get_guild_wars();
else if ($config['TFSVersion'] == 'TFS_03') $wardata = get_guild_wars03();
else die("Can't recognize TFS version. It has to be either TFS_02 or TFS_03. Correct this in config.php");
//echo $wardata[0]['name1'];
//die(var_dump($wardata));
if ($wardata != false) {
// kills data
$killsdata = array(); // killsdata[guildid] => array(warid) => array info about the selected war entry
foreach ($wardata as $wars) {
if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10') $killsdata[$wars['id']] = get_war_kills($wars['id']);
else if ($config['TFSVersion'] == 'TFS_03') $killsdata[$wars['id']] = get_war_kills03($wars['id']);
}
?>
Attacking Guild: |
Death Count: |
Defending Guild: |
';
echo ''. $wars['name1'] .' | ';
echo ''. $guild_1_kills .' - ' . $guild_2_kills . ' | ';
echo ''. $wars['name2'] .' | ';
echo '';
}
?>