I need a lil help on how $calc on this dice roller I'm making. Now I got the random numbers working and i got it to add and give a total but I can't get it to modify like modifiers like *Fear rolls 2d6 +1 the result would be oh say 2+5 = 7 but the +1 would make it 8, Or Even subtract like *Fear rolls 2d4 3+2 = 5 -2 would = 3, here is what i got

alias dice2 {
tokenize 32 $iif($1 isnum 1-,$1,6) $iif($2 isnum 1-,$2,3)
var %i = 1
while (%i <= $2) { var %o = $instok(%o,$iif($calc($r(1,$1) % 2),$r(1,$1),$r(1,$1)),0,44) | inc %i }
if ($isid) { return $replace(%o,$chr(44),$chr(43),$chr(32)) }
else { describe $active Rolled $+($chr(3),14,$2,$chr(3),12,d,$chr(3),14,$1) And Got4:12 $+ $replace(%o,$chr(44),$chr(43)) Total4:12 $+ $calc($replace(%o,$chr(44),$chr(43))) }
}