mIRC Home    About    Download    Register    News    Help

Print Thread
#113759 08/03/05 02:42 PM
Joined: Mar 2005
Posts: 15
phishes Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Mar 2005
Posts: 15
I'm a newbie at this stuff, but basically what i was after was a small script, that gets triggered by someone talking in caps (has to be more than 5 caps in the line) and when this happens, i reply with a line something like this..

<ph1shes> Stop talking in 66.5% caps and stuff nickname
i want it to work out the percentage of caps within the line(s)

thanks.

#113760 08/03/05 07:53 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on *:text:*:#:{
  var %caps = $regex($1-,/[A-Z]/g)
  if (%caps &gt; 5) { msg $chan Stop talking in $round($calc(%caps / $len($1-) * 100),2) $+ % and stuff $nick }
}


The above is untested, but it should work.


New username: hixxy
#113761 08/03/05 08:36 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
So on a 300 character line with 5 caps its ment to say...

<ph1shes> Stop talking in 1.7% caps and stuff Bob

lol

#113762 09/03/05 03:45 PM
Joined: Mar 2005
Posts: 15
phishes Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Mar 2005
Posts: 15
Yeah works great, all i need now is the flood defence to go with it, lol
some people like to take advantage of it frown

#113763 09/03/05 07:44 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on *:text:*:#:{
  if (!%caps.floodprotection) {
    inc -u2 %caps.floodprotection
    var %caps = $regex($1-,/[A-Z]/g)
    if (%caps &gt; 5) { msg $chan Stop talking in $round($calc(%caps / $len($1-) * 100),2) $+ % and stuff $nick }
  }
}


New username: hixxy

Link Copied to Clipboard