public function calculateCombatLevel($attack, $strength, $magic, $ranged, $defence, $constitution, $prayer, $summoning, $float = false)
    {
        $highest = max(($attack + $strength), (2 * $magic), (2 * $ranged));

        $cmb = floor(0.25 * ((1.3 * $highest) + $defence + $constitution + floor(0.5 * $prayer) + floor(0.5 * $summoning)));

        return $float ? $cmb : (int) $cmb;
    }
public function calculateCombatLevel($attack, $strength, $magic, $ranged, $defence, $constitution, $prayer, $summoning, $float = false)
    {
        $highest = max(($attack + $strength), (2 * $magic), (2 * $ranged));

        $cmb = floor(0.25 * ((1.3 * $highest) + $defence + $constitution + floor(0.5 * $prayer) + floor(0.5 * $summoning)));

        return $float ? $cmb : (int) $cmb;
    }
public function calculateCombatLevel ( $ attack , $ strength , $ magic , $ ranged , $ defence , $ constitution , $ prayer , $ summoning , $ float = false ) { $ highest = max ( ( $ attack + $ strength ) , ( 2 * $ magic ) , ( 2 * $ ranged ) ) ; $ cmb = floor ( 0.25 * ( ( 1.3 * $ highest ) + $ defence + $ constitution + floor ( 0.5 * $ prayer ) + floor ( 0.5 * $ summoning ) ) ) ; return $ float ? $ cmb : ( int ) $ cmb ; }
Calculates a players combat level

@param  int  $attack
@param  int  $strength
@param  int  $magic
@param  int  $ranged
@param  int  $defence
@param  int  $constitution
@param  int  $prayer
@param  int  $summoning
@param  bool $float
@return int
Calculates a players combat level