Guild Wars

* /war invite,guild name,fraglimit : Send an invitation to start a war.
Example: /war invite,Black Ninjas,150

* /war accept,guild name : Accept the invitation to start a war.
* /war reject,guild name : Reject the invitation to start a war.
* /war cancel,guild name : This will cancel the invitation to the guild "Black Ninjas"

Those commands can only be executed by guild leaders.

Remember:

  • This war system is just like real Tibia\'s. During the war, the killing of a war opponent will always be a justified kill. However, attacking a war ponent will result in a protection zone block. If the attacked character hits back, he will also receive a protection zone block even though he did not initiate the act.
  • Characters that are currently in war will be marked with special icons. This allows an easy identification of friendly and opposing characters, as well as characters who are involved in other ongoing wars you are not part of.


'; $count = 0; foreach($SQL->query('SELECT * FROM `guild_wars` WHERE (`end` >= (UNIX_TIMESTAMP() - 604800) OR `end` = 0) AND `status` IN (1,4);') as $war) /* 0,5 */ { $a = $ots->createObject('Guild'); $a->load($war['guild_id']); if(!$a->isLoaded()) continue; $e = $ots->createObject('Guild'); $e->load($war['enemy_id']); if(!$e->isLoaded()) continue; $alogo = $a->getCustomField('logo_gfx_name'); if(empty($alogo) || !file_exists('images/guilds/' . $alogo)) $alogo = 'default_logo.gif'; $elogo = $e->getCustomField('logo_gfx_name'); if(empty($elogo) || !file_exists('images/guilds/' . $elogo)) $elogo = 'default_logo.gif'; $count++; if(is_int($count / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $main_content .= ""; } if($count == 0) $main_content .= ""; $main_content .= '
Active Wars
Aggressor Information Enemy
getId()."\">
".$a->getName()."
"; switch($war['status']) { case 1: { $main_content .= "" . $war['guild_kills'] . " : " . $war['enemy_kills'] . "

On a brutal war

Began on " . date("M d Y, H:i:s", $war['begin']) . ($war['end'] > 0 ? ", will end up at " . date("M d Y, H:i:s", $war['end']) : "") . ".
The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " gold coins." : "without any payment."); break; } case 4: { $main_content .= "" . $war['guild_kills'] . " : " . $war['enemy_kills'] . "

Pending end

Began on " . date("M d Y, H:i:s", $war['begin']) . ", signed armstice on " . date("M d Y, H:i:s", $war['end']) . ".
Will expire after reaching " . $war['frags'] . " frags. ".($war['payment'] > 0 ? "The payment is set to " . $war['payment'] . " gold coins." : "There's no payment set."); break; } default: { $main_content .= "Unknown, please contact with gamemaster."; break; } } $main_content .= "
getId()."\">
".$e->getName()."
Currently there are no active wars.


'; $count = 0; foreach($SQL->query('SELECT * FROM `guild_wars` WHERE (`end` >= (UNIX_TIMESTAMP() - 604800) OR `end` = 0) AND `status` IN (0);') as $war) /* 0,5 */ { $a = $ots->createObject('Guild'); $a->load($war['guild_id']); if(!$a->isLoaded()) continue; $e = $ots->createObject('Guild'); $e->load($war['enemy_id']); if(!$e->isLoaded()) continue; $alogo = $a->getCustomField('logo_gfx_name'); if(empty($alogo) || !file_exists('images/guilds/' . $alogo)) $alogo = 'default_logo.gif'; $elogo = $e->getCustomField('logo_gfx_name'); if(empty($elogo) || !file_exists('images/guilds/' . $elogo)) $elogo = 'default_logo.gif'; $count++; if(is_int($count / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $main_content .= ""; } if($count == 0) $main_content .= ""; $main_content .= '
Pending declarations
Aggressor Information Enemy
getId()."\">
".$a->getName()."
"; switch($war['status']) { case 0: { $main_content .= "Pending acceptation
Invited on " . date("M d Y, H:i:s", $war['begin']) . " for " . ($war['end'] > 0 ? (($war['end'] - $war['begin']) / 86400) : "unspecified") . " days. The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " gold coins." : "without any payment.")."
Will expire in two days."; break; } default: { $main_content .= "Unknown, please contact with gamemaster."; break; } } $main_content .= "
getId()."\">
".$e->getName()."
Currently there are no under declaration of war.


'; $count = 0; foreach($SQL->query('SELECT * FROM `guild_wars` WHERE `status` IN (5);') as $war) /* 0,5 */ { $a = $ots->createObject('Guild'); $a->load($war['guild_id']); if(!$a->isLoaded()) continue; $e = $ots->createObject('Guild'); $e->load($war['enemy_id']); if(!$e->isLoaded()) continue; $alogo = $a->getCustomField('logo_gfx_name'); if(empty($alogo) || !file_exists('images/guilds/' . $alogo)) $alogo = 'default_logo.gif'; $elogo = $e->getCustomField('logo_gfx_name'); if(empty($elogo) || !file_exists('images/guilds/' . $elogo)) $elogo = 'default_logo.gif'; $count++; if(is_int($count / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $main_content .= ""; } if($count == 0) $main_content .= ""; $main_content .= "
Finished Wars
Aggressor Information Enemy
getId()."\">
".$a->getName()."
"; switch($war['status']) { case 5: { $main_content .= "Ended
Began on " . date("M d Y, H:i:s", $war['begin']) . ", ended on " . date("M d Y, H:i:s", $war['end']) . ". Frag statistics: " . $war['guild_kills'] . " to " . $war['enemy_kills'] . "."; break; } default: { $main_content .= "Unknown, please contact with gamemaster."; break; } } $main_content .= "
getId()."\">
".$e->getName()."
Currently there are no finished wars.
"; ?>