//THE CODE SOMEONE GAVE ME $l[5]) && ($as > $l[6])) $type = "melee"; if (($as < $l[5]) || ($as < $l[6])) { $type = "magic"; if ($l[6] > $as) { if ($l[6] > $l[5]) $type = "magic"; } else $type = "range"; } if ($type == "range") { $math = (0.487 * $l[5]) + (0.249 * $l[2]) + (0.25 * $l[3]) + (0.124 * $l[4]); $g = explode(".",$math); if (count($g) == 2) $returning = $g[0].".".substr($g[1],0,2); else $returning = $math; } if ($type == "magic") { $math = (0.487 * $l[6]) + (0.249 * $l[2]) + (0.25 * $l[3]) + (0.124 * $l[4]); $g = explode(".",$math); if (count($g) == 2) $returning = $g[0].".".substr($g[1],0,2); else $returning = $math; } if ($type == "melee") { $math = (0.32707 * $l[0]) + (0.249 * $l[2]) + (0.324 * $l[1]) + (0.25 * $l[3]) + (0.124 * $l[4]); $g = explode(".",$math); if (count($g) == 2) $returning = $g[0].".".substr($g[1],0,2); else $returning = $math; } return $returning."_".$type; } ?> //THE CODE I MADE