diff --git a/Templates/field.tpl b/Templates/field.tpl index f768007..551dce6 100644 --- a/Templates/field.tpl +++ b/Templates/field.tpl @@ -8,39 +8,34 @@ ## Copyright: TravianX (c) 2010-2011. All rights reserved. ## ## ## ################################################################################# +//Load default array position +$coorarray = array(1=>"101,33,28","165,32,28","224,46,28","46,63,28","138,74,28","203,94,28","262,86,28","31,117,28","83,110,28","214,142,28","269,146,28","42,171,28","93,164,28","160,184,28","239,199,28","87,217,28","140,231,28","190,232,28"); + +//Load level & type +$arrayVillage = $village->resarray; +?> + +procResType($arrayVillage['f'.$i.'t'])." Level ".$arrayVillage['f'.$i]."\"/>\r\n"; +} ?> - - "101,33,28","165,32,28","224,46,28","46,63,28","138,74,28","203,94,28","262,86,28","31,117,28","83,110,28","214,142,28","269,146,28","42,171,28","93,164,28","160,184,28","239,199,28","87,217,28","140,231,28","190,232,28"); - for($i=1;$i<=18;$i++) { - echo "procResType($village->resarray['f'.$i.'t'])." Level ".$village->resarray['f'.$i]."\"/>"; - } - ?> - +
resarray['f'.$i.'t'] != 0) { - $text = ""; - switch($i) { - case 1: - $text = "Woodcutter Level"; - break; - case 2: - $text = "Clay Pit Level"; - break; - case 3: - $text = "Iron Mine Level"; - break; - case 4: - $text = "Cropland Level"; - break; - } - echo "resarray['f'.$i]."\" alt=\"$text ".$village->resarray['f'.$i]."\" />"; - } - } - ?> - + if($arrayVillage['f'.$i.'t'] != 0) { + $text = ""; + switch($i){ + case 1:$text = "Woodcutter Level";break; + case 2:$text = "Clay Pit Level";break; + case 3:$text = "Iron Mine Level";break; + case 4:$text = "Cropland Level";break; + } + echo "\"$text"; + } +} +?> +
\ No newline at end of file