thunk didn't say he wanted to remove the dots from the last
word, just from the last 4 chars. Even if he had though, your script takes the last 4 chars from the last word and removes all dots from there; if the last word is longer than 4 chars, all but the last 4 chars of that word will be lost (eg if the last word is "ab.cd.ef.gh", your script would turn it to "fgh" and not the correct "ab.cd.efgh").
I'd use something like this:
on ^*:text:*:#: if . isin $right($1-,4) { echo -mbflirt # $+(<,$nick,>) [color:red]$left($1-,-4) $+[/color] $remove($v2,.) | halt }
The red part is probably what thunk was missing.
Note: this only works on mIRC 6.16 or newer (it can be easily modified to work for older versions though).
As a sidenote, and this is not for the OP's problem, instead of
var %a = $+(1-,$calc($numtok($1-,32) - 1)), %b = $gettok($1-,%a,32)
you can just use
var %b = $deltok($1-,-1,32)
And, btw, $0 = $numtok($1-,32)