I have a few scripts here that I found. Need some help editing them. Thanks for any and all that help.
I have this spam script here

on *:TEXT:*:#:{
inc -u3 %spam. [ $+ [ $nick ] ]
if (%spam. [ $+ [ $nick ] ] == 4) {
ban $chan $address($nick,1)
kick $chan $nick Spam
}
}

I was wondering on how to make it a warning script. Where 2 or 3 times it will kick them. Then on the 3 or 4th it will be a ban.

Also for my blacklist script everytime someone joins it will say its 5 kicks till blacklist thing. How do you make it so that it only says it once and only when the bot joins? Heres the script
on *:join:#: {
if $ini(black.ini,bans,$chan) {
part $chan $c1 This channel has Been blacklisted To have this removed please contact $c2 Yournick.
}
else {
if ($chan != #bots) {
if ($($+(%,kick.,$chan),2)) var %left = $+($calc(5 - $v1),/5)
else var %left = 5/5
.msg $nick $c1 If i am kicked $c2 5 $c1 Times this channel will be blacklisted Number of kicks left $c2 %left
}
}
}

My last one is my mute script. i would like to make it so that if a voice tries to use it it will say you need to a hop/op to use this command. As well as not allowing it to work on an op/hop and lastly if you just type !mute it will do nothing and give an error message like please type in a name. Here is the script

on *:text:!mute*:#:{ if ($nick isop $chan) || ($nick ishop $chan) {
/mode $chan +bb ~q: $+ $address($2,2)
/mode $chan -v $2
/notice $nick $2 has been muted
}
}
on *:text:!unmute*:#:{ if ($nick isop $chan) || ($nick ishop $chan) {
/mode $chan -b ~q: $+ $address($2,2)
/msg $chan $2 has been unmuted
/mode $chan +v $2
}
}

I know this is a lot but I would appreciate any help anyone can offer me.

Thanks.