Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.07 KB | None | 0 0
  1. ;ALIASES;
  2. 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 
  3. alias -l blogo { return $+($c1([),$c2($1),$c1(])) }
  4. alias -l plogo { return $+($c1($chr(40)),$c2($1),$c1($chr(41))) }
  5. alias -l blogo2 { return $+($c2([),$c1($1),$c2(])) }
  6. alias -l plogo2 { return $+($c2($chr(40)),$c1($1),$c2($chr(41))) }
  7. ;alias -l login { if (!$hget(Login,$nick)) { .notice $nick $plogo(STATUS) $c1(Currently verifying) $c2(your) $c1(authentication with NickServ) $+ $c2(.) | .ns status $nick | halt } }
  8. alias -l incwins { writeini BingoStatistics.ini Wins $nick $iif($readini(BingoStatistics.ini,Wins,$nick),$calc($v1 + 1),1) }
  9. alias -l inctotalgames { writeini BingoStatistics.ini Total-Played $nick $iif($readini(BingoStatistics.ini,Total-Played,$nick),$calc($v1 + 1),1) }
  10. alias -l EngBingo {
  11. if ($1 == $null) {
  12. .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(!))
  13. return
  14. }
  15. unset $+(%bingo.,$1,.,*)
  16. }
  17. alias -l ReadyBingo {
  18. if ($1 == #FastBingo) {
  19. .timer 1 60 StartBingo $1
  20. .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(.))
  21. }
  22. else {
  23. .timer 1 120 StartBingo $1
  24. .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(.))
  25. }
  26. }
  27. alias -l StartBingo {
  28. if ($1 == #FastBingo) {
  29. .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(.))
  30. .timer 1 5 GetNumber #FastBingo
  31. set $+(%,bingo.,$1,.Game) true
  32. }
  33. else {
  34. .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(.))
  35. .timer 1 10 GetNumber $1
  36. set $+(%,bingo.,$1,.Game) true
  37. }
  38. }
  39. alias -l GetNumber {
  40. if (!$eval($+(%,bingo.,$1,.gnums),3)) {
  41. var %bnum 1
  42. while (%bnum <= 75) {
  43. set $+(%,bingo.,$1,.gnums) $eval($+(%,bingo.,$1,.gnums),3) %bnum
  44. inc %bnum }
  45. }
  46. var %ball $gettok($eval($+(%,bingo.,$1,.gnums),3),$r(1,$gettok($eval($+(%,bingo.,$1,.gnums),3),0,32)),32)
  47. set $+(%,bingo.,$1,.gnums) $remtok($eval($+(%,bingo.,$1,.gnums),3),%ball,1,32)
  48. if (%ball isnum 1-15) { set %call $+($chr(3),12,$chr(44),12,$chr(3),0,$chr(44),12,B,$chr(40),%ball,$chr(41)) }
  49. if (%ball isnum 16-30) { set %call $+($chr(3),4,$chr(44),4,$chr(3),0,$chr(44),4,I,$chr(40),%ball,$chr(41)) }
  50. if (%ball isnum 31-45) { set %call $+($chr(3),8,$chr(44),8,$chr(3),1,$chr(44),8,N,$chr(40),%ball,$chr(41)) }
  51. if (%ball isnum 46-60) { set %call $+($chr(3),9,$chr(44),9,$chr(3),0,$chr(44),9,G,$chr(40),%ball,$chr(41)) }
  52. if (%ball isnum 61-75) { set %call $+($chr(3),7,$chr(44),7,$chr(3),0,$chr(44),7,O,$chr(40),%ball,$chr(41)) }
  53. msg $1 $iif($r(1,2) == 1,$blogo2(CALL),$plogo2(CALL)) $+($c1(A new number has been called),$c2(!)) $c1(The new number is) $+(%call,$chr(3),$c2(!)) $c1(If you have this number type) $+($c2(!mark),$c1(.))
  54. if ($1 == #FastBingo) .timerGetBall 1 2 getnumber #FastBingo
  55. if ($1 != #FastBingo) .timerGetBall 1 15 getnumber $1
  56. if ($eval($+(%,bingo.,$eval($1,1),.gnums),3) == $null) { msg $1 All out of numbers!#@!#!@#!@# | timergetball off }
  57. }
  58. ;LOGIN;
  59. ;on $*:TEXT:/^[!.@]login/Si:#:{
  60. ;if ($chan != #BINGO || $chan != #BINGO2 || $chan != #BINGO3) { halt }
  61. ;if (!$hGet(Login,$nick)) {
  62. ;if (!$hGet(Waiting,$nick)) {
  63. ;hAdd -mz Waiting $nick 10
  64. ;.ns status $nick
  65. ;}
  66. ;}
  67. ;else { .notice $nick $plogo(STATUS) $c2(You) $c1(are already logged in) $+ $c2(!) | .ignore -u3 $nick }
  68. ;}
  69. ;on ^*:NOTICE:Status*:?:{
  70. ;if ($nick == NickServ) {
  71. ;if (!$hget(login,$2)) {
  72. ;if ($3 >= 2) {
  73. ;.notice $2 $plogo(STATUS) $c2(NickServ) $c1(authentication was a success with the nick) $c2($2) $+ $c1(!)
  74. ;.hadd -m login $2 $ctime
  75. ;.watch $+(+,$2)
  76. ;.haltdef
  77. ;}
  78. ;else {
  79. ;.notice $2 $plogo(STATUS) $c2(NickServ) $c1(authentication failed) $+ $c2(!) $c1(Please identify with NickServ) $+ $c2(.)
  80. ;.haltdef
  81. ;}
  82. ;}
  83. ;else { .notice $2 $plogo(STATUS) $c1(You are already logged in) $+ $c2(.) | ignore -u3 $nick }
  84. ;}
  85. ;}
  86. ;raw 601:*:{
  87. ;if ($hGet(Login,$gettok($2,1,126))) {
  88. ;.hdel Login $gettok($2,1,126)
  89. ;.watch $+(-,$gettok($2,1,126))
  90. ;}
  91. ;}
  92. ;on 1:NICK:{ if ($hGet(Login,$nick)) { .hdel Login $nick } }
  93. ;on 1:QUIT:{ if ($hGet(Login,$nick)) { .hdel Login $nick } }
  94. ;BINGO STUFF;
  95. On $*:TEXT:/^[.!]Endbingo\b/Si:#Bingo,#BingoStaff,#FastBingo,#Bingo2,#Bingo3: {
  96. if ($readini(BingoStaff.ini,Admins,$nick)) {
  97. if ($2 == $null || $2 != #Bingo || $2 != #Bingo2 || $2 != #bingo3) { .notice $nick $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $+($c1(You have not specified a correct channel),$c2(!)) | RETURN }
  98. .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(.))
  99. .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),.)
  100. EndBingo $2
  101. }
  102. else {
  103. .notice $nick $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(You must be an) $c2(Administrator) $+($c1(to end a game),$c2(!)) | return
  104. }
  105. }
  106. On $*:TEXT:/^[.!]Startbingo\b/Si:#Bingo,#FastBingo,#Bingo2,#Bingo3: {
  107. if ($eval($+(%,bingo,.,$chan,.game),3) == true) { .notice $nick $iif($r(1,2) == 1,$blogo2(ERROR),$plogo2(ERROR)) $c1(There is already a game of) $c2(BINGO) $+($c1(going),!) | RETURN }
  108. login
  109. ReadyBingo #
  110. }
  111. On $*:TEXT:/^[.!]join\b/Si:#Bingo,#FastBingo,#Bingo2,#Bingo3: {
  112. if ($eval($+(%,bingo.,$1,.Game),3) == true) {
  113. }
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement