| | Dzoki < dzoki.travian@gmail.com > | | Copyright: TravianX Project All rights reserved | \*-------------------------------------------------------*/ // check if there is a hero in revive already $reviving = $training = false; foreach ($heroes as $hero_datarow) { if ($hero_datarow['inrevive']) $reviving = true; if ($hero_datarow['intraining']) $training = true; $name = $technology->getUnitName($hero_datarow['unit']); if($hero_datarow['level'] <= 60){ $wood = (${'h'.$hero_datarow['unit'].'_full'}[$hero_datarow['level']]['wood']); $clay = (${'h'.$hero_datarow['unit'].'_full'}[$hero_datarow['level']]['clay']); $iron = (${'h'.$hero_datarow['unit'].'_full'}[$hero_datarow['level']]['iron']); $crop = (${'h'.$hero_datarow['unit'].'_full'}[$hero_datarow['level']]['crop']); $timeToTrain = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, (${'h'.$hero_datarow['unit'].'_full'}[$hero_datarow['level']]['time']) / SPEED); $training_time = $generator->getTimeFormat($timeToTrain); $training_time2 = time() + $timeToTrain; }else{ $wood = (${'h'.$hero_datarow['unit'].'_full'}[60]['wood']); $clay = (${'h'.$hero_datarow['unit'].'_full'}[60]['clay']); $iron = (${'h'.$hero_datarow['unit'].'_full'}[60]['iron']); $crop = (${'h'.$hero_datarow['unit'].'_full'}[60]['crop']); $timeToTrain = $database->getArtifactsValueInfluence($session->uid, $village->wid, 5, (${'h'.$hero_datarow['unit'].'_full'}[60]['time']) / SPEED); $training_time = $generator->getTimeFormat($timeToTrain); $training_time2 = time() + $timeToTrain; } if($hero_datarow['inrevive'] == 1) { $timeleft = $generator->getTimeFormat($hero_datarow['trainingtime'] - time()); ?>
"; ?>
".HERO_READY." timer.">".$timeleft."
\"".$name."\" $name ($name1)
" ?>
<?php echo $name; ?>
Wood| Clay| Iron| Crop| Crop consumption6| Duration userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) { echo "|\"NPC"; } ?>
awood < $wood || $village->aclay < $clay || $village->airon < $iron || $village->acrop < $crop) { echo "".NOT."".ENOUGH_RESOURCES.""; }else { echo "".REVIVE.""; } ?> checkIfResearched($village->wid, 't'.$hero_datarow['unit']) != 0){ ?>
<?php echo $name; ?>
Wood| Clay| Iron| Crop| Crop consumption6| Duration userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1 && $village->atotal >= $total_required) { echo "|\"NPC"; } ?>
awood < $wood || $village->aclay < $clay || $village->airon < $iron || $village->acrop < $crop) { echo "".NOT."".ENOUGH_RESOURCES.""; }else { echo "".REVIVE.""; } ?> dblink,"UPDATE ".TB_PREFIX."hero SET `inrevive` = '1', `trainingtime` = '".(int) $training_time2."', `wref` = '".(int) $village->wid."' WHERE `heroid` = ".(int) $_GET['hid']." AND `uid` = '".(int) $session->uid."'"); $database->modifyResource($village->wid, $wood, $clay, $iron, $crop, 0); header("Location: build.php?id=".$id.""); exit; } } ?>