יוצר: Arthas and Sypho
גרסה: 1.0
תיאור: בוט הגרלות שמחלק פרסים שאתם קובעים
הפעלה: כנסו למירק ולחצו במקלדת ALT + R, לחצו למעלה בצד שמאל File ואז New, תעתיקו את הסקריפט ותאשרו.
קוד: בחר הכל
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;.
;;;. Lotterybot
;;;. by Arthas and Sypho
;;;.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;.
;;;. Just put yourself a owner on the dialog and type to the bot in private message "!Commands".
;;.;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:text:$(%Lottery.Sign $+ *):%Lottery.Channel: {
if (!%Flood) {
tokenize 32 $mid($1-,2)
if ($1 == notice) || ($1 == n) && ($2) && ($nick isop #) { mode %Lottery.channel -N | nlstyle $2- | mode %Lottery.channel +N | lflood }
if ($1 == notice) || ($1 == n) && (!$2) && (%Lottery.status == ON) && ($nick isop #) { mode %Lottery.channel -N | nlstyle $LotteryON | nlstyle $LotteryON2 | mode %Lottery.channel +N | lflood }
if ($1 == Commands) || ($1 == Help) { lstyle # Lottery commands are: $cmd(Status) $cmd(Admin) $cmd(Prize) $cmd(Regs) $cmd(Reg) $cmd(Del) | lflood }
if ($1 == status) {
if (%Lottery.status == ON) { lstyle # $LotteryON | lstyle # $LotteryON2 | lflood }
else { LotteryOFF | lflood }
}
if ($1 == Prize) {
if (%Lottery.status == ON) { Prize | lflood }
else { LotteryOFF | lflood }
}
if ($1 == Admin) {
if (%Lottery.status == ON) { Sayadmin | lflood }
else { $LotteryOFF | lflood }
}
if ($1 == $+($chr(67),$chr(114),$chr(101),$chr(100),$chr(105),$chr(116),$chr(115))) { lstyle # $+($chr(84),$chr(104),$chr(105),$chr(115),$chr(32),$chr(108),$chr(111),$chr(116),$chr(116),$chr(101),$chr(114),$chr(121),$chr(32),$chr(98),$chr(111),$chr(116),$chr(32),$chr(109),$chr(97),$chr(100),$chr(101),$chr(32),$chr(98),$chr(121),$chr(32),$chr(65),$chr(114),$chr(116),$chr(104),$chr(97),$chr(115),$chr(32),$chr(38),$chr(32),$chr(83),$chr(121),$chr(112),$chr(104),$chr(111)) $+ . | lflood }
if ($1 == Regs) {
if (%Lottery.status == ON) { LotteryREGS | lflood }
else { LotteryOFF | lflood }
}
if ($1 == Reg) {
if (%Lottery.status == ON) {
if ($istok(%lottery.regs,$nick,32)) { Nickisin | lflood }
else {
if (%Lottery.Blocktagstatus == ON) {
if (* $+ %Lottery.Blocktag $+ * iswm $nick) { Nickblocked | lflood }
else { Nickregistered | lflood }
}
else { Nickregistered | lflood }
}
}
else { LotteryOFF | lflood }
}
if ($1 == Del) {
if (%Lottery.status == ON) {
if ($istok(%lottery.regs,$nick,32)) { Nickdeleted | lflood }
else { Nickisntin | lflood }
}
else { LotteryOFF | lflood }
}
}
if ($numtok(%Lottery.Regs,32) == %Lottery.MAX) { LotteryEND }
}
on *:text:$(%Lottery.Sign $+ *):?: {
if (!%Flood) {
tokenize 32 $mid($1-,2)
if ($gettok($wildsite,2,64) isin %Lottery.owners) {
if ($1 == Commands) { lstyle $nick $cmd(SetChannel) $cmd(Mahur) <ON/OFF> $cmd(Mahur) <WinnerNick> $cmd(Start) $cmd(Stop) $cmd(NewWinner) $cmd(SetPrize) $cmd(SetMax) $cmd(Blocktag <ON/OFF>) $cmd(Blocktag <TAG>) $cmd(SetAdmin) $cmd(SetSign) $cmd(Join <#CHAN>) $cmd(Part <CHAN>) $cmd(Del) <Nick> | lflood }
if ($1 == setprize) && ($2) { set %Lottery.Prize $2- | lstyle $nick done $+ $chr(44) lottery prize changed to $2- | lflood }
if ($1 == setmax) && ($2) { set %Lottery.MAX $2 | lstyle $nick done $+ $chr(44) lottery max users changed to $2 | lflood }
if ($1 == setchannel) && ($2) { sec %Lottery.channel $2 | lstyle $nick done $+ $chr(44) channel changed to $2 | lflood }
if ($1 == 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 }
elseif ($2 != ON && $2 != OFF) { set %Lottery.Blocktag $2 | lstyle $nick done $+ $chr(44) $chr(42) $+ $2 $+ $chr(42) tag is now blocked $+ $iif(%Lottery.blocktagstatus == OFF,$chr(44) Attention: Blocktag status is OFF) | lflood }
}
if ($1 == Mahur) {
if ($2 == ON) { set %Lottery.Mahur ON | lstyle $nick done $+ $chr(44) lottery mahur is now ON. }
if ($2 == OFF) { set %Lottery.Mahur OFF | lstyle $nick done $+ $chr(44) lottery mahur is now OFF. }
elseif ($2 != ON && $2 != OFF) { set %Lottery.MahurWin $2 | lstyle $nick done $+ $chr(44) the winner of the mahur will be %Lottery.MahurWin $+ $iif(%Lottery.Mahur == OFF,$chr(44) Attention: Mahur status is OFF) }
}
If ($1 == NewWinner) {
if (%Lottery.NewWinnerCan == ON) { LotteryNewWinner }
else { lstyle $nick Lottery new winner time has left }
}
if ($1 == join) && ($2) { join $2 | lstyle $nick Joining to $2 | lflood }
if ($1 == del) && ($2) {
if (%Lottery.status == ON) {
if ($istok(%lottery.regs,$2,32)) { set %Lottery.Regs $remtok(%Lottery.Regs,$2,1,32) | lstyle $nick ( $+ $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX $+ %Lottery.Color1 $+ ) הוסר מההגרלה בהצלחה $chr(44) $+ $2 | lflood }
else { lstyle $nick בכלל לא רשום להגרלה $chr(44) $+ $2 | lflood }
}
else { LotteryOFF | lflood }
}
if ($1 == part) && ($2) { part $2 | lstyle $nick Parting from $2 | lflood }
if ($1 == Start) { lstyle $nick Are u sure $+ $chr(44) if u sure type here $cmd(StartSure) $+ . | set -u15 %Lottery.STARTSURE ON | lflood }
if ($1 == Stop) { lstyle $nick Are u sure $+ $chr(44) if u sure type here $cmd(StopSure) $+ . | lflood }
if ($1 == 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 == StopSure) { LotteryStop1 | lstyle $nick Lottery has been stopped. }
}
}
}
alias lflood set -u3 %Flood ON
alias sayit { if (!%Flood) { lstyle # $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX :בסך הכל משתמשים רשומים } }
alias Sayadmin lstyle # %Lottery.Admin האדמין של ההגרלה הוא
alias Prize lstyle # הפרס הוא: %Lottery.Prize
alias LotteryREGS {
if ($numtok(%Lottery.Regs,32) != 0) { sayit | timer 1 1 lstyle # $replace(%Lottery.Regs,$chr(32),$chr(44) $+ $chr(32)) :משתמשים רשומים }
else { lstyle # אין משתמשים רשומים }
}
alias Nickdeleted set %Lottery.Regs $remtok(%Lottery.Regs,$nick,1,32) | lstyle # ( $+ $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX $+ %Lottery.Color1 $+ ) הוסרת מההגרלה בהצלחה $chr(44) $+ $Nick
alias Nickisntin lstyle # אתה בכלל לא רשום להגרלה $chr(44) $+ $Nick
alias Nickblocked lstyle # אני מתעלם מהטאג שלך $chr(44) $+ $Nick
alias Nickregistered set %Lottery.Regs $addtok(%Lottery.Regs,$nick,32) | lstyle # ( $+ $numtok(%Lottery.Regs,32) $+ / $+ %Lottery.MAX $+ %Lottery.Color1 $+ ) נרשמת להגרלה בהצלחה $chr(44) $+ $Nick
alias Nickisin lstyle # אתה כבר בתוך רשימת המשתמשים הרשומים $chr(44) $+ $Nick
alias LotteryON return ההגרלה עובדת ! כרגע יש $numtok(%Lottery.Regs,32) אנשים רשומים מתוך %Lottery.MAX $+ $chr(44) הפרס הוא %Lottery.Prize $+ .
alias LotteryON2 return $cmd(Reg) בשביל להירשם רשום בערוץ
alias LotteryOFF lstyle # הגרלה לא רצה כרגע, ההגרלה האחרונה התקיימה ב- %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 echostyle echo -a %Lottery.Style1 %Lottery.Color1 $+ $+ $1- %Lottery.Style2
alias nlstyle notice %Lottery.channel %Lottery.Style1 %Lottery.Color1 $+ $+ $1- %Lottery.Style2
alias nstyle notice %Lottery.channel %Lottery.Style1 %Lottery.Color1 $+ $+ $1- %Lottery.Style2
alias setWinner set -u3 %Lottery.Winner $gettok(%Lottery.Regs,$rand(1,%Lottery.MAX),32)
alias NewWinnerSet set -u20 %Lottery.NewWinner $gettok(%Lottery.NewRegs,$rand(1,%Lottery.NewMAX),32)
alias NewSetWinner {
set -u400 %Lottery.NewRegs %Lottery.Regs
set -u400 %Lottery.NewMAX %Lottery.MAX
set -u400 %Lottery.NewWinnerCan ON
}
alias LotteryNewWinner {
NewWinnerSet
mode %Lottery.channel +m
timer 1 1 lstyle %Lottery.Channel ...מערבב את המשתמשים הרשומים בכדי לבחור את המנצח החדש
timer 1 7 lstyle %Lottery.Channel או.קיי ! המנצח החדש נבחר
timer 1 8 lstyle %Lottery.Channel ...והמנצח הוא
timer 1 12 lstyle %Lottery.Channel %Lottery.NewWinner :המנצח הוא
timer 1 13 lstyle %Lottery.Channel זכית ב: %Lottery.Prize
timer 1 14 lstyle %Lottery.Channel ההגרלה הסתיימה. תודה לכולם
timer 1 14 lstyle %Lottery.NewWinner %Lottery.Channel
timer 1 14 lstyle %Lottery.NewWinner אתה ניצחת בהגרלה זו, בדקות הקרובות אחד האדמינים של ההגרלה ייצרו איתך קשר ותקבל את הפרס שלך: %Lottery.Prize
set %Lottery.status OFF
timer 1 15 mode %Lottery.channel -m
}
dialog Styles {
title "Styles"
size -1 -1 57 126
option dbu
radio "1", 1, 6 22 16 10
text "Styles", 2, 16 10 21 8, center
radio "2", 3, 6 32 16 10
radio "3", 4, 6 42 16 10
radio "4", 5, 6 52 16 10
radio "5", 6, 6 62 16 10
radio "6", 7, 6 72 16 10
radio "7", 8, 6 82 16 10
radio "8", 9, 6 92 16 10
radio "9", 10, 6 102 16 10
radio "", 11, 22 111 8 10, left
radio "10", 12, 34 22 16 10, left
radio "11", 13, 34 32 16 10, left
radio "12", 14, 34 42 16 10, left
radio "13", 15, 34 52 16 10, left
radio "14", 16, 34 62 16 10, left
radio "15", 17, 34 72 16 10, left
radio "16", 18, 34 82 16 10, left
radio "17", 19, 34 92 16 10, left
radio "18", 20, 34 102 16 10, left
text "19", 21, 21 119 11 6, center
text "Arthas and Sypho", 22, 6 1 45 8, disable
}
alias LotteryEND {
if (%Lottery.Mahur != ON) {
NewSetWinner
setWinner
mode %Lottery.channel +m
timer 1 1 lstyle %Lottery.Channel ...מערבב את המשתמשים הרשומים בכדי לבחור את המנצח
timer 1 7 lstyle %Lottery.Channel או.קיי ! המנצח נבחר
timer 1 8 lstyle %Lottery.Channel ...והמנצח הוא
timer 1 12 lstyle %Lottery.Channel %Lottery.Winner :המנצח הוא
timer 1 13 lstyle %Lottery.Channel זכית ב: %Lottery.Prize
timer 1 15 lstyle %Lottery.Channel ההגרלה הסתיימה. תודה לכולם
timer 1 15 lstyle %Lottery.Winner #
timer 1 16 lstyle %Lottery.Winner אתה ניצחת בהגרלה זו, בדקות הקרובות אחד האדמינים של ההגרלה ייצרו איתך קשר ותקבל את הפרס שלך: %Lottery.Prize
set %Lottery.status OFF
unset %Lottery.Regs
unset %Lottery.Winner
timer 1 15 mode %Lottery.channel -m
}
else {
mode %Lottery.channel +m
timer 1 1 lstyle %Lottery.Channel ...מערבב את המשתמשים הרשומים בכדי לבחור את המנצח
timer 1 7 lstyle %Lottery.Channel או.קיי ! המנצח נבחר
timer 1 8 lstyle %Lottery.Channel ...והמנצח הוא
timer 1 12 lstyle %Lottery.Channel %Lottery.MahurWin :המנצח הוא
timer 1 13 lstyle %Lottery.Channel זכית ב: %Lottery.Prize
timer 1 15 lstyle %Lottery.Channel ההגרלה הסתיימה. תודה לכולם
timer 1 15 lstyle %Lottery.MahurWin #
timer 1 16 lstyle %Lottery.MahurWin אתה ניצחת בהגרלה זו, בדקות הקרובות אחד האדמינים של ההגרלה ייצרו איתך קשר ותקבל את הפרס שלך: %Lottery.Prize
set %Lottery.status OFF
unset %Lottery.Regs
unset %Lottery.MahurWin
timer 1 15 mode %Lottery.channel -m
}
}
alias LotterySTART {
timers off
set %Lottery.status ON
inc %Lottery.number
set %Lottery.Time $time
set %Lottery.Date $date
mode %Lottery.channel +m
timer 1 1 lstyle %Lottery.channel מתחיל את ההגרלה מספר %Lottery.number
timer 1 2 lstyle %Lottery.channel %Lottery.Color2 $+ %Lottery.Prize $+ %Lottery.Color1 הפרס הוא , $+ %Lottery.Color2 %Lottery.MAX $+ %Lottery.Color1 מספר משתמשים
timer 1 3 lstyle %Lottery.channel Commands are $cmd(Reg) $cmd(Del) and $cmd(Regs)
timer 1 14 mode %Lottery.channel -m
}
alias LotterySTOP1 {
set %Lottery.status OFF
unset %Lottery.Regs
unset %Lottery.Winner
lstyle %Lottery.channel הגרלה מספר %Lottery.number הופסקה ע"י $nick
}
alias LotterySTOP2 {
set %Lottery.status OFF
unset %Lottery.Regs
unset %Lottery.Winner
lstyle %Lottery.channel הגרלה מספר %Lottery.number הופסקה.
}
on *:quit: if ($istok(%lottery.regs,$nick,32)) { set %Lottery.Regs $remtok(%Lottery.Regs,$nick,1,32) | timer 1 1 sayit }
on *:nick: {
if ($nick == %Lottery.Admin) { set %Lottery.admin $newnick }
if ($istok(%lottery.regs,$nick,32)) { set %Lottery.regs $reptok(%Lottery.regs,$nick,$newnick,1,32) | echo -a asd }
}
on *:part:%Lottery.channel: if ($istok(%Lottery.Regs,$nick,32)) { set %Lottery.Regs $remtok(%Lottery.Regs,$nick,1,32) | timer 1 1 sayit }
on *:kick:%Lottery.channel: if ($istok(%lottery.regs,$knick,32)) { set %Lottery.Regs $remtok(%Lottery.Regs,$knick,1,32) | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | echostyle Lottery Bot by Arthas and Sypho $+ $chr(44) Commands are: $cmd(Reg) }
}
menu * {
LotteryBot { Lotteryb }
}
dialog Lotteryb {
title "Lottery bot"
size -1 -1 220 266
option pixels notheme
tab "Settings", 1, 4 1 215 267
text "Channel:", 15, 18 49 44 16, tab 1
text "Prize:", 16, 18 80 28 16, tab 1
text "MAXUsers:", 17, 19 112 54 16, tab 1
text "Admin:", 18, 18 145 34 16, tab 1
text "Channel Tag:", 19, 16 178 64 16, tab 1
radio "ON", 21, 66 208 36 12, tab 1
text "Blocktag:", 22, 16 212 46 16, tab 1
radio "OFF", 23, 66 221 38 12, tab 1
edit "", 20, 109 208 28 23, tab 1 autohs
text "Sign:", 24, 128 112 24 16, tab 1
edit "", 25, 64 47 70 21, tab 1 autohs
edit "", 27, 81 109 38 21, tab 1
edit "", 28, 158 109 16 21, tab 1 autohs
edit "", 29, 55 141 80 21, tab 1 autohs
edit "", 30, 84 173 52 21, tab 1 autohs
button "Update ALL", 31, 21 235 75 25, tab 1
edit "", 26, 49 79 86 21, tab 1 autohs
button "Open Styles dialog", 32, 100 235 101 25, tab 1
edit "", 35, 142 80 68 21, tab 1 autohs
text "Type winner", 36, 143 64 60 12, tab 1
check "Mahur", 34, 144 46 56 16, tab 1
tab "Accesses", 2
edit "", 8, 62 57 100 23, tab 2 autohs
list 9, 20 83 184 100, tab 2 size
button "Remove", 10, 20 187 69 25, tab 2
button "Clear", 12, 134 187 69 25, tab 2
text "Type the address of the owner", 13, 53 29 126 26, tab 2 center
text "Type the address like this: *!*@Arthax.users.quakenet.org or *!*@123123.012 blablabla", 14, 34 221 162 40, disable tab 2 center
button "Add", 11, 90 187 43 25, tab 2
tab "Start/Stop", 3
button "New Winner", 6, 66 193 75 25, tab 3
button "Start", 4, 66 51 75 25, tab 3
button "Stop", 5, 64 121 75 25, tab 3
text "Only if lottery is running", 7, 45 175 118 16, disable tab 3 center
text "Only on the 500 seconds after finish the lottery", 33, 22 151 160 26, disable tab 3 center
}
alias LO set -u1 %LO $did(Lotteryb,9).seltext
on *:dialog:lotteryb:sclick:*:{
If ($Did == 12) { remove LotteryOwners.txt | did -r $dname 9 | unset %Lottery.Owners }
If ($Did == 10) && ($did($dname,9).seltext) { LO | did -d $DName 9 $did($DName,9).sel | set %Lottery.Owners $remove(%Lottery.Owners,%LO) | write -ds %LO LotteryOwners.txt }
If ($Did == 11) && (*!*@* iswm $did(8)) && ($did(8) !isin %Lottery.Owners) { did -a $DName 9 $did(8) | set %Lottery.Owners %Lottery.Owners $did(8) | write LotteryOwners.txt $did(8) }
If ($Did == 21) && ($did(21).state == 1) { set %Lottery.Blocktagstatus ON | did -e $DName 20 }
If ($Did == 23) && ($did(23).state == 1) { unset %Lottery.Blocktagstatus | did -b $DName 20 }
If ($Did == 34) {
if ($did(34).state != 0) { set %Lottery.Mahur ON | did -e $DName 35 }
if ($did(34).state == 0) { set %Lottery.Mahur OFF | did -b $DName 35 }
}
If ($Did == 31) {
if (#* iswm $did(25)) { set %Lottery.channel $did(25) }
if (* iswm $did(26)) { set %Lottery.prize $did(26) }
if (* iswm $did(27)) { set %Lottery.MAX $did(27) }
if (* iswm $did(28)) { set %Lottery.sign $did(28) }
if (* iswm $did(29)) { set %Lottery.Admin $did(29) }
if (* iswm $did(30)) { set %Lottery.tag $did(30) }
if (* iswm $did(20)) { set %Lottery.blocktag $did(20) }
if (* iswm $did(35)) { set %Lottery.MahurWin $did(35) }
}
If ($Did == 32) { Styles }
If ($Did == 4) {
if (%Lottery.status == ON) { echostyle Lottery is already running. }
else { LotterySTART }
}
If ($Did == 5) {
if (%Lottery.status != ON) { echostyle Lottery is not running. }
else { LotterySTOP2 }
}
If ($Did == 6) {
if (%Lottery.NewWinnerCan == ON) { LotteryNewWinner }
else { echostyle Lottery new winner time has left }
}
}
on *:dialog:Styles:sclick:*:{
If ($Did == 1) { setstyle 1 }
If ($Did == 3) { setstyle 2 }
If ($Did == 4) { setstyle 3 }
If ($Did == 5) { setstyle 4 }
If ($Did == 6) { setstyle 5 }
If ($Did == 7) { setstyle 6 }
If ($Did == 8) { setstyle 7 }
If ($Did == 9) { setstyle 8 }
If ($Did == 10) { setstyle 9 }
If ($Did == 11) { setstyle 10 }
If ($Did == 12) { setstyle 11 }
If ($Did == 13) { setstyle 12 }
If ($Did == 14) { setstyle 13 }
If ($Did == 15) { setstyle 14 }
If ($Did == 16) { setstyle 15 }
If ($Did == 17) { setstyle 16 }
If ($Did == 18) { setstyle 17 }
If ($Did == 19) { setstyle 18 }
If ($Did == 20) { setstyle 19 }
}
on *:dialog:Lotteryb:init:*:{
did -a $DName 25 %Lottery.channel
did -a $DName 26 %Lottery.prize
did -a $DName 27 %Lottery.MAX
did -a $DName 28 %Lottery.sign
did -a $DName 29 %Lottery.admin
did -a $DName 30 %Lottery.tag
did -a $DName 20 %Lottery.blocktag
did -a $DName 35 %Lottery.MahurWin
if (%Lottery.Mahur == ON) { did -c $DName 34 }
else { did -b $DName 35 }
if (%Lottery.Blocktagstatus == ON) { did -c $DName 21 }
else { did -c $DName 23 | did -b $DName 20 }
var %o = 1
while (%o < $calc($lines(LotteryOwners.txt) + 1)) { did -a $dname 9 $read(LotteryOwners.txt, %o) | inc %o }
}
alias Styles dialog $iif($dialog(Styles),-v Lotteryb,-m Styles Styles)
alias Lotteryb dialog $iif($dialog(lotteryb),-v lotteryb,-m lotteryb lotteryb)
יש למצוא גם: pastebin.php?mode=view&s=32