Does someone know how to calculate the needed time to expand a building if I have the $factor, $world_speed, $build_level and $build (the dbname of a build, just to find out the buildings expand time);
Let's just supose I have a function as is follows:
Does anyone know the formula ? I don't need the function word by word, i can make it on my own, just the formula so I can develop it.
Let's just supose I have a function as is follows:
PHP Code:
function get_build_time($build,$level,$world_speed) {
$time = array('main' => 30, 'barracks' => 20, 'stable' => 40 etc); //this is the default time for a building
$factor = 0.3;
..................
formula how to calculate the needed time for a building to be expanded in dslan ? without using the function from include.inc.php
..................
return $seconds;
}
PHP Code:
return ceil($time[$build]*(percentage($level,maxstage($build))*$level/6)); //i used this, as a formula to get similar values like dslan ones
Does anyone know the formula ? I don't need the function word by word, i can make it on my own, just the formula so I can develop it.