$<number> identifiers are the parameters to a command, separated by spaces. if you had "!hi bye hello" $1 would be !hi, $2 would be bye, and $3 would be hello. for the poster's nickname, the identifier would be $nick.
PS i have no idea what script uses "on $*:text"... as it seems no nicknames would be able to trigger it, and ...":/!wins (" wouldn't ever be triggered since messages starting with / are commands and won't go through to your own client. that said, you need an alias to check for you to use a command, not an on text event.