rendered paste bodyon *:load:{
set %loto.chan $$?="Enter Channel Name"
set %loto.status OFF
set %loto.run 0
set %color1 7,1 (0 #Lottery-il7 ) 0
set %color2 7(0 #Lottery-il 7)
echo -at %color1 Loaded SooN Lottery Successfuly. %color2
set %loto.rand ON
.timer 1 1 join %loto.chan
}
menu * {
Lottery Options
.Set Channel:set %Loto.chan $?="Enter The Lottery Channel Use ( $+ # $+ )"
.Masters and Owners
..Masters
...Add Master:auser 100 $$?="Enter Nickname:"
...Remove Master:ruser 100 $$?="Enter Nickname:"
..Owners
...Add Owner:auser 101 $$?="Enter Nickname:"
...Remove Owner:ruser 101 $$?="Enter Nickname:"
.Set Users:set %Loto.Users $?="Enter The Number Of Users You Want."
.Set Winner?
..Yes:set %Loto.winner $?="Enter The Lottery Winner." | set %Loto.rand OFF | echo -at %color1 Done. The Winner Will Be ( $+ %Loto.winner $+ ) %color2
..No:Set %Loto.rand ON | echo -at %color1 Done. The Winner Will Be Random %color2
.Lottery Status
..ON:set %Loto.status ON | echo -at %color1 Lottery Bot Is Now: $+ 3ON %color2
..OFF:set %Loto.status OFF | set %loto.run 0 | echo -at %color1 Lottery Bot Is Now: $+ 4OFF %color2
.Set Loto Sign:set %lsign $?="Set Sign To The Lottery Bot Exm:(!,@,+,-,^)"
.Set Admin Lottery:set %loto.admin $?="Set Admin" | echo -at %color1 Done. The Admin Has Been Added ( $+ %loto.admin $+ ) %color2
.Set Loto Prize:set %loto.prize $?="Set Prize" | echo -at %color1 Done. The Prize Has Been Added %color2
.Set Color
..Set Tag:set %Tag $?="Set Tag To Lottery"
}
on *:Text:*:%Loto.chan: {
if ($1 == %lsign $+ Regs) && (%loto.status == ON) && (!%flood) {
msg %loto.chan %color1 $+ Regs0,1 ( $+ $numtok(%Regs,32) $+ / $+ %Loto.Users $+ ) %color2
msg %Loto.chan %color1 $+ Regs are:7 %regs %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Reg) && (%loto.status == OFF) && (!%flood) {
msg %loto.chan %color1 Lottery Status: OFF %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Commands) && (%loto.status == ON) && (!%flood) {
msg %loto.chan %color1 $+ 7Commands Are: 7!0,1Status 7!0,1Prize 7!0,1Reg 7!0,1Regs 7!0,1Admin 7!0,1Credits %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Commands) && ($nick isop %loto.chan) {
msg $nick %color1 $+ Admin Commands Are: %lsign $+ Start , %lsign $+ Set-Users , %lsign $+ Set-Win , %lsign $+ loto ON/OFF , %lsign $+ Set-Admin , %lsign $+ Set-Prize , %lsign $+ Set-Chan <#Chan> , %lsign $+ Rand ON/OFF , %lsign $+ Stop. %color2
}
if ($1 == %lsign $+ Prize) && (%loto.status == ON) && (!%flood) {
msg %loto.chan %color1 $+ Prize:7 %loto.prize %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Admin) && (%loto.status == ON) && (!%flood) {
msg %loto.chan %color1 $+ Admin Are:7 %loto.admin %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ status) && (%loto.status == ON) && (!%flood) {
msg %loto.chan %color1 $+ Lottery Number <7 %loto.run 0> Started at7 %time 0| Admin:7 %loto.admin 0| Regs: ( $+ $numtok(%Regs,32) $+ / $+ %Loto.Users $+ ) %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ status) && (%loto.status == OFF) && (!%flood) {
msg %loto.chan %color1 Lottery Status: OFF, Last Lottery: %time %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ last) && (%loto.status == OFF) && (!%flood) {
msg %loto.chan %color1 Last Lottery Was At: %Time %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Reg) && (%loto.status == ON) && (!%flood) {
if ($nick isin %regs) {
msg %loto.chan %color1 $+ $nick - You Are Already Registered! %color2
set -u3 %flood 1
halt
}
set %regs %regs $nick
msg %Loto.chan %color1 $+ $nick - You Are Now Registered! %color2
set -u3 %flood 1
}
if ($numtok(%Regs,32) == %Loto.Users) { endloto }
if ($1 == %lsign $+ Credits) {
msg %loto.chan %color1 $+ This Bot Created By SooN %color2
set -u3 %flood 1
}
}
on 100,101:Text:*:?: {
if ($nick isop %loto.chan) {
if ($1 == !start) && (%loto.run == 0) && (!%flood) {
mode %loto.chan +m-N
.timer 1 1 msg %loto.chan %color1 $+ Lottery Has Been Started At %loto.chan For %loto.users Users %color2
set %loto.run 1
.timer 1 2 msg %loto.chan %color1 $+ Prize Is: %loto.prize %color2
.timer 1 2 msg %loto.chan %color1 $+ Admin Is: %loto.admin %color2
.timer 1 4 notice %loto.chan Have Fun do !Reg
.timer 1 8 mode %loto.chan -m+N
set %loto.status ON | set %time $time
set -u3 %flood 1
}
if ($1 == !start) && (%loto.run == 1) && (!%flood) {
msg $nick %color1 Lottery Is Already On. Use %lsign $+ Stop To Stop The Lottery %color2
}
if ($1 == %lsign $+ !Set-Users) && (!%flood) {
if (!$2) { msg $nick %color1 Error: Type Number Of Users Ex: %lsign $+ Set-users 20 %color2 | halt }
set %loto.users $2-
msg $nick %color1 Done. Users Set To $2 $+ . %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Set-Winner) && (!%flood) {
if (!$2) { msg $nick %color1 Error: Type The Name Of The WInner Ex: %lsign $+ Set-win RLx %color2 | halt }
set %loto.winner $2
msg $nick %color1 Done. Winner Set To $2 $+ . %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Set-Prize) && (!%flood) {
if (!$2-) { msg $nick %color1 Error: Type The Name Of The Prize Ex: %lsign $+ Set-Prize Vent %color2 | halt }
set %loto.prize $2-
msg $nick %color1 Done. Prize Set To $2- $+ . %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Set-Chan) && (!%flood) {
if (!$2) { msg $nick %color1 Error: Type The Name Of The Channel Ex: %lsign $+ Set-chan #RLx %color2 | halt }
set %loto.chan $2
msg $nick %color1 Done. Channel Set To $2 $+ . %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Set-Admin) && (!%flood) {
if (!$2) { msg $nick %color1 Error: Type The Name Of The Admin Ex: %lsign $+ Set-Admin RLx %color2 | halt }
set %loto.admin $2
msg $nick %color1 Done. Admin Set To $2 $+ . %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Loto) && (!%flood) {
if (!$2) { msg $nick %color1 Error: Type OFF Or ON Ex: %lsign $+ loto ON %color2 | halt }
set %loto.status $2
msg $nick %color1 Done. Lottery Status Set To $2 $+ . %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ Rand) && (!%flood) {
if (!$2) { msg $nick %color1 Error: Type ON Or OFF Ex: %lsign $+ rand ON Will Do Random Winner %color2 | halt }
set %loto.rand $2
msg $nick %color1 Done. Lottery Random Set To $2 $+ . %color2
set -u3 %flood 1
}
if ($1 == %lsign $+ stop) && (%loto.run == 1) && (!%flood) {
msg $nick %color1 Done. Lottery Has Been Stoped By $nick $+ . %color2
set %loto.status OFF
set %loto.run 0
msg %loto.chan %color1 $+ Lottery Has Been Stopped! %color2
unset %regs
timer 1 1 set %regs
}
if ($1 == %lsign $+ stop) && (%loto.run == 0) && (!%flood) {
msg $nick %color1 Lottery Is Not Running Right Now Use %lsign $+ Start To Start The Lottery %color2
}
}
}
alias endloto {
mode %loto.chan +m
msg %loto.chan %color1 $+ The Lottery Has Finished... %color2
msg %loto.chan %color1 $+ The Lottery Has Been Choose The Winner %color2
if (%loto.rand == ON) {
.timera 1 10 msg %loto.chan %color1 $+ And The Winner Is: $gettok(%regs,$rand(1,%Loto.Users),32) PM %loto.admin To Get The Prize. %color2
set %loto.run 0
}
elseif (%loto.rand == OFF) {
.timerb 1 10 msg %loto.chan %color1 $+ And The Winner Is: %loto.winner $+ , PM %loto.admin To Get The Prize. %color2
set %loto.run 0
}
set %loto.status OFF
timer 1 15 mode %loto.chan -m
timer 1 15 unset %regs
timer 1 16 set %regs
}
on *:NICK:{
if ($nick isin %regs) { set %regs $replace(%regs,$nick,$newnick) }
}
on *:kick:%loto.chan:{
if ($knick isin %regs) { set %regs $remove(%regs,$knick) }
}
on *:Quit:%loto.chan:{
if ($nick isin %regs) { set %regs $remove(%regs,$nick) }
}
on *:Part:%loto.chan:{
if ($istok(%regs,$nick,32)) { set %regs $remove(%regs,$nick) }
}
on *:ban:%loto.chan:{
if ($bnick isin %regs) { set %regs $remove(%regs,$bnick) }
}
on *:join:%loto.chan:{
set -u2 %jnick %jnick $nick
if ($numtok(%jnick,32) => 4) {
mode # +mr
timer 1 80 mode # -mr
}
}