dblink,"SELECT * FROM ".TB_PREFIX."units WHERE `vref` = ".(int) $village->wid.""); $units_array = mysqli_fetch_array($result); $count_hero = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "hero WHERE `uid` = " . $database->escape($session->uid) . ""), MYSQLI_ASSOC); $count_hero = $count_hero['Total']; if ($count_hero < 3) { $output="
| ".TRAIN_HERO." | |
|---|---|
".U1."
".$u1['wood']."|
".$u1['clay']."|
".$u1['iron']."|
".$u1['crop']."|
6|
";
$output .= $generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5,$u1['time'] / SPEED)*3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u1['wood'] + $u1['clay'] + $u1['iron'] + $u1['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output.=" |
|
".U2."
".$u2['wood']."|
".$u2['clay']."|
".$u2['iron']."|
".$u2['crop']."|
6|
";
$output.=$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u2['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u2['wood'] + $u2['clay'] + $u2['iron'] + $u2['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output.=" |
|
".U3."
".$u3['wood']."|
".$u3['clay']."|
".$u3['iron']."|
".$u3['crop']."|
6|
";
$output.= $generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u3['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u3['wood'] + $u3['clay'] + $u3['iron'] + $u3['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output.= " |
|
".U5."
".$u5['wood']."|
".$u5['clay']."|
".$u5['iron']."|
".$u5['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u5['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u5['wood'] + $u5['clay'] + $u5['iron'] + $u5['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U6."
".$u6['wood']."|
".$u6['clay']."|
".$u6['iron']."|
".$u6['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u6['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u6['wood'] + $u6['clay'] + $u6['iron'] + $u6['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U11."
".$u11['wood']."|
".$u11['clay']."|
".$u11['iron']."|
".$u11['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u11['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u11['wood'] + $u11['clay'] + $u11['iron'] + $u11['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U12."
".$u12['wood']."|
".$u12['clay']."|
".$u12['iron']."|
".$u12['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u12['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u12['wood'] + $u12['clay'] + $u12['iron'] + $u12['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U13."
".$u13['wood']."|
".$u13['clay']."|
".$u13['iron']."|
".$u13['crop']."|
6|
";
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u13['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u13['wood'] + $u13['clay'] + $u13['iron'] + $u13['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U15."
".$u15['wood']."|
".$u15['clay']."|
".$u15['iron']."|
".$u15['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u15['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u15['wood'] + $u15['clay'] + $u15['iron'] + $u15['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U16."
".$u16['wood']."|
".$u16['clay']."|
".$u16['iron']."|
".$u16['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u16['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u16['wood'] + $u16['clay'] + $u16['iron'] + $u16['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U21."
".$u21['wood']."|
".$u21['clay']."|
".$u21['iron']."|
".$u21['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u21['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u21['wood'] + $u21['clay'] + $u21['iron'] + $u21['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U22."
".$u22['wood']."|
".$u22['clay']."|
".$u22['iron']."|
".$u22['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u22['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u22['wood'] + $u22['clay'] + $u22['iron'] + $u22['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U24."
".$u24['wood']."|
".$u24['clay']."|
".$u24['iron']."|
".$u24['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u24['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u24['wood'] + $u24['clay'] + $u24['iron'] + $u24['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U25."
".$u25['wood']."|
".$u25['clay']."|
".$u25['iron']."|
".$u25['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u25['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u25['wood'] + $u25['clay'] + $u25['iron'] + $u25['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|
".U26."
".$u26['wood']."|
".$u26['clay']."|
".$u26['iron']."|
".$u26['crop']."|
6|
".
$generator->getTimeFormat($database->getArtifactsValueInfluence($session->uid, $village->wid, 5, $u26['time'] / SPEED) * 3);
//-- If available resources combined are not enough, remove NPC button
$total_required = (int)($u26['wood'] + $u26['clay'] + $u26['iron'] + $u26['crop']);
if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) {
$output .= "| ";
}
$output .= "
|
|