<?php
// Formula version 4.0
// Created by MaxWaterman
// Formula by MaxWaterman, Fern1970, Helcaterian,
// Oblivion590, Hans980 and Benmarchant.
// Reproduction without this comment is prohibited.
function combatLevel($attack, $defence, $strength, $hp, $prayer, $ranged, $magic, $summoning) {
$base = ($defence + $hp + floor($prayer / 2) + floor($summoning / 2)) * 0.25;
$melee = ($attack + $strength) * 0.325;
$ranger = floor($ranged * 1.5) * 0.325;
$mage = floor($magic * 1.5) * 0.325;
return $base + max($melee, $ranger, $mage);
}
?>