Hugs:
on *:action:*:#: {
if (hug isin $1- && $me isin $1-) {
describe $chan hugs $nick back.
}
elseif (slap isin $1- && $me isin $1-) {
describe $chan slaps $nick back.
}
}
Be aware that if other users have a hug-back or slap-back script, that you can be flooded off for repeatedly hugging/slapping each other. This can be avoided with a timed variable if you think it's needed in your particular channel.
As for # of nicks in a channel, type this on your edit line while you are in the channel you specify:
//echo -a $nick(#yourchannel,0)
To check if it's enough users, read up on
/help if then else (type that in your edit line).