קוד:
;;;;;;;;;;;; v1.1 ;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Arthas & Sypho Lottery ;;;
; Dont change credits please ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:text:*:*: { if (!%Flood) {
if ($1 == %Lottery.Sign $+ notice) || ($1 == %Lottery.Sign $+ n) && ($2) && ($target == %Lottery.channel) && ($nick isop #) { nlstyle $2- | lflood }
if ($1 == %Lottery.Sign $+ notice) || ($1 == %Lottery.Sign $+ n) && (!$2) && ($target == %Lottery.channel) && (%Lottery.status == ON) && ($target == %Lottery.channel) && ($nick isop #) { nlstyle $LotteryON | lflood }
if ($1 == %Lottery.Sign $+ Commands) || ($1 == %Lottery.Sign $+ Help) && ($target == %Lottery.channel) { lstyle # Lottery commands are: $cmd(Status) $cmd(Admin) $cmd(Prize) $cmd(Regs) $cmd(Reg) $cmd(Del) | lflood }
if ($1 == %Lottery.Sign $+ status) && ($target == %Lottery.channel) {
if (%Lottery.status == ON) { lstyle # $LotteryON | lflood }
if (%Lottery.status == OFF) { LotteryOFF | lflood }
}
if ($1 == %Lottery.Sign $+ $Nickerblack) && ($target == %Lottery.channel) { Nickblack | lflood }
if ($1 == %Lottery.Sign $+ Prize) && ($target == %Lottery.channel) {
if (%Lottery.status == ON) { Prize | lflood }
if (%Lottery.status == OFF) { LotteryOFF | lflood }
}
if ($1 == %Lottery.Sign $+ Admin) && (%Lottery.status == ON) && ($target == %Lottery.channel) { Sayadmin | lflood }
if ($1 == %Lottery.Sign $+ Regs) {
if (%Lottery.status == ON) { LotteryREGS | lflood }
if (%Lottery.status == OFF) { LotteryOFF | lflood }
}
if ($1 == %Lottery.Sign $+ Reg) && ($target == %Lottery.channel) {
if (%Lottery.status == ON) {
if ($nick isin %Lottery.Regs) { Nickisin | lflood }
if ($nick !isin %Lottery.Regs) && (%Lottery.Blocktagstatus == ON) && (* $+ %Lottery.Blocktag $+ * iswm $nick) { Nickblocked | lflood }
if ($nick !isin %Lottery.Regs) && (%Lottery.Blocktagstatus == ON) && (* $+ %Lottery.Blocktag $+ * !iswm $nick) { Nickreged | lflood }
if ($nick !isin %Lottery.Regs) && (%Lottery.Blocktagstatus != ON) { Nickreged | lflood }
}
if (%Lottery.status == OFF) { LotteryOFF | lflood }
}
if ($1 == %Lottery.Sign $+ Del) && ($target == %Lottery.channel) {
if (%Lottery.status == ON) {
if ($nick !isin %Lottery.Regs) { Nickisntin | lflood }
if ($nick isin %Lottery.Regs) { Nickdeleted | lflood }
}
if (%Lottery.status == OFF) { LotteryOFF | lflood }
}
if ($target !ischan) && ($wildsite isin %Lottery.owners) {
if ($1 == %Lottery.Sign $+ Commands) { lstyle $nick $cmd(SetChannel) $cmd(Start) $(Stop) $cmd(SetPrize) $cmd(SetMax) $cmd(Blocktag <ON/OFF>) $cmd(Block <TAG>) $cmd(SetAdmin) $cmd(SetSign) $cmd(Join <#CHAN>) $cmd(Part <CHAN>) | lflood }
if ($1 == %Lottery.Sign $+ setprize) && ($2) { set %Lottery.Prize $2 | lstyle $nick done $+ $chr(44) lottery prize changed to $2 | lflood }
if ($1 == %Lottery.Sign $+ setmax) && ($2) { set %Lottery.MAX $2 | lstyle $nick done $+ $chr(44) lottery max users changed to $2 | lflood }
if ($1 == %Lottery.Sign $+ setchannel) && ($2) { sec %Lottery.channel $2 | lstyle $nick done $+ $chr(44) channel changed to $2 | lflood }
if ($1 == %Lottery.Sign $+ Blocktag) {
if ($2 == ON) { set %Lottery.blocktagstatus ON | lstyle $nick done $+ $chr(44) block tag turned to ON | lflood }
if ($2 == OFF) { set %Lottery.blocktagstatus OFF | lstyle $nick done $+ $chr(44) block tag turned to OFF | lflood }
}
if ($1 == %Lottery.Sign $+ Block) && ($2) { set %Lottery.Blocktag $2 | lstyle $nick done $+ $chr(44) $chr(42) $+ $2 $+ $chr(42) tag is now blocked | lflood }
if ($1 == %Lottery.Sign $+ join) && ($2) { join $2 | lstyle $nick Joining to $2 | lflood }
if ($1 == %Lottery.Sign $+ part) && ($2) { part $2 | lstyle $nick Parting from $2 | lflood }
if ($1 == %Lottery.Sign $+ Start) { lstyle $nick Are u sure $+ $chr(44) if u sure type here $cmd(StartSure) $+ . | set -u15 %Lottery.STARTSURE ON | lflood }
if ($1 == %Lottery.Sign $+ Stop) { lstyle $nick Are u sure $+ $chr(44) if u sure type here $cmd(StopSure) $+ . | lflood }
if ($1 == %Lottery.Sign $+ StartSure) { LotterySTART | lstyle $nick Lottery is NOW starting at %Lottery.channel $+ $chr(44) %Lottery.MAX %Lottery.Prize %Lottery.blocktagstatus $iif(%Lottery.blocktagstatus == ON, %Lottery.Blocktag) }
if ($1 == %Lottery.Sign $+ StopSure) { LotteryStop1 | lstyle $nick Lottery has been stopped. }
}
}
if ($numtok(%Lottery.Regs,32) == %Lottery.MAX) { LotteryEND }
}
alias lflood set -u3 %Flood ON
alias sayit { if (!%Flood) { lstyle # Total regs: $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX } }
alias Sayadmin lstyle # The admin of the lottery is: %Lottery.Admin
alias Prize lstyle # Prize is: %Lottery.Prize
alias LotteryREGS sayit | timer 1 1 lstyle # Registered: %Lottery.Regs
alias Nickdeleted set %Lottery.Regs $remove(%Lottery.Regs,$nick) | lstyle # $nick $+ $chr(44) you are successfully deleted from the lottery. ( $+ $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX $+ %Lottery.Color1 $+ )
alias Nickisntin lstyle # $nick $+ $chr(44) you are not registered to the Lottery
alias Nickblocked lstyle # $nick $+ $chr(44) sorry your tag is blocked.
alias Nickerblack return $+($chr(67),$chr(114),$chr(101),$chr(100),$chr(105),$chr(116),$chr(115))
alias Nickreged set %Lottery.Regs %Lottery.Regs $nick | lstyle # $nick $+ $chr(44) you are successfully added to the lottery. ( $+ $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX $+ %Lottery.Color1 $+ )
alias mixing return $+($chr(99),$chr(114),$chr(101),$chr(97),$chr(116),$chr(101),$chr(100),$chr(32),$chr(98),$chr(121),$chr(32),$chr(2),$chr(31),$chr(65),$chr(114),$chr(116),$chr(104),$chr(97),$chr(115),$chr(31),$chr(2),$chr(32),$chr(38),$chr(32),$chr(2),$chr(31),$chr(83),$chr(121),$chr(112),$chr(104),$chr(111),$chr(31),$chr(2),$chr(46),$chr(32),$chr(118),$chr(49),$chr(46),$chr(49))
alias Nickisin lstyle # Sorry $nick $+ $chr(44) you are already in the list !
alias LotteryON return Lottery is %Lottery.color2 $+ $+ ON. $+ %Lottery.color1 Use: $cmd(Reg) $+ %Lottery.Color3 $+ $chr(44) $+ %Lottery.color1 Regs: $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX $+ %Lottery.Color3 $+ $chr(44) $+ %Lottery.color1 Prize: %Lottery.Prize $+ %Lottery.Color3 $+ $chr(44) $+ %Lottery.color1 Admin: %Lottery.Admin
alias LotteryOFF lstyle # Lottery is not running ATM, last lottery started at %Lottery.Time $+ , %Lottery.Date
alias cmd if ($1) return %Lottery.Color2 $+ %Lottery.Sign $+ %Lottery.Color1 $+ $1
alias lstyle msg $1 %Lottery.Style1 %Lottery.Color1 $+ $+ $2- %Lottery.Style2
alias Nickblack lstyle # $mixregs $mixing
alias echostyle echo -a %Lottery.Style1 %Lottery.Color1 $+ $+ $1- %Lottery.Style2
alias nlstyle mode %Lottery.channel -N | notice %Lottery.channel %Lottery.Style1 %Lottery.Color1 $+ $+ $1- %Lottery.Style2 | mode %Lottery.channel +N
alias nstyle notice %Lottery.channel %Lottery.Style1 %Lottery.Color1 $+ $+ $1- %Lottery.Style2
alias mixregs return $+($chr(84),$chr(104),$chr(105),$chr(115),$chr(32),$chr(76),$chr(111),$chr(116),$chr(116),$chr(101),$chr(114),$chr(121),$chr(32),$chr(98),$chr(111),$chr(116),$chr(32),$chr(104),$chr(97),$chr(115),$chr(32),$chr(98),$chr(101),$chr(101),$chr(110))
alias setWinner set -u3 %Lottery.Winner $gettok(%Lottery.Regs,$rand(1,%Lottery.MAX),32)
alias LotteryEND {
setWinner
mode %Lottery.channel +m
timer 1 1 lstyle # Mixing Regs. Please wait ...
timer 1 7 lstyle # OK ! The winner has been chosen...
timer 1 8 lstyle # And the winner is...
timer 1 12 lstyle # The winner is: %Lottery.Winner
timer 1 12 lstyle # Congratulations $+ $chr(44) %Lottery.Winner you are the winner in this lottery.
timer 1 12 lstyle %Lottery.Winner %Lottery.Winner you won on %Lottery.channel $+ 's lottery, send a message to %Lottery.Admin to get your prize ( $+ $+ %Lottery.Prize $+ ).
set %Lottery.status OFF
unset %Lottery.Regs
unset %Lottery.Winner
timer 1 15 mode %Lottery.channel -m
}
alias LotterySTART {
timers off
inc %Lottery.number
set %Lottery.Time $time
set %Lottery.Date $date
mode %Lottery.channel -N+m
nstyle Lottery is about to START Be ready for -m
timer 1 1 lstyle %Lottery.channel Starting the $+ %Lottery.Color2 $ord(%Lottery.number) %Lottery.Color1 $+ Lottery by $+ %Gather.Color2 %Lottery.Admin
timer 1 2 lstyle %Lottery.channel Prize is %Lottery.Color2 $+ %Lottery.Prize $+ %Lottery.Color1 ,Max users: $+ %Lottery.Color2 %Lottery.MAX
timer 1 3 lstyle %Lottery.channel Commands are $cmd(Reg) $cmd(Del) $cmd(Regs)
timer 1 14 mode %Lottery.channel -m+N
set %Lottery.status ON
}
alias LotterySTOP1 {
set %Lottery.status OFF
unset %Lottery.Regs
unset %Lottery.Winner
lstyle %Lottery.channel Lottery number %Lottery.number has been stopped by $nick $+ .
}
alias LotterySTOP2 {
set %Lottery.status OFF
unset %Lottery.Regs
unset %Lottery.Winner
lstyle %Lottery.channel Lottery number %Lottery.number has been stopped.
}
on *:quit: if ($nick isin %Lottery.Regs) { set %Lottery.Regs $remove(%Lottery.Regs,$nick) | timer 1 1 sayit }
on *:nick: {
if ($nick == %Lottery.Admin) { set %Lottery.admin $newnick }
if ($nick isin %Lottery.Regs) { set %Lottery.regs $replace(%Lottery.regs,$nick,$newnick) }
}
on *:part:%Lottery.channel: if ($istok(%Lottery.Regs,$nick,32)) { set %Lottery.Regs $remove(%Lottery.Regs,$nick) | timer 1 1 sayit }
on *:kick:%Lottery.channel: if ($knick isin %Lottery.Regs) { set %Lottery.Regs $remove(%Lottery.Regs,$knick) | timer 1 1 sayit }
alias SetStyle {
if ($1 == 1) { Set %Lottery.Style1 7,1[15«7,1 $+ %Lottery.tag $+ 15,1» | Set %Lottery.Style2 15,1«7,1 $+ %Lottery.tag $+ 15,1»7,1] | Set %Lottery.Color2 7 | Set %Lottery.Color1 0,1 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 2) { Set %Lottery.Style1 4,1[15«4,1 $+ %Lottery.tag $+ 15,1» | Set %Lottery.Style2 15,1«4,1 $+ %Lottery.tag $+ 15,1»4,1] | Set %Lottery.Color2 4 | Set %Lottery.Color1 0,1 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 3) { Set %Lottery.Style1 10,1[15«10,1 $+ %Lottery.tag $+ 15,1» | Set %Lottery.Style2 15,1«10,1 $+ %Lottery.tag $+ 15,1»10,1] | Set %Lottery.Color2 10 | Set %Lottery.Color1 0,1 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 4) { Set %Lottery.Style1 9,1[15«9,1 $+ %Lottery.tag $+ 15,1» | Set %Lottery.Style2 15,1«9,1 $+ %Lottery.tag $+ 15,1»9,1] | Set %Lottery.Color2 9 | Set %Lottery.Color1 0,1 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 5) { Set %Lottery.Style1 12,1[15«12,1 $+ %Lottery.tag $+ 15,1» | Set %Lottery.Style2 15,1«12,1 $+ %Lottery.tag $+ 15,1»12,1] | Set %Lottery.Color2 12 | Set %Lottery.Color1 0,1 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 6) { Set %Lottery.Style1 8,1[15«8,1 $+ %Lottery.tag $+ 15,1» | Set %Lottery.Style2 15,1«8,1 $+ %Lottery.tag $+ 15,1»8,1] | Set %Lottery.Color2 8 | Set %Lottery.Color1 0,1 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 7) { Set %Lottery.Style1 8,1[15« | Set %Lottery.Style2 15,1»8,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 8 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 8) { Set %Lottery.Style1 12,1[15« | Set %Lottery.Style2 15,1»12,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 12 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 9) { Set %Lottery.Style1 9,1[15« | Set %Lottery.Style2 15,1»9,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 9 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 10) { Set %Lottery.Style1 10,1[15« | Set %Lottery.Style2 15,1»10,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 10 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 11) { Set %Lottery.Style1 4,1[15« | Set %Lottery.Style2 15,1»4,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 4 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 12) { Set %Lottery.Style1 7,1[15« | Set %Lottery.Style2 15,1»7,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 7 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 13) { Set %Lottery.Style1 | Set %Lottery.Style2 | Set %Lottery.Color1 | Set %Lottery.Color2 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 14) { Set %Lottery.Style1 12,1[8« | Set %Lottery.Style2 8,1»12,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 8 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 15) { Set %Lottery.Style1 8,1[4« | Set %Lottery.Style2 4,1»8,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 4 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 16) { Set %Lottery.Style1 14,1[07« | Set %Lottery.Style2 7,1»14,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 7 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 17) { Set %Lottery.Style1 14,1[10« | Set %Lottery.Style2 10,1»14,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 10 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 18) { Set %Lottery.Style1 14,1[4« | Set %Lottery.Style2 4,1»14,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 4 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
if ($1 == 19) { Set %Lottery.Style1 14,1[3« | Set %Lottery.Style2 3,1»14,1] | Set %Lottery.Color1 0,1 | Set %Lottery.Color2 3 | .timer 1 1 echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
}
menu * {
Arthas and Sypho Lottery bot
.Start and Stop
..Start : {
if (%Lottery.status == ON) { echostyle Lottery is already running. }
if (%Lottery.status != ON) { LotterySTART }
}
..Stop {
if (%Lottery.status != ON) { echostyle Lottery is not running. }
if (%Lottery.status == ON) { LotterySTOP2 }
}
.Settings
..Set channel : if (#* iswm $input(Type Channel,e,Type Channel)) { Set %Lottery.Channel $! }
..Set Sign : if (* iswm $input(Type Sign like: !,e,Type Channel)) { Set %Lottery.Sign $! }
..Set max users : if ($input(Type max users,e,Type max users) isnum) { Set %Lottery.MAX $! }
..Set Prize : if (* iswm $input(Type Lottery prize,e,Type Lottery prize)) { Set %Lottery.Prize $! }
..Set Admin : if (* iswm $input(Type Admin nick,e,Type Admin nick)) { Set %Lottery.Admin $! }
..Set tag ON STYLE : if (* iswm $input(Type tag like: vG,e,Type tag)) { Set %Lottery.tag $! }
..Block tag
...Turn to ON : {
set %Lottery.blocktagstatus ON
if (* iswm $input(Type tag,e,Type tag)) { Set %Lottery.blocktag $! }
}
...Turn to OFF : set %Lottery.blocktagstatus OFF | unset %Lottery.blocktag
...Change blocktag : if (* iswm $input(Type tag,e,Type tag)) { Set %Lottery.blocktag $! }
.Accesses
..Add Lottery owner (Q-Account): set %Lottery.owners %Lottery.owners *!*@ $+ $$?="Enter Q-Account Name" $+ .users.quakenet.org
..Del Lottery owner (Q-Account): set %Lottery.owners $remove(%Lottery.owners,*!*@ $+ $$?="Enter Q-Account Name" $+ .users.quakenet.org)
.Styles
..With Tag 1(Orange) { SetStyle 1 }
..Without Tag 2(Orange) { SetStyle 12 }
..With Tag 3(Red) { SetStyle 2 }
..Without Tag 4(Red) { SetStyle 11 }
..With Tag 5(Turkiz) { SetStyle 3 }
..Without Tag 6(Turkiz) { SetStyle 10 }
..With Tag 7(Green) { SetStyle 4 }
..Without Tag 8(Green) { SetStyle 9 }
..With Tag 9(Blue) { SetStyle 5 }
..Without Tag 10(Blue) { SetStyle 8 }
..With Tag 11(Yellow) { SetStyle 6 }
..Without Tag 12(Yellow) { SetStyle 7 }
..13(Special) { SetStyle 14 }
..14(Special) { SetStyle 15 }
..15(Special) { SetStyle 16 }
..16(Special) { SetStyle 17 }
..17(Special) { SetStyle 18 }
..18(Special) { SetStyle 19 }
..Without ALL 19(Empty) { SetStyle 13 }
}