Well, here's an assortment of small stuff.. I think they should be available to everyone, but they're too small / rarely needed to have their own listing. I will be adding lots of stuff to this in the future, so if you need an uncommon piece of code you can't find using the search feature, check here. I might have it. Code includes: Moron detector, length of text, an uppercase kicker, and more!
;Please send any misc. snippets you would like listed here to me via pm.
;You will get credit for anything you create.
;------------------------------SEPARATION LINE--------------------------
;
;Moron Scanner
;
;Thanks to QuickStep for the upgrade of my moron scanner.
;Usage: !moron
;Note: Everything until the next separation line is needed for this to work.
alias ismoron if ($iseven($asccount($1))) return $true
alias asccount {
var %a = 1, %b
while (%a <= $len($$1)) {
%b = $calc(%b + $asc($mid($1,%a,1)))
inc %a
}
return %b
}
alias isint if ($1 = $int($1)) return $true
alias iseven if ($isint($calc($1 / 2))) return $true
on *:Text:!moron:#:{
msg # Performing moron-detection on $nick ... $iif($ismoron($nick),MORON DETECTED,Sorry no moron detected)
}
;--------------------SEPARATION LINE-----------------------------------------
;
;Length of text
;
;Usage: /length
;Note: Everything until the next separation line is needed for this to work.
alias length { set %length on }
on *:Text:*:{
if (%length == on) {
echo -a The length of the text: $1 $2 $3 $+ ... is $len($1-)
}
}
;----------------------SEPARATION LINE---------------------------------------------
;
;Caps Kicker
;
;Thanks to Quick-Step for this code.
;Note: Everything until the next section is needed for this to work.
alias ukicker { set %ukicker on }
on *:Text:*:*:{
;The new improved caps-kicker checks, if there are 3 or more characters of text found,
;and then attempts to kick the user if the text was all uppercase
if (%ukicker == on) && ($len($stripchars($1-)) >= 3) && ($isupper($1-)) {
echo -a all of $nick $+ 's text is uppercase.
echo -a commensing uppercase kicker.
kick $chan $nick Do not use all capital letters!
}
}
alias stripchars {
;What this does is take a line of code,
;and only keep the text characters (a-z and A-Z) (= ASC: 65-90 and 97-122)
;This way the uppercase kicker can work properly
;Usage: $stripchars(text)
var %a = 1, %b, %c
while (%a <= $len($$1-)) {
%c = $asc($mid($1-,%a,1))
if ((%c isnum 65-90) || (%c isnum 97-122)) %b = $+(%b,$chr(%c))
inc %a
}
return %b
}
;---------------=---------------;
;Misc. Identifiers
;For those who need individual identifiers
alias ismoron if ($iseven($asccount($1))) return $true
alias asccount {
var %a = 1, %b
while (%a <= $len($$1)) {
%b = $calc(%b + $asc($mid($1,%a,1)))
inc %a
}
return %b
}
alias isint if ($1 = $int($1)) return $true
alias iseven if ($isint($calc($1 / 2))) return $true
;Following adds $server to $serverip, making $sinfo. A shorter way for when making scripts.
alias sinfo { return $server $+ $serverip }
Well I fixed it an all but still man..
[12:33:01~56pm] (Kyofa) Hey. :D
[12:33:02~02pm] ==Kyofa was kicked by Vertix! ((Do not use all capital letters!))
[12:33:03~01pm] JOINS: Kyofa (LmaoStfu@I.Dont.Like.You)
[12:34:01~20pm] (Kyofa) Dude, Wtf? o_O
[12:34:02~21pm] ==Kyofa was kicked by Vertix! ((Do not use all capital letters!))
on the gtopic: interesting but i just double click the background and check there. Also on the moron scanner: i would think you should make it random, like you type the number of people then it picks from people in the chan. All in all it looks good, and some good ideas that will probably help some people.
there are still some errors in your code here and there, but thats not what id like to point out. The thing is with a caps-kicker (not meaning your script in particular) is that sometimes with short messages like \':D\' or \':)\' or \';)\' etc. it gets you kicked. There are more advanced cap kick scripts that also check length, special characters and percentage of capsed letters
Ok, I made a mistake. Sorry I\'m not perfect.
supergeo the quality of the snippets that you have been posting on hawkee are getting steadly worse and worse. Your on text events won\'t work you forgot to specify a #?= or * for the window it should function in and your last 3 aliases are pointless.
Well, at least I make an ATTEMPT to make something for others to use and an ATTEMPT to help them and don\'t just come around and criticise other people\'s code when I\'m not making ANYTHING myself. Maybe I\'ll make a few mistakes. I\'m trying to get these things on here quickly so that more people can benefit from them!
If I had to rate your quality of snippets as of late, it
d be horrible, because you haven\'t even MADE any lately! I guess it\'s up to your \"quality standards\" though, so I might as well not have it. I don\'t understand the \"declining quality\". I haven\'t seen ANYTHING to make that hasn\'t been taken, so I make the little things. I\'m sorry if a lot of this is from the help file, but non-scriptors might rather just use this! I think the quality of some of my snippets has been good. Such as the Code Master, currently it does the most of any snippet on the site! Also, I don\'t know if you noticed by I updated Goggled_Bot, fixing many errors and adding a co-owner to it. Also my /register I think was pretty helpful. So of the last 3, excluding this one, I think my code has had a pretty good quality. Liquid and X, thanks for the comments. You weren\'t rude like some of the others. I don\'t understand how Reven can sit there, not make any snippets, and call other\'s snippets trash! And since all of my snippets are of \"bad quality\", I guess there\'s no need for them, so I will be deleting all of them very shortly. Hawkee, if you see this, please clear out all of my snippets. If not, I\'ll just edit them to say \"delete\" until you can get around to it.
In your moron scanner, \"if (%mfound => 1)\" should be changed to \"if (%mfound >= 1)\"
In the uppercase kicker, you should change \"if (%ukicker == on)\" to \"if (%ukick == on ) && ( $upper($1-) === $1- )\"
And in your aliases, you should add a way to turn them on AND off, like
\"alias ukicker $iif(%ukicker == on,set %ukicker off,set %ukicker on)\"
And maybe echo the status of whether it\'s now on or off, etc etc..
The last three aliases are unneccessary, the \"/topic #channel\" command without a third parameter will show you the current topic, and I believe the \"/mode #channel\" command without additional parameters will show you the limit and maybe key. All three can easily be obtained by right-clicking the background of a channel window and going to Info.