This is just a fun little novelity thing. It requires the winrgn.dll to work so remember to go get that before you complain it doesn't work. Where to get it?.. don't know now i made this a while ago i just thought it'd be fun to share it now. In my script the users use this as a kind of wake up call like a yahoo buzz.. but instead it smashes yours and your privite msg buddies window.. lots of fun especially if you get a glass breaking wav file to go with it. so here it is.
Type /smash in your active window to break it.. and /fix to restore it back to normal.. no 2 smashes r exactly the same as it's completely random.
this snippet it part of the Torment Evolution IRC Script.. http://outlawartwork.cjb.net
_winrgn return WinRgn.dll
winrgn {
var %result = $dll($_winrgn, $1, $iif($len($2-), $2-, NOT_USED))
if (E_* iswm %result) {
echo -a * Error: %result ( $+ $script $+ , line $scriptline $+ )
halt
}
}
fix {
winrgn wrResetWindow
}
smash {
;.splay glassbreak.wav
var %w = $active, %n = $iif(($1 isnum),$1,6), %nx = $iif(($1 isnum),$1,80)
winrgn wrSelectWindow $window(%w).hwnd
winrgn wrSetMode rmRect
winrgn wrSetRegion 0 0 $window(%w).w $window(%w).h
while (%nx) {
winrgn wrSetMode rmRect
var %d = $rand(15,85), %x = $rand(0,$calc($window(%w).w -%d)), %y = $rand(0,$calc($window(%w).h -%d))
dec %nx
}
while (%n) {
var %d = $rand(15,85), %x = $rand(0,$calc($window(%w).w -%d)), %y = $rand(0,$calc($window(%w).h -%d))
winrgn wrDeleteRegionPoly %x %y $calc(%x +%d) $calc(%y +%d) 35 50 75 100
dec %n
}
}
I just searched the net for that .dll (winrgn.dll) and there were a couple places that used to have it but not anymore. Since your snippet requires it, why don\'t you make it an addon and put the .dll in with it, or send your copy of the .dll, that way those of us that don\'t have it, could use your snippet.