Clan - Bouwterrein | \n";
print " Welkom in de clan winkel, Koop hier muren, coffeeshops (voor een lekkere joint!!) en huizen voor je clan leden!! |
\n";
$dbres = mysql_query("SELECT * FROM `[clans]` WHERE `name`='{$data['clan']}'");
$clan = mysql_fetch_object($dbres);
if($_POST['submit'] && is_numeric($_POST['num']) && $$_POST['num'] < 10) {
$aantal = $_POST['num'];
$name = $_POST['name'];
$dbres = mysql_query("SELECT * FROM `[weapons]` WHERE `name`='{$name}' AND (`area`=8 OR `area`=8+{$clan->type})");
if($item = mysql_fetch_object($dbres)) {
if($clan->type == 1)
$item->costs = round(($item->costs)*$aantal);
if($item->costs > $clan->cash) {
echo "";
exit;
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->{"$type"}++;
for($i = 1; $i <= "$aantal"; $i++){
mysql_query("UPDATE `[clans]` SET `cash`=`cash`-{$item->costs},`$type`=`{$type}`+1 WHERE `name`='{$clan->name}'") or die (mysql_error());
}
print " Je hebt {$aantal}x een {$item->name} gekocht! |
\n ";
}
else
print " {$item->error} |
\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->max != NULL)
print " Benodigdheden: | {$weapon->max} | \n";
print <<
|
ENDHTML;
print " | | \n";
print <<
ENDHTML;
}
}
else if($data['clanlevel'] >= 8 || $data['clanlevel'] == 6) {
print <<Clan - Bouwterrein |
- Bouw
- Clan Land
- Clan Clicks
|
ENDHTML;
}
/* ------------------------- */ ?>
| |