Unfortunately, this is very incomplete. It's a bit to basic! You have a nice idea, but maybe instead of "$2 $3 $4", use just $2-4? That's just one suggestion, there could be many for this particular script
Fumph you like
on :TEXT:!calc:#:{ msg $chan ( $nick ) $2-4? = $calc( $2-4? ) }
Fumph you like
on :TEXT:!calc:#:{
msg $chan ( $nick ) $2-4? = $calc( $2-4? )
}