Modification to add faction colors to the display. Hopefully this can get slurped into the SVN so here's a diff to patch this against 0.4.1's TowerAttack (
download original version to patch) ...
`diff _TowerAttack.php-revision912 TowerAttack.php`
146a147,151
> /* Called to colorize faction string */
> function factioncolor($side) {
> $side = "##" . strtolower($side) . "##" . $side . "##end##";
> return($side);
> }
159,160c164,165
< $battle .= "Winner: <font color=CCCCTextColor>" . stripslashes($res[1]) . "</font> <font color=CCCCHeaderColor>(" . $res[2] . ")</font>\n";
< $battle .= "Looser: <font color=CCCCTextColor>" . stripslashes($res[3]) . "</font> <font color=CCCCHeaderColor>(" . $res[4] . ")</font>\n";
---
> $battle .= "Winner: <font color=CCCCTextColor>" . stripslashes($res[1]) . "</font> <font color=CCCCHeaderColor>(" . $this -> factioncolor($res[2]) . ")</font>\n";
> $battle .= "Looser: <font color=CCCCTextColor>" . stripslashes($res[3]) . "</font> <font color=CCCCHeaderColor>(" . $this -> factioncolor($res[4]) . ")</font>\n";
183,184c188,189
< $battle .= "Attacking Guild: <font color=CCCCTextColor>" . stripslashes($res[1]) . "</font> <font color=CCCCHeaderColor>(" . $res[2] . ")</font>\n";
< $battle .= "Defending Guild: <font color=CCCCTextColor>" . stripslashes($res[6]) . "</font> <font color=CCCCHeaderColor>(" . $res[7] . ")</font>\n";
---
> $battle .= "Attacking Guild: <font color=CCCCTextColor>" . stripslashes($res[1]) . "</font> <font color=CCCCHeaderColor>(" . $this -> factioncolor($res[2]) . ")</font>\n";
> $battle .= "Defending Guild: <font color=CCCCTextColor>" . stripslashes($res[6]) . "</font> <font color=CCCCHeaderColor>(" . $this -> factioncolor($res[7]) . ")</font>\n";
244,245c249,250
< $msg = "<font color=#ffff00>" . $off_guild . "</font> <font color=#dddddd>(" . $off_side . ")</font> has attacked <font color=#ffff00>" .
< $def_guild . "</font> <font color=#dddddd>(" . $def_side . ")</font> in " . $zone . " at " . $x_coords . "x" . $y_coords. ". Attacker: <font color=#ffff00>" .
---
> $msg = "<font color=#ffff00>" . $off_guild . "</font> <font color=#dddddd>(</font>" . $this -> factioncolor($off_side) . "<font color=#dddddd>)</font> has attacked <font color=#ffff00>" .
> $def_guild . "</font> <font color=#dddddd>(</font>" . $this -> factioncolor($def_side) . "<font color=#dddddd>)</font> in " . $zone . " at " . $x_coords . "x" . $y_coords. ". Attacker: <font color=#ffff00>" .
249c254
< $def_guild . "</font> <font color=#dddddd>(" . $def_side . ")</font> in " . $zone . " at " . $x_coords . "x" . $y_coords. ".";
---
> $def_guild . "</font> <font color=#dddddd>(</font>" . $this -> factioncolor($def_side) . "<font color=#dddddd>)</font> in " . $zone . " at " . $x_coords . "x" . $y_coords. ".";