Thread Rating:
  • 5 Vote(s) - 3.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[v1.3] Bonusdörfer
ich schreib jetzt erst mal was ihr endern solt in include.inc.php und fügt unter die 1 zeile
PHP Code:
<?php include('bbcodes.php'); ?> <?php $sql_bonus_villages = mysql_query("SELECT * FROM villages WHERE id = '".$_GET["village"]."'"); $vill = mysql_fetch_assoc($sql_bonus_villages); if ($vill["bonus"] == "1") { include("include/configs/max_storage_bonus.php"); include("include/configs/dealers_bonus.php"); } elseif($vill["bonus"] == "2") { include("include/configs/farm_limits_bonus.php"); } elseif($vill["bonus"] == "3") { include("include/configs/units_bonus_stable.php"); } elseif($vill["bonus"] == "4") { include("include/configs/units_bonus_barracks.php"); } elseif($vill["bonus"] == "5") { include("include/configs/units_bonus_garage.php"); } elseif($vill["bonus"] == "6") { include("include/configs/raw_material_production_bonus.php"); } function get_bonus($x,$y) { $sql = mysql_query("SELECT * FROM villages WHERE x = '$x' AND y = '$y'"); $vill = mysql_fetch_assoc($sql); if ($vill["bonus"] > "0") { $out = true; } else { $out = false; } return $out; } ?>

dann einfach in templates gehn und in game_map.tpl
und erstzt dort alle was drinne ist durch
PHP Code:
<div id="info" style="position:absolute; top:0px; left:0px; width:350px; height:1px; visibility: hidden; z-index:10"> <table class="vis" style="background-color: #F0E6C8"> <tr><th id="info_title" colspan="2">title</th></tr> <tr><td id="bonusbild"></td><td id='bonus'></td></tr> <tr><td>Punkte:</td><td id="info_points">points</td></tr> <tr id="info_owner_row"><td>Besitzer:</td><td id="info_owner">owner</td></tr> <tr id="info_left_row"><td colspan="2">verlassen</td></tr> <tr id="info_ally_row"><td>Stamm:</td><td id="info_ally">ally</td></tr> <tr id="info_village_groups_row"><td>Gruppen:</td><td id="info_village_groups">village_groups</td></tr> </table> </div> <h2>Kontinent {$continent}</h2> <table collspacing="1" collpadding="0"><tr><td valign="top"> <table><tr><td valign="top"><table cellspacing="1" cellpadding="0" style="background-color: #DED3B9; border: 1px solid rgb(0, 0, 0);"><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-$map.size+1}&amp;y={$map.y+$map.size-1}"><img src="graphic/map/map_nw.png" style="z-index:1; position:relative;" alt="map/map_nw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y+$map.size-1}"><img src="graphic/map/map_n.png" style="z-index:1; position:relative;" alt="map/map_n.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+$map.size-1}&amp;y={$map.y+$map.size-1}"><img src="graphic/map/map_ne.png" style="z-index:1; position:relative;" alt="map/map_ne.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-$map.size+1}&amp;y={$map.y}"><img src="graphic/map/map_w.png" style="z-index:1; position:relative;" alt="map/map_w.png"/></a></td><td> <table style="background-color: #F1EBDD; border: 1px solid #F1EBDD;" cellspacing="0" cellpadding="0" class="map"> {foreach from=$y_coords item=y} <tr> <td width="20">{$y}</td> {foreach from=$x_coords item=x} {if !$cl_map->getVillage($x,$y)} <td id="tile_{$x}_{$y}" class="{$cl_map->getClass($x,$y)}"><img src="graphic/map/{$cl_map->graphic($x,$y)}" alt="" /></td> {else} <td id="tile_{$x}_{$y}" class="{$cl_map->getClass($x,$y)}" style="background-color:rgb({$cl_map->getColor($x,$y)})"><a href="game.php?village={$village.id}&amp;screen=info_village&amp;id={$cl_map->getvillageid($x,$y)}"><img src="graphic/map/{$cl_map->graphic($x,$y)}{php}if (get_bonus($this->_tpl_vars[x], $this->_tpl_vars[y])) echo 'b.png';{/php}" onmouseover="map_popup('{$cl_map->getVillage($x,$y,"name")} ({$x}|{$y}) K{$cl_map->getcon($x,$y)}', {$cl_map->getvillage($x,$y,points)}, {$cl_map->playerinfo($x,$y)}, {$cl_map->getally($x,$y)}, false, {$x}, {$y}, {$village.id}, {$cl_map->getvillage($x,$y)})" onmouseout="map_kill()" alt="" /></a></td> {/if} {/foreach} </tr> {/foreach} <tr> <td height="20"></td> {foreach from=$x_coords item=x} <td>{$x}</td> {/foreach} </tr></table></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+$map.size-1}&amp;y={$map.y}"><img src="graphic/map/map_e.png" style="z-index:1; position:relative;" alt="map/map_e.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-$map.size+1}&amp;y={$map.y-$map.size+1}"><img src="graphic/map/map_sw.png" style="z-index:1; position:relative;" alt="map/map_sw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y-$map.size+1}"><img src="graphic/map/map_s.png" style="z-index:1; position:relative;" alt="map/map_s.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+$map.size-1}&amp;y={$map.y-$map.size+1}"><img src="graphic/map/map_se.png" style="z-index:1; position:relative;" alt="map/map_se.png"/></a></td></tr></table></td><td valign="top"> </td></tr></table> </td><td valign="top"> <table><tr><td valign="top"><table cellspacing="1" cellpadding="0" style="background-color: #DED3B9; border: 1px solid rgb(0, 0, 0);"><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-50}&amp;y={$map.y+50}"><img src="graphic/map/map_nw.png" style="z-index:1; position:relative;" alt="map/map_nw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y+50}"><img src="graphic/map/map_n.png" style="z-index:1; position:relative;" alt="map/map_n.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+50}&amp;y={$map.y+50}"><img src="graphic/map/map_ne.png" style="z-index:1; position:relative;" alt="map/map_ne.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-50}&amp;y={$map.y}"><img src="graphic/map/map_w.png" style="z-index:1; position:relative;" alt="map/map_w.png"/></a></td><td> <form method="POST" action="game.php?village={$village.id}&screen=map&action=bigMapOnclick"> <input type="hidden" name="startX" id="startX" value="{$xs}" /> <input type="hidden" name="startY" id="startY" value="{$ys}" /> <div style="position:relative; padding:0px"> <div style="position:absolute;z-index:100"> <input type="image" class="noneStyle" src="graphic/map/empty.png" style="width:251px;height:250px;margin:0px;padding:0px" /> </div> <img src="graphic/continent/{$user.id}-{$conmap}-{$contime}.png"> <div id="bigMapRect" style="z-index:10; position:absolute; top:{$bigMapRectTop}px; left:{$bigMapRectLeft}px; width:{$mapSize*5-1}px; height:{$mapSize*5-1}px; border: 1px solid rgb(213, 227, 174);"></div> </div> </form> </td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+50}&amp;y={$map.y}"><img src="graphic/map/map_e.png" style="z-index:1; position:relative;" alt="map/map_e.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-50}&amp;y={$map.y-50}"><img src="graphic/map/map_sw.png" style="z-index:1; position:relative;" alt="map/map_sw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y-50}"><img src="graphic/map/map_s.png" style="z-index:1; position:relative;" alt="map/map_s.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+50}&amp;y={$map.y-50}"><img src="graphic/map/map_se.png" style="z-index:1; position:relative;" alt="map/map_se.png"/></a></td></tr></table></td><td valign="top"> </td></tr></table> </td></tr></table> <br /> <form action="game.php?village={$village.id}&amp;screen=map" method="post"> <table> <tr><td>x: <input type="text" name="x" value="{$map.x}" size="5" /> y:<input type="text" name="y" value="{$map.y}" size="5" /></td> <td><input type="submit" value="&raquo; OK &laquo;" style="font-size: 10pt;" /></td> </tr></table> </form><br /> <table style="border: 1px solid ; background-color: #DED3B9; margin-left: 2px;"> <tbody> <tr class="nowrap"> <td/> <td width="10" style="background-color: rgb(255, 255, 255);"/> <td class="small">Aktuelles Dorf</td> <td width="10" style="background-color: rgb(240, 200, 0);"/> <td class="small">Eigene Dörfer</td> <td width="10" style="background-color: rgb(0, 0, 244);"/> <td class="small">Eigener Stamm</td> <td width="10" style="background-color: rgb(150, 150, 150);"/> <td class="small">Verlassene Dörfer</td> <td width="10" style="background-color: rgb(180, 0, 0);"/> <td class="small">Sonstige Dörfer</td> </tr> <tr class="nowrap"> <td class="small">Stamm:</td> <td width="10" style="background-color: rgb(0, 160, 244);"/> <td class="small">Verbündete</td> <td width="10" style="background-color: rgb(128, 0, 128);"/> <td class="small">Nicht-Angriffs-Pakt (NAP)</td> <td width="10" style="background-color: rgb(244, 0, 0);"/> <td class="small">Feinde</td> </tr> </tbody> </table>
natürlich könnt ihr auch nur das hier in die 4 zeile einfügen macht davor aber eine sicherheitskopie von der datei einfach auf den Desktop kopiren
PHP Code:
<tr><td id="bonusbild"></td><td id='bonus'></td></tr>

dan nur noch die restlichen dateien einfügen und keine erstsen
dann nur noch in localhost/phpmyadmin
und
PHP Code:
ALTER TABLE `villages` ADD `bonus` INT( 11 ) NOT NULL AFTER `id`
einfügen und fertig


Messages In This Thread
Bonusdörfer - by Milu2K - 08.07.2010, 11:56
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 16.07.2010, 13:28
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 16.07.2010, 13:35
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 16.07.2010, 14:44
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 16.07.2010, 20:13
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 16.07.2010, 20:31
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 16.07.2010, 20:45
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 16.07.2010, 21:47
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 17.07.2010, 01:42
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 17.07.2010, 14:49
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 17.07.2010, 17:41
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 17.07.2010, 21:42
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 18.07.2010, 00:06
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 18.07.2010, 01:23
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 18.07.2010, 10:08
RE: Bonusdörfer - Aber richtig ;-) - by Gira - 18.07.2010, 13:40
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 18.07.2010, 17:05
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 18.07.2010, 20:20
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 20.07.2010, 17:48
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 19.08.2010, 00:13
RE: Bonusdörfer - Aber richtig ;-) - by eddi268 - 26.08.2010, 08:34
RE: Bonusdörfer - Aber richtig ;-) - by Old pro - 17.11.2010, 11:21
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 17.11.2010, 13:18
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 17.11.2010, 17:50
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 17.11.2010, 19:25
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 18.11.2010, 09:05
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 22.12.2010, 15:51
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 22.12.2010, 16:06
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 26.12.2010, 14:03
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 26.12.2010, 14:33
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 26.12.2010, 20:20
RE: Bonusdörfer - Aber richtig ;-) - by Molt - 26.12.2010, 20:50
RE: Bonusdörfer - by Bettdecke1 - 27.12.2010, 10:32
RE: Bonusdörfer - by trident100 - 16.07.2011, 15:48
RE: Bonusdörfer - by ON21 - 16.07.2011, 15:53
RE: Bonusdörfer - by trident100 - 16.07.2011, 15:57
RE: Bonusdörfer - by k3v95 - 16.07.2011, 16:04
RE: Bonusdörfer - by ON21 - 16.07.2011, 17:01
RE: Bonusdörfer - by Yannici - 16.07.2011, 18:05
RE: Bonusdörfer - by maikmille - 17.07.2011, 11:06
RE: Bonusdörfer - by ON21 - 17.07.2011, 11:07
RE: Bonusdörfer - by Molt - 17.07.2011, 11:10
RE: Bonusdörfer - by trident100 - 17.07.2011, 15:28
RE: Bonusdörfer - by Molt - 17.07.2011, 18:03



Users browsing this thread: 1 Guest(s)