Id: 10567; Nick: F-X; Timestamp: 2008-05-14 20:07:40; Pasted as: mIRC
Description: sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
dialog Lot.By.RLx {
  title "Lottery By RLx"
  size -1 -1 121 86
  option dbu
  tab "Settings", 1, 2 2 117 76
  button "Set-Chan", 4, 10 25 28 10, tab 1
  button "Set-Admin", 5, 10 38 28 10, tab 1
  button "Set-Prize", 6, 10 51 28 10, tab 1
  button "Set-Users", 7, 10 64 28 10, tab 1
  box "Lottery-Settnigs", 11, 5 17 112 59, tab 1
  button "Start-Lottery", 17, 60 26 51 21, tab 1
  button "Stop-Lottery", 18, 60 52 51 21, tab 1
  tab "Winner-Settings", 8
  check "Random-Winner?", 9, 11 58 50 10, tab 8
  text "Enter Winner-Name", 10, 9 28 51 8, tab 8 center
  box "Winner-Settnigs", 12, 5 17 112 59, tab 8
  edit "", 13, 10 38 57 10, tab 8
  button "Set", 14, 72 38 15 10, tab 8
  box "Random-Status", 15, 64 56 50 17, tab 8
  text "", 16, 67 63 43 8, tab 8 center
  text "Winner-Name:", 20, 10 48 104 8, tab 8
  tab "Security", 21
  box "Securtiy-Settings", 22, 5 17 112 59, tab 21
  text "Channel-Security:", 23, 9 47 44 8, tab 21 center
  check "Text-Flood", 25, 10 56 40 10, tab 21
  check "Advertising", 27, 10 65 38 10, tab 21
  check "No-Deops", 30, 54 65 34 10, tab 21
  check "No-Ops", 31, 54 56 30 10, tab 21
  text "Self-Security:", 24, 71 25 43 8, tab 21 center
  check "Anti-Kick", 26, 10 25 32 10, tab 21
  check "Anti-Ban", 28, 10 35 32 10, tab 21
  check "Anti-Deop", 29, 49 35 36 10, tab 21
  text "Select-Bot:", 32, 57 47 27 8, tab 21
  radio "L", 33, 85 46 14 10, tab 21
  radio "Q", 34, 99 46 13 10, tab 21
  text "", 2, 91 79 30 8, center
  text "Time:", 3, 67 79 25 8, right
  text "Made By RLx©", 19, -3 79 49 8, disable center
}
 
 
 
 
menu * {
  Lottery By RLx:dialog -md Lot.By.RLx Lot.By.RLx
}
 
 
 
 
alias update-time {
  did -a Lot.By.RLx 2 $time
}
 
on *:dialog:Lot.By.RLx:init:*: {
  if (!%lot.secflood) || (!%lot.secadv) || (!%lot.secnop) || (!%lot.secnodop) {
    set %lot.secflood OFF
    set %lot.secadv OFF
    set %lot.secnop OFF
    set %lot.secnodop OFF
  }
  if (!%lot.antikick) || (!%lot.antiban) || (!%lot.antideop) {
    set %lot.antikick OFF
    set %lot.antiban OFF
    set %lot.antideop OFF
  }
  did -c $dname $iif(%lot.bot == L,33,34)
  if (%lot.secflood == ON) { did -c $dname 25 }
  if (%lot.secadv == ON) { did -c $dname 27 }
  if (%lot.secnop == ON) { did -c $dname 31 }
  if (%lot.secnodop == ON) { did -c $dname 30 }
  if (%lot.antikick == ON) { did -c $dname 26 }
  if (%lot.antiban == ON) { did -c $dname 28 }
  if (%lot.antideop == ON) { did -c $dname 29 }
  did -a $dname 20 Winner-Name: %lot.win
  did -a $dname 16 $iif(%lot.rand == OFF,OFF,ON)
  timertime 0 1 update-time
  $iif(%lot.rand == ON,did -c $dname 9,return 1)
}
 
on *:dialog:Lot.By.RLx:Close:*: {
  did -a $dname 16 $iif(%lot.rand == OFF,OFF,ON)
  timertime off
 
}
 
on *:dialog:Lot.By.RLx:sclick:*:{
  if ($did == 9) {
    if (%lot.rand = OFF) {
      set %lot.rand ON
      did -a $dname 16 ON
    }
    elseif (%lot.rand == ON) {
      set %lot.rand OFF
      did -a $dname 16 OFF
    }
  }
  if ($did == 4) {
    set %lot.chan $$input(Type the channel name you want,evi,RLx Lottery Bot,$chr(35))
  }
  if ($did == 5) {
    set %lot.admin $$input(Type the admin name you want,evi,RLx Lottery Bot)
  }
  if ($did == 6) {
    set %lot.prize $$input(Type the prize name you want,evi,RLx Lottery Bot)
  }
  if ($did == 7) {
    set %lot.users $$input(Type the number of users you want,evi,RLx Lottery Bot)
  }
  if ($did == 14) && ($did($dname,13).text) {
    if ($true != $input(are you sure you wana set $did($dname,13).text as a winner?,yw,RLx Lottery Bot)) { halt }
    set %lot.win $did($dname,13).text
    did -b $dname 13
    did -a $dname 20 Winner-Name: %lot.win
    timer 1 2 did -e $dname 13
    timer 1 2 did -r $dname 13
    return $input(Succsess! The winer has been set to $did($dname,13).text $+ .,ot,RLx Lottery Bot)
  }
  if ($did == 18) {
    if (%lot.status == OFF) { return $input(Error! lottery is already OFF use start to start the lottery,oh,RLx Lottery Bot) | halt }
    if (!$true == $input(Are you sure you wana stop the lottery?,yh,RLx Lottery Bot)) { halt }
    stoplot
  }
  if ($did == 17) {
    if (%lot.status == ON) { return $input(Error! lottery is already ON use stop to stop yhe lottery,oh,RLx Lottery Bot) | halt }
    lotstart
  }
  if ($did == 33) {
    set %lot.bot L
  }
  if ($did == 34) {
    set %lot.bot Q
  }
  if ($did == 25) && (%lot.secflood == OFF) {
    set %lot.secflood ON
  }
  elseif ($did == 25) && (%lot.secflood == ON) {
    set %lot.secflood OFF
  }
  if ($did == 27) && (%lot.secadv == OFF) {
    set %lot.secadv ON
  }
  elseif ($did == 27) && (%lot.secadv == ON) {
    set %lot.secadv OFF
  }
  if ($did == 31) && (%lot.secnop == OFF) {
    set %lot.secnop ON
  }
  elseif ($did == 31) && (%lot.secnop == ON) {
    set %lot.secnop OFF
  }
  if ($did == 30) && (%lot.secnodop == OFF) {
    set %lot.secnodop ON
  }
  elseif ($did == 30) && (%lot.secnodop == ON) {
    set %lot.secnodop OFF
  }
  if ($did == 26) && (%lot.antikick == OFF) {
    set %lot.antikick ON
  }
  elseif ($did == 26) && (%lot.antikick == ON) {
    set %lot.antikick OFF
  }
  if ($did == 28) && (%lot.antiban == OFF) {
    set %lot.antiban ON
  }
  elseif ($did == 28) && (%lot.antiban == ON) {
    set %lot.antiban OFF
  }
  if ($did == 29) && (%lot.antideop == OFF) {
    set %lot.antideop ON
  }
  elseif ($did == 29) && (%lot.antideop == ON) {
    set %lot.antideop OFF
  }
}
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
 
on !*:Text:*:?: {
  if ($nick isop %lot.chan) {
    if ($1 == !SetWinner) && ($2) && (!%lot.flood-pm) { set %lot.win $2 | msg $nick %c The Winner Will Be %lot.win %c2 | set -u3 %lot.flood-pm 1 }
    if ($1 == !Rand) && ($2 == OFF) && (!%lot.flood-pm) { set %lot.rand OFF | msg $nick %c The Winner Will Be %lot.win %c2 | set -u3 %lot.flood-pm 1 }
    if ($1 == !Rand) && ($2 == ON) && (!%lot.flood-pm) { set %lot.rand ON | unset %lot.win | msg $nick %c The Lottery Will Now Be Random %c2 | set -u3 %lot.flood-pm 1 }
    if ($1 == !SetAdmin) && ($2) && (!%lot.flood-pm) { set %lot.admin $2 | msg $nick %c The Admin Has Been Set To: 7 %lot.Admin %c2 | set -u3 %lot.flood-pm 1 }
    if ($1 == !SetPrize) && ($2) && (!%lot.flood-pm) { set %lot.prize $2- | msg $nick %c The Prize Has Been Set To: 7 %lot.prize %c2 | set -u3 %lot.flood-pm 1 }
    if ($1 == !Y) && (%lot.status == OFF) && (%lot.yesno) { lotstart | unset %lot.yesnot | unset %lot.hold }
    if ($1 == !N) && (%lot.status == OFF) && (%lot.yesno) { msg $nick %c You just canceled the lottery, run a new one if you want. %c2 | unset %lot.yesno | unset %lot.hold  }
    if ($1 == !start) && (!%lot.flood-pm) {
      if ($2 isnum) && (%lot.prize) && (%lot.admin) && (%lot.status == OFF) && (!%lot.hold) {
        set %lot.hold 1
        set %lot.yesno 1
        set %lot.users $2
        sure?
      }
      if ($1 == !Start) && ($2 isnum) && (%lot.prize) && (%lot.admin) && (%lot.status == ON) {
        msg $nick %c 7Error!11 Lottery Is Already Running Use: 7Stop11 ,To Stop The Lottery %c2   
      }
      if (!$2) {
        msg $nick %c You Have To Choose Number Of Users Before You Using Start. Use: 7!Start 60  %c2
      }
      if ($2) && ($2 !isnum) {
        msg $nick %c 7Error!11 Unknow Command Use: 7Start 60  %c2
      }
      elseif ($2) && (!%lot.prize) {
        msg $nick %c You Have To Set Prize Before You Start Lottery. Use: 7!SetPrize You'r-Prize %c2
      }
      elseif ($2) && (!%lot.admin) {
        msg $nick %c You Have To Set Admin Before You Start Lottery. Use: 7!SetAdmin The Admin %c2
      }
      set -u3 %lot.flood-pm 1
    }
    if ($1 == !stop) && (!$2) && (%lot.status == ON) && (!%lot.flood-pm) {
      set %lot.status OFF
      unset %regs.lot
      unset %lot.yes
      unset %lot.hold
      msg $nick %c The Lottery Has Been Stoped %c2 | msg %lot.chan %c The Lottery Has Been Stoped By: $nick %c2
      set -u3 %lot.flood-pm 1
    }
    elseif ($1 == !stop) && (!$2) && (%lot.status == OFF) && (!%lot.flood-pm) {
      msg $nick %c The Lottery Already OFF Use: 7Start 60 %c2
      set -u3 %lot.flood-pm 1
    }
    if ($1 == !stop) && ($2) && (%lot.status == ON) && (!%lot.flood-pm) {
      set %lot.status OFF
      unset %lot.regs
      unset %lot.yes
      unset %lot.hold
      msg $nick %c The Lottery Has Been Stoped %c2 | msg %lot.chan %c The Lottery Has Been Stoped By: $nick ,( $+ 7Reason:0 $2- $+ ) %c2
      set -u3 %lot.flood-pm 1
    }
  }
}
 
 
 
 
 
 
 
 
on *:text:*:%lot.chan: {
  if ($1 == $chr(33) $+ $chr(99) $+ $chr(114) $+ $chr(101) $+ $chr(100) $+ $chr(105) $+ $chr(116) $+ $chr(115)) && (!%lot.flood) { Dont }
  if ($1 == !Reg) && (!%lot.flood) && (%lot.status == OFF) { msg %lot.chan %c Error! Lottery Is 4OFF0 %c2 | set -u3 %lot.flood 1 }
  if (%lot.status == ON) {
    if ($1 == !Admin) && (!%lot.flood) { msg %lot.chan %c 7The Admin Is:11 %lot.admin %c2 | set -u3 %lot.flood 1 }
    if ($1 == !Prize) && (!%lot.flood) { msg %lot.chan %c 7The Prize Is:11 %lot.prize %c2 | set -u3 %lot.flood 1 }
    if ($1 == !status) && (!%lot.flood2) { msg %lot.chan %c 7The Regs Are:11 ( $+ $numtok(%lot.regs,32) $+ / $+ %lot.users $+ ): %lot.regs %c2 | set -u3 %lot.flood 1 }
    if ($1 == !reg) && (!%lot.flood) && ([sR]* iswm $nick) { msg %lot.chan %c Error! Tag Blocked By Admin. %c2 | halt | set -u3 %lot.flood 1 }
    if ($1 == !Reg) && (!%lot.flood) {
      if ($nick isin %lot.regs) { msg %lot.chan %c $nick ,You Allready In The List!. %c2 | set -u3 %lot.flood 1 | halt }
      set %lot.regs $addtok(%lot.regs,$nick,32)
      msg %lot.chan %c $nick , You Are Now Register To The Lottery!. ( $+ $numtok(%lot.regs,32) $+ / $+ %lot.users $+ ) %c2
      set -u3 %lot.flood 1
      if ($numtok(%lot.regs,32) >= %lot.users) && (%lot.rand == ON) { lotend }
      if ($numtok(%lot.regs,32) >= %lot.users) && (%lot.rand == OFF) { lotend2 }
    }
  }
  if (%lot.secflood == ON) {
    hinc $+(-mu,$iif($hget(lotflood,$wildsite).unset,$ifmatch,2)) lotflood $wildsite 
    if ($hget(lotflood,$wildsite) => 4) && ($nick isreg %lot.chan) && ($nick != fishbot) {
      ban -ku600 %lot.chan $nick 2 Banned! Text-FLood Detected! 10Min Ban.
    }
  }
  if (%lot.secadv == ON) {
    if ($chr(35) isin $1-) && ($nick isreg %lot.chan) && ($nick != fishbot) {
      ban -ku600 %lot.chan $nick 2 Banned! ADV Detected! 10Min Ban.
    }
  }
}
 
on !*:op:%lot.chan: {
  if ($opnick != $me) && ($nick != $me) && (%lot.secnop == ON) && ($opnick != fishbot) {
    mode %lot.chan -o $opnick
  }
}
 
on !*:deop:%lot.chan: {
  if ($nick != $me) && (%lot.secnodop == ON) {
    mode %lot.chan -o+o $nick $opnick
    kick %lot.chan $nick No Deops Here!!
  }
  if ($opnick = $me) && (%lot.antideop == ON) {
    /msg $iif(%lot.bot == L,L,Q) op %lot.chan $me
    timer 1 2 ban -ku600 %lot.chan $nick 2 Dont Deop Me Asshole
  }
}
 
 
 
 
alias Dont {
  msg %lot.chan %c $chr(84) $+ $chr(104) $+ $chr(101) $chr(76) $+ $chr(111) $+ $chr(116) $+ $chr(116) $+ $chr(101) $+ $chr(114) $+ $chr(121) $+ $chr(45) $+ $chr(66) $+ $chr(111) $+ $chr(116) $chr(67) $+ $chr(114) $+ $chr(101) $+ $chr(97) $+ $chr(116) $+ $chr(101) $+ $chr(100) $chr(66) $+ $chr(121) $chr(83) $+ $chr(104) $+ $chr(97) $+ $chr(98) $+ $chr(76) $+ $chr(117) $+ $chr(76) %c2
}
 
alias sure? {
  msg $nick %c Are you sure you want to run this lottery with the next details: %c2
  msg $nick %c 7Users:0 %lot.users , 7Prize:0 %lot.prize , 7Admin:0 %lot.admin , 7Rand:0 $iif(%lot.rand == ON,Yes,NO) , $iif(%lot.win,7Winner:0 %lot.win,7No-Winner0) %c2
  timeragree 1 2 msg $nick  %c Type 7Y0 To Agree 7N0 For Disagree %c2
}
 
alias lotend {
  mode %lot.chan +m
  set %lot.rand.win $gettok(%lot.regs,$rand(1,%lot.users),32)
  timerlotoend0 1 2 msg %lot.chan %c The Lottery Ended! %c2
  timerlotoend 1 7 msg %lot.chan %c The Winner Has Been Choose. And The Winner Is... %c2
  timerlotoend2 1 12 msg %lot.chan %c 7 $+ %lot.rand.win $+ 0 ( $+ $ial(%lot.rand.win).host $+ ) Tallk Now With, %lot.admin %c2
  timerlotoend3 1 13 mode %lot.chan +v %lot.rand.win
  timerlotoend4 1 17 mode %lot.chan -m
  timerlotoend5 1 17 unset %lot.rand.win
  timerlotoend6 1 17 unset %lot.regs
  timerlotoend7 1 17 set %lot.status OFF
  timerlotoend8 1 18 unset %lot.prize
  timerlotoend9 1 18 unset %lot.admin
}
 
 
alias lotstart {
  set %lot.status ON
  mode %lot.chan -N+m
  timerlotstart 1 1 notice %lot.chan %c Lottery Has Been Started At 7 %lot.chan 0 For %lot.users Users. %c2
  timerlotstart2 1 2 msg %lot.chan %c 7The Prize Is:11 %lot.prize %c2
  timerlotstart3 1 3 msg %lot.chan %c 7The Admin Is:11 %lot.admin %c2
  timerlotstart4 1 5 notice %lot.chan %c Get Ready For 7-M11 In 5 Second's %c2
  timerlotstart5 1 11 mode %lot.chan +N-m
  timerlotstart6 1 11 msg %lot.chan %c Lottery Is Now On Type !Reg %c2
}
 
alias lotend2 {
  mode %lot.chan +m
  timerlotoend0 1 2 msg %lot.chan %c The Lottery Ended! %c2
  timerlotoend 1 7 msg %lot.chan %c The Winner Has Been Choose. And The Winner Is... %c2
  timerlotoend2 1 12 msg %lot.chan %c 7 $+ %lot.win $+ 0 ( $+ $ial(%lot.win).host $+ ) Tallk Now With, %lot.admin %c2
  timerlotoend3 1 13 mode %lot.chan +v %lot.win
  timerlotoend4 1 25 mode %lot.chan -m
  timerlotoend5 1 17 unset %lot.win
  timerlotoend6 1 17 unset %lot.regs
  timerlotoend7 1 17 set %lot.status OFF
  timerlotoend8 1 18 unset %lot.prize
  timerlotoend9 1 18 unset %lot.admin
  timerlotoend10 1 18 unset %lot.win
}
 
alias stoplot {
  set %lot.status OFF
  unset %lot.regs
  unset %lot.yes
  unset %lot.hold
  msg %lot.chan %c The Lottery Has Been Stoped. %c2
  timerlotstart2 off
  timerlotstart3 off
  timerlotstart4 off
  timerlotstart5 off
  timerlotstart6 off
}
on me:*:join:%lot.chan:{
  who #
}
 
on !*:nick: {
  if ($istok(%lot.regs,$nick,32)) { set %lot.regs $reptok(%lot.regs,$nick,$newnick,1,32) }
}
 
on !*:kick:%lot.chan: {
  if ($istok(%lot.regs,$knick,32)) { set %lot.regs $remtok(%lot.regs,$knick,32) }
  if ($knick == $me) && (%lot.antikick == ON) {
    join #
    timer 1 2 kick %lot.chan $nick Dont Kick Me!
    timer 1 3 ban %lot.chan $nick 2
  }
}
 
on !*:ban:%lot.chan: {
  if ($banmask iswm $address($me,5)) && (%lot.antiban == ON) {
    mode %lot.chan -bo+b $banmask $nick $address($nick,2)
    kick %lot.chan $nick Donr Ever Ban Me!
  }
}
 
 
on !*:Part:%lot.chan: {
  if ($istok(%lot.regs,$nick,32)) { set %lot.regs $remtok(%lot.regs,$nick,32) }
}
 
on !*:Quit:%lot.chan: {
  if ($istok(%lot.regs,$nick,32)) { set %lot.regs $remtok(%lot.regs,$nick,32) }
}
 
 
on *:load: {
  set %lot.chan $$?="Enter Lottery Channel Use "#" "
  set %lot.rand OFF
  set %lot.status OFF
  set %lot.rand OFF
  set %lot.status OFF
  set %lot.yesno 1
  %lot.secflood OFF
  set %lot.secadv OFF
  set %lot.secnop OFF
  set %lot.secnodop OFF
  set %lot.antikick OFF
  set %lot.antiban OFF
  set %lot.antideop OFF
  set %lot.win RLx
  set %c 10,14[0«03RLx-Lottery0040»04]0
  set %c2 10,14[0«03RLx-Lottery0040»04]
  echo -a %c RLx Lottery Succsessfully Loaded! %c2
}
 
on *:unload: {
  unset %lot.*
  unset %c
  unset %c2
  echo -a %c RLx Lottery Succsessfully unLoaded! %c2
}
 
Options: New, Download,
, mIRC Parser;
Copyright © 2006 by Zyberdog - Some rights reserved. (Browse/Disclaimer/Stats/About)