clanlevel >= 8 || $data->clanlevel == 6)) {
print " Clan - Bouwterrein |
\n";
$dbres = mysql_query("SELECT * FROM `[clans]` WHERE `name`='{$data->clan}'");
$clan = mysql_fetch_object($dbres);
if(isset($_GET['x'])) {
$dbres = mysql_query("SELECT * FROM `[weapons]` WHERE `name`='{$_GET['x']}' AND (`area`=8 OR `area`=8+{$clan->type})");
if($item = mysql_fetch_object($dbres)) {
if($clan->type == 1)
$item->costs = round($item->costs*0.95);
if($item->costs <= $clan->cash) {
if(eval($item->eval) > 0) {
$type = Array("Huis" => "homes",
"Muur" => "def_lvl1",
"Coffeeshop" => "money_lvl1",
"Chemie Lab" => "money_lvl1",
"Aandeel" => "money_lvl1");
$type = $type[$item->name];
$clan->cash -= $item->costs;
$clan->{"$type"}++;
if($item->lim >= $clan->$type) {
mysql_query("UPDATE `[clans]` SET `cash`={$clan->cash},`$type`=". ($clan->{"$type"}) ." WHERE `name`='{$clan->name}'");
print " Je hebt een nieuw {$item->name} gekocht |
\n";
}
else
print " Je hebt al {$item->lim} x een {$item->name} gekocht |
\n";
}
else
print " {$item->error} |
\n";
}
else
print " Je hebt niet genoeg geld om een {$item->name} te bouwen |
\n";
}
}
$dbres = mysql_query("SELECT * FROM `[weapons]` WHERE `area`=8 OR `area`=8+{$clan->type}");
while($weapon = mysql_fetch_object($dbres)) {
if($clan->type == 1)
$weapon->costs = round($weapon->costs*0.95);
else if($clan->type == 2)
$weapon->defence = round($weapon->defence*1.05);
eval($weapon->eval);
eval("\$weapon->max = \"{$weapon->max}\";");
print <<
{$weapon->name}
|
ENDHTML;
eval("\$weapon->max = \"{$weapon->max}\";");
print " \n";
print " {$weapon->extra} | \n";
print " \n";
if($weapon->attack != NULL)
print " Attack: | {$weapon->attack} | \n";
if($weapon->defence != NULL)
print " Defence: | {$weapon->defence} | \n";
if($weapon->costs != NULL)
print " Kost: | \${$weapon->costs} | \n";
if($weapon->lim != NULL)
print " Limiet aantal: | {$weapon->lim} | \n";
if($weapon->max != NULL)
print " Benodigdheden: | {$weapon->max} | \n";
print <<
|
ENDHTML;
if($clan->cash >= preg_replace("/,/","",$weapon->costs) && eval($weapon->eval) > 0)
print " | name}\">Koop | \n";
else
print " | name}\" style=\"color: #000000;\">Koop | \n";
print <<
ENDHTML;
}
}
else if($data->clanlevel >= 8 || $data->clanlevel == 6) {
print <<Clan - Bouwterrein |
Bouw - Land
|
ENDHTML;
}
/* ------------------------- */ ?>
| |