Advertisement
Guest User

Untitled

a guest
Jun 17th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.65 KB | None | 0 0
  1. ; Lottery/Bigno Bot By `Xronic ;
  2. ; Please dont change credits ;
  3. ; version bot: 2.5 / update: soon ;
  4. ; //////////////////////////////// ;
  5. ; Variables (% | Exmaple: %b.chan) ;
  6. ; %b.chan = channel, %b.sign = ! ;
  7. ; //////////////////////////////// ;
  8. on *:kick:%b.Chan: if ($read(bingoregs.txt,w,* $+ $address($knick,2)) { write -dl $+ $readn bingoregs.txt }
  9. on *:ban:%b.chan: if ($read(bingoregs.txt,w,* $+ $banmask) { write -dl $+ $readn bingoregs.txt }
  10. on *:part:%b.Chan: if ($read(bingoregs.txt,w,* $+ $wildsite) { write -dl $+ $readn bingoregs.txt }
  11. on *:Quit: if ($read(bingoregs.txt,w,* $+ $wildsite) { write -dl $+ $readn bingoregs.txt }
  12. on *:nick: if ($read(bingoregs.txt,w,* $+ $wildsite) { write -l $+ $readn bingoregs.txt $nick $wildsite }
  13. on *:connect:{
  14. timer 1 2 /join %b.chan
  15. echo -s %color1 Welcome to Xronic lotterybot Version: 1.3 %color2
  16. echo -s %color1 Have Bug? do /q [P51]`Xronic %color2
  17. echo -s %color1 Ty for you use in my bot %color2
  18. echo -s %color1 Next a good day. %color2
  19. window -e @עדכונים
  20. echo @עדכונים %color1 ברוכים הבאים לגרסא החדשה 1.3 %color2
  21. echo @עדכונים %color1 !login User Pass מה שעודכן בבוט,מערכת אדמינים ע"י התחברות לבוט %color2
  22. echo @עדכונים %color1 נוספו דיאלוגים חדשים וידותיים יותר %color2
  23. }
  24. on *:load:{
  25. set %b.chan $input(channel,e,channel( $+ %b.chan $+ )
  26. set %b.sign $input(Sign,e,sign ex: !)
  27. set %color1 0,1[11«0 | set %color2 11»0]
  28. echo -a %color1 on load settings is over! %color2
  29. window -e @עדכונים
  30. echo @עדכונים %color1 ברוכים הבאים לגרסא החדשה 1.3 %color2
  31. echo @עדכונים %color1 !login User Pass מה שעודכן בבוט,מערכת אדמינים ע"י התחברות לבוט %color2
  32. echo @עדכונים %color1 נוספו דיאלוגים חדשים וידותיים יותר %color2
  33. }
  34. on *:text:*:%b.chan: {
  35. if ($1 == %b.sign $+ Regs) && (%bingo.status == ON) && (!%flood) { bingoregs | set -u3 %flood 1 }
  36. elseif (($1 == %b.sign $+ Regs) || ($1 == %b.sign $+ Reg) || ($1 == %b.sign $+ Status) || ($1 == %b.sign $+ Del) || $1 == %b.sign $+ prize)) && (%bingo.status == OFF) && (!%flood) { msg %b.chan %color1 There isn't lottery for the momnet, Ready for the next match. %color2 | set -u3 %flood 1 }
  37. elseif (($1 == %b.sign $+ Commands) || ($1 == %b.sign $+ Help)) && (%bingo.status == OFF) && (!%flood) { msg %b.chan %color1 %color3 $+ Commands are: $+ %color4 $+ %color3 %b.sign $+ %color4 $+ Admin $+ %color3 %b.sign $+ %color4 $+ Prize $+ %color3 %b.sign $+ %color4 $+ Regs $+ %color3 %b.sign $+ %color4 $+ status $+ %color3 %b.sign $+ %color4 $+ Regs $+ %color3 %b.sign $+ %color4 $+ Last %color2 | set -u3 %flood 1 }
  38. elseif (($1 == %b.sign $+ Commands) || ($1 == %b.sign $+ Help)) && (%bingo.status == ON) && (!%flood) { msg %b.chan %color1 %color3 $+ Commands are: $+ %color4 $+ %color3 %b.sign $+ %color4 $+ Admin $+ %color3 %b.sign $+ %color4 $+ Prize $+ %color3 %b.sign $+ %color4 $+ Regs $+ %color3 %b.sign $+ %color4 $+ status $+ %color3 %b.sign $+ %color4 $+ Regs $+ %color3 %b.sign $+ %color4 $+ Last %color2 | set -u3 %flood 1 }
  39. elseif ($1 == %b.sign $+ Prize) && (%bingo.status == ON) && (!%flood) { msg %b.chan %color1 %color3 $+ The prize is: %color4 $+ %b.prize %color2 | set -u3 %flood 1 }
  40. elseif ($1 == %b.sign $+ status) && (%bingo.status == ON) && (!%flood) { msg %b.chan %color1 %color3 $+ The lottery started in: %color4 $+  $+ $readini(Settings.ini,At,Date-time) $+  $+ %color3 admin: %color4 $+  $+ %b.admin $+  $+ %color3 regs: %color4 $+  $+ $numtok(%Regs,32) $+ / $+ %b.Users $+  %color3 $+ prize: %color4 $+  $+ %b.prize $+ , %color4 $+ to register type: %color3 $+ %b.sign $+ %color4 $+ Reg $+ . %color2 | set -u3 %flood 1 }
  41. elseif ($1 == %b.sign $+ Last) && (%bingo.status == OFF) && (!%flood) { msg %b.chan %color1 %color3 $+ The last lottery started in: %color4 $+  $+ $readini(Settings.ini,At,Date-time) $+  %color3 $+ prize: %color4 $+  $+ %b.prize $+ , %color3 $+  $+ admin: $+  $+ %color4 %b.admin $+ , %color3 $+ winner: %color4 $+  $+ %last.win $+  %color2 }
  42. elseif ($1 == %b.sign $+ Admin) && (%bingo.status == ON) && (!%flood) { msg %b.chan %color1 %color3 $+ The admin is: %color4 $+ %b.admin %color2 | set -u3 %flood 1 }
  43. elseif ($1 == %b.sign $+ Credits) && (!%flood) { msg %b.chan %color1 %color4 $+ Lotterybot By %color3 $+ Xronic %color4 $+ Version: $+ %color3 2.5 %color2 }
  44. elseif (($1 == %b.sign $+ Del) || ($1 == %b.sign $+ Remove)) && (%bingo.status == ON) && (!%flood) {
  45. if ($read(bingoregs.txt,w,* $+ $wildsite)) { write -dl $+ $readn bingoregs.txt | msg %b.chan %color1 %color3 $+  $+ $nick $+  $+ %color4 $+ , You are removed from the Lottery in success! %color2 | set -u2 %flood 1 }
  46. else { msg %b.chan %color1 %color3 $+  $+ $nick $+  $+ %color4 $+ , You are not registered to the lottery! %color2 | set -u2 %flood 1 }
  47. }
  48. elseif ($1 == %b.sign $+ Reg) && (%bingo.status == ON) && (%b.tagg == 1) && (* $+ %b.tag $+ * iswm $nick) && (!%flood) { msg %b.chan %color1 %color3 $+  $+ $nick $+  $+ %color4 $+ , admin %color3 $+  $+ %b.admin $+  $+ %color4 blocked your tag! %color2 | set -u3 %flood 1 }
  49. elseif ($1 == %b.sign $+ Reg) && (%bingo.status == ON) && (!%flood) {
  50. if ($read(bingoregs.txt,w,* $+ $wildsite)) { msg %b.chan %color1 %color3 $+  $+ $nick $+  $+ %color4 $+ , You are already register to the lottery %color2 | set -u3 %flood 1 | halt }
  51. else { write bingoregs.txt $nick $wildsite | msg %b.chan %color1 %color3 $+  $+ $nick $+  $+ %color4 $+ , succesfully registered to the lottery now %color2 | set -u3 %flood 1
  52. if ($lines(bingoregs.txt) == %b.users) { endbingo }
  53. }
  54. }
  55. }
  56. on *:text:$(%b.sign $+ *):*:{
  57. tokenize 32 $mid($1-,2) | var %n = Ctl $nick,%c = Ctl %b.chan
  58. if (!%Cfld) {
  59. if ($target == %b.chan) || ($target !ischan) {
  60. %e = Ctl $iif($target ischan,%b.chan,$nick)
  61. if ($1 == Admins) { %e $Admins | inc -u5 %flood }
  62. if ($Admins($right($wildsite,-4)).logged) {
  63. if ($1 == TEXT) { %e TEXT | cfld }
  64. }
  65. }
  66. if ($target !ischan) {
  67. if ($1 == Login) && ($Admins($2 $3).login) && (!$Admins($right($wildsite,-4)).logged) { writeini Admins.ini $2 Logged $right($wildsite,-4) | %c $nick has been connected to admin account. User: $Admins($right($wildsite,-4)).user ( $+ $wildsite $+ ) | %n You have been connected to admin account. User: $Admins($right($wildsite,-4)).user ( $+ $wildsite $+ ) | /mode %b.chan +v $nick | inc -u5 %flood }
  68. elseif ($1 == Logout) && ($Admins($right($wildsite,-4)).logged) { %c $nick has been disconnected from admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) Reason: Logout ( $+ $wildsite $+ ) | %n You have been disconnected to admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) ( $+ $wildsite $+ ) | remini Admins.ini $Admins($right($wildsite,-4)).user Logged | inc -u5 %flood }
  69. elseif ($1 == Add && $5) {
  70. if ($2 == Admin) {
  71. if ($3 == %botpass) {
  72. if ($Admins($4).isin) { %n Error: the username $4 is already in use $+ $chr(44) please try another user name. }
  73. else { writeini Admins.ini $4 Pass $5 | %n Admin successfully added $+ $chr(44) for login /msg $me %Cign $+ login $4 $5 }
  74. }
  75. else { %n Error: the bot pass is wrong ! }
  76. }
  77. inc -u5 %flood
  78. }
  79. elseif ($1 == Del && $4) {
  80. if ($2 == Admin) {
  81. if ($3 == %botpass) {
  82. if ($Admins($4).isin) { remini Admins.ini $4 | %n Admin successfully removed $+ $chr(44) user: $4 }
  83. else { %n Error: the username $4 is not on the admins list. }
  84. }
  85. else { %n Error: the bot pass is wrong ! }
  86. }
  87. inc -u5 %flood
  88. }
  89. elseif ($1 == Change && $5) {
  90. if ($2 == Botpass) {
  91. if ($3 == %botpass) {
  92. if ($4 == $5) { %n The bot pass is successfully changed from %botpass to $4 | set %botpass $4 }
  93. else { %n Error: Wrong syntax. !Change botpass <botpass> <newbotpass> <newbotpass> }
  94. }
  95. else { %n Error: the bot pass is wrong ! }
  96. }
  97. inc -u5 %flood
  98. }
  99. if ($1 == Help) || ($1 == commands) && (!%flood) { msg $nick %color1 Commands are: %b.sign $+ start, %b.sign $+ stop, %b.sign $+ set-users, %b.sign $+ set-admin, %b.sign $+ set-prize, %b.sign $+ set-mahur, %b.sign $+ set-lomahur, %b.sign $+ set-chan, %b.sign $+ set-winner, %b.sign $+ setblock-tag, %b.sign $+ statusblock-tag (options: 1/2), %b.sign $+ Statusbot (options: 0/1) %color2 | set -u3 %flood 1 }
  100. elseif ($1 == start) && (!%flood) { unset %bingo.status | startbingo-pm | set -u3 %flood 1 }
  101. elseif ($1 == start) && (%bingo.status == ON) && (!%flood) { msg $nick %color1 The Lottery 9running %color4 $+ in the channel.| set -u3 %flood 1 }
  102. elseif ($1 == stop) { notbingo }
  103. elseif ($1 == stop) && (%bino.status == OFF) && (!%flood) { msg $nick %color1 Lottery isn't running at the momenet. %color2 | set -u3 %flood 1 }
  104. elseif ($1 == set-users) && (!%flood) { set %b.users $2 | set %b.users $2- | msg $nick %color1 Done! %color2 | set -u3 %flood 1 }
  105. elseif ($1 == set-admin) && (!%flood) { set %b.admin $2- | msg $nick %color1 Done! %color2 | set -u3 %flood 1 }
  106. elseif ($1 == set-prize) && (!%flood) { set %b.prize $2- | msg $nick %color1 Done! %color2 | set -u3 %flood 1 }
  107. elseif ($1 == set-mahur) && (!%flood) { set %bingo.rand ON | msg $nick %color1 Done!, now setting the winner for lottery commands: !set-winner <nick> Exmaple: !set-winner Xronic %color2 | set -u3 %flood 1 }
  108. elseif ($1 == newwiner) && (!%flood) { set %n.win ON | newwiner }
  109. elseif ($1 == set-lomahur) && (!%flood) { set %bingo.rand OFF | unset %b.winner | msg $nick %color1 Done! %color2 | set -u3 %flood 1 }
  110. elseif ($1 == set-chan) && (!%flood) { set %b.chan $2 | msg $nick %color1 Done! %color2 | set -u3 %flood 1 }
  111. elseif ($1 == set-winner) && (!%flood) { set %b.winner $2 | msg $nick %color1 Done! %color2 | set -u3 %flood 1 }
  112. elseif ($1 == set-blocktag) && (!%flood) { set %b.tag $2- | msg $nick %color1 Done! %color2 | set -u3 %flood 1 }
  113. elseif ($1 == statusblock-tag) && (!%flood) { set %b.tagg $2 | msg $nick %color1 Done %color2 | set -u3 %flood 1 }
  114. elseif ($1 == StatusBot) && (!%flood) { set %bingo.run $2 | msg $nick %color1 Done %color2 | set -u3 %flood 1 }
  115. elseif ($1 == settings) && (!%flood) {
  116. if ($numtok(%b.chan,32) isnum 1-100) { msg $nick %color1 Cahnnel is: %b.chan %color2 | set -u3 %flood 1 }
  117. if ($numtok(%b.sign,32) isnum 1-100) { msg $nick %color1 Sign is: %b.sign %color2 | set -u3 %flood 1 }
  118. if ($numtok(%b.prize,32) isnum 1-100) { msg $nick %color1 Prize is: %b.prize %color2 | set -u3 %flood 1 }
  119. if (%bingo.run == 0) { msg $nick %color1 StatusBot: 4,1OFF!0,1 %color2 | set -u3 %flood 1 }
  120. if (%bingo.run == 1) { msg $nick %color1 StatusBot: 3,1ON!0,1 %color2 | set -u3 %flood 1 }
  121. if ($numtok(%b.winner,32) isnum 1-100) { msg $nick %color1 Winner is: %b.winner %color2 | set -u3 %flood 1 }
  122. if ($numtok(%b.admin,32) isnum 1-100) { msg $nick %color1 Admin is: %b.admin %color2 | set -u3 %flood 1 }
  123. if (%bingo.rand == ON) { msg $nick %color1 Mahur status: 3,1ON!0,1 %color2 | set -u3 %flood 1 }
  124. if ($numtok(%b.winner,32) == isnum 1-100) { msg $nick %color1 Winner: %b.winner %color2 | set -u3 %flood 1 }
  125. if (%bingo.rand == OFF) { msg $nick %color1 Mahur status: 4,1OFF!0,1 %color2 | set -u3 %flood 1 }
  126. }
  127. }
  128. }
  129. }
  130. alias Admins {
  131. if ($1) {
  132. if ($prop == user) { var %x = 1 | while (%x <= $ini(Admins.ini,0)) { if ($1 == $readini(Admins.ini,$ini(Admins.ini,%x),Logged)) return $ini(Admins.ini,%x) | inc %x } }
  133. if ($prop == login) && ($readini(Admins.ini,$gettok($1,1,32),Pass) == $gettok($1,2,32)) { return $true }
  134. if ($prop == isin) { var %x = 1 | while (%x <= $ini(Admins.ini,0)) { if ($1 == $ini(Admins.ini,%x)) { return $true | break } | inc %x } }
  135. if ($prop == logged) { var %x = 1 | while (%x <= $ini(Admins.ini,0)) { if ($1 == $readini(Admins.ini,$ini(Admins.ini,%x),Logged)) { return $true | break } | inc %x } }
  136. }
  137. if (!$prop) { var %x = 1, %y = 0 | while (%x <= $ini(Admins.ini,0)) { var %admins = %admins $iif($readini(Admins.ini,$ini(Admins.ini,%x),Logged),3,4) $+ $ini(Admins.ini,%x) | if ($readini(Admins.ini,$ini(Admins.ini,%x),Logged)) inc %y | inc %x } | return Admins are ( $+ $iif(%y == 0,14,03) $+ %y $+ %Color1 $+ / $+ $ini(Admins.ini,0) $+ ) $replacE(%admins,$chr(32),$+(%Color1,$chr(44),$chr(32))) }
  138. }
  139. alias Cfld inc -u4 %Cfld
  140. alias Ctl /msg $1 %color1 %Color4 $+ $2- %color2
  141. alias bingoregs {
  142. unset %timer
  143. var %x 1,%k 1,%t
  144. while (%x <= $lines(bingoregs.txt)) {
  145. var %t = %t $gettok($read(bingoregs.txt,%x),1,32) | inc %x | inc %k
  146. if (%k == 15) { inc %timer | .timer 1 $calc(%timer *2) msg %b.chan %color1 $iif(%timer == 1,Lottery regs ( $+ $Lines(bingoregs.txt) $+ / $+ %b.users $+ ): $+ $chr(32)) $+ $replace(%t,$chr(32),$+($chr(44),$chr(32))) %color2 | var %k $null,%t $null }
  147. }
  148. if (!$read(bingoregs.txt)) { msg %b.chan %color1 There are no registered users ( $+ $Lines(bingoregs.txt) $+ / $+ %b.users $+ ) %color2 }
  149. elseif ($calc($lines(bingoregs.txt) - %x) < 15) { inc %timer | .timer 1 $calc(%timer *2) msg %b.chan %color1 $iif(%timer == 1,Lottery regs ( $+ $Lines(bingoregs.txt) $+ / $+ %b.users $+ ): $+ $chr(32)) $+ $replace(%t,$chr(32),$+($chr(44),$chr(32))) %color2 }
  150. inc $(-u $+ $calc(%timer *2 +5)) %flood
  151. unset %timer
  152. }
  153. alias endbingo {
  154. .remove lastregs.txt
  155. ;lo mahur
  156. mode %b.chan +m
  157. .timer 1 10 mode %b.chan -m
  158. if (%bingo.rand == OFF) {
  159. set %b.winner $gettok($read(bingoregs.txt),1,32)
  160. .timer 1 1 msg %b.chan %color1 Lotterybot is now mixing the %color3 $+ registers %color4 $+ please wait %color2
  161. .timer 1 2 msg %b.chan %color1 I`m choose the %color3 $+ winner $+ %color4 please waiting 2secs.. %color2
  162. .timer 1 4 msg %b.chan %color1 And the %color3 $+ winner $+ %color4 is ... %color2
  163. .timer 1 5 msg %b.chan %color1 And the %color3 $+ winner $+ %color4 is ... %color2
  164. .timer 1 6 msg %b.chan %color1 The winner is: %color3 $+ %b.winner $+ %color4 $+ , send now message to %color3 $+ %b.admin $+ %color4 to get your prize: %color3 $+ %b.prize $+ %color4 $+ . %color2
  165. .timer 1 7 /notice %b.admin %color1 %color3 $+ System msg: $+ %color4 for do newwiner %color3 $+ %b.sign $+ %color4 $+ newwiner tpye: /msg $me %color3 $+ %b.sign $+ %color4 $+ newwiner %color2
  166. }
  167. ;mahur
  168. if (%bingo.rand == ON) {
  169. .timer 1 1 msg %b.chan %color1 Lotterybot now mixing the %color3 $+ registers %color4 $+ please wait %color2
  170. .timer 1 2 msg %b.chan %color1 I`m choose the winner please waiting 2secs.. %color2
  171. .timer 1 4 msg %b.chan %color1 And the winner is ... %color2
  172. .timer 1 5 msg %b.chan %color1 And the winenr is ... %color2
  173. .timer 1 6 msg %b.chan %color1 The winner is: %color3 $+ %b.winner $+ %color4 $+ , send now message to %color3 $+ %b.admin $+ %color4 to get your prize: %color3 $+ %b.prize $+ %color4 $+ . %color2
  174. .timer 1 7 /notice %b.admin %color1 %color3 $+ System msg: $+ %color4 for do newwiner %color3 $+ %b.sign $+ %color4 $+ newwiner tpye: /msg $me %color3 $+ %b.sign $+ %color4 $+ newwiner %color2
  175. }
  176. timer 1 8 mode %b.chan +v %b.winner
  177. set -u7 %flood on
  178. .copy -o bingoregs.txt lastregs.txt
  179. .remove bingoregs.txt
  180. .timer 1 420 .remove lastregs.txt | timer 1 421 set %n.win OFF
  181. off
  182. }
  183.  
  184. alias newwiner {
  185. if (%n.win == OFF) { msg $nick %color1 Over the time for newwiner %color2 }
  186. if (%bingo.rand == OFF) {
  187. if (%n.win == ON) {
  188. timer 1 1 set %b.winner $gettok($read(lastregs.txt),1,32)
  189. timer 1 2 /mode %b.chan +m
  190. timer 1 3 msg %b.chan %color1 I choose a new winner right now. please waiting 2secs.. %color2
  191. timer 1 4 msg %b.chan %color1 Please wait 1sec. %color2
  192. timer 1 5 msg %b.chan %color1 The new winner is: %color3 $+ %b.winner $+ $+ %color4 $+ , send now message to %color3 $+ %b.admin $+ %color4 to get your prize: %color3 $+ %b.prize $+ %color4 $+ . %color2
  193. timer 1 6 /mode %b.chan +v %b.winner
  194. }
  195. }
  196. if (%bingo.rand == ON) {
  197. timer 1 1 msg %b.chan %color1 I choose a new winner right now. please waiting 2secs.. %color2
  198. timer 1 2 msg %b.chan %color1 Please wait 1sec. %color2
  199. timer 1 3 msg %b.chan %color1 The new winner is: %color3 $+ %b.winner $+ $+ %color4 $+ , send now message to %color3 $+ %b.admin $+ %color4 to get your prize: %color3 $+ %b.prize $+ %color4 $+ . %color2
  200. timer 1 4 /mode %b.chan +v %b.winner
  201. }
  202. timer 1 7 /mode %b.chan -m
  203. timer 1 120 set %n.win OFF
  204. }
  205. alias startbingo {
  206. writeini settings.ini Lottery Number $calc($readini(Settings.ini,Lottery,Number) +1) | unset %b.ttag | set %bingo.status ON | set %regs | set %b.winner | writeini settings.ini At Date-time $time $date
  207. timer 1 1 mode %b.chan +m
  208. timer 1 3 msg %b.chan %color1 The lottery number < $+ %color3 $+  $+ $readini(Settings.ini,Lottery,Number) $+  $+ %color4 $+ > has been started at: %color3 $+  $+ $readini(Settings.ini,At,Date-time) $+  %color2
  209. timer 1 5 msg %b.chan %color1 %color3 $+ Details lottery: %color4 $+ admin: %color3 $+  $+ %b.admin $+  $+ %color4 prize: %color3 $+  $+ %b.prize $+  $+ %color4 users: %color3 $+  $+ %b.users $+  $+ %color4 sign: %color3 $+  $+ %b.sign $+  $+ %color4 %color2
  210. timer 1 7 msg %b.chan %color1 Commands: %color3 $+ %b.sign $+ %color4 $+ Reg %color3 $+ %b.sign $+ %color4 $+ Del %color3 $+ %b.sign $+ %color4 $+ Regs %color2
  211. timer 1 9 msg %b.chan %color1 The register started in more %color3 $+ (3 secs...) $+ %color4 $+ , ready for -m %color2
  212. timer 1 12 mode %b.chan -m
  213. }
  214. alias startbingo-pm {
  215. if (%bingo.run == 0) {
  216. msg $nick %color1 4,1Error0: are you not settings lottery status commands: !StatusBot 1 = Statusbot ON! %color2
  217. }
  218. if ($numtok(%b.users,32) == 0) {
  219. msg $nick %color1 4,1Error0: are you not setting users commands: !set-users <users> example: !set-users 35 %color2
  220. }
  221. if (%bingo.status == ON) {
  222. msg $nick %color1 Lottery is right now running in channel: %b.chan %color2
  223. }
  224. if ($numtok(%b.prize,32) == 0) {
  225. msg $nick %color1 4,1Error0: are you not setting prize please set, commands: !set-prize <prize> exmaple: !set-prize VENT
  226. }
  227. if ($numtok(%b.admin,32) == 0) {
  228. msg $nick %color1 4,1Error0: are you not setting admin please set, commands: !set-admin <admin> exmaple: !set-admin Xronic %color2
  229. }
  230. if (%bingo.rand == ON) {
  231. if ($numtok(%b.winner,32) == 0) {
  232. msg $nick %color1 4,1Error0: are you not setting winner please set, commands: !set-winner <winner> exmaple: !set-winner Xronic %color2
  233. }
  234. }
  235. ;Lo mahur
  236. if (%bingo.run == 1) {
  237. if (%bingo.rand == OFF) {
  238. msg $nick %color1 $nick $+ ,are you succesfully started lottery in channel: %b.chan %color2
  239. writeini settings.ini Lottery Number $calc($readini(Settings.ini,Lottery,Number) +1) | unset %b.ttag | echo -a done! 1 | set %bingo.status ON | set %regs | set %b.winner | echo -a done! 2 | writeini settings.ini At Date-time $time $date
  240. timer 1 1 mode %b.chan +m
  241. timer 1 3 msg %b.chan %color1 The lottery number < $+ %color3 $+  $+ $readini(Settings.ini,Lottery,Number) $+  $+ %color4 $+ > has been started at: %color3 $+  $+ $readini(Settings.ini,At,Date-time) $+  %color2
  242. timer 1 5 msg %b.chan %color1 %color3 $+ Details lottery: %color4 $+ admin: %color3 $+  $+ %b.admin $+  $+ %color4 prize: %color3 $+  $+ %b.prize $+  $+ %color4 users: %color3 $+  $+ %b.users $+  $+ %color4 sign: %color3 $+  $+ %b.sign $+  $+ %color4 %color2
  243. timer 1 7 msg %b.chan %color1 Commands: %color3 $+ %b.sign $+ %color4 $+ Reg %color3 $+ %b.sign $+ %color4 $+ Del %color3 $+ %b.sign $+ %color4 $+ Regs %color2
  244. timer 1 9 msg %b.chan %color1 The register started in more %color3 $+ (3 secs...) $+ %color4 $+ , ready for -m %color2
  245. timer 1 12 mode %b.chan -m
  246. }
  247. }
  248. ;Mahur
  249. if (%bingo.run == 1) {
  250. if (%bingo.rand == ON) {
  251. msg $nick %color1 $nick $+ ,are you succesfully started lottery in channel: %b.chan %color2
  252. writeini settings.ini Lottery Number $calc($readini(Settings.ini,Lottery,Number) +1) | unset %b.ttag | set %bingo.status ON | set %regs | writeini settings.ini At Date-time $time $date
  253. timer 1 1 mode %b.chan +m
  254. timer 1 3 msg %b.chan %color1 The lottery number < $+ %color3 $+  $+ $readini(Settings.ini,Lottery,Number) $+  $+ %color4 $+ > has been started at: %color3 $+  $+ $readini(Settings.ini,At,Date-time) $+  %color2
  255. timer 1 5 msg %b.chan %color1 %color3 $+ Details lottery: %color4 $+ admin: %color3 $+  $+ %b.admin $+  $+ %color4 prize: %color3 $+  $+ %b.prize $+  $+ %color4 users: %color3 $+  $+ %b.users $+  $+ %color4 sign: %color3 $+  $+ %b.sign $+  $+ %color4 %color2
  256. timer 1 7 msg %b.chan %color1 Commands: %color3 $+ %b.sign $+ %color4 $+ Reg %color3 $+ %b.sign $+ %color4 $+ Del %color3 $+ %b.sign $+ %color4 $+ Regs %color2
  257. timer 1 9 msg %b.chan %color1 The register started in more %color3 $+ (3 secs...) $+ %color4 $+ , ready for -m %color2
  258. timer 1 12 mode %b.chan -m
  259. }
  260. }
  261. }
  262. alias notbingo {
  263. if (%bingo.status == ON) && (!%flood) {
  264. mode %b.chan -m
  265. /OFF
  266. msg %b.chan %color1 The lottery has been finished by ( $+  $+ $nick $+  $+ ) %color2
  267. msg $nick %color1 The lottery succesfully finished by ( $+  $+ $nick $+  $+ ) %color2
  268. }
  269. }
  270. alias OFF {
  271. unset %bingo.status | set %bingo.status OFF | unset %b.winner | set %bingo.run 0 | set %b.tagg 0 | set %bingo.rand OFF
  272. if ($numbok(%b.tag,32) == 0) { set %b.tagg 0 }
  273. if ($numtok(%b.tag,32) isnum 1-100 $+ ) { set %b.tagg 1 }
  274. }
  275. dialog LottetySettings {
  276. title "Lotterybot settings"
  277. size -1 -1 117 155
  278. option dbu
  279. text "Set channel:", 1, 6 8 36 10
  280. edit "", 2, 45 8 69 11
  281. edit "", 3, 45 23 69 11
  282. text "Set sign (!):", 4, 6 23 36 10
  283. text "Admin bigno:", 5, 6 38 36 10
  284. edit "", 6, 45 39 69 11
  285. text "Prize bigno:", 7, 5 53 36 10
  286. edit "", 8, 45 53 69 11
  287. text "Users bigno:", 9, 5 68 36 10
  288. edit "", 10, 45 68 69 11
  289. text "Blocktag:", 11, 5 82 36 10
  290. edit "", 12, 45 82 69 11
  291. button "Start lottery", 13, 21 112 79 12
  292. button "Stop lottery", 14, 20 126 79 12
  293. text "No randonmally (mahur):", 15, 5 96 70 10
  294. button "Yes", 16, 78 95 16 12
  295. button "No", 17, 97 95 16 12
  296. button "New winner", 18, 20 140 79 12
  297. }
  298. on *:dialog:LottetySettings:*:*: {
  299. if ($devent == sclick) {
  300. if ($did == 13) { set %b.chan $did(2) | set %b.sign $did(3) | set %b.admin $did(6) | set %b.prize $did(8) | set %b.users $did(10) | set %b.tag $did(12) | set %B.tagg $input(Set b.tagg,e,write 1 == ON/2 == OFF) | echo -a %color1 Lottery settings finished. %color2 | timer 1 3 /startbingo }
  301. if ($did == 14) { notbingo }
  302. if ($did == 16) { set %bingo.rand ON | set %b.winner $input(Winner,e,Winner?) | echo -a %color1 Lottery Mahur %color2 }
  303. if ($did == 17) { set %bingo.rand OFF | echo -a %color1 Lottery lo mahur %color2 }
  304. if ($did == 18) { newwiner | echo -a %color1 Newwiner run %color2 }
  305. }
  306. }
  307. alias LS { dialog -m LottetySettings LottetySettings }
  308. dialog style {
  309. title "Styles"
  310. size -1 -1 117 131
  311. option dbu
  312. text "Color 1 (Main): ", 1, 3 15 41 10
  313. text "Color 2 (Alt): ", 2, 3 28 41 10
  314. edit "", 3, 48 15 65 11
  315. text "Color 3 (Regullary): ", 5, 4 44 48 10
  316. edit "", 6, 57 44 56 11
  317. text "Color 4 (Regullary): ", 7, 4 59 48 10
  318. edit "", 8, 57 58 57 11
  319. text " Bot styles: ", 9, 31 90 44 10
  320. text " You styles: ", 10, 27 2 44 10
  321. button "Green and black", 11, 31 103 44 12
  322. button "Blue and black", 12, 31 116 44 12
  323. button "Save Colors", 13, 34 72 37 12
  324. edit "", 4, 49 28 64 11
  325. }
  326. alias sy { dialog -m style style }
  327. on *:dialog:style:*:*: {
  328. if ($devent == sclick) {
  329. if ($did == 13) { set %color1 $did(3) | set %color2 $did(4) | set %color3 $did(6) | set %color4 $did(8) | echo -a color1: %color1 color2 %color2 color3 %color3 $+ Xronic 1color4 %color4 $+ Xronic }
  330. if ($did == 11) { Set %color1 0,1[9«0 | set %color2 9,1»0] | set %color3 9 | set %color4 0 | echo -a %color1 Done! %color2 }
  331. if ($did == 12) { set %color1 0,1[11«0 | set %color2 11»0] | set %color3 11 | set %color4 0 | echo -a %color1 Done! %color2 }
  332. }
  333. }
  334. Menu * {
  335. Xronic lotterybot version 1.3
  336. .Lottery Settings { /LS }
  337. .Admins system
  338. ..Set Botpass: var %p = $?=\"Type botpass" | $iif(%p,set %Botpass %p,echo -a Error: Type botpass)
  339. ..Clear Admins: .remove Admins.ini
  340. ..Open admins file: $iif($exists(Admins.ini),run Admins.ini,echo -a There are no admins.)
  341. .Styles { /sy }
  342. .אודות
  343. ..עברית {
  344. window -e @אודות
  345. echo @אודות %color1 LotteryBot By Xronic Version 1.3 %color2
  346. echo @אודות %color1 בניתי את הלוטרי בוט בשבילכם למטרה להריץ הגרלות %color2
  347. echo @אודות %color1 :בבוט ניתן לך לעשות כך %color2
  348. echo @אודות %color1 להריץ הגרלה מכורה אשר אתה מגדיר את המנצח מראש, ולהריץ אותו רגיל %color2
  349. echo @אודות %color1 /msg $me !newwiner :ניתן לך גם לעשות מנצח מחדש לאחר שיש כבר מנצח ע"י הפקודה הבאה %color2
  350. echo @אודות %color1 ini לבוט יש מרכת אוונרים אשר עובדת על משתמש קיו והאוונרים מאוחסנים בתוך קובץ %color2
  351. echo @אודות %color1 /LB :לקוד יש דיאלוג חביב בשביל להפעיל יש לעשות את הפקודה הבאה %color2
  352. echo @אודות %color1 Host הבוט שופר ע"י כך שאין אפשרות להצטרף להגרלה מאותו %color2
  353. echo @אודות %color1 Xronic Version 1.3 נתראה בגרסא החדשה %color2
  354. }
  355. ..English {
  356. window -e @אודות
  357. echo @אודות %color1 LotteryBot By Xronic Version 1.3 %color2
  358. echo @אודות %color1 I bulit the bot for you. for one goal run lottery. %color2
  359. echo @אודות %color1 In bot you can to: %color2
  360. echo @אודות %color1 You can do run randomally lottery. and no randomally lottery. %color2
  361. echo @אודות %color1 You can choose a newwiner commands: /msg $me !newwiner (Owners only) %color2
  362. echo @אודות %color1 In bot have owners system. the owners was in owners.ini to do: /run owners.ini %color2
  363. echo @אודות %color1 in bot have nice. to see do: /LB %color2
  364. echo @אודות %color1 Cant to do !Reg if nick-host was in regs. %color2
  365. echo @אודות %color1 Have Fun! %color2
  366. }
  367. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement