alias -l cmb { set %stats.basecmb $calc((($3 * 100) + ($4 * 100) + $iif($right($7,1) isin 13579,(($7 - 1) * 50),($7 * 50))) / 400) set %stats.meleecmb $calc((($1 * 130) + ($2 * 130)) / 400 ) set %stats.magecmb $calc(((($6 - 1) + ($6 * 2) * 65)) / 400) set %stats.rangecmb $calc(((($5 - 1) + ($5 * 2) * 65)) / 400) if (%stats.meleecmb > %stats.magecmb) && (%stats.rangecmb < %stats.magecmb) { return $calc(%stats.basecmb + %stats.meleecmb) } elseif (%stats.meleecmb > %stats.magecmb) && (%stats.rangecmb > %stats.meleecmb) { return $calc(%stats.basecmb + %stats.rangecmb) } elseif (%stats.mageecmb > %stats.rangecmb) && (%stats.meleecmb < %stats.rangecmb) { return $calc(%stats.basecmb + %stats.magecmb) } }