From 1412af8f2c39540d8892717541109ad8e1a86f0d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Jun 2012 15:51:40 +0300 Subject: [PATCH] fix some training and hero bugs + fix GameEngine/Admin/database.php (now should to work fine) --- GameEngine/Admin/database.php | 37 ++++++++++---------- GameEngine/Automation.php | 22 ++++++++---- GameEngine/Units.php | 4 +++ Templates/Build/19_5.tpl | 60 --------------------------------- Templates/Build/19_train.tpl | 21 ++++++++++-- Templates/Build/20_1.tpl | 20 +++++++++-- Templates/Build/20_2.tpl | 20 +++++++++-- Templates/Build/20_3.tpl | 20 +++++++++-- Templates/Build/20_4.tpl | 20 +++++++++-- Templates/Build/20_5.tpl | 20 +++++++++-- Templates/Build/21.tpl | 20 +++++++++-- Templates/Build/25_train.tpl | 19 +++++++++-- Templates/Build/26_train.tpl | 19 +++++++++-- Templates/Build/29_train.tpl | 21 ++++++++++-- Templates/Build/30_train.tpl | 21 ++++++++++-- Templates/Build/37.tpl | 26 +------------- Templates/Build/37_revive.tpl | 57 ++++++++++++++++++++++++++----- Templates/Build/37_train.tpl | 47 +++++++++++++++++--------- Templates/Build/42_train.tpl | 21 ++++++++++-- install/data/sql.sql | 15 +++++---- install/include/multihunter.php | 4 +-- 21 files changed, 344 insertions(+), 170 deletions(-) delete mode 100644 Templates/Build/19_5.tpl diff --git a/GameEngine/Admin/database.php b/GameEngine/Admin/database.php index a759e688..28da23f4 100644 --- a/GameEngine/Admin/database.php +++ b/GameEngine/Admin/database.php @@ -16,19 +16,22 @@ ## Source code: http://www.github.com/ZZJHONS/ZravianX ## ## ## ################################################################################# - +if($gameinstall == 1){ include("../../GameEngine/config.php"); include("../../GameEngine/Data/buidata.php"); - +}else{ +include("../GameEngine/config.php"); +include("../GameEngine/Data/buidata.php"); +} class adm_DB { var $connection; - + function adm_DB(){ global $database; $this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error()); mysql_select_db(SQL_DB, $this->connection) or die(mysql_error()); } - + function Login($username,$password){ $q = "SELECT password FROM ".TB_PREFIX."users where username = '$username' and access >= ".MULTIHUNTER; $result = mysql_query($q, $this->connection); @@ -42,7 +45,7 @@ class adm_DB { return false; } } - + function recountPopUser($uid){ global $database; $villages = $database->getProfileVillages($uid); @@ -51,7 +54,7 @@ class adm_DB { $this->recountPop($vid); } } - + function recountPop($vid){ global $database; $fdata = $database->getResourceLevel($vid); @@ -77,14 +80,14 @@ class adm_DB { } return $popT; } - + function getWref($x,$y) { $q = "SELECT id FROM ".TB_PREFIX."wdata where x = $x and y = $y"; $result = mysql_query($q, $this->connection); $r = mysql_fetch_array($result); return $r['id']; } - + function AddVillage($post){ global $database; $wid = $this->getWref($post['x'],$post['y']); @@ -101,7 +104,7 @@ class adm_DB { $database->addABTech($wid); } } - + function Punish($post){ global $database; $villages = $database->getProfileVillages($post['uid']); @@ -115,7 +118,7 @@ class adm_DB { $pop = floor(($popOld/100)*($proc)); if($pop <= 1 ){$pop = 2;} $this->PunishBuilding($vid,$proc,$pop); - + } if($post['del_troop']){ if($user['tribe'] == 1) { @@ -161,7 +164,7 @@ class adm_DB { $q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;"; mysql_query($q, $this->connection); } - + function DelPlayer($uid,$pass){ global $database; $ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1); @@ -194,7 +197,7 @@ class adm_DB { return false; } } - + function DelVillage($wref){ $q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 0"; $result = mysql_query($q, $this->connection); @@ -218,7 +221,7 @@ class adm_DB { mysql_query($q, $this->connection); } } - + function DelBan($uid,$id){ global $database; $name = $database->getUserField($uid,"username",0); @@ -295,12 +298,12 @@ class adm_DB { return $all; } } - + function query_return($q) { $result = mysql_query($q, $this->connection); return $this->mysql_fetch_all($result); } - + /*************************** Function to do free query References: Query @@ -308,8 +311,8 @@ class adm_DB { function query($query) { return mysql_query($query, $this->connection); } - - + + }; $admin = new adm_DB; diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index 4b446746..f87c5439 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -2592,8 +2592,8 @@ $crannyimg = "getTypeLevel(37,$data['to']) > 0) { //don't reinforce, addunit instead $database->modifyUnit($data['to'],array("hero"),array(1),array(1)); - $heroid = $database->getHero($database->getVillageField($data['from'],"owner"),1); $database->modifyHero("wref",$data['to'],$heroid,0); + $heroid = $database->getHero($database->getVillageField($data['from'],"owner"),1); $HeroTransfer = 1; } } @@ -3243,12 +3243,12 @@ $crannyimg = "getHero(); - if(!empty($harray)) { - foreach($harray as $hdata) { - if((time()-$hdata['lastupdate'])>=1) { - if($hdata['health']<100 and $hdata['health']>0) { + if(!empty($harray)){ + foreach($harray as $hdata){ + if((time()-$hdata['lastupdate'])>=1){ + if($hdata['health']<100 and $hdata['health']>0){ $reg = $hdata['health']+$hdata['regeneration']*5*SPEED/86400*(time()-$hdata['lastupdate']); - if($reg <= 100) { + if($reg <= 100){ $database->modifyHero("health",$reg,$hdata['heroid']); }else{ $database->modifyHero("health",100,$hdata['heroid']); @@ -3256,10 +3256,18 @@ $crannyimg = "modifyHero("lastupdate",time(),$hdata['heroid']); } - if ($hdata['experience'] > $hero_levels[$hdata['level']+1] && $hdata['level'] < 100) { + if($hdata['experience'] > $hero_levels[$hdata['level']+1] && $hdata['level'] < 100){ mysql_query("UPDATE " . TB_PREFIX ."hero SET level = level + 1 WHERE heroid = '".$hdata['heroid']."'"); mysql_query("UPDATE " . TB_PREFIX ."hero SET points = points + 5 WHERE heroid = '".$hdata['heroid']."'"); } + $villunits = $database->getUnit($hdata['wref']); + if($hero_info['dead'] == 1 or $villunits['hero'] == 1){ + mysql_query("UPDATE " . TB_PREFIX . "hero SET nothome = 0 WHERE heroid = ".$hdata['heroid'].""); + } + if($villunits['hero'] == 0 && $hero_info['trainingtime'] < time() && $hero_info['nothome'] == 0){ + mysql_query("UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".$hdata['wref'].""); + mysql_query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `health` = '100' WHERE `uid` = '".$hdata['uid']."'"); + } } } if(file_exists("GameEngine/Prevention/updatehero.txt")) { diff --git a/GameEngine/Units.php b/GameEngine/Units.php index 8c23e861..812c3381 100644 --- a/GameEngine/Units.php +++ b/GameEngine/Units.php @@ -332,6 +332,10 @@ class Units { $checkoexist = $database->checkOasisExist($data['to_vid']); if($checkexist or $checkoexist){ $database->addMovement(3,$village->wid,$data['to_vid'],$reference,time(),($time+time())); + if($data['u11'] > 0){ + $heroid = $database->getHero($session->uid); + mysql_query("UPDATE " . TB_PREFIX . "hero SET nothome = 1 WHERE heroid = ".$heroid.""); + } } if($form->returnErrors() > 0) { diff --git a/Templates/Build/19_5.tpl b/Templates/Build/19_5.tpl deleted file mode 100644 index 46ad4138..00000000 --- a/Templates/Build/19_5.tpl +++ /dev/null @@ -1,60 +0,0 @@ - -
- \"Clubswinger\" - Clubswinger (Available: ".$village->unitarray['u41'].") -
-
- \"Wood\"95|\"Clay\"75|\"Iron\"40|\"Crop\"40|\"Crop1|\"Duration\""; - echo $generator->getTimeFormat(round($u11['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); - echo "
- - - maxUnit(11)."; return false;\">(".$technology->maxUnit(11).") - "; - if($technology->getTech(12)) { - echo " -
- \"Spearman\" - Spearman (Available: ".$village->unitarray['u12'].") -
-
- \"Wood\"145|\"Clay\"70|\"Iron\"85|\"Crop\"40|\"Crop1|\"Duration\""; - echo $generator->getTimeFormat(round($u12['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); - echo "
- - - maxUnit(12)."; return false;\">(".$technology->maxUnit(12).") - "; - } - if($technology->getTech(13)){ - echo " -
- \"Axeman\" - Axeman (Available: ".$village->unitarray['u13'].") -
-
- \"Wood\"130|\"Clay\"120|\"Iron\"170|\"Crop\"70|\"Crop1|\"Duration\""; - echo $generator->getTimeFormat(round($u13['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); - echo "
- - - maxUnit(13)."; return false;\">(".$technology->maxUnit(13).") - "; - } - if($technology->getTech(14)) { - echo " -
- \"Scout\" - Scout (Available: ".$village->unitarray['u14'].") -
-
- \"Wood\"160|\"Clay\"100|\"Iron\"50|\"Crop\"50|\"Crop1|\"Duration\""; - echo $generator->getTimeFormat(round($u14['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); - echo "
- - - maxUnit(14)."; return false;\">(".$technology->maxUnit(14).") - "; -} -?> \ No newline at end of file diff --git a/Templates/Build/19_train.tpl b/Templates/Build/19_train.tpl index 0e4b2cbb..7c57ccec 100644 --- a/Templates/Build/19_train.tpl +++ b/Templates/Build/19_train.tpl @@ -1,5 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } for ($i=($session->tribe-1)*10+1;$i<=($session->tribe-1)*10+4;$i++) { if ($i <> 4 && $i <> 23 && $i <> 24 && ($technology->getTech($i) || $i%10 == 1)) { @@ -10,7 +25,7 @@ echo "
\"Wood\"".(${'u'.$i}['wood'])."|\"Clay\"".(${'u'.$i}['clay'])."|\"Iron\"".(${'u'.$i}['iron'])."|\"Crop\"".(${'u'.$i}['crop'])."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; -$dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); +$dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid19[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; diff --git a/Templates/Build/20_1.tpl b/Templates/Build/20_1.tpl index cd73c9e5..eec7d234 100644 --- a/Templates/Build/20_1.tpl +++ b/Templates/Build/20_1.tpl @@ -1,4 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } $success = 0; for($i=4;$i<=6;$i++) { if($technology->getTech($i)) { @@ -11,7 +27,7 @@ for($i=4;$i<=6;$i++) { echo "
\"Wood\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"Crop".(${'u'.$i}['pop'])."|\"Duration\""; } - $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) * ($building->getTypeLevel(41)>=1?(1/$bid41[$building->getTypeLevel(41)]['attri']):1) / SPEED)); + $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) * ($building->getTypeLevel(41)>=1?(1/$bid41[$building->getTypeLevel(41)]['attri']):1) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; diff --git a/Templates/Build/20_2.tpl b/Templates/Build/20_2.tpl index f9955a56..4dffa44d 100644 --- a/Templates/Build/20_2.tpl +++ b/Templates/Build/20_2.tpl @@ -1,4 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } $success = 0; for($i=15;$i<=16;$i++) { if($technology->getTech($i)) { @@ -6,7 +22,7 @@ for($i=15;$i<=16;$i++) { ".$technology->getUnitName($i)." (Avaliable: ".$village->unitarray['u'.$i].")
"; echo "
\"Wood\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; - $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) * ($building->getTypeLevel(41)>=1?(1/$bid41[$building->getTypeLevel(41)]['attri']):1) / SPEED)); + $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; diff --git a/Templates/Build/20_3.tpl b/Templates/Build/20_3.tpl index 173e9da6..17628cb5 100644 --- a/Templates/Build/20_3.tpl +++ b/Templates/Build/20_3.tpl @@ -1,4 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } $success = 0; for($i=23;$i<=26;$i++) { if($technology->getTech($i)) { @@ -6,7 +22,7 @@ for($i=23;$i<=26;$i++) { ".$technology->getUnitName($i)." (Avaliable: ".$village->unitarray['u'.$i].")
"; echo "
\"Wood\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; - $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) * ($building->getTypeLevel(41)>=1?(1/$bid41[$building->getTypeLevel(41)]['attri']):1) / SPEED)); + $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; diff --git a/Templates/Build/20_4.tpl b/Templates/Build/20_4.tpl index 8a04b85b..729a9987 100644 --- a/Templates/Build/20_4.tpl +++ b/Templates/Build/20_4.tpl @@ -1,4 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } $success = 0; for($i=35;$i<=36;$i++) { if($technology->getTech($i)) { @@ -6,7 +22,7 @@ for($i=35;$i<=36;$i++) { ".$technology->getUnitName($i)." (Avaliable: ".$village->unitarray['u'.$i].")
"; echo "
\"Wood\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; - $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) * ($building->getTypeLevel(41)>=1?(1/$bid41[$building->getTypeLevel(41)]['attri']):1) / SPEED)); + $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; diff --git a/Templates/Build/20_5.tpl b/Templates/Build/20_5.tpl index 72a55b8a..3f7e76e8 100644 --- a/Templates/Build/20_5.tpl +++ b/Templates/Build/20_5.tpl @@ -1,4 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } $success = 0; for($i=45;$i<=46;$i++) { if($technology->getTech($i)) { @@ -6,7 +22,7 @@ for($i=45;$i<=46;$i++) { ".$technology->getUnitName($i)." (Avaliable: ".$village->unitarray['u'.$i].")
"; echo "
\"Wood\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; - echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); + echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid20[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo "
diff --git a/Templates/Build/21.tpl b/Templates/Build/21.tpl index fc939dbd..ae082db8 100644 --- a/Templates/Build/21.tpl +++ b/Templates/Build/21.tpl @@ -17,7 +17,23 @@ - getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } $success = 0; $start = ($session->tribe == 1)? 7 : (($session->tribe == 2)? 17 : 27); if ($session->tribe == 1){ @@ -37,7 +53,7 @@ ".$technology->getUnitName($i)." (Avaliable: ".$village->unitarray['u'.$i].")
"; echo "
\"Wood\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; - $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid21[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); + $dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid21[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; diff --git a/Templates/Build/25_train.tpl b/Templates/Build/25_train.tpl index ebe19be4..4f9130d6 100644 --- a/Templates/Build/25_train.tpl +++ b/Templates/Build/25_train.tpl @@ -1,5 +1,20 @@ getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } ################################################################################# ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## @@ -37,7 +52,7 @@ echo " \"".$technology-getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" /> ".$technology->getUnitName($i)." (Available: ".$village->unitarray['u'.$i].")
\"Lumber\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"duration\""; -$dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid25[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); +$dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid25[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) > 1) { echo "|\"NPC"; diff --git a/Templates/Build/26_train.tpl b/Templates/Build/26_train.tpl index c5761be5..5aa2fbf0 100644 --- a/Templates/Build/26_train.tpl +++ b/Templates/Build/26_train.tpl @@ -1,5 +1,20 @@ getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } ################################################################################# ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## @@ -37,7 +52,7 @@ echo " \"".$technology-getUnitName($i)."\" title=\"".$technology->getUnitName($i)."\" /> ".$technology->getUnitName($i)." (Available: ".$village->unitarray['u'.$i].")
\"Lumber\"".${'u'.$i}['wood']."|\"Clay\"".${'u'.$i}['clay']."|\"Iron\"".${'u'.$i}['iron']."|\"Crop\"".${'u'.$i}['crop']."|\"duration\""; -$dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid26[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); +$dur=$generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid26[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); echo ($dur=="0:00:00")? "0:00:01":$dur; if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) > 1) { echo "|\"NPC"; diff --git a/Templates/Build/29_train.tpl b/Templates/Build/29_train.tpl index 17672b54..cdf3c457 100644 --- a/Templates/Build/29_train.tpl +++ b/Templates/Build/29_train.tpl @@ -1,5 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } for ($i=($session->tribe-1)*10+1;$i<=($session->tribe-1)*10+4;$i++) { if ($i <> 4 && $i <> 23 && $i <> 24 && ($technology->getTech($i) || $i%10 == 1)) { @@ -10,7 +25,7 @@ echo "
\"Wood\"".(${'u'.$i}['wood']*3)."|\"Clay\"".(${'u'.$i}['clay']*3)."|\"Iron\"".(${'u'.$i}['iron']*3)."|\"Crop\"".(${'u'.$i}['crop']*3)."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; -echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid29[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); +echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid29[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; } diff --git a/Templates/Build/30_train.tpl b/Templates/Build/30_train.tpl index 84437a67..9aea6de8 100644 --- a/Templates/Build/30_train.tpl +++ b/Templates/Build/30_train.tpl @@ -1,5 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } for ($i=($session->tribe-1)*10+3;$i<=($session->tribe-1)*10+6;$i++) { if ($i <> 3 && $i <> 13 && $i <> 14 && $technology->getTech($i)) { @@ -10,7 +25,7 @@ echo "
\"Wood\"".(${'u'.$i}['wood']*3)."|\"Clay\"".(${'u'.$i}['clay']*3)."|\"Iron\"".(${'u'.$i}['iron']*3)."|\"Crop\"".(${'u'.$i}['crop']*3)."|\"Crop".(${'u'.$i}['pop']-($building->getTypeLevel(41)>=1?1:0))."|\"Duration\""; -echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid30[$village->resarray['f'.$id]]['attri'] * ($building->getTypeLevel(41)>=1?(1/$bid41[$building->getTypeLevel(41)]['attri']):1) / 100) / SPEED)); +echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid30[$village->resarray['f'.$id]]['attri'] * ($building->getTypeLevel(41)>=1?(1/$bid41[$building->getTypeLevel(41)]['attri']):1) / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; } diff --git a/Templates/Build/37.tpl b/Templates/Build/37.tpl index 18215938..a903221a 100644 --- a/Templates/Build/37.tpl +++ b/Templates/Build/37.tpl @@ -57,30 +57,7 @@ $name = "Haeduan"; } $name1 = $hero_info['name']; - if($hero_info['trainingtime'] > time()) { - $timeleft = $generator->getTimeFormat($hero_info['trainingtime'] - time()); - -?> - - - - "; ?> - - - - - - -
Hero will be ready in " . $timeleft . "
-
- \"".$name."\" - $name ($name1) -
" - ?> - -
-
diff --git a/Templates/Build/37_revive.tpl b/Templates/Build/37_revive.tpl index 92fdc55a..31461483 100644 --- a/Templates/Build/37_revive.tpl +++ b/Templates/Build/37_revive.tpl @@ -1,5 +1,20 @@ getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } /*-------------------------------------------------------*\ | ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* | +---------------------------------------------------------+ @@ -44,8 +59,8 @@ $clay = (${'h'.$hero_info['unit'].'_full'}[$hero_info['level']]['clay']); $iron = (${'h'.$hero_info['unit'].'_full'}[$hero_info['level']]['iron']); $crop = (${'h'.$hero_info['unit'].'_full'}[$hero_info['level']]['crop']); - $training_time = $generator->getTimeFormat(round((${'h'.$hero_info['unit'].'_full'}[$hero_info['level']]['time']) / SPEED)); - $training_time2 = time() + (${'h'.$hero_info['unit'].'_full'}[$hero_info['level']]['time']) / SPEED; + $training_time = $generator->getTimeFormat(round((${'h'.$hero_info['unit'].'_full'}[$hero_info['level']]['time']) / SPEED * $artefact_bonus2 / $artefact_bonus)); + $training_time2 = time() + round((${'h'.$hero_info['unit'].'_full'}[$hero_info['level']]['time']) / SPEED * $artefact_bonus2 / $artefact_bonus); ?> @@ -55,7 +70,31 @@ - + time()) { + $timeleft = $generator->getTimeFormat($hero_info['trainingtime'] - time()); + +?> +
+ + + "; ?> + + + + + + +
Hero will be ready in " . $timeleft . "
+
+ \"".$name."\" + $name ($name1) +
" + ?> + +
+
@@ -115,7 +154,7 @@ ?> - + @@ -125,7 +164,6 @@ if($_GET['revive'] == 1){ if($session->access != BANNED){ mysql_query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `health` = '100', `trainingtime` = '".$training_time2."' WHERE `uid` = '".$session->uid."'"); - mysql_query("UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".$village->wid.""); mysql_query("UPDATE " . TB_PREFIX . "vdata SET `wood` = `wood` - ".$wood." WHERE `wref` = '" . $village->wid . "'"); mysql_query("UPDATE " . TB_PREFIX . "vdata SET `clay` = `clay` - ".$clay." WHERE `wref` = '" . $village->wid . "'"); mysql_query("UPDATE " . TB_PREFIX . "vdata SET `iron` = `wood` - ".$iron." WHERE `wref` = '" . $village->wid . "'"); @@ -135,7 +173,10 @@ header("Location: banned.php"); } } - - +if($hero_info['trainingtime'] < time() && $hero_info['dead'] == 0 && $hero_info['nothome'] == 0){ +mysql_query("UPDATE " . TB_PREFIX . "units SET hero = 1 WHERE vref = ".$village->wid.""); +} + if($hero_info['trainingtime'] < time()) { include ("37_train.tpl"); + } ?> \ No newline at end of file diff --git a/Templates/Build/37_train.tpl b/Templates/Build/37_train.tpl index 2051188e..93f6383d 100644 --- a/Templates/Build/37_train.tpl +++ b/Templates/Build/37_train.tpl @@ -3,7 +3,22 @@ + Travian File: 37_train.tpl + + Developed by vnnbot.net + +=============================*/ - + $artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } //check if there is unit needed in the village @@ -31,7 +46,7 @@ if($session->tribe == 1) { \"Crop\"".$u1['crop']."| \"Crop6| \"Duration\""; - $output.=$generator->getTimeFormat(round($u1['time'] / SPEED)*3); + $output.=$generator->getTimeFormat(round($u1['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3); $output.="
@@ -64,7 +79,7 @@ if($session->tribe == 1) { \"Crop\"".$u2['crop']."| \"Crop6| \"Duration\""; - $output.=$generator->getTimeFormat(round($u2['time'] / SPEED)*3); + $output.=$generator->getTimeFormat(round($u2['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3); $output.=" @@ -98,7 +113,7 @@ if($session->tribe == 1) { \"Crop6| \"Duration\""; - $output.= $generator->getTimeFormat(round($u3['time'] / SPEED)*3); + $output.= $generator->getTimeFormat(round($u3['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3); $output.= " @@ -130,7 +145,7 @@ if($session->tribe == 1) { \"Crop\"".$u5['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u5['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u5['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -161,7 +176,7 @@ if($session->tribe == 1) { \"Crop\"".$u6['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u6['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u6['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -195,7 +210,7 @@ $output.=" \"Crop\"".$u11['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u11['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u11['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -226,7 +241,7 @@ $output.=" \"Crop\"".$u12['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u12['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u12['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -258,7 +273,7 @@ $output.=" \"Crop\"".$u13['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u13['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u13['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -289,7 +304,7 @@ $output.=" \"Crop\"".$u15['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u15['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u15['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -321,7 +336,7 @@ $output.=" \"Crop\"".$u16['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u16['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u16['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -355,7 +370,7 @@ $output.=" \"Crop\"".$u21['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u21['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u21['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -386,7 +401,7 @@ $output.=" \"Crop\"".$u22['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u22['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u22['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -418,7 +433,7 @@ $output.=" \"Crop\"".$u24['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u24['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u24['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -449,7 +464,7 @@ $output.=" \"Crop\"".$u25['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u25['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u25['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." @@ -481,7 +496,7 @@ $output.=" \"Crop\"".$u26['crop']."| \"Crop6| \"Duration\"". - $generator->getTimeFormat(round($u26['time'] / SPEED)*3)." + $generator->getTimeFormat(round($u26['time'] / SPEED * $artefact_bonus2 / $artefact_bonus)*3)." diff --git a/Templates/Build/42_train.tpl b/Templates/Build/42_train.tpl index 9438a0c4..d306107a 100644 --- a/Templates/Build/42_train.tpl +++ b/Templates/Build/42_train.tpl @@ -1,5 +1,20 @@ -getOwnUniqueArtefactInfo2($session->uid,5,3,0)); + $artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,5,1,1)); + $artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,5,2,0)); + if($artefact > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact1 > 0){ + $artefact_bonus = 2; + $artefact_bonus2 = 1; + }else if($artefact2 > 0){ + $artefact_bonus = 4; + $artefact_bonus2 = 3; + }else{ + $artefact_bonus = 1; + $artefact_bonus2 = 1; + } for ($i=($session->tribe-1)*10+7;$i<=($session->tribe-1)*10+8;$i++) { if ($technology->getTech($i)) { echo " @@ -9,7 +24,7 @@ echo "
\"Wood\"".(${'u'.$i}['wood']*3)."|\"Clay\"".(${'u'.$i}['clay']*3)."|\"Iron\"".(${'u'.$i}['iron']*3)."|\"Crop\"".(${'u'.$i}['crop']*3)."|\"Crop".${'u'.$i}['pop']."|\"Duration\""; -echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid42[$village->resarray['f'.$id]]['attri'] / 100) / SPEED)); +echo $generator->getTimeFormat(round(${'u'.$i}['time'] * ($bid42[$village->resarray['f'.$id]]['attri'] / 100) / SPEED * $artefact_bonus2 / $artefact_bonus)); if($session->userinfo['gold'] >= 3 && $building->getTypeLevel(17) >= 1) { echo "|maxUnitPlus($i))."&r2=".((${'u'.$i}['clay'])*$technology->maxUnitPlus($i))."&r3=".((${'u'.$i}['iron'])*$technology->maxUnitPlus($i))."&r4=".((${'u'.$i}['crop'])*$technology->maxUnitPlus($i))."\" title=\"NPC trade\">\"NPC"; } diff --git a/install/data/sql.sql b/install/data/sql.sql index 66ea41da..07f804e9 100644 --- a/install/data/sql.sql +++ b/install/data/sql.sql @@ -793,19 +793,20 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%hero` ( `uid` int(11) unsigned NOT NULL, `unit` smallint(2) unsigned NOT NULL, `name` tinytext NOT NULL, - `wref` mediumint(3) unsigned NOT NULL, - `level` tinyint(1) unsigned NOT NULL, + `wref` int(11) unsigned NOT NULL, + `level` mediumint(3) unsigned NOT NULL, `points` mediumint(3) unsigned NOT NULL, `experience` int(11) NOT NULL, `dead` tinyint(1) unsigned NOT NULL, `health` float(12,9) unsigned NOT NULL, - `attack` tinyint(1) unsigned NOT NULL, - `defence` tinyint(1) unsigned NOT NULL, - `attackbonus` tinyint(1) unsigned NOT NULL, - `defencebonus` tinyint(1) unsigned NOT NULL, - `regeneration` tinyint(1) unsigned NOT NULL, + `attack` tinyint(3) unsigned NOT NULL, + `defence` tinyint(3) unsigned NOT NULL, + `attackbonus` tinyint(3) unsigned NOT NULL, + `defencebonus` tinyint(3) unsigned NOT NULL, + `regeneration` tinyint(3) unsigned NOT NULL, `autoregen` int(2) NOT NULL, `trainingtime` int(11) unsigned NOT NULL, + `nothome` tinyint(1) unsigned NOT NULL, PRIMARY KEY (`heroid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; diff --git a/install/include/multihunter.php b/install/include/multihunter.php index 525e2544..d4982609 100644 --- a/install/include/multihunter.php +++ b/install/include/multihunter.php @@ -1,5 +1,5 @@ \ No newline at end of file