Assuming there's always going to be 1 to 3 numbers (no more, no less), you can use regular expressions to match the strings you want and capture the useful substrings to format your reply:
Code:
on *:text:!calc *:#yourchannel:{
  var %a = $regsubex(calc,$2-,/^(\d)( \d|)( \d|)( )([ABCD])((?: \w+){1,3})$/, $&
    (( $+ $remove(\1*x + \2*y + \3*z,\4+ *z,\4+ *y) $+ ) * \5) * $($+(%,calc.points.,$remove(\6,\4)),2))
  if $regml(calc,0) {
    ; result is stored in %a
    msg # %a
  }
}