Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.98 KB | None | 0 0
  1. ;ALIASES;
  2. alias grid return 1,12  B 12,12 1,0|4,4 1,4 I 4,4 1,0|8,8 1,8 N 8,8 1,0|9,9 1,9 G 9,9 1,0|7,7 1,7 O 7,7 
  3. alias bingo return 1,12 B12,12 1,0|4,4 1,4I4,4 1,0|8,8 1,8N8,8 1,0|9,9 1,9G9,9 1,0|7,7 1,7O7,7 
  4. alias -l blogo { return $+($c1([),$c2($1),$c1(])) }
  5. alias -l plogo { return $+($c1($chr(40)),$c2($1),$c1($chr(41))) }
  6. alias -l blogo2 { return $+($c2([),$c1($1),$c2(])) }
  7. alias -l plogo2 { return $+($c2($chr(40)),$c1($1),$c2($chr(41))) }
  8. alias -l logins { if (!$hget(Logins,$nick)) { .notice $nick $plogo(STATUS) $c1(Currently verifying) $c2(your) $c1(authentication with NickServ) $+ $c2(.) | .ns status $nick | halt } }
  9. alias incwins { writeini BingoStatistics.ini Wins $1 $iif($readini(BingoStatistics.ini,Wins,$1),$calc($v1 + 1),1) }
  10. alias inctotalgames { writeini BingoStatistics.ini total-played $1 $iif($readini(BingoStatistics.ini,total-played,$1),$calc($v1 + 1),1) }
  11. alias -l EngBingo {
  12. if ($1 == $null) {
  13. .msg #BingoStaff $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1($nick) $+($c2(Tried to end a game of Bingo without specifying a correct channel),$c1(!))
  14. return
  15. }
  16. unset $+(%bingo.,$1,.,*)
  17. }
  18. alias ReadyBingo {
  19. if ($1 == #FastBingo) {
  20. timer 1 20 StartBingo $1
  21. msg $1 $iif($r(1,2) == 1,$blogo2(BINGO),$plogo2(BINGO)) $c1(A game of) $bingo $c1(will start in) $c2(60) $+($c1(Seconds),$c2(.)) $c1(Type) $c2(!Join) $c1(to join the current) $c2(#FastBingo) $+($c1(Game),$c2(.))
  22. }
  23. else {
  24. .timer 1 120 StartBingo $1
  25. .msg $1 $iif($r(1,2) == 1,$blogo2(BINGO),$plogo2(BINGO)) $c1(A game of) $bingo $c1(will start in) $c2(120) $+($c1(Seconds),$c2(.)) $c1(Type) $c2(!Join) $c1(to join the current) $c1(Game of) $+($c2(Bingo),$c1(.))
  26. }
  27. set $+(%,bingo.,$1,.starting) true
  28. }
  29. alias -l StartBingo {
  30. if ($numtok($eval($+(%,bingo.,$1,.users),2),44) <= 1 || $eval($+(%,bingo.,$1,.users),2) == $null) { msg $1 Not enough users | endgame $1 | HALT }
  31. if ($1 == #FastBingo) {
  32. msg #FastBingo $iif($r(1,2) == 1,$blogo2(BINGO),$plogo2(BINGO)) $c1(The Game of) $bingo $+($c1(is now starting),$c2(!)) $c1(The first number will be drawn in) $c2(5) $+($c1(seconds),$c2($chr(44))) $c1(and consecutive draws will be) $c2(10) $+($c1(seconds apart),$c2(.))
  33. timer 1 5 GetNumber #FastBingo
  34. set $+(%,bingo.,$1,.Game) true
  35. }
  36. else {
  37. .msg $1 $iif($r(1,2) == 1,$blogo2(BINGO),$plogo2(BINGO)) $c1(The Game of) $bingo $+($c1(is now starting),$c2(!)) $c1(The first number will be drawn in) $c2(10) $+($c1(seconds),$c2($chr(44))) $c1(and consecutive draws will be) $c2(15) $+($c1(seconds apart),$c2(.))
  38. .timer 1 10 GetNumber $1
  39. set $+(%,bingo.,$1,.Game) true
  40. }
  41. var %x 1
  42. while (%x <= $numtok(%bingo. [ $+ [ $1 ] $+ .users ],44)) {
  43. var %user $gettok(%bingo. [ $+ [ $1 ] $+ .users ],%x,44)
  44. b1 $eval(%user,1)
  45. i1 $eval(%user,1)
  46. n1 $eval(%user,1)
  47. g1 $eval(%user,1)
  48. o1 $eval(%user,1)
  49. inc %x
  50. var %m $iif($readini(UserOptions.ini,msgornotice,$eval(%user,1)) == msg,msg $eval(%user,1),notice $eval(%user,1))
  51. %m $bingo
  52. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b1,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b1,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b1,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i1,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i1,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i1,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n1,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n1,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n1,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g1,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g1,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g1,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o1,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o1,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o1,%user),2))),$chr(31))
  53. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b2,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b2,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b2,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i2,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i2,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i2,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n2,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n2,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n2,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g2,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g2,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g2,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o2,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o2,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o2,%user),2))),$chr(31))
  54. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b3,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b3,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b3,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i3,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i3,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i3,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n3,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n3,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n3,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g3,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g3,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g3,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o3,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o3,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o3,%user),2))),$chr(31))
  55. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b4,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b4,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b4,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i4,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i4,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i4,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n4,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n4,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n4,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g4,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g4,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g4,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o4,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o4,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o4,%user),2))),$chr(31))
  56. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b5,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b5,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b5,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i5,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i5,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i5,%user),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n5,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n5,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n5,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g5,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g5,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g5,%user),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o5,%user),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o5,%user),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o5,%user),2))),$chr(31))
  57. }
  58. unset $+(%,bingo.,$1,.starting)
  59. }
  60. alias GetNumber {
  61. if (!$eval($+(%,bingo.,$1,.gnums),3)) {
  62. var %bnum 1
  63. while (%bnum <= 75) {
  64. set $+(%,bingo.,$1,.gnums) $eval($+(%,bingo.,$1,.gnums),3) %bnum
  65. inc %bnum }
  66. }
  67. var %ball $gettok($eval($+(%,bingo.,$1,.gnums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),3),0,32)),32)
  68. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),3),%ball,1,32)
  69. if (%ball isnum 1-15) { set %call $+ $1 $+($chr(3),12,$chr(44),12,$chr(3),0,$chr(44),12,B,$chr(40),%ball,$chr(41)) }
  70. if (%ball isnum 16-30) { set %call $+ $1 $+($chr(3),4,$chr(44),4,$chr(3),0,$chr(44),4,I,$chr(40),%ball,$chr(41)) }
  71. if (%ball isnum 31-45) { set %call $+ $1 $+($chr(3),8,$chr(44),8,$chr(3),1,$chr(44),8,N,$chr(40),%ball,$chr(41)) }
  72. if (%ball isnum 46-60) { set %call $+ $1 $+($chr(3),9,$chr(44),9,$chr(3),0,$chr(44),9,G,$chr(40),%ball,$chr(41)) }
  73. if (%ball isnum 61-75) { set %call $+ $1 $+($chr(3),7,$chr(44),7,$chr(3),0,$chr(44),7,O,$chr(40),%ball,$chr(41)) }
  74. set %ballscalled $+ $1 $eval($+(%,ballscalled,$1),2) $+ . $+ %ball
  75. msg $1 $iif($r(1,2) == 1,$blogo2(CALL),$plogo2(CALL)) $+($c1(A new number has been called),$c2(!)) $c1(The new number is) $+($eval($+(%,call,$1),2),$chr(3),$c2(!)) $c1(If you have this number type) $+($c2(!mark),$c1(.))
  76. if ($1 == #FastBingo) .timerGetBall $+ $1 1 10 getnumber #FastBingo
  77. if ($1 != #FastBingo) .timerGetBall $+ $1 1 15 getnumber $1
  78. if ($eval($+(%,bingo.,$eval($1,1),.gnums),3) == $null) { endgame $1 | timergetball $+ $1 off }
  79. }
  80. alias endgame {
  81. unset %call $+ $1
  82. var %x 1
  83. while (%x <= $numtok(%bingo. [ $+ [ $1 ] $+ .users ],44)) {
  84. echo -a $numtok(%bingo. [ $+ [ $1 ] $+ .users ],44)
  85. unset $+(%,bingo.,*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44),*)
  86. unset $+(%,B1*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  87. unset $+(%,B2*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  88. unset $+(%,B3*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  89. unset $+(%,B4*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  90. unset $+(%,B5*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  91. unset $+(%,I1*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  92. unset $+(%,I2*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  93. unset $+(%,I3*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  94. unset $+(%,I4*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  95. unset $+(%,I5*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  96. unset $+(%,N1*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  97. unset $+(%,n2*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  98. unset $+(%,n3*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  99. unset $+(%,n4*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  100. unset $+(%,n5*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  101. unset $+(%,g1*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  102. unset $+(%,g2*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  103. unset $+(%,g3*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  104. unset $+(%,g4*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  105. unset $+(%,g5*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  106. unset $+(%,o1*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  107. unset $+(%,o2*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  108. unset $+(%,o3*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  109. unset $+(%,o4*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  110. unset $+(%,o5*,$gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44))
  111. echo -a %x $gettok($eval($+(%,bingo.,$1,.users),2),%x,44)
  112. inctotalgames $gettok($eval($+(%,bingo.,$1,.users),2),$eval(%x,1),44)
  113. inc %x
  114. }
  115. unset $+(%*,$1,*)
  116. unset %ballscalled $+ $1
  117. .timerGetBall $+ $1 off
  118. unset $+(%,bingo.,$1,.gnums)
  119. if ($2) {
  120. incwins $2
  121. inctotalgames $2
  122. msg $1 $blogo2(WINNER) $c1(It seems we have a winner $+ $chr(44)) $c2($2) $c1(has gotten a line of) $c2(5) $+($c1(and now has a bingo),$c2(!)) $c1(They currently have) $c2($bytes($readini(BingoStatistics.ini,wins,$2),db)) $c1($+(Win,$iif($readini(BingoStatistics.ini,wins,$2) > 1,$+ s,$+ $null)) out of) $c2($bytes($readini(Bingostatistics.ini,Total-Played,$2),db)) $+($c1(Total $+(Game,$iif($readini(BingoStatistics.ini,total-played,$2) > 1,$+ s,$+ $null))),$c2(.))
  123. }
  124. }
  125. alias b1 {
  126. if (!$eval($+(%,bingo.,$1,.gnums),2)) {
  127. var %bnum 1
  128. while (%bnum <= 15) {
  129. set $+(%,bingo.,$1,.gnums) $eval($+(%,bingo.,$1,.gnums),2) %bnum
  130. inc %bnum }
  131. }
  132. var %ball $gettok($eval($+(%,bingo.,$1,.gnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),2),0,32)),32)
  133. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),2),%ball,1,32)
  134. set $+(%,b1,$1) $gettok($eval($+(%,bingo.,$1,.gnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),2),0,32)),32)
  135. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),2),$eval($+(%,b1,$1),2),1,32)
  136. set $+(%,b2,$1) $gettok($eval($+(%,bingo.,$1,.gnums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),2),0,32)),32)
  137. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),2),$eval($+(%,b2,$1),2),1,32)
  138. set $+(%,b3,$1) $gettok($eval($+(%,bingo.,$1,.gnums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),2),0,32)),32)
  139. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),2),$eval($+(%,b3,$1),2),1,32)
  140. set $+(%,b4,$1) $gettok($eval($+(%,bingo.,$1,.gnums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),2),0,32)),32)
  141. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),2),$eval($+(%,b4,$1),2),1,32)
  142. set $+(%,b5,$1) $gettok($eval($+(%,bingo.,$1,.gnums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),2),0,32)),32)
  143. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),2),$eval($+(%,b5,$1),2),1,32)
  144. unset $+(%,bingo.,$1,.gnums)
  145. }
  146. alias i1 {
  147. if (!$eval($+(%,bingo.,$1,.inums),2)) {
  148. var %inum 16
  149. while (%inum <= 30) {
  150. set $+(%,bingo.,$1,.inums) $eval($+(%,bingo.,$1,.inums),2) %inum
  151. inc %inum }
  152. }
  153. var %ball $gettok($eval($+(%,bingo.,$1,.inums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.inums),2),0,32)),32)
  154. set $+(%,bingo.,$1,.inums) $remtok($eval($+(%,bingo.,$1,.inums),2),%ball,1,32)
  155. set $+(%,i1,$1) $gettok($eval($+(%,bingo.,$1,.inums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.inums),2),0,32)),32)
  156. set $+(%,bingo.,$1,.inums) $remtok($eval($+(%,bingo.,$1,.inums),2),$eval($+(%,i1,$1),2),1,32)
  157. set $+(%,i2,$1) $gettok($eval($+(%,bingo.,$1,.inums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.inums),2),0,32)),32)
  158. set $+(%,bingo.,$1,.inums) $remtok($eval($+(%,bingo.,$1,.inums),2),$eval($+(%,i2,$1),2),1,32)
  159. set $+(%,i3,$1) $gettok($eval($+(%,bingo.,$1,.inums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.inums),2),0,32)),32)
  160. set $+(%,bingo.,$1,.inums) $remtok($eval($+(%,bingo.,$1,.inums),2),$eval($+(%,i3,$1),2),1,32)
  161. set $+(%,i4,$1) $gettok($eval($+(%,bingo.,$1,.inums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.inums),2),0,32)),32)
  162. set $+(%,bingo.,$1,.inums) $remtok($eval($+(%,bingo.,$1,.inums),2),$eval($+(%,i4,$1),2),1,32)
  163. set $+(%,i5,$1) $gettok($eval($+(%,bingo.,$1,.inums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.inums),2),0,32)),32)
  164. set $+(%,bingo.,$1,.inums) $remtok($eval($+(%,bingo.,$1,.inums),2),$eval($+(%,i5,$1),2),1,32)
  165. unset $+(%,bingo.,$1,.inums)
  166. }
  167. alias n1 {
  168. if (!$eval($+(%,bingo.,$1,.nnums),2)) {
  169. var %nnum 31
  170. while (%nnum <= 45) {
  171. set $+(%,bingo.,$1,.nnums) $eval($+(%,bingo.,$1,.nnums),2) %nnum
  172. inc %nnum }
  173. }
  174. var %ball $gettok($eval($+(%,bingo.,$1,.nnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.nnums),2),0,32)),32)
  175. set $+(%,bingo.,$1,.nnums) $remtok($eval($+(%,bingo.,$1,.nnums),2),%ball,1,32)
  176. set $+(%,n1,$1) $gettok($eval($+(%,bingo.,$1,.nnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.nnums),2),0,32)),32)
  177. set $+(%,bingo.,$1,.nnums) $remtok($eval($+(%,bingo.,$1,.nnums),2),$eval($+(%,n1,$1),2),1,32)
  178. set $+(%,n2,$1) $gettok($eval($+(%,bingo.,$1,.nnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.nnums),2),0,32)),32)
  179. set $+(%,bingo.,$1,.nnums) $remtok($eval($+(%,bingo.,$1,.nnums),2),$eval($+(%,n2,$1),2),1,32)
  180. set $+(%,n3,$1) $gettok($eval($+(%,bingo.,$1,.nnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.nnums),2),0,32)),32)
  181. set $+(%,bingo.,$1,.nnums) $remtok($eval($+(%,bingo.,$1,.nnums),2),$eval($+(%,n3,$1),2),1,32)
  182. set $+(%,n4,$1) $gettok($eval($+(%,bingo.,$1,.nnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.nnums),2),0,32)),32)
  183. set $+(%,bingo.,$1,.nnums) $remtok($eval($+(%,bingo.,$1,.nnums),2),$eval($+(%,n4,$1),2),1,32)
  184. set $+(%,n5,$1) $gettok($eval($+(%,bingo.,$1,.nnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.nnums),2),0,32)),32)
  185. set $+(%,bingo.,$1,.nnums) $remtok($eval($+(%,bingo.,$1,.nnums),2),$eval($+(%,n5,$1),2),1,32)
  186. unset $+(%,bingo.,$1,.nnums)
  187. }
  188. alias g1 {
  189. if (!$eval($+(%,bingo.,$1,.ggnums),2)) {
  190. var %gnum 46
  191. while (%gnum <= 60) {
  192. set $+(%,bingo.,$1,.ggnums) $eval($+(%,bingo.,$1,.ggnums),2) %gnum
  193. inc %gnum }
  194. }
  195. var %ball $gettok($eval($+(%,bingo.,$1,.ggnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.ggnums),2),0,32)),32)
  196. set $+(%,bingo.,$1,.ggnums) $remtok($eval($+(%,bingo.,$1,.ggnums),2),%ball,1,32)
  197. set $+(%,g1,$1) $gettok($eval($+(%,bingo.,$1,.ggnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.ggnums),2),0,32)),32)
  198. set $+(%,bingo.,$1,.ggnums) $remtok($eval($+(%,bingo.,$1,.ggnums),2),$eval($+(%,g1,$1),2),1,32)
  199. set $+(%,g2,$1) $gettok($eval($+(%,bingo.,$1,.ggnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.ggnums),2),0,32)),32)
  200. set $+(%,bingo.,$1,.ggnums) $remtok($eval($+(%,bingo.,$1,.ggnums),2),$eval($+(%,g2,$1),2),1,32)
  201. set $+(%,g3,$1) $gettok($eval($+(%,bingo.,$1,.ggnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.ggnums),2),0,32)),32)
  202. set $+(%,bingo.,$1,.ggnums) $remtok($eval($+(%,bingo.,$1,.ggnums),2),$eval($+(%,g3,$1),2),1,32)
  203. set $+(%,g4,$1) $gettok($eval($+(%,bingo.,$1,.ggnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.ggnums),2),0,32)),32)
  204. set $+(%,bingo.,$1,.ggnums) $remtok($eval($+(%,bingo.,$1,.ggnums),2),$eval($+(%,g4,$1),2),1,32)
  205. set $+(%,g5,$1) $gettok($eval($+(%,bingo.,$1,.ggnums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.ggnums),2),0,32)),32)
  206. set $+(%,bingo.,$1,.ggnums) $remtok($eval($+(%,bingo.,$1,.ggnums),2),$eval($+(%,g5,$1),2),1,32)
  207. unset $+(%,bingo.,$1,.ggnums)
  208. }
  209. alias o1 {
  210. if (!$eval($+(%,bingo.,$1,.onums),2)) {
  211. var %onum 61
  212. while (%onum <= 75) {
  213. set $+(%,bingo.,$1,.onums) $eval($+(%,bingo.,$1,.onums),2) %onum
  214. inc %onum }
  215. }
  216. var %ball $gettok($eval($+(%,bingo.,$1,.onums),2),$r(1,$gettok($eval($+(%,bingo.,$1,.onums),2),0,32)),32)
  217. set $+(%,bingo.,$1,.onums) $remtok($eval($+(%,bingo.,$1,.onums),2),%ball,1,32)
  218. set $+(%,o1,$1) $gettok($eval($+(%,bingo.,$1,.onums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.onums),3),0,32)),32)
  219. set $+(%,bingo.,$1,.onums) $remtok($eval($+(%,bingo.,$1,.onums),2),$eval($+(%,o1,$1),2),1,32)
  220. set $+(%,o2,$1) $gettok($eval($+(%,bingo.,$1,.onums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.onums),3),0,32)),32)
  221. set $+(%,bingo.,$1,.onums) $remtok($eval($+(%,bingo.,$1,.onums),2),$eval($+(%,o2,$1),2),1,32)
  222. set $+(%,o3,$1) $gettok($eval($+(%,bingo.,$1,.onums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.onums),3),0,32)),32)
  223. set $+(%,bingo.,$1,.onums) $remtok($eval($+(%,bingo.,$1,.onums),2),$eval($+(%,o3,$1),2),1,32)
  224. set $+(%,o4,$1) $gettok($eval($+(%,bingo.,$1,.onums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.onums),3),0,32)),32)
  225. set $+(%,bingo.,$1,.onums) $remtok($eval($+(%,bingo.,$1,.onums),2),$eval($+(%,o4,$1),2),1,32)
  226. set $+(%,o5,$1) $gettok($eval($+(%,bingo.,$1,.onums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.onums),3),0,32)),32)
  227. set $+(%,bingo.,$1,.onums) $remtok($eval($+(%,bingo.,$1,.onums),2),$eval($+(%,o5,$1),2),1,32)
  228. unset $+(%,bingo.,$1,.onums)
  229. }
  230. alias brank {
  231. filter -ffrcuetg 2 $+ - $+ $calc($ini(bingostatistics.ini,wins,0) +1) 2 61 bingostatistics.ini brank.txt
  232. if ($isfile(brank.txt)) {
  233. var %rank $iif($1 isnum,$read(brank.txt,$1),$read(brank.txt, w, $+($1,=,*)))
  234. if ($gettok(%rank,1,32) >= 1) {
  235. return $readn $replace(%rank,=,$chr(32))
  236. }
  237. else return $null
  238. }
  239. }
  240. alias toprank {
  241. filter -ffrcuetg 2 $+ - $+ $calc($ini(bingostatistics.ini,wins,0) +1) 2 61 bingostatistics.ini btop.txt
  242. if ($isfile(btop.txt)) {
  243. var %t $blogo2(TOP TEN) $c1(1:) $c2($gettok($read(btop.txt,1),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,1),2,61),db)) $c2($chr(124)) $c1(2:) $c2($gettok($read(btop.txt,2),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,2),2,61),db)) $c2($chr(124)) $c1(3:) $c2($gettok($read(btop.txt,3),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,3),2,61),db)) $c2($chr(124)) $c1(4:) $c2($gettok($read(btop.txt,4),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,4),2,61),db)) $c2($chr(124)) $c1(5:) $c2($gettok($read(btop.txt,5),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,5),2,61),db)) $c2($chr(124)) $c1(6:) $c2($gettok($read(btop.txt,6),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,6),2,61),db)) $c2($chr(124)) $c1(7:) $c2($gettok($read(btop.txt,7),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,7),2,61),db)) $c2($chr(124)) $c1(8:) $c2($gettok($read(btop.txt,8),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,8),2,61),db)) $c2($chr(124)) $c1(9:) $c2($gettok($read(btop.txt,9),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,9),2,61),db)) $c2($chr(124)) $c1(10:) $c2($gettok($read(btop.txt,10),1,61)) $plogo(Wins: $bytes($gettok($read(btop.txt,10),2,61),db))
  244. return %t
  245. }
  246. }
  247. ;LOGIN;
  248. on $*:TEXT:/^[!.@]login/Si:#:{
  249. if (bingo !isin $chan) { RETURN }
  250. if (!$hGet(Logins,$nick)) {
  251. if (!$hGet(Waiting,$nick)) {
  252. hAdd -mz Waiting $nick 10
  253. ns status $nick
  254. }
  255. }
  256. else { .notice $nick $plogo(STATUS) $c2(You) $c1(are already logged in) $+ $c2(!) | .ignore -u3 $nick }
  257. }
  258. on ^*:NOTICE:Status*:?:{
  259. if ($nick == NickServ) {
  260. if (!$hget(logins,$2)) {
  261. if ($3 >= 2) {
  262. notice $2 $plogo(STATUS) $c2(NickServ) $c1(authentication was a success with the nick) $c2($2) $+ $c1(!)
  263. hadd -m logins $2 $ctime
  264. watch $+(+,$2)
  265. haltdef
  266. }
  267. else {
  268. notice $2 $plogo(STATUS) $c2(NickServ) $c1(authentication failed) $+ $c2(!) $c1(Please identify with NickServ) $+ $c2(.)
  269. haltdef
  270. }
  271. }
  272. else { .notice $2 $plogo(STATUS) $c1(You are already logged in) $+ $c2(.) | ignore -u3 $nick }
  273. }
  274. }
  275. raw 601:*:{
  276. if ($hGet(Logins,$gettok($2,1,126))) {
  277. hdel Logins $gettok($2,1,126)
  278. watch $+(-,$gettok($2,1,126))
  279. }
  280. }
  281. on 1:NICK:{ if ($hGet(Logins,$nick)) { hdel Logins $nick } }
  282. on 1:QUIT:{ if ($hGet(Logins,$nick)) { hdel Logins $nick } }
  283. ;BINGO STUFF;
  284. On $*:TEXT:/^[.!]Endbingo\b/Si:#Bingo,#BingoStaff,#FastBingo,#Bingo2,#Bingo3: {
  285. logins
  286. var %m $iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)
  287. if ($readini(BingoStaff.ini,Admins,$nick)) {
  288. if ($2 == $null || $2 != #Bingo || $2 != #Bingo2 || $2 != #bingo3) { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $+($c1(You have not specified a correct channel),$c2(!)) | RETURN }
  289. .msg $2 $iif($r(1,2) == 1,$blogo2(Admin End),$plogo2(Admin End)) $c1(Administrator) $c2($nick) $+($c1(just ended the game in this channel),$c2(.))
  290. .msg #BingoStaff $iif($r(1,2) == 1,$blogo2(Force End),$plogo2(Force End)) $c1(Administrator) $c2($nick) $c1(just ended the game in) $+($c2($2),.)
  291. EndBingo $2
  292. }
  293. else { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(You must be an) $c2(Administrator) $+($c1(to end a game),$c2(!)) | return }
  294. }
  295. On $*:TEXT:/^[.!]Startbingo\b/Si:#FastBingo,#Bingo2,#Bingo3: {
  296. var %m $iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)
  297. if ($eval($+(%,bingo,.,$chan,.game),2) == true) { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(There is already a game of) $c2(BINGO) $+($c1(going),!) | RETURN }
  298. logins
  299. ReadyBingo #
  300. }
  301. On $*:TEXT:/^[.!]join\b/Si:#Bingo,#FastBingo,#Bingo2,#Bingo3: {
  302. logins
  303. var %m $iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)
  304. if ($eval($+(%,bingo.,$chan,.starting),2) == true) {
  305. if ($eval($+(%,bingo.,all,.user,$nick),2) == true) { %m $c1($+(Sorry,$chr(44)) but you've already joined a game of) $+($bingo,$c2(!)) | RETURN }
  306. set $+(%,bingo.,all,.user,$nick) true
  307. set $+(%,bingo.,$chan,.users) $+($eval($+(%,bingo.,#,.users),2),$iif($+(%,bingo.,#,.users),$iif($eval($+(%,bingo.,#fastbingo,.users),3),$chr(44),$null),$null),$nick)
  308. %m $plogo2(JOIN) $c1(You have joined the game of) $bingo $c1(in) $+($c2(#),$c1(!))
  309. }
  310. else { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(Nobody has started a game yet in) $+($c2(#),$c2(!)) $c1(You can start a game by typing) $c2(!Startgame) $+($c1(in the channel you wish to play in),$c2(.))
  311. }
  312. }
  313. On $*:TEXT:/^[.!](board|grid)\b/Si:#Bingo,#FastBingo,#Bingo2,#Bingo3: {
  314. var %m $iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)
  315. if ($eval($+(%,bingo.,all,.user,$nick),2) == true) {
  316. %m $bingo
  317. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b1,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b1,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b1,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i1,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i1,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i1,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n1,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n1,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n1,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g1,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g1,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g1,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o1,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o1,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o1,$nick),2))),$chr(31))
  318. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b2,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b2,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b2,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i2,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i2,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i2,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n2,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n2,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n2,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g2,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g2,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g2,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o2,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o2,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o2,$nick),2))),$chr(31))
  319. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b3,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b3,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b3,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i3,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i3,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i3,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n3,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n3,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n3,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g3,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g3,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g3,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o3,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o3,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o3,$nick),2))),$chr(31))
  320. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b4,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b4,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b4,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i4,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i4,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i4,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n4,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n4,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n4,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g4,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g4,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g4,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o4,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o4,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o4,$nick),2))),$chr(31))
  321. %m $+($+($eval($+($chr(3),01,$chr(44),12),1)),$iif($len($eval($+(%,b5,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,b5,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,b5,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$chr(31),$+($eval($+($chr(3),01,$chr(44),04),1)),$iif($len($eval($+(%,i5,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,i5,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,i5,$nick),2))),$chr(31),$chr(3),$chr(31),$chr(124),$+($eval($+($chr(3),01,$chr(44),08),1)),$chr(31),$iif($len($eval($+(%,n5,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,n5,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,n5,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),09),1)),$chr(31),$iif($len($eval($+(%,g5,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,g5,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,g5,$nick),2))),$chr(3),$chr(124),$+($eval($+($chr(3),01,$chr(44),07),1)),$chr(31),$iif($len($eval($+(%,o5,$nick),2)) == 1,$+($chr(160),$chr(31),$eval($+(%,o5,$nick),2),$chr(31),$chr(160),$chr(31)),$+($chr(160),$chr(31),$eval($+(%,o5,$nick),2))),$chr(31))
  322. }
  323. else { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $+($c1(You are not in a game),$c2($chr(33)))
  324. }
  325. }
  326. On $*:TEXT:/^[.!]bingo\b/Si:#Bingo,#FastBingo,#Bingo2,#Bingo3: {
  327. var %m $iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)
  328. if ($eval($+(%,bingo.,all,.user,$nick),2) == true) {
  329. if ($eval($+(%,b1,$nick),2) == x) && ($eval($+(%,b2,$nick),2) == x) && ($eval($+(%,b3,$nick),2) == x) && ($eval($+(%,b4,$nick),2) == x) && ($eval($+(%,b5,$nick),2) == x) { var %bbingo yes }
  330. if ($eval($+(%,i1,$nick),2) == x) && ($eval($+(%,i2,$nick),2) == x) && ($eval($+(%,i3,$nick),2) == x) && ($eval($+(%,i4,$nick),2) == x) && ($eval($+(%,i5,$nick),2) == x) { var %ibingo yes }
  331. if ($eval($+(%,n1,$nick),2) == x) && ($eval($+(%,n2,$nick),2) == x) && ($eval($+(%,n3,$nick),2) == x) && ($eval($+(%,n4,$nick),2) == x) && ($eval($+(%,n5,$nick),2) == x) { var %nbingo yes }
  332. if ($eval($+(%,g1,$nick),2) == x) && ($eval($+(%,g2,$nick),2) == x) && ($eval($+(%,g3,$nick),2) == x) && ($eval($+(%,g4,$nick),2) == x) && ($eval($+(%,g5,$nick),2) == x) { var %gbingo yes }
  333. if ($eval($+(%,o1,$nick),2) == x) && ($eval($+(%,o2,$nick),2) == x) && ($eval($+(%,o3,$nick),2) == x) && ($eval($+(%,o4,$nick),2) == x) && ($eval($+(%,o5,$nick),2) == x) { var %obingo yes }
  334. if ($eval($+(%,b1,$nick),2) == x) && ($eval($+(%,i2,$nick),2) == x) && ($eval($+(%,n3,$nick),2) == x) && ($eval($+(%,g4,$nick),2) == x) && ($eval($+(%,o5,$nick),2) == x) { var %dlrbingo yes }
  335. if ($eval($+(%,b5,$nick),2) == x) && ($eval($+(%,i4,$nick),2) == x) && ($eval($+(%,n3,$nick),2) == x) && ($eval($+(%,g2,$nick),2) == x) && ($eval($+(%,o1,$nick),2) == x) { var %drlbingo yes }
  336. if ($eval($+(%,b1,$nick),2) == x) && ($eval($+(%,i1,$nick),2) == x) && ($eval($+(%,n1,$nick),2) == x) && ($eval($+(%,g1,$nick),2) == x) && ($eval($+(%,o1,$nick),2) == x) { var %r1bingo yes }
  337. if ($eval($+(%,b2,$nick),2) == x) && ($eval($+(%,i2,$nick),2) == x) && ($eval($+(%,n2,$nick),2) == x) && ($eval($+(%,g2,$nick),2) == x) && ($eval($+(%,o2,$nick),2) == x) { var %r2bingo yes }
  338. if ($eval($+(%,b3,$nick),2) == x) && ($eval($+(%,i3,$nick),2) == x) && ($eval($+(%,n3,$nick),2) == x) && ($eval($+(%,g3,$nick),2) == x) && ($eval($+(%,o3,$nick),2) == x) { var %r3bingo yes }
  339. if ($eval($+(%,b4,$nick),2) == x) && ($eval($+(%,i4,$nick),2) == x) && ($eval($+(%,n4,$nick),2) == x) && ($eval($+(%,g4,$nick),2) == x) && ($eval($+(%,o4,$nick),2) == x) { var %r4bingo yes }
  340. if ($eval($+(%,b5,$nick),2) == x) && ($eval($+(%,i5,$nick),2) == x) && ($eval($+(%,n5,$nick),2) == x) && ($eval($+(%,g5,$nick),2) == x) && ($eval($+(%,o5,$nick),2) == x) { var %r5bingo yes }
  341. msg # $nick just got a bingo with $iif(%bbingo == yes, column 1,$null) $iif(%ibingo == yes, column 2,$null) $iif(%nbingo == yes, column 3,$null) $iif(%gbingo == yes, column 4,$null) $iif(%obingo == yes, column 5,$null) $iif(%r1bingo == yes, row 1,$null) $iif(%r2bingo == yes, row 2,$null) $iif(%r3bingo == yes, row 3,$null) $iif(%r4bingo == yes, row 4,$null) $iif(%r5bingo == yes, row 5,$null)
  342. endgame $chan $nick
  343. }
  344. else { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(you are not currently in a game of) $+($bingo,$c2(!)) }
  345. }
  346. On $*:TEXT:/^[.!]mark\b/Si:#Bingo,#FastBingo,#Bingo2,#Bingo3: {
  347. var %m $iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)
  348. if ($2) { if ($remove($strip($2),b,i,n,g,o) !isnum 1-75) { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $+($c1(The numbers range from 1),$c2($chr(45)),$c1(75),$c2(!)) | RETURN } }
  349. if ($eval($+(%,bingo.,all,.user,$nick),2) == true) {
  350. var %allnums $+($eval($+(%,b1,$nick),2),.,$eval($+(%,b2,$nick),2),.,$eval($+(%,b3,$nick),2),.,$eval($+(%,b4,$nick),2),.,$eval($+(%,b5,$nick),2),.,$eval($+(%,i1,$nick),2),.,$eval($+(%,i2,$nick),2),.,$eval($+(%,i3,$nick),2),.,$eval($+(%,i4,$nick),2),.,$eval($+(%,i5,$nick),2),.,$eval($+(%,n1,$nick),2),.,$eval($+(%,n2,$nick),2),.,$eval($+(%,n3,$nick),2),.,$eval($+(%,n4,$nick),2),.,$eval($+(%,n5,$nick),2),.,$eval($+(%,g1,$nick),2),.,$eval($+(%,g2,$nick),2),.,$eval($+(%,g3,$nick),2),.,$eval($+(%,g4,$nick),2),.,$eval($+(%,g5,$nick),2),.,$eval($+(%,o1,$nick),2),.,$eval($+(%,o2,$nick),2),.,$eval($+(%,o3,$nick),2),.,$eval($+(%,o4,$nick),2),.,$eval($+(%,o5,$nick),2))
  351. var %mball $iif($2,$remove($strip($2),b,i,n,g,o),$remove($strip($eval($+(%,call,#),2)),b,i,n,g,o,$chr(40),$chr(41)))
  352. if (!$istok(%allnums,%mball,46)) { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(You do) $c2(not) $+($c1(have that number on your board),$c2(!)) | HALT }
  353. if ($istok($eval($+(%,ballscalled,$chan),2),%mball,46) == $true) {
  354. if (%mball isnum 1-15) { var %let B | if ($eval($+(%,b1,$nick),2) == %mball) set $+(%,b1,$nick) x | if ($eval($+(%,b2,$nick),2) == %mball) set $+(%,b2,$nick) x | if ($eval($+(%,b3,$nick),2) == %mball) set $+(%,b3,$nick) x | if ($eval($+(%,b4,$nick),2) == %mball) set $+(%,b4,$nick) x | if ($eval($+(%,b5,$nick),2) == %mball) set $+(%,b5,$nick) x }
  355. if (%mball isnum 16-30) { var %let I | if ($eval($+(%,i1,$nick),2) == %mball) set $+(%,i1,$nick) x | if ($eval($+(%,i2,$nick),2) == %mball) set $+(%,i2,$nick) x | if ($eval($+(%,i3,$nick),2) == %mball) set $+(%,i3,$nick) x | if ($eval($+(%,i4,$nick),2) == %mball) set $+(%,i4,$nick) x | if ($eval($+(%,i5,$nick),2) == %mball) set $+(%,i5,$nick) x }
  356. if (%mball isnum 31-45) { var %let N | if ($eval($+(%,n1,$nick),2) == %mball) set $+(%,n1,$nick) x | if ($eval($+(%,n2,$nick),2) == %mball) set $+(%,n2,$nick) x | if ($eval($+(%,n3,$nick),2) == %mball) set $+(%,n3,$nick) x | if ($eval($+(%,n4,$nick),2) == %mball) set $+(%,n4,$nick) x | if ($eval($+(%,n5,$nick),2) == %mball) set $+(%,n5,$nick) x }
  357. if (%mball isnum 46-60) { var %let G | if ($eval($+(%,g1,$nick),2) == %mball) set $+(%,g1,$nick) x | if ($eval($+(%,g2,$nick),2) == %mball) set $+(%,g2,$nick) x | if ($eval($+(%,g3,$nick),2) == %mball) set $+(%,g3,$nick) x | if ($eval($+(%,g4,$nick),2) == %mball) set $+(%,g4,$nick) x | if ($eval($+(%,g5,$nick),2) == %mball) set $+(%,g5,$nick) x }
  358. if (%mball isnum 61-75) { var %let O | if ($eval($+(%,o1,$nick),2) == %mball) set $+(%,o1,$nick) x | if ($eval($+(%,o2,$nick),2) == %mball) set $+(%,o2,$nick) x | if ($eval($+(%,o3,$nick),2) == %mball) set $+(%,o3,$nick) x | if ($eval($+(%,o4,$nick),2) == %mball) set $+(%,o4,$nick) x | if ($eval($+(%,o5,$nick),2) == %mball) set $+(%,o5,$nick) x }
  359. %m $iif($r(1,2) == 1,$blogo2(BINGO),$plogo2(BINGO)) $c1(You have just marked the number) $c2(%mball) $c1(in column) $+($c2(%let),$c1(. To see your board type)) $c2(!Board) $c1(or) $+($c2(!grid),$c1(.))
  360. }
  361. else { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(%mball) $+($c1(did not match any balls that have been called),$c2(!)) }
  362. }
  363. else { %m $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $+($c1(You are not currently in a game),$c2(!))
  364. }
  365. }
  366.  
  367. on $*:TEXT:/^[!@.]rank/Si:#Bingo,#FastBingo,#Bingo2,#Bingo3:{
  368. var %n $iif($2,$2,$nick), %msg $iif($left($1,1) == @,msg #,$iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)), %rank $brank($replace(%n,$chr(91),$chr(126),$chr(93),$chr(126)))
  369. if ($2 isnum) && ($2 > $ini(bingostatistics.ini,wins,0)) { %msg $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $+($c1(I do not have that many users),$c2(.)) | RETURN }
  370. if (%rank) {
  371. var %rankb4 $calc($gettok(%rank,1,32) - 1)
  372. var %rankb4wins $gettok($brank(%rankb4),3,32)
  373. var %winsneed4rank $calc(%rankb4wins - $gettok(%rank,3,32) + 1)
  374. %msg $blogo(RANK) $c2($gettok(%rank,2,32)) $c1(is ranked) $+($c2($gettok(%rank,1,32)),$c1(/),$c2($ini(bingostatistics.ini,wins,0))) $c1(with) $c2($bytes($gettok(%rank,3,32),db)) $c1(win $+ $iif($gettok(%rank,3,32) == 1,$null,s)) $+ $c2(.) $iif($readn >= 1,$c1(They need) $c2($bytes(%winsneed4rank,db)) $c1(more win $+ $iif(%winsneed4rank == 1,$+ $null,$+ s) for rank) $c2(%rankb4) $+ $c1(.))
  375. }
  376. else { %m $plogo(ERROR) $c1(Sorry) $+ $c2($chr(44)) $c1(but I could not find a rank for) $c2(%n) $+ $c1(.) }
  377. }
  378. on $*:TEXT:/^[!@.](top$|top10$)/Si:#Bingo,#n0drama,#bingostaff,#Fastbingo,#bingo.support:{
  379. var %msg $iif($left($1,1) == @,msg #,$iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick))
  380. if ($ini(bingostatistics.ini,wins,0) >= 10) {
  381. %msg $toprank
  382. }
  383. else { %msg $plogo(ERROR) $c1(Sorry) $+ $c2($chr(44)) $c1(but this command is currently offline due to not having enough users) $+ $c1(.) }
  384. }
  385. on $*:TEXT:/^[!@.]addvip/Si:#bingostaff:{
  386. if ($istok(Admin.Helper.Supporter,$2,46) != $true || $3 == $null) { .notice $nick Correct syntax: !addvip Admin/Helper/Staff Nick | RETURN }
  387. if ($readini(BingoStaff.ini,Admin,$address($nick,2)) == yes) {
  388. msg # $nick just added $3 to the $+($2,s) list!
  389. writeini BingoStaff.ini $2 $address($3,2) yes
  390. }
  391. }
  392. ;JOIN/QUIT/PART;
  393. on 1:JOIN:#Bingo,#Bingo2,#Bingo3,#FastBingo,#bingo.support:{
  394. if ($chan != #bingo.support) {
  395. if ($readini(BingoStatistics.ini,Wins,$nick) >= 50) {
  396. mode # +v $nick
  397. }
  398. if ($gettok($brank($nick),1,32) <= 3) {
  399. msg # $iif($r(1,2) == 1,$plogo(TOP PLAYER),$blogo(TOP PLAYER)) $c2($nick) $+($c1($chr(40)),$c2(Rank),$c1(:),$chr(32),$c2($brank($nick)),$c1($chr(41))) $c2(has joined) $+($c1(#),$c2(.)) $c2(Wins:) $c1($readini(bingostatistics.ini,wins,$nick)) $c2(Games:) $c1($readini(bingostatistics.ini,total-played,$nick))
  400. }
  401. }
  402. if ($readini(BingoStaff.ini,Admin,$address($nick,2)) == yes) {
  403. msg # $plogo2(STAFF JOIN) $c1(Admin) $c2($nick) $c1(has joined) $+($c2(#),$c1(.))
  404. }
  405. if ($readini(Bingostaff.ini,Helper,$address($nick,2)) == yes) {
  406. msg # $plogo2(STAFF JOIN) $c1(Helper) $c2($nick) $c1(has joined) $+($c2(#),$c1(.))
  407. }
  408. if ($readini(Bingostaff.ini,Supporter,$address($nick,2)) == yes) {
  409. msg # $plogo2(VIP JOIN) $c1(Supporter) $c2($nick) $c1(has joined) $+($c2(#),$c1(.))
  410. }
  411. }
  412. on $*:TEXT:/^[!@.]set/Si:#bingo,#bingo.support,#fastbingo,#bingostaff:{
  413. logins
  414. var %m $iif($readini(UserOptions.ini,msgornotice,$nick) == msg,msg $nick,notice $nick)
  415. if ($2 == notify) {
  416. if ($3 == $null) { .notice $nick $plogo2(SYNTAX) $c1(The correct syntax is) $c2(!set notify msg/message/query/pm/privmsg/notice) | RETURN }
  417. if ($istok(msg.message.query.pm.privmsg,$3,46) == $true) {
  418. writeini useroptions.ini msgornotice $nick msg
  419. %m $plogo2(SETTINGS) $c1(You have changed your) $c2(notify) $c1(setting to) $+($c2(message),$c1(/),$c2(query)) $+($c1(you),$c2(.))
  420. }
  421. if ($3 == notice) {
  422. %m $plogo2(SETTINGS) $c1(You have changed your) $c2(notify) $c1(setting to) $c2(notice) $+($c1(you),$c2(.))
  423. remini useroptions.ini msgornotice $nick
  424. }
  425. }
  426. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement