Newbie Spellweaver
- Joined
- Mar 5, 2012
- Messages
- 29
- Reaction score
- 20
I think make a update soon file
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!<?php
include("GameEngine/Database.php");
if(isset($_GET['uid'])){
$uid = $_GET['uid'];
} else {
$uid = "1";
}
if(isset($_GET['size'])){
if($_GET['size']=='profile'){
$size = '31x40';
}elseif($_GET['size']=='inventory'){
$size = '64x82';
}elseif($_GET['size']=='sideinfo'){
$size = '119x136';
}
} else {
$size = "119x136";
}
$herodetail = $database->HeroFace($uid);
if($herodetail['color']==0){
$color = "black";
}
if($herodetail['color']==1){
$color = "brown";
}
if($herodetail['color']==2){
$color = "darkbrown";
}
if($herodetail['color']==3){
$color = "yellow";
}
if($herodetail['color']==4){
$color = "red";
}
$geteye = $herodetail['eye'];
$geteyebrow = $herodetail['eyebrow'];
$getnose = $herodetail['nose'];
$getear = $herodetail['ear'];
$getmouth = $herodetail['mouth'];
$getbeard = $herodetail['beard'];
$gethair = $herodetail['hair'];
$getface = $herodetail['face'];
// USAGE EXAMPLE:
$body = imagecreatefrompng('img/hero/head/'.$size.'/face0.png');
if($getbeard!=5){
$beard = imagecreatefrompng('img/hero/head/'.$size.'/beard/beard'.$getbeard.'-'.$color.'.png');
}
$ear = imagecreatefrompng('img/hero/head/'.$size.'/ear/ear'.$getear.'.png');
$eye = imagecreatefrompng('img/hero/head/'.$size.'/eye/eye'.$geteye.'.png');
$eyebrow = imagecreatefrompng('img/hero/head/'.$size.'/eyebrow/eyebrow'.$geteyebrow.'-'.$color.'.png');
if($gethair!=5){
$hair = imagecreatefrompng('img/hero/head/'.$size.'/hair/hair'.$gethair.'-'.$color.'.png');
}
$mouth = imagecreatefrompng('img/hero/head/'.$size.'/mouth/mouth'.$getmouth.'.png');
$nose = imagecreatefrompng('img/hero/head/'.$size.'/nose/nose'.$getnose.'.png');
$face = imagecreatefrompng('img/hero/head/'.$size.'/face/face'.$getface.'.png');
// SAME COMMANDS:
$database->imagecopymerge_alpha($body, $face, 0, 0, 0, 0, imagesx($face), imagesy($face),100);
$database->imagecopymerge_alpha($body, $ear, 0, 0, 0, 0, imagesx($ear), imagesy($ear),100);
$database->imagecopymerge_alpha($body, $eye, 0, 0, 0, 0, imagesx($eye), imagesy($eye),100);
$database->imagecopymerge_alpha($body, $eyebrow, 0, 0, 0, 0, imagesx($eyebrow), imagesy($eyebrow),100);
if($gethair!=5){
$database->imagecopymerge_alpha($body, $hair, 0, 0, 0, 0, imagesx($hair), imagesy($hair),100);
}
$database->imagecopymerge_alpha($body, $mouth, 0, 0, 0, 0, imagesx($mouth), imagesy($mouth),100);
$database->imagecopymerge_alpha($body, $nose, 0, 0, 0, 0, imagesx($nose), imagesy($nose),100);
if($getbeard!=5){
$database->imagecopymerge_alpha($body, $beard, 0, 0, 0, 0, imagesx($beard), imagesy($beard),100);
}
// OUTPUT IMAGE:
header("Content-Type: image/png");
imagesavealpha($body, true);
imagepng($body, NULL);
?>
<?php
session_start();
include("GameEngine/Database.php");
if(isset($_GET['uid'])){
$uid = $_GET['uid'];
} else {
$uid = "1";
}
if(isset($_GET['size'])){
if($_GET['size']=='profile'){
$size = '160x205';
$fsize = '31x40';
$w = 79;
$h = 18;
}elseif($_GET['size']=='inventory'){
$size = '330x422';
$fsize = '64x82';
$w = 163;
$h = 37;
}
} else {
$size = "330x422";
$fsize = '64x82';
$w = 163;
$h = 37;
}
$herodetail = $database->HeroFace($uid);
if($herodetail['color']==0){
$color = "black";
}
if($herodetail['color']==1){
$color = "brown";
}
if($herodetail['color']==2){
$color = "darkbrown";
}
if($herodetail['color']==3){
$color = "yellow";
}
if($herodetail['color']==4){
$color = "red";
}
$geteye = $herodetail['eye'];
$geteyebrow = $herodetail['eyebrow'];
$getnose = $herodetail['nose'];
$getear = $herodetail['ear'];
$getmouth = $herodetail['mouth'];
$getbeard = $herodetail['beard'];
$gethair = $herodetail['hair'];
$getface = $herodetail['face'];
$getfoot = $herodetail['foot'];
$gethelmet = $herodetail['helmet'];
$gethorse = $herodetail['horse'];
$getleftHand = $herodetail['leftHand'];
$getrightHand = $herodetail['rightHand'];
// HERO FACE:
$face0 = imagecreatefrompng('img/hero/head/'.$fsize.'/face0.png');
$face = imagecreatefrompng('img/hero/head/'.$fsize.'/face/face'.$getface.'.png');
$ear = imagecreatefrompng('img/hero/head/'.$fsize.'/ear/ear'.$getear.'.png');
$eye = imagecreatefrompng('img/hero/head/'.$fsize.'/eye/eye'.$geteye.'.png');
$eyebrow = imagecreatefrompng('img/hero/head/'.$fsize.'/eyebrow/eyebrow'.$geteyebrow.'-'.$color.'.png');
if($gethair!=5){
$hair = imagecreatefrompng('img/hero/head/'.$fsize.'/hair/hair'.$gethair.'-'.$color.'.png');
}
$mouth = imagecreatefrompng('img/hero/head/'.$fsize.'/mouth/mouth'.$getmouth.'.png');
$nose = imagecreatefrompng('img/hero/head/'.$fsize.'/nose/nose'.$getnose.'.png');
if($getbeard!=5){
$beard = imagecreatefrompng('img/hero/head/'.$fsize.'/beard/beard'.$getbeard.'-'.$color.'.png');
}
if($gethelmet>=1 && $gethelmet<=3){
$helmet = 1;
}elseif($gethelmet>=4 && $gethelmet<=6){
$helmet = 2;
}elseif($gethelmet>=7 && $gethelmet<=9){
$helmet = 3;
}elseif($gethelmet>=10 && $gethelmet<=12){
$helmet = 4;
}elseif($gethelmet>=13 && $gethelmet<=15){
$helmet = 5;
}
if($getfoot>=94 && $getfoot<=96){
$shoes = 1;
}elseif($getfoot>=97 && $getfoot<=99){
$shoes = 2;
}elseif($getfoot>=100 && $getfoot<=102){
$shoes = 3;
}
if($getleftHand==0){
$leftHand = 'leftHand';
}elseif($getleftHand>=61 && $getleftHand<=63){
$leftHand = 'map0';
}elseif($getleftHand>=64 && $getleftHand<=66){
$leftHand = 'flag0';
}elseif($getleftHand>=67 && $getleftHand<=69){
$leftHand = 'flag1';
}elseif($getleftHand>=73 && $getleftHand<=75){
$leftHand = 'sack0';
}elseif($getleftHand>=76 && $getleftHand<=78){
$leftHand = 'shield0';
}elseif($getleftHand>=79 && $getleftHand<=81){
$leftHand = 'horn0';
}
if($getrightHand==0){
$rightHand = 'rightHand';
}elseif($getrightHand>=16 && $getrightHand<=18){
$rightHand = 'sword0';
}elseif($getrightHand>=19 && $getrightHand<=21){
$rightHand = 'sword1';
}elseif($getrightHand>=22 && $getrightHand<=24){
$rightHand = 'sword2';
}elseif($getrightHand>=25 && $getrightHand<=27){
$rightHand = 'sword3';
}elseif($getrightHand>=28 && $getrightHand<=30){
$rightHand = 'lance0';
}elseif($getrightHand>=31 && $getrightHand<=33){
$rightHand = 'spear0';
}elseif($getrightHand>=34 && $getrightHand<=36){
$rightHand = 'sword4';
}elseif($getrightHand>=37 && $getrightHand<=39){
$rightHand = 'bow0';
}elseif($getrightHand>=40 && $getrightHand<=42){
$rightHand = 'staff0';
}elseif($getrightHand>=43 && $getrightHand<=45){
$rightHand = 'spear1';
}elseif($getrightHand>=46 && $getrightHand<=48){
$rightHand = 'club0';
}elseif($getrightHand>=49 && $getrightHand<=51){
$rightHand = 'spear2';
}elseif($getrightHand>=52 && $getrightHand<=54){
$rightHand = 'axe0';
}elseif($getrightHand>=55 && $getrightHand<=57){
$rightHand = 'hammer0';
}elseif($getrightHand>=58 && $getrightHand<=60){
$rightHand = 'sword5';
}
// HERO BODY:
$body = imagecreatefrompng('img/hero/body/'.$size.'/hero_body0.png');
$leftHand = imagecreatefrompng('img/hero/body/'.$size.'/'.$leftHand.'.png');
$rightHand = imagecreatefrompng('img/hero/body/'.$size.'/'.$rightHand.'.png');
if($gethelmet!=0){
$helmet = imagecreatefrompng('img/hero/body/'.$size.'/helmet'.$helmet.'.png');
}
if($getfoot!=0){
$shoes = imagecreatefrompng('img/hero/body/'.$size.'/shoes'.$shoes.'.png');
}
if($gethorse!=0){
$horse = imagecreatefrompng('img/hero/body/'.$size.'/horse0.png');
}
$database->imagecopymerge_alpha($body, $face0, $w, $h, 0, 0, imagesx($face0), imagesy($face0),100);
$database->imagecopymerge_alpha($body, $face, $w, $h, 0, 0, imagesx($face), imagesy($face),100);
$database->imagecopymerge_alpha($body, $ear, $w, $h, 0, 0, imagesx($ear), imagesy($ear),100);
$database->imagecopymerge_alpha($body, $eye, $w, $h, 0, 0, imagesx($eye), imagesy($eye),100);
$database->imagecopymerge_alpha($body, $eyebrow, $w, $h, 0, 0, imagesx($eyebrow), imagesy($eyebrow),100);
if($gethair!=5){
$database->imagecopymerge_alpha($body, $hair, $w, $h, 0, 0, imagesx($hair), imagesy($hair),100);
}
$database->imagecopymerge_alpha($body, $mouth, $w, $h, 0, 0, imagesx($mouth), imagesy($mouth),100);
$database->imagecopymerge_alpha($body, $nose, $w, $h, 0, 0, imagesx($nose), imagesy($nose),100);
if($getbeard!=5){
$database->imagecopymerge_alpha($body, $beard, $w, $h, 0, 0, imagesx($beard), imagesy($beard),100);
}
if($gethorse!=0){
$database->imagecopymerge_alpha($body, $horse, 0, 0, 0, 0, imagesx($horse), imagesy($horse),100);
}
if($getfoot!=0){
$database->imagecopymerge_alpha($body, $shoes, 0, 0, 0, 0, imagesx($shoes), imagesy($shoes),100);
}
$database->imagecopymerge_alpha($body, $rightHand, 0, 0, 0, 0, imagesx($rightHand), imagesy($rightHand),100);
$database->imagecopymerge_alpha($body, $leftHand, 0, 0, 0, 0, imagesx($leftHand), imagesy($leftHand),100);
if($gethelmet!=0){
$database->imagecopymerge_alpha($body, $helmet, 0, 0, 0, 0, imagesx($helmet), imagesy($helmet),100);
}
// OUTPUT IMAGE:
header("Content-Type: image/png");
imagesavealpha($body, true);
imagepng($body, NULL);
?>
<?php
include("GameEngine/Village.php");
include("GameEngine/Inventory.php");
$start = $generator->pageLoadTimeStart();
include "Templates/html.tpl";
if(isset($_GET['inventory'])){
$uid = $session->uid;
if(isset($_GET['helmet'])){
$database->setHeroInventory($uid, "helmet", 0);
$database->editProcItem($_GET['helmet'], 0);
$database->modifyHeroFace($uid, "helmet", 0);
}elseif(isset($_GET['leftHand'])){
$database->setHeroInventory($uid, "leftHand", 0);
$database->editProcItem($_GET['leftHand'], 0);
$database->modifyHeroFace($uid, "leftHand", 0);
}elseif(isset($_GET['rightHand'])){
$itemData = $database->getHeroInventory($uid);
$itemData2 = $database->getItemData($itemData['rightHand']);
if($itemData2['type']==16){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==17){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==18){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==19){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==20){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==21){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==22){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==23){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==24){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==25){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==26){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==27){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==28){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==29){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==30){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==31){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==32){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==33){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==34){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==35){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==36){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==37){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==38){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==39){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==40){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==41){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==42){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==43){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==44){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==45){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==46){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==47){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==48){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==49){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==50){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==51){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==52){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==53){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==54){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==55){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==56){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==57){
$database->modifyHero2("itempower",1500,$uid,2);
}
if($itemData2['type']==58){
$database->modifyHero2("itempower",500,$uid,2);
}
if($itemData2['type']==59){
$database->modifyHero2("itempower",1000,$uid,2);
}
if($itemData2['type']==60){
$database->modifyHero2("itempower",1500,$uid,2);
}
$database->setHeroInventory($uid, "rightHand", 0);
$database->editProcItem($_GET['rightHand'], 0);
$database->modifyHeroFace($uid, "rightHand", 0);
}elseif(isset($_GET['body'])){
$database->setHeroInventory($uid, "body", 0);
$database->editProcItem($_GET['body'], 0);
$database->modifyHeroFace($uid, "body", 0);
}elseif(isset($_GET['horse'])){
$itemData = $database->getHeroInventory($uid);
$itemData2 = $database->getItemData($itemData['horse']);
if($itemData2['type']==103){
$database->modifyHero2("speed",7,$uid,2);
}
if($itemData2['type']==104){
$database->modifyHero2("speed",10,$uid,2);
}
if($itemData2['type']==105){
$database->modifyHero2("speed",13,$uid,2);
}
$database->setHeroInventory($uid, "horse", 0);
$database->editProcItem($_GET['horse'], 0);
$database->modifyHeroFace($uid, "horse", 0);
}elseif(isset($_GET['bag'])){
$database->setHeroInventory($uid, "bag", 0);
$database->editProcItem($_GET['bag'], 0);
$itemdata = $database->getItemData($_GET['bag']);
if($itemdata['btype']==9){
$database->editHeroType($itemdata['id'], 0, 2);
}
}
}
if(isset($_GET['showhero'])){
$database->modifyHero2('hide', 0, $session->uid, 0);
}
if(isset($_GET['hidehero'])){
$database->modifyHero2('hide', 1, $session->uid, 0);
}
?>
<body class="v35 webkit chrome hero_inventory">
<div id="wrapper">
<img id="staticElements" src="img/x.gif" alt="" />
<div id="logoutContainer">
<a id="logout" href="logout.php" title="<?php echo LOGOUT; ?>"> </a>
</div>
<div class="bodyWrapper">
<div id="header">
<div id="mtop">
<a id="logo" href="<?php echo HOMEPAGE; ?>" target="_blank" title="<?php echo SERVER_NAME ?>"></a>
<ul id="navigation">
<li id="n1" class="resources">
<a class="" href="dorf1.php" accesskey="1" title="<?php echo HEADER_DORF1; ?>"></a>
</li>
<li id="n2" class="village">
<a class="" href="dorf2.php" accesskey="2" title="<?php echo HEADER_DORF2; ?>"></a>
</li>
<li id="n3" class="map">
<a class="" href="karte.php" accesskey="3" title="<?php echo HEADER_MAP; ?>"></a>
</li>
<li id="n4" class="stats">
<a class="" href="statistiken.php" accesskey="4" title="<?php echo HEADER_STATS; ?>"></a>
</li>
<?php
if(count($database->getMessage2($session->uid)) >= 1000) {
$unmsg = "+1000";
} else { $unmsg = count($database->getMessage2($session->uid)); }
if(count($database->getNotice5($session->uid)) >= 1000) {
$unnotice = "+1000";
} else { $unnotice = count($database->getNotice5($session->uid)); }
?>
<li id="n5" class="reports">
<a href="berichte.php" accesskey="5" title="<?php echo HEADER_NOTICES; ?><?php if($message->nunread){ echo' ('.count($database->getNotice5($session->uid)).')'; } ?>"></a>
<?php
if($message->nunread){
echo "<div class=\"ltr bubble\" title=\"".$unnotice." ".HEADER_NOTICES_NEW."\" style=\"display:block\">
<div class=\"bubble-background-l\"></div>
<div class=\"bubble-background-r\"></div>
<div class=\"bubble-content\">".$unnotice."</div></div>";
}
?>
</li>
<li id="n6" class="messages">
<a href="nachrichten.php" accesskey="6" title="<?php echo HEADER_MESSAGES; ?><?php if($message->unread){ echo' ('.count($database->getMessage2($session->uid)).')'; } ?>"></a>
<?php
if($message->unread) {
echo "<div class=\"ltr bubble\" title=\"".$unmsg." ".HEADER_MESSAGES_NEW."\" style=\"display:block\">
<div class=\"bubble-background-l\"></div>
<div class=\"bubble-background-r\"></div>
<div class=\"bubble-content\">".$unmsg."</div></div>";
}
?>
</li>
</ul>
<div class="clear"></div>
</div>
</div>
<div id="mid">
<div class="clear"></div>
<div id="contentOuterContainer">
<div class="contentTitle"> </div>
<div class="contentContainer">
<div id="content" class="hero_inventory"><h1 class="titleInHeader">Hero</h1>
<div class="contentNavi subNavi">
<div class="container active">
<div class="background-start"> </div>
<div class="background-end"> </div>
<div class="content"><a href="hero_inventory.php"><span class="tabItem">Attributes</span></a></div>
</div>
<div class="container normal">
<div class="background-start"> </div>
<div class="background-end"> </div>
<div class="content"><a href="hero.php"><span class="tabItem">Appearance</span></a></div>
</div>
<div class="container normal">
<div class="background-start"> </div>
<div class="background-end"> </div>
<div class="content"><a href="hero_adventure.php"><span class="tabItem">Adventures</span></a></div>
</div>
<div class="container normal">
<div class="background-start"> </div>
<div class="background-end"> </div>
<div class="content"><a href="hero_auction.php"><span class="tabItem">Auctions</span></a></div>
</div><div class="clear"></div>
</div>
<script type="text/javascript">
window.addEvent('domready', function()
{
$$('.subNavi').each(function(element)
{
new Travian.Game.Menu(element);
});
});
</script>
<div class="clear"></div>
<?php
include("Templates/hero.tpl");
?>
<div id="bodyOptions">
<div id="hero_body_container">
<div id="hero_body">
<img class="heroBody" src="hero_body.php?uid=<?php echo $session->uid; ?>&size=inventory&<?php echo $hero['hash']; ?>">
<div class="clear"></div>
</div>
<div id="hero_body_content">
<div class="content">
<?php
$gi = $database->getHeroInventory($session->uid);
$dis = '';
if($hero['dead']==1){
$dis = ' disabled';
}
if($gi['helmet']!=0){
$data = $database->getItemData($gi['helmet']);
$item = '<a href="?inventory&helmet='.$gi['helmet'].'"><div id="item_'.$gi['helmet'].'" class="item item_'.$data['type'].' onHero'.$dis.'" style="position: relative; left: 0px; top: 0px; "><div class="amount">'.$data['num'].'</div></div></a>';
echo '<div id="helmet" class="draggable">'.$item.'</div>';
}else{
echo '<div id="helmet" class="draggable"></div>';
}
if($gi['leftHand']!=0){
$data = $database->getItemData($gi['leftHand']);
$item = '<a href="?inventory&leftHand='.$gi['leftHand'].'"><div id="item_'.$gi['leftHand'].'" class="item item_'.$data['type'].' onHero'.$dis.'" style="position: relative; left: 0px; top: 0px; "><div class="amount">'.$data['num'].'</div></div></a>';
echo '<div id="leftHand" class="draggable">'.$item.'</div>';
}else{
echo '<div id="leftHand" class="draggable"></div>';
}
if($gi['rightHand']!=0){
$data = $database->getItemData($gi['rightHand']);
$item = '<a href="?inventory&rightHand='.$gi['rightHand'].'"><div id="item_'.$gi['rightHand'].'" class="item item_'.$data['type'].' onHero'.$dis.'" style="position: relative; left: 0px; top: 0px; "><div class="amount">'.$data['num'].'</div></div></a>';
echo '<div id="rightHand" class="draggable">'.$item.'</div>';
}else{
echo '<div id="rightHand" class="draggable"></div>';
}
if($gi['body']!=0){
$data = $database->getItemData($gi['body']);
$item = '<a href="?inventory&body='.$gi['body'].'"><div id="item_'.$gi['body'].'" class="item item_'.$data['type'].' onHero'.$dis.'" style="position: relative; left: 0px; top: 0px; "><div class="amount">'.$data['num'].'</div></div></a>';
echo '<div id="body" class="draggable">'.$item.'</div>';
}else{
echo '<div id="body" class="draggable"></div>';
}
if($gi['horse']!=0){
$data = $database->getItemData($gi['horse']);
$item = '<a href="?inventory&horse='.$gi['horse'].'"><div id="item_'.$gi['horse'].'" class="item item_'.$data['type'].' onHero'.$dis.'" style="position: relative; left: 0px; top: 0px; "><div class="amount">'.$data['num'].'</div></div></a>';
echo '<div id="horse" class="draggable">'.$item.'</div>';
}else{
echo '<div id="horse" class="draggable"></div>';
}
if($gi['bag']!=0){
$data = $database->getItemData($gi['bag']);
if($data['btype'] != 9){
$item = '<a href="?inventory&bag='.$gi['bag'].'"><div id="item_'.$gi['bag'].'" class="item item_'.$data['type'].' onHero" style="position: relative; left: 0px; top: 0px; "><div class="amount">'.$data['num'].'</div></div></a>';
echo '<div id="bag" class="draggable">'.$item.'</div>';
}else{
$data = $database->getItemData($gi['bag']);
$item = '<a href="?inventory&bag='.$gi['bag'].'"><div id="item_'.$gi['bag'].'" class="item item_114 onHero" style="position: relative; left: 0px; top: 0px; "><div class="amount">'.$data['type'].'</div></div></a>';
echo '<div id="bag" class="draggable">'.$item.'</div>';
}
}else{
echo '<div id="bag" class="draggable"></div>';
}
?>
</div>
</div>
</div>
<div class="heroHidden">
<?php
if($hero['hide'] == 1){
?>
<input type="checkbox" class="check" name="hideShow" onClick="window.location.href = '?showhero=<?php echo $hero['heroid'];?>';" checked="checked"> When checked hero will hide when village attacked.
<?php
}else{
?>
<input type="checkbox" class="check" name="hideShow" onClick="window.location.href = '?hidehero=<?php echo $hero['heroid'];?>';"> When checked hero will hide when village attacked.
<?php } ?>
</div>
</div>
<div id="hero_inventory">
<div class="boxes boxesColor gray"><div class="boxes-tl"></div><div class="boxes-tr"></div><div class="boxes-tc"></div><div class="boxes-ml"></div><div class="boxes-mr"></div><div class="boxes-mc"></div><div class="boxes-bl"></div><div class="boxes-br"></div><div class="boxes-bc"></div><div class="boxes-contents cf">
<div id="itemsToSale"><?php
$prefix = "".TB_PREFIX."heroitems";
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."heroitems WHERE (proc = 0 OR (btype = 9 && num - type != 0)) AND uid = $session->uid");
$query = mysql_num_rows($sql);
$outputList = '';
$inv = 1;
while($row = mysql_fetch_array($sql)){
$id = $row["id"];$uid = $row["uid"];$btype = $row["btype"];$type = $row["type"];$num = $row["num"];$proc = $row["proc"];
include "Templates/Auction/alt.tpl";
if($btype<=10 or $btype==11 or $btype==13){
if($hero['dead']==1){
$dis = ' disabled';
$deadTitle = "
<span class='itemNotMoveable'>You cannot use this item when your hero is dead.</span><br>";
}else{
$dis = '';
$deadTitle = '';
}
}else{
$dis = '';
$deadTitle = '';
}
if($btype == 9){
$amount = '('.$num.') ';
$outputList .= "<div id=\"inventory_".$inv."\" class=\"inventory draggable\">";
$outputList .= "<div id=\"item_".$id."\" title=\"".$amount."".$name."||".$deadTitle."".$title."\" class=\"item item_114".$dis."\" style=\"position:relative;left:0px;top:0px;\">";
$outputList .= "<div class=\"amount\">".($num)."</div>";
$outputList .= "</div>";
$outputList .= '</div>';
}else{
if($num==1){$amount = '';}else{$amount = '('.$num.') ';}
$outputList .= "<div id=\"inventory_".$inv."\" class=\"inventory draggable\">";
$outputList .= "<div id=\"item_".$id."\" title=\"".$amount."".$name."||".$deadTitle."".$title."\" class=\"item item_".$item."".$dis."\" style=\"position:relative;left:0px;top:0px;\">";
$outputList .= "<div class=\"amount\">".($num)."</div>";
$outputList .= "</div>";
$outputList .= '</div>';
$inv++;
}
}
echo $outputList;
if($inv <= 12){
for($i=$inv;$i<=((12+$inv)-$inv);$i++){
echo '<div id="inventory_'.$i.'" class="inventory draggable"></div>';
}
}else{
echo '<div id="inventory_'.$i.'" class="inventory draggable"></div>';
}
?>
<div class="market">
<a class="buy arrow" href="hero_auction.php?action=buy">Buy Items</a>
<a class="sell arrow" href="hero_auction.php?action=sell">Sell Items</a>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
<div id="placeHolder"></div>
<form id="HeroInventory" method="post" action="hero_inventory.php">
<input type="hidden" name="a" value="inventory">
<input type="hidden" name="id" value="<?php echo $_POST['id']; ?>">
<input type="hidden" name="amount" value="<?php echo $_POST['amount']; ?>">
<input type="hidden" name="btype" value="<?php echo $_POST['btype']; ?>">
<input type="hidden" name="type" value="<?php echo $_POST['type']; ?>">
</form>
<script type="text/javascript">
Travian.Game.Hero.Inventory = new (new Class(
{
b10: '<p><div style="color:#F90">Experience: <?php echo $hero['experience']; ?><br>?????? ?????: 10<br>????? ??? ?? ???????: <?php echo ($hero['experience']+10); ?><br></div>',
b15: '<table id="heroInventoryDataDialog" class="transparent" cellspacing="0" cellpadding="0"><tbody><tr class="rowBeforeUse"><th>Jelenlegi kultúrpont arány</th><td><?php echo $database->getUserField($session->uid, 'cp',0); ?></td></tr><tr class="rowUseValue"><th>?????? ?????? ???? ???? ??? ???? ??? ????:</th><td class="displayUseValue"><?php echo $database->getVSumField($session->uid, 'cp'); ?></td></tr><tr class="rowAfterUse"><th>?????? ?????? ??? ?? ???? ??? ????:</th><td class="displayAfterUse"><?php echo ($database->getUserField($session->uid, 'cp',0)+$database->getVSumField($session->uid, 'cp')); ?></td></tr></tbody></table>',
alreadyOpen: false,
textSingle: 'Do you really want to wear this item?',
textMulti: 'Total item used: <input class=\"text\" id=\"amount\" type=\"text\" value=\"\" />'.unescapeHtml(),
initialize: function() {
var $this = this;
<?php
$sql2 = mysql_query("SELECT * FROM ".TB_PREFIX."heroitems WHERE proc = 0 AND uid = $session->uid");
while($row2 = mysql_fetch_array($sql2)){
$id = $row2["id"];$num = $row2["num"];$btype = $row2["btype"];$type = $row2["type"];
if($btype<=10 or $btype==11 or $btype==13){
if($hero['dead']==0){
if($num==1){
?>
$('item_<?php echo $id; ?>').addEvent('click', function() { $this.showItem(<?php echo $id; ?>,<?php echo $num; ?>,<?php echo $btype; ?>,<?php echo $type; ?>);});
<?php }else{ ?>
$('item_<?php echo $id; ?>').addEvent('click', function() { $this.sellItem(<?php echo $id; ?>,<?php echo $num; ?>,<?php echo $btype; ?>,<?php echo $type; ?>);});
<?php
}
}
}else{
?>
$('item_<?php echo $id; ?>').addEvent('click', function() { $this.sellItem(<?php echo $id; ?>,<?php echo $num; ?>,<?php echo $btype; ?>,<?php echo $type; ?>);});
<?php
}
}
?>
},
showItem: function (id, amount, btype, type){
var $this = this;
$('HeroInventory').id.value = id;
$('HeroInventory').amount.value = amount;
$('HeroInventory').btype.value = btype;
$('HeroInventory').type.value = type;
$('HeroInventory').submit();
},
sellItem: function (id, amount, btype, type){
var html = '';
var $this = this;
if (this.alreadyOpen){
return;
}
this.alreadyOpen = true;
$('HeroInventory').id.value = id;
$('HeroInventory').amount.value = amount;
$('HeroInventory').btype.value = btype;
$('HeroInventory').type.value = type;
if (amount == 1){
if(btype == 10){
html = $this.textSingle;
html += this.b10;
}else
if(btype == 15){
html = $this.textSingle;
html += this.b15;
}else{
html = $this.textSingle;
}
}else{
if(btype == 10){
exp_a = '<?php echo $hero['experience']; ?>';
exp_b = amount*10;
exp_total = <?php echo $hero['experience']; ?>+exp_b;
html = $this.textMulti;
html += '<table id="heroInventoryDataDialog" class="transparent" cellspacing="0" cellpadding="0"><tbody><tr class="rowBeforeUse"><th>??????? ???? ??????:</th><td>'+exp_a+'</td></tr><tr class="rowUseValue"><th>??????? ???? ???? ?? ???? ???? ?????:</th><td class="displayUseValue">'+exp_b+'</td></tr><tr class="rowAfterUse"><th>??????? ?????? ??? ?? ???? ?????:</th><td class="displayAfterUse">'+exp_total+'</td></tr></tbody></table>';
}else
if(btype == 15){
cp = '<?php echo $database->getUserField($session->uid, 'cp',0); ?>';
cp_b = (cp*amount);
cp_total = <?php echo $database->getUserField($session->uid, 'cp',0); ?>+cp_b;
html = $this.textMulti;
html += '<table id="heroInventoryDataDialog" class="transparent" cellspacing="0" cellpadding="0"><tbody><tr class="rowBeforeUse"><th>?????? ?????? ???? ???:</th><td>'+cp+'</td></tr><tr class="rowUseValue"><th>?????? ?????? ???? ???? ?? ???? ???? ??? ????:</th><td class="displayUseValue">'+cp_b+'</td></tr><tr class="rowAfterUse"><th>?????? ?????? ??? ?? ???? ??? ????:</th><td class="displayAfterUse">'+cp_total+'</td></tr></tbody></table>';
}else{
html = $this.textMulti;
}
}
html.dialog({
relativeTo: $('content'),
elementFoucs: 'inventoryAmount',
buttonTextOk: 'Ok',
buttonTextCancel: 'Cancel',
title: 'consumption',
onOpen: function(dialog, contentElement){
if ($('amount')){
$('amount').value = amount;
$('amount').addEvent('change', function(){
$('HeroInventory').amount.value = $('amount').value;
});
}
},
onOkay: function(dialog, contentElement){
if ($('amount')){
$('HeroInventory').amount.value = $('amount').value;
}
$('HeroInventory').submit();
},
onClose: function(dialog, contentElement){
$this.alreadyOpen = false;
}
});
}
}));
</script>
<div class="clear"> </div>
</div>
<div class="clear"></div>
</div>
<div class="contentFooter"> </div>
</div>
<?php
include("Templates/sideinfo.tpl");
include("Templates/footer.tpl");
include("Templates/header.tpl");
include("Templates/res.tpl");
include("Templates/vname.tpl");
include("Templates/quest.tpl");
?>
</div>
<div id="ce"></div>
</div>
</body>
</html>
I have The Same Error But with the installations "Multihunter" and with the registrations ,,,,,,
i have noticed that on 1freehosting in all versions of travian map is not working
it just cant move can you help me? is it because of mysql connections limit?
if($village->resarray['f99'] < 5){
echo '<center>'.WWNAME.': <input class="text" name="wwname" id="wwname" disabled="disabled" value="'.$wwname.'" maxlength="20">
<button type="submit" value="ok" name="s1" id="btn_train" value="ok" class="startTraining" disabled="disabled">
<div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">'.OK.'</div></div>
</button>
</center>';
} else if($village->resarray['f99'] >= 5) {
echo '<center><br />'.WWNAME.': <input class="text" name="wwname" id="wwname" value="'.$wwname.'" maxlength="20"> <button type="submit" value="ok" name="s1" id="btn_train" value="ok" class="startTraining">
<div class="button-container"><div class="button-position"><div class="btl"><div class="btr"><div class="btc"></div></div></div><div class="bml"><div class="bmr"><div class="bmc"></div></div></div><div class="bbl"><div class="bbr"><div class="bbc"></div></div></div></div><div class="button-contents">'.OK.'</div></div>
</button></center>';
} ?>
I fixed more than 80 bugs i write maybe 60 of them here http://forum.ragezone.com/f741/travian-t4-yi12345-bugs-juddy-996060/ but besides this it has more bugs like double troops or this version not stable or optimized so it will be not easy to you fix everything but good luckeveryone ,,,, Please Write the Bugs Of this Version ,,,,, I will Try To fix them ,,,,,