Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Top Challenge Entrants

  # User Points
  1 jaytea 587
  2 [Znork] 303
  3 urza 297
  4 Ag2X 288
  5 dr_Eamer 255
  6 Albie 199
  7 Chessnut 197
  8 A Noniem 194
  9 zzattack 186
  10 Kol 185
  11 m910q 168
  12 Sephiroth 115
  13 patje 114
  14 Auron956 114
  15 chid 110
  16 Ohad2121 92
  17 SkorpSSS 87
  18 DixrouE 84
  19 Suchorski 83
  20 ^Vampire^ 74
Challenge:Smallest CAPS kicker
Ended: July 22nd 2000

This challenge you need to make the smallest caps kicker. Which means anyone using CAPS in their text gets automatically kicked. The rules for this challenge are as follows:

  • No using loops of any kind.
  • The one script file must be named capskicker.mrc (This is so you don't embed a command in the filename ;) )
  • No timers.
  • Your code must only react to a message sent to a channel and when you are opped.
  • Percentage must be calculated for letters only. A-Z/a-z. That's it, any other characters should not be considered in your overall percentage.
  • It must only kick if the percentage is greater than 50%
  • Only kick when there are a total of 10 letters or more.
  • Kick message must include the reason for kicking with the percentage number of capital letters.
  • There must not be any %vars left over after a kick.
The script file that follows these rules and is the smallest in file size wins.

Challenge Entries:

All challenge entries were tested and counted the same way. We decided NOT to count the kick message, which means if you had
kick # $nick excessive caps $ifmatch $+ %
We only counted the var or identifier that returned the percentage number, in this case we would have only counted
kick # $nick $ifmatch.

So here they are, a lot of entries were incorrect but I listed them anyways:

Winner:
Name: cold-
File size: 214 bytes

How he did it:
First, he set one local variable with all 26 letters seperated by commas
var %. ,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z

As you can see he knew the = wasn't needed in the var. He then set another var that counted the total of nonletters
%; $len($remove($1- [ %. ] ))

By removing all 26 letters from the message, then using $len, he now has %; that holds the total number of nonletters

Now in the third var he take the total number of characters and subtracts the total number of nonletters.
%: $len($1-) - %;

Now that he has the total number of letters and the total number of nonletters he uses an if statement before kicking
if $calc(100*($len($removecs($1- [ %. ] ))-%;)/%:) > 50 && %: > 9 kick # $nick too much caps: $ifmatch $+ %

In the first comparison using $calc() he checks if the percentage of caps is > 50 and in the second he simply checks if total letters > 9

The most important part of this code is what's inside $calc(), I'll spread it out to better explain it:

  • First, the '100' is to switch the decimal to a percentage number.
  • Then with $removecs() he removed all lowercase letters from the text string and used $len to get the length. Now he has total number of characters except lowercase.
  • He then subtracted it the length of nonletters giving him the total number of caps.
  • From there he just divided it by the number of letters giving him the percentage of caps...

100 * (<length of caps and nonletters> - <length of nonletters>) / <length of total letters>

And lastly he used $ifmatch, inside the kick message, which holds the percentage number within the if statement.

Almost...

  1. Name: subbie
    File size: 228 bytes
    Description: Had the same idea as the winner, but just set it up differently, which cost him in the total size.

  2. Name: _Parappa_
    File size: 245 bytes
    Description: This entry used a different approach. He used an alias recursion to check every character of the text. Pretty good size for the way he did it though.

  3. Name: JAWilliams
    File size: 261 bytes
    Description: Done in a similiar way as the winner, only he used a few unnecessary variables instead of nesting everything together.

  4. Name: rex
    File size: 360 bytes
    Description: His approach was a bit different, his was somewhat backwards of the winning entry. He counted all the letters (which is what made it bigger), instead of removing all the letters and counting the nonletters.

  5. Name: Mike Moore
    File size: 622 bytes
    Description: One of our bigger entries. Using { brackets }, 4 aliases, 2 events, and 6 /unset commands only made this entry larger than it had to be. Could of even saved a lot of space using only one /unset (41 bytes).

Invalid entries

  • Name: Ymar
    File size: 166 bytes
    Description: This one considers every character a letter when checking for percentage and length, e.g. it kicks when you type: HI THERE!!!

  • Name: nukem
    File size: 189 bytes
    Description: Does the same as the one above..

  • Name: ^ASM^
    File size: 197 bytes
    Description: Counted every character as a letter.

  • Name: hantu
    File size: 211 bytes
    Description: Counted every character as a letter.

  • Name: el_guineo
    File size: 212 bytes
    Description: Counted every character as a letter.

  • Name: Thomas Hansen
    File size: 312 bytes
    Description: Yet another one that counted every character as a letter. Weird approach also.

  • Name: dreamweb
    File size: 317 bytes
    Description: This one worked fine and followed every rule but one, it didn't clean up the variables after the kick. bummer.

  • Name: Saturnine
    File size: 344 bytes
    Description: Counted every character as a letter in the length. I also gave him another chance(didn't accept) because of his many complaints about not understanding the rules.