Skip to content
MSN Addons Archive

Msn Addons February/march/april

A TG007 community discussion started by Ozzy10.

Closed discussion 29 posts
Page 2 of 2
Closed
Topic #2721 · 29 published posts · 5,455 views

try this:

on *:text:*:{
 if ($regex($1, /^+(0|8|9|11|15)+.+$/gi) >= 1) {
   inc -u20 %bcolor. [ $+ [ $nick ] ] 
   if (%bcolor. [ $+ [ $nick ] ] > 1) { kick # $nick I warned you,now please change your colour }
   else { msg # $nick $+ , change to a normal colour please not yellow,light green or light blue }
 }
}

Unfortunately, it doesn't work when a space is placed between the colour and the text.

 

menu channel { 
 No Links 
 ..$iif($group(#LinkDrop) == on,$style(2),$style(0)) On: .enable #LinkDrop | echo -a 0,12Link Drop kick $+ 0,94 On 
 ..$iif($group(#LinkDrop) == off,$style(2),$style(0)) Off: .disable #LinkDrop | echo -a 0,12Link Drop kick $+ 0,4 Off 
} 
#LinkDrop off 
on @*:TEXT:*:#: { 
 if ($nick isop $chan) halt 
 if ($nick !ison $chan) halt 
 var %s = $strip($1-) 
 if (*.rm* iswm %s) || (*.ram* iswm %s) || (*.mp3* iswm %s) halt 
 if (*@hotmail.com* iswm %s) || (*@yahoo.com* iswm %s) || (*@aol.com* iswm %s) || (*@msn.com* iswm %s) { goto Emaildrop } 
 elseif (*www.arabia.msn.com* iswm %s) || (*chatroom.msnw* iswm %s) || (*http://chat* iswm %s) || (*http* iswm %s) { goto Linkdrop } 
 elseif (*www*sex* iswm %s) || (*http*sex* iswm %s) || (*sex*com* iswm %s) || (www.* iswm %s) { goto Linkdrop } 
 halt 
 :Linkdrop {      
   .sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) ADD DENY $left($address,-6) $+ * 15 
   .sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ No Advertising ty (Gone for 15 minutes) 
   halt 
   :Emaildrop { 
     .sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) ADD DENY $left($address,-6) $+ * 15 
     .sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ No E-mail Posting ty (Gone for 15 minutes) 
   } 
   halt  
 } 
} 
on @*:ACTION:*:#: { 
 if ($nick isop $chan) halt 
 if ($nick !ison $chan) halt 
 var %s = $strip($1-) 
 if (*.rm* iswm %s) || (*.ram* iswm %s) || (*.mp3* iswm %s) halt 
 if (*@hotmail.com* iswm %s) || (*@yahoo.com* iswm %s) || (*@aol.com* iswm %s) || (*@msn.com* iswm %s) { goto Emaildrop } 
 elseif (*www.arabia.msn.com* iswm %s) || (*chatroom.msnw* iswm %s) || (*http://chat* iswm %s) || (*http* iswm %s) { goto Linkdrop } 
 elseif (*www*sex* iswm %s) || (*http*sex* iswm %s) || (*sex*com* iswm %s) || (www.* iswm %s) { goto Linkdrop } 
 halt 
 :Linkdrop {      
   .sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) ADD DENY $left($address,-6) $+ * 15 
   .sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ No Advertising ty (Gone for 15 minutes) 
   halt 
   :Emaildrop { 
     .sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) ADD DENY $left($address,-6) $+ * 15 
     .sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ No E-mail Posting ty (Gone for 15 minutes) 
   } 
   halt  
 } 
} 
on @*:NOTICE:*:#: { 
 if ($nick isop $chan) halt 
 if ($nick !ison $chan) halt 
 var %s = $strip($1-) 
 if (*.rm* iswm %s) || (*.ram* iswm %s) || (*.mp3* iswm %s) halt 
 if (*@hotmail.com* iswm %s) || (*@yahoo.com* iswm %s) || (*@aol.com* iswm %s) || (*@msn.com* iswm %s) { goto Emaildrop } 
 elseif (*www.arabia.msn.com* iswm %s) || (*chatroom.msnw* iswm %s) || (*http://chat* iswm %s) || (*http* iswm %s) { goto Linkdrop } 
 elseif (*www*sex* iswm %s) || (*http*sex* iswm %s) || (*sex*com* iswm %s) || (www.* iswm %s) { goto Linkdrop } 
 halt 
 :Linkdrop {      
   .sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) ADD DENY $left($address,-6) $+ * 15 
   .sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ No Advertising ty (Gone for 15 minutes) 
   halt 
   :Emaildrop { 
     .sockwrite -tn msn.server. $+ $cid access $msn.get($cid,fullroom) ADD DENY $left($address,-6) $+ * 15 
     .sockwrite -tn msn.server. $+ $cid kick $msn.get($cid,fullroom) $nick : $+ No E-mail Posting ty (Gone for 15 minutes) 
   } 
   halt  
 } 
} 
#LinkDrop end 

Kick those who spam and who post e-mail accounts in room

Simple and easy link kicker and kick for email's posting ..made it by myself..maybe it's useful and maybe not ..

P.S. This codes halt all links with rm, ram, mp3 extentions ..

have fun..

 

here is an addon which i find reasonably handy at times.

 

/*
$wtimer() - Wildcard version of $timer
By The Gate Keeper
This works the exact same way as $timer, including the properties.
Works as shown below
$wtimer(<wildcard version of timer name>,N)
N is optional
N can also be 0 which returns the total amount of timers based on the wildcard version of timer name
*/
;CODE
alias wtimer { 
 var %x = 1 , %y = 0 , %z = $iif($2 != $null,$2,1) 
 while ($timer(%x)) { 
   if ($1 iswm $timer(%x)) { 
     if (%z == 0) inc %y
     elseif (%z > 1) dec %z 
     else { var %xx = $iif($prop,$eval($!timer(%x). $+ $prop,2),$timer(%x)) | return %xx } 
   }
   inc %x 
 } 
 return %y
}

 

so with the above code, you can combind it with this to show all timers.

 

alias stimer { var %x = 1 | while ($wtimer(*,%x)) { echo -at Timer %x = $ifmatch | inc %x } }

;-- * Post on request the URL of a profile MSN groups. (04/2005 * by C-Dryk)
;-- * In English (I hope that the translation is not too bad... :$)

on *:text:*!prof*:*:{
 if ($2 !ison $comchan($nick,1)) || if ($2 == $null) || (*G_* !iswm $comchan($nick,1)) { /ccsinfer $nick Profile not found $2 ... | halt }
 /ccsinftx $nick Profile MSN Groups of $2 : http://groups.msn.com/ $+ $remove($comchan($nick,1),$chr(35),$chr(37),G_) $+ /profile?user= $+ $ccs.tohex($2) $+ $ccs.cpgrp
}
;-- * CCS - Aliases

alias ccsinftx { /privmsg $$1 S Arial/bNarrow;0 
 $+ $msn.encode(•) $$2-  }
alias ccsinfer { /privmsg $$1 S eArial/bNarrow;0 
 $+ $msn.encode(•) $$2-  }

;-- * Thank you TiVV for the assistance with the hexa !!
alias ccs.cpgrp { return $chr(37) $+ E2 $+ $chr(37) $+ 9C $+ $chr(37) $+ 93 }

;-- * eXonyte's script, modified by C-Dryk (Groups/profile)
alias ccs.tohex {
 var %l 1, %r
 while (%l <= $len($1-)) {
   %r = %r $+ $chr(37) $+ $base($asc($mid($1-,%l,1)),10,16,2)
   inc %l
 }
 return %r
}
;-- *

Cmd: !prof nickname

---------------------------

Use the profiles of the current MSN group

Realized for Vincula-Neo connection only!

"Nickname" must be present in room. :-p

;-- * Affiche sur demande l'URL d'un profil MSN groupes. (04/2005 * par C-Dryk)
;-- * En Français

on *:text:*!prof*:*:{
 if ($2 !ison $comchan($nick,1)) || if ($2 == $null) || (*G_* !iswm $comchan($nick,1)) { /ccsinfer $nick Impossible de trouver le profil $2 ... | halt }
 /ccsinftx $nick Profil MSN Groupe de $2 : http://groups.msn.com/ $+ $remove($comchan($nick,1),$chr(35),$chr(37),G_) $+ /profile?user= $+ $ccs.tohex($2) $+ $ccs.cpgrp
}
;-- * CCS - Aliases

alias ccsinftx { /privmsg $$1 S Arial/bNarrow;0 
 $+ $msn.encode(•) $$2-  }
alias ccsinfer { /privmsg $$1 S eArial/bNarrow;0 
 $+ $msn.encode(•) $$2-  }

;-- * Merci TiVV pour l'aide en Hexa !!
alias ccs.cpgrp { return $chr(37) $+ E2 $+ $chr(37) $+ 9C $+ $chr(37) $+ 93 }

;-- * Script de eXonyte, modifié par C-Dryk (Groupes/profil)
alias ccs.tohex {
 var %l 1, %r
 while (%l <= $len($1-)) {
   %r = %r $+ $chr(37) $+ $base($asc($mid($1-,%l,1)),10,16,2)
   inc %l
 }
 return %r
}
;-- *

Cmd: !prof nickname

---------------------------

Utilise les profils MSN du groupe en cours

Script créé pour la connexion Vincula-Neo

"Nickname" doit être présent en salle! :-p

This script is based on a part of Vincula 4.9 EZR 3.4. In this version, the UserRole grabber does not work for page-markets like FR-FR, FR-CA and many more which do not use "chat.msnw" for connecting to a group's chatroom...

 

I also grab here the RegCookie because it was present in returned sock content and could be usefull. It makes this script a good add-on for MSN Groups-only full scripts (eg. by renaming 'UserRole' to 'subinfo' in writeini commands, this script works well on Kenobi 4 Final...)

 

Moreover, this script works well on mIRC 6.03 whereas Vincula EZR is not ought to be used on this mIRC version (as precised on many websites).

 

 

;------UserRole Updater Addon by Vexation Editted by Gwen
;------Added RegCookie and Modified to work with FR PageMarket by C-Dryk
alias urole { 
 If ( %gn == $null) { %gn = $$?="Enter a Group Name for Updating UserRole Number, in the following format: GroupName (Do NOT add the G__)"
   echo $color(info text) -a 8• Updating UserRole for %gn ( $+ %msnpp.email $+ ), please wait...
   echo $color(info text)-at             To Change Group Room For UserRole Update Type In: /urole2
   sockopen urole groups.msn.com 80
   set -u30 %ut $ticks
 }
 else {
   echo $color(info) -a 8• Updating UserRole for %gn ( $+ %msnpp.email $+ ), please wait...
   echo $color(info) -at             To Change Group Room For UserRole Update Type In: /urole2
   sockopen urole groups.msn.com 80
   set -u30 %ut $ticks
 }
}
on *:sockopen:urole:{ 
 sockwrite -n $sockname GET / $+ %gn $+ /chat.msnw HTTP/1.1 $+ $crlf $+ User-Agent: Vincula/ $+ $vver (compatible; MSIE 6.0; Windows NT 5.1) $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: FR-CA |;**FR Market
 sockwrite -n $sockname Host: groups.msn.com $+ $crlf $+ Cookie: AdultWarn=1;path=/;chocx=9,02,0310,2401; MSPProf= $+ %msnpp.profile $+; MSPAuth= $+ %msnpp.ticket $+; $+ $crlf $+ Connection: Close $+ $crlf $+ $crlf
}
on *:sockread:urole:{ 
 if ($sockerr > 0) return
 var %ur | sockread %ur
 if (>RenderChat isin %ur) {
  ;**Added
   set %msnpp.cookie $gettok(%ur,2,39)
   writeini $+(",$scriptdir,vpassport.dat") $msn.ini(selpp) cookie $gettok(%ur,2,39)
   set %msnpp.userrole $gettok(%ur,8,39)
  ;**Added - End
   writeini $+(",$scriptdir,vpassport.dat") $msn.ini(selpp) UserRole $gettok(%ur,8,39)
   echo $color(info2 text) -at 9• UserRole for %gn ( $+ %msnpp.email $+ ) Updated. ( $+ $calc(($ticks - %ut) / 1000) seconds)  
   sockclose $sockname
   return
 }
 elseif (*HTTP/1.1 302* iswm %ur) { echo $color(info text) -at 4• Failed! UserRole update failed. Passport ( $+ %msnpp.email $+ ) must be updated before userrole can be updated. | sockclose $sockname | return }
 elseif (*Error Message:* iswm %gr) { echo $color(info text) -at 4• Cannot update %gn (Error: $gettok(%gr,2-,58) $+ ) | sockclose $sockname | return }
}
menu * { /halt
 -
 Update Current UserRole:urole
 -
} 

alias urole2 { 
 %gn = $$?="Group Room Name Change: Enter a Group Name for updating the UserRole Number, in the following format: GroupName (Do NOT add the G__)"
 echo $color(info text) -at 8• Updating UserRole for %gn ( $+ %msnpp.email $+ ), please wait...
 echo $color(info text) -at             To Change Group Room For UserRole Update Type In: /urole2
 sockopen urole2 groups.msn.com 80
 set -u30 %ut $ticks
}
on *:sockopen:urole2:{ 
 sockwrite -n $sockname GET / $+ %gn $+ /chat.msnw HTTP/1.1 $+ $crlf $+ User-Agent: Vincula/ $+ $vver (compatible; MSIE 6.0; Windows NT 5.1) $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: FR-CA |;**FR Market
 sockwrite -n $sockname Host: groups.msn.com $+ $crlf $+ Cookie: AdultWarn=1;path=/;chocx=9,02,0310,2401; MSPProf= $+ %msnpp.profile $+; MSPAuth= $+ %msnpp.ticket $+; $+ $crlf $+ Connection: Close $+ $crlf $+ $crlf
}
on *:sockread:urole2:{
 if ($sockerr > 0) return
 var %ur | sockread %ur
 if (>RenderChat isin %ur) {
  ;**Added
   set %msnpp.cookie $gettok(%ur,2,39)
   writeini $+(",$scriptdir,vpassport.dat") $msn.ini(selpp) cookie $gettok(%ur,2,39)
   set %msnpp.userrole $gettok(%ur,8,39)
  ;**Added - End
   set %msnpp.userrole $gettok(%ur,8,39) 
   writeini $+(",$scriptdir,vpassport.dat") $msn.ini(selpp) UserRole $gettok(%ur,8,39)
   echo $color(info2 text) -at 9• UserRole for %gn ( $+ %msnpp.email $+ ) Updated. ( $+ $calc(($ticks - %ut) / 1000) seconds)  
   sockclose $sockname
   return
 }
 elseif (*HTTP/1.1 302* iswm %ur) { echo $color(info text) -at 4• Failed! UserRole Update Failed. Passport ( $+ %msnpp.email $+ ) must be updated before updating userRole. | sockclose $sockname | return }
 elseif (*Error Message:* iswm %gr) { echo $color(info text) -at 4• Cannot update %gn (Error: $gettok(%gr,2-,58) $+ ) | sockclose $sockname | return }
}
menu * { /halt
 -
 Update UserRole:urole
 -
} 

 

Obviously, I didn't modify credits and just precised what I modified myself. I believe scripters should be more aware of internationalization features of their scripts. (The same problem exists for Sub-Info grabbers for example)

 

I based this work on Vexation's add-on because I think that's a good work.

Generate a random answer from a list.

alias randomise { return $gettok($1-,$r(1,$numtok($1-,44)),44) }

Use: $randomise(this,is,a,test)

 

Could be useful for randomly choosing a password or randomly returning an alias/variable.

 

This is a Bingo Game I made with assistance from Petertje. Thanks Petertje for teaching me some new things. Any questions feel free to ask me for assistance. Its pretty self explanatory though. Enjoy !!

;;;;;;;;;;;;;;;;;Bingo Game By Mail;;;;;;;;;;;;;;;;; 
;;;;;;;;;;;;;;;;;Credits To Petertje For His Invaluable Assistance;;;;;;;;;;;;;;;;;
menu menubar {
 -
 Bingo
 .$iif($group(#bingo) == on,$style(2),$style(0)) On: .enable #bingo | /msg # S \rTahoma;0 Bingo On | /echo -a Bingo On 
 .$iif($group(#bingo) == off,$style(2),$style(0)) Off: .disable #bingo | /msg # S \rTahoma;0 Bingo Off | /echo -a Bingo Off 
 .Set Channel:hadd bingo bingochan $chan
 .Start Bingo:start.bingo | msg $hget(bingo,bingochan) The game will begin in 15 seconds.
 .Stop Bingo:bingo.end
}
on *:start: {
 hmake bingo 100
}
on *:JOIN:#: {
 if ($nick != $me) { 
   ctcpreply $nick TIME To Play Bingo Type:
!bcard then !bstart.$& 
     â€©Type !bcommands For List Of Commands$& 
     â€©Right now you need 5 numbers one for each letter for winning. 
 }
 if ($nick == $me) { 
   hadd -m bingo bingochan $chan
   setallnum
 }
}
#bingo on
on *:text:*:#: { 
 if ($1 == !bstart) {
   if (!$hget(bingo)) hmake bingo 100
   hadd bingo bingonick $nick
   msg $hget(bingo,bingochan) The game will begin in 15 seconds. 
   start.bingo
 }
 if ($1 == !bcommands) bingo.commands
 if ($1 == !bpause) bingo.pause
 if ($1 == !bresume) bingo.resume
 if ($1 == !bstop) bingo.end
 if ($1 == !bingo) {
   msg $hget(bingo,bingochan) Hold Your Cards While We Check To Verify The Winning Numbers
   hadd -m bingo winnick $nick
   bingo.pause
   checkcard
 }
 if ($1 == !bcard) {
   hadd -m bingo bcard $+ $nick $fillcard 
   hadd -m bingo bingochan $chan 
   msg $nick Your Bingo Numbers are $hget(bingo,bcard $+ $nick)
 }
 if ($1 == !bobject) {
   msg $hget(bingo,bingochan) The Object Of This Game Is To Match 5 Numbers, One Number From Every Letter From Those The Script Supplies You To The Numbers The Script Calls. Match 5 Numbers, One From Each Letter And Type !bingo
 }
}
alias start.bingo {
 hadd -m bingo toguess $hget(bingo,allnum) 
 hadd -m bingo cardinfo $null 
 timer.call 0 15 call 
}
alias bingo.end {
 msg $hget(bingo,bingochan) To Play Bingo Again Type !bcard Then Type !bstart
;  hfree -s bingo 
 hdel bingo bcard $+ $nick
 hdel bingo bingonick $nick
 hdel bingo cardinfo
 timer.call off
}
alias call {
 if ($hget(bingo,toguess)  == $null) { timer.call off | bingo.end }
 else {
   var %i = $gettok($hget(bingo,toguess),$r(1,$numtok($hget(bingo,toguess),32)),32)
   hadd -m bingo cardinfo $hget(bingo,cardinfo) %i
   hadd -m bingo toguess $remtok($hget(bingo,toguess),%i,1,32)
   msg $hget(bingo,bingochan) $bletter(%i)
 }
}
alias bingo.commands {
 ctcpreply $nick TIME Type:
!bobject ~ To See The Object Of The Game$&
   â€©!bcard ~ To Set The Numbers For Your Card
!bstart ~ To Start Bingo$&
   â€©!bingo ~ If You Think You Have Won
!bstop ~ To End Game$&
   â€©!bpause ~ To Pause The Game
!bresume ~ To Resume The Game$&
   â€©!blackout ~ If You Used All The Numbers On Your Card
}
alias bletter return $mid(bingo,$ceil($calc($1 / 15)),1) $+ $1
alias -l letter return $mid(bingo,$ceil($calc($1 / 15)),1) 
alias setallnum {
 var %i = 1
 hadd -m bingo allnum
 while (%i <= 75 ) { hadd bingo allnum $hget(bingo,allnum) %i | inc %i }
}
alias fillcard {
 var %card, %i = 61, %j, %r, %all = $hget(bingo,allnum)
 while (%i > 0) {
   %j = 14
   while (%j > 9) {
     %r = $r(%i,$calc(%j + %i))
     %card = %card $gettok(%all,%r,32) 
     %all = $deltok(%all,%r,32)
   dec %j } 
 dec %i 15 }
 return $sorttok(%card,32,n)
}
alias bingo.pause {
 timer.call -p   
 msg $hget(bingo,bingochan) Bingo Paused
}
alias bingo.resume {
 timer.call -r 0 16 call
 msg $hget(bingo,bingochan) Bingo Resumed
}
alias checkcard {
 var %i = 1, %card = $hget(bingo,bcard $+ $hget(bingo,winnick)), %bingo = bingo
 while (%i <= 25) {
   if ($istok($hget(bingo,cardinfo),$gettok(%card,%i,32),32)) {
     %bingo = $remove(%bingo,$letter($gettok(%card,%i,32)))
   }
   inc %i
 }
 $iif(%bingo,losemsg,winmsg)
}
alias winmsg {
 msg $hget(bingo,bingochan) $hget(bingo,winnick) Is The WINNER.
 hdel bingo winnick $nick
 bingo.end
}
alias losemsg {
 msg $hget(bingo,bingochan) Lets Continue Playing $hget(bingo,winnick) Didnt Have The Right Numbers.
 hdel bingo winnick $nick
 bingo.resume
} 

#bingo end

Edited May 16, 2005 11:12 PM by Mail

 

"Diplomacy is the art of saying 'Nice doggie' until you can find a rock".-Will Rogers

This is the Blackout Bingo version. Still pretty much self explanatory. In this game you need to get all the numbers in your card before typing the command to check if you are a winner.

;;;;;;;;;;;;;;;;;Blackout Bingo By Mail;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;Credits To Petertje For His Invaluable Assistance;;;;;;;;;;;;;;;;;
menu menubar {
 -
 Blackout Bingo
 .$iif($group(#blackout) == on,$style(2),$style(0)) On: .enable #blackout | /msg # S \rTahoma;0 Blackout Bingo On | /echo -a Blackout Bingo On 
 .$iif($group(#blackout) == off,$style(2),$style(0)) Off: .disable #blackout | /msg # S \rTahoma;0 Blackout Bingo Off | /echo -a Blackout Bingo Off 
 .Set Channel:hadd blackout blackoutchan $chan
 .Start Blackout Bingo:start.blackout | msg $hget(blackout,blackoutchan) The game will begin in 15 seconds.
 .Stop Blackout Bingo:blackout.end
}
on *:start: {
 hmake blackout 100
}
on *:JOIN:#: {
 if ($nick != $me) { 
   ctcpreply $nick TIME To Play Blackout Bingo Type:
!blcard then !blstart.$& 
     Ã¢â‚¬Â©Type !blcommands For List Of Commands$& 
     Ã¢â‚¬Â©You need to get all 25 numbers in your card for winning. 
 }
 if ($nick == $me) { 
   hadd -m blackout blackoutchan $chan
   blackoutsetallnum
 }
}
#blackout off
on *:text:*:#: {
 if ($1 === !blstart) {
   if (!$hget(blackout)) hmake blackout 100
   hadd blackout blackoutnick $nick
   msg $hget(blackout,blackoutchan) The game will begin in 15 seconds. 
   blackout.start
 }
 if ($1 == !blcommands) blackout.commands
 if ($1 == !blpause) blackout.pause
 if ($1 == !blresume) blackout.resume
 if ($1 == !blstop) blackout.end
 if ($1 == !blackout) {
   msg $hget(blackout,blackoutchan) Hold Your Cards While We Check To Verify The Winning Numbers
   hadd -m blackout wnick $nick
   blackout.pause
   checkblackout
 }
 if ($1 == !blcard) {
   hadd -m blackout card $+ $nick $blackoutfillcard 
   hadd -m blackout blackoutchan $chan 
   msg $nick Your Blackout Bingo Numbers are $hget(blackout,card $+ $nick)
 }
 if ($1 == !blobject) {
   msg $hget(blackout,blackoutchan) The Object Of This Game Is To Match All 25 Of Your Numbers And Type !blackout
 }
}

alias blackout.start {
 hadd -m blackout guessing $hget(blackout,blackoutallnum) 
 hadd -m blackout blcardinfo $null 
 timer.blackoutcall 0 15 call 
}
alias blackout.end {
 msg $hget(blackout,blackoutchan) To Play Blackout Bingo Again Type !blackoutcard Then Type !blackoutstart 
 hdel blackout card $+ $nick
 hdel blackout blackoutnick $nick
 hdel blackout blcardinfo
 timer.blackoutcall off
}
alias blackoutcall {
 var %i = $gettok($hget(blackout,guessing),$r(1,$numtok($hget(blackout,guessing),32)),32)
 hadd -m blackout blcardinfo $hget(blackout,blcardinfo) %i
 hadd -m blackout guessing $remtok($hget(blackout,guessing),%i,1,32)
 msg $hget(blackout,blackoutchan) $bletter(%i)
}
alias blackout.commands {
 ctcpreply $nick TIME Type:
!blobject ~ To See The Object Of The Game$&
   Ã¢â‚¬Â©!blcard ~ To Set The Numbers For Your Card$&
   Ã¢â‚¬Â©!blstart ~ To Start Bingo$&
   Ã¢â‚¬Â©!blstop ~ To End Game$&
   Ã¢â‚¬Â©!blpause ~ To Pause The Game
!blresume ~ To Resume The Game$&
   Ã¢â‚¬Â©!blackout ~ If You Used All The Numbers On Your Card
}
alias bletter return $mid(bingo,$ceil($calc($1 / 15)),1) $+ $1
alias -l blackoutletter return $mid(bingo,$ceil($calc($1 / 15)),1)
alias blackoutsetallnum {
 var %i = 1
 hadd -m blackout blackoutallnum
 while (%i <= 75 ) { hadd blackout blackoutallnum $hget(blackout,blackoutallnum) %i | inc %i }
}
alias blackoutfillcard {
 var %blcard, %i = 61, %j, %r, %blall = $hget(blackout,blackoutallnum)
 while (%i > 0) {
   %j = 14
   while (%j > 9) {
     %r = $r(%i,$calc(%j + %i))
     %blcard = %blcard $gettok(%blall,%r,32) 
     %blall = $deltok(%blall,%r,32)
   dec %j } 
 dec %i 15 }
 return $sorttok(%blcard,32,n)
}
alias blackout.pause {
 timer.blackoutcall -p   
 msg $hget(blackout,blackoutchan) Blackout Bingo Paused
}
alias blackout.resume {
 timer.blackoutcall -r 0 16 blackoutcall
 msg $hget(blackout,blackoutchan) Blackout Bingo Resumed
}
alias blwinmsg {
 msg $hget(blackout,blackoutchan) $hget(blackout,wnick) Is The WINNER.
 hdel blackout wnick $nick
 blackout.end
}
alias bllosemsg {
 msg $hget(blackout,blackoutchan) Lets Continue Playing $hget(blackout,wnick) Didnt Have The Right Numbers.
 hdel blackout wnick $nick
 blackout.resume
}
alias checkblackout {
 var %i = 1, %blcard = $hget(blackout,card $+ $hget(blackout,wnick)), %blackout = 25
 while (%i <= 25) {
   if ($istok($hget(blackout,blcardinfo),$gettok(%blcard,%i,32),32)) dec %blackout
   inc %i
 }
 $iif(%blackout,bllosemsg,blwinmsg)
}
#blackout end

 

"Diplomacy is the art of saying 'Nice doggie' until you can find a rock".-Will Rogers