Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
expand a building
#1
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:
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.
Reply


Messages In This Thread
expand a building - by sinner - 23.07.2011, 22:40
RE: expand a building - by maikmille - 26.07.2011, 09:27
RE: expand a building - by Molt - 26.07.2011, 09:34



Users browsing this thread: 3 Guest(s)