Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Services bot
- ;; By Arthas & Rizpaz
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; To add admin, define Your botpass and type to the bot - YouRSIGN<Add> Admin <Botpass> <USER> <PASS>
- ;; Example: !Add Admin
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; Login system..
- alias blacklist {
- var %b = 1
- while (%b <= $ulist(*,Blacklisted,0)) { var %bl = %bl $ulist(*,Blacklisted,%b) | inc %b }
- return $replace(%bl,$chr(32),$chr(32) $+ ? $+ $Chr(32))
- }
- alias vip {
- var %b = 1
- while (%b <= $ulist(*,vip,0)) { var %bl = %bl $ulist(*,vip,%b) | inc %b }
- return $replace(%bl,$chr(32),$chr(32) $+ ? $+ $Chr(32))
- }
- alias blackwords {
- var %ks 1
- while (%ks <= $numtok($1-,32)) {
- if ($istok(%blackwords,$gettok($1,%ks,32),32)) { return $gettok($1,%ks,32) | break }
- inc %ks
- }
- }
- on *:text:*:*:{
- if ($nick isreg #) && (# == %Channel) { if ($blackwords($1-)) { ban -k %Channel $nick 2 Blackwords protection $+ $chr(44) $chr(42) $+ $blackwords($1-) $+ $chr(42) } }
- if (!%flood) {
- if (%Cign $+ * iswm $1) {
- tokenize 32 $mid($1-,2) | var %n = Ctl $nick,%c = Ctl %Channel
- if ($target == %Channel) {
- if ($1 == status) {
- if (%C.status) { %c $LotteryON | %c $LotteryON2 | lflood }
- else { %c $LotteryOFF | lflood }
- }
- if ($1 == Prize) {
- if (%C.status) { %c The prize is %C.Prize | lflood }
- else { %c $LotteryOFF | lflood }
- }
- if ($1 == Admin) {
- if (%C.status) { %c The admin is %C.Admin | lflood }
- else { %c $LotteryOFF | lflood }
- }
- if ($1 == Regs) {
- if (%C.status) {
- if ($read(regs.txt)) { mode # + | totalusr | artregs }
- else { %c There are no registered users }
- lflood
- }
- else { %c $LotteryOFF | lflood }
- }
- if ($1 == Reg) {
- if (%C.status) {
- if ($checkreg($nick)) { %c $nick $+ $chr(44) You are already registered to the lottery. | lflood }
- else {
- if (%C.Blocktagstatus) {
- if (%C.Blocktag isin $nick) { %c $nick $+ $chr(44) You'r tag is blocked. | lflood }
- else { Nickregistered | lflood }
- }
- else { Nickregistered | lflood }
- }
- }
- else { %c $LotteryOFF | lflood }
- }
- if ($1 == Del) && (!$2) {
- if (%C.status) {
- if ($checkreg($nick)) { write -dl $+ $v1 regs.txt | %c $nick $+ $chr(44) You have successfully removed from the lottery. ( $+ $lines(regs.txt) $+ / $+ %C.MAX $+ %Color1 $+ ) | lflood }
- else { %c $nick $+ $chr(44) You're not registered to the lottery. | lflood }
- }
- else { %c $LotteryOFF | lflood }
- }
- }
- if ($target == %Channel) || ($target !ischan) {
- %e = Ctl $iif($target ischan,%Channel,$nick)
- if ($1 == Admins) { %e $Admins | inc -u5 %flood }
- if ($Admins($right($wildsite,-4)).logged) {
- if ($1 == chanlev) && ($2) {
- if ($(% $+ d $+ $nick,2) == 5) { Ctl $nick You are ignored $+ $chr(44) Contraceptives to takeover. | ignore $wildsite }
- else {
- .msg q chanlev $2-
- inc -u4 %flood | set -u4 %floodnick $nick | inc -u25 %d $+ $nick
- }
- }
- ;if ($1 == Credits) { %e This services bot has been created by Sibonis $+ $chr(44) v1 | inc -u5 %flood }
- if (mode == $1) && ($2) { mode %Channel $2- | %e mode $2- | lflood }
- if ($istok(kick ban kban,$1,32)) && ($2) {
- var %b
- if ($3) {
- if ($3 == adv) %b = Advertise on join
- if ($3 == kalb) %b = check
- else %b = $3-
- }
- else {
- %b = Without any reason
- }
- $iif(ban isin $1,ban %Channel $address($2,2))
- $iif(k isin $1,kick %Channel $2 Kicked by $nick $+ $chr(44) %b )
- lflood
- }
- if ($1 == Blacklist) { if ($ulist(*,Blacklisted,0) !== 0) { %e Blacklist users: | %e $blacklist } | else %e There are no BLACKLIST users. | lflood }
- if ($1 == Blackwords) { if ($numtok(%blackwords,32) > 0) { %e Blackwords: | %e $replace(%blackwords,$chr(32),$chr(32) $+ ? $+ $Chr(32)) } | else %e There are no BLACKLIST users. | lflood }
- if ($1 == add) {
- if ($2 == blackword) && ($3) && ($3 !isin %blackwords) { set %blackwords $addtok(%blackwords,$3-,32) | %e the word $+ $iif($4,s) $3- $iif($4,have,has) been added to the blackwords list. | lflood }
- if ($2 == vip) && (*@* iswm $3) && ($istok(v +v o +o,$4,32)) { .auser vip $3- | %e Done $+ $chr(44) $3 has been added to the vip list with the mode $4. | lflood }
- if ($2 == black) && (*@* iswm $3) { .auser Blacklisted $3- | %e Done $+ $chr(44) $3 has been added to the blacklist. | lflood }
- }
- if ($1 == del) && ($3) {
- if ($2 == blackword) && ($3) && ($3 isin %blackwords) { %e The word $+ $iif($4,s) $matchtok(%blackwords,$3-,1,32) $iif($4,have,has) been deleted from the blackwords list. | set %blackwords $remtok(%blackwords,$matchtok(%blackwords,$3-,1,32),1,32) | lflood }
- if ($2 == vip) {
- if ($3 isin $vip) {
- %e Done $+ $chr(44) $matchtok($vip,$3,1,32) has been deleted from the VIP list. | .ruser $matchtok($vip,$3,1,32) | lflood
- }
- }
- if ($2 == black) {
- if ($3 isin $blacklist) {
- %e Done $+ $chr(44) $matchtok($blacklist,$3,1,32) has been deleted from the blacklist. | .ruser $matchtok($blacklist,$3,1,32) | lflood
- }
- }
- }
- if ($1 == Banclear) { mode %Channel -b * | lflood }
- if ($1 == VIP) { if ($ulist(*,vip,0) !== 0) { %e VIP users: | %e $vip } | else %e There are no VIP users. | lflood }
- if ($istok(+mr -mr +r -r +s -s +m -m,$1,32)) { mode %Channel $1- | %e mode $1- | lflood }
- if ($istok(i invite,$1,32)) && ($2) {
- if ($2 ison %Channel) { %e Invite faild $+ $chr(44) $2 is already on %Channel | lflood }
- else { invite $2 %Channel | Ctl $2 You have been invited to %Channel $+ $Chr(44) Gathers and free busted servers & vents ! JOIN | %e $2 was invited in successfully. | lflood }
- }
- if ($istok(n notice,$1,32)) {
- if ($2) {
- mode %Channel -N | nCtl # $2- | mode %Channel +N | lflood
- }
- elseif (%C.status) {
- mode %Channel -N | nCtl # $LotteryON | nCtl # $LotteryON2 | mode %Channel +N | lflood
- }
- }
- if ($1 == Commands) { nCtl $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 %C.Prize $2- | %e Done $+ $chr(44) lottery prize changed to $2- | lflood }
- if ($1 == setmax) && ($2) { set %C.MAX $2 | %e Done $+ $chr(44) lottery max users changed to $2 | lflood }
- if ($1 == setchannel) && ($2) { sec %Channel $2 | %e Done $+ $chr(44) channel changed to $2 | lflood }
- if ($1 == Blocktag) {
- if ($2 == ON) { inc %C.blocktagstatus | %e Done $+ $chr(44) block tag turned to ON | lflood }
- elseif ($2 == OFF) { unset %C.blocktagstatus | %e Done $+ $chr(44) block tag turned to OFF | lflood }
- elseif ($2) { set %C.Blocktag $2 | %e Done $+ $chr(44) $chr(42) $+ $2 $+ $chr(42) tag is now blocked $+ $chr(44) Blocktag status is $iif(%C.blocktagstatus,ON,OFF) | lflood }
- else { %e The Blocktag Status is $iif(%C.blocktagstatus,ON,OFF) | lflood }
- }
- if ($1 == Mahur) {
- if ($2 == ON) { inc %C.Mahur | %e Done $+ $chr(44) lottery mahur is now ON. }
- elseif ($2 == OFF) { unset %C.Mahur | %e Done $+ $chr(44) lottery mahur is now OFF. }
- elseif ($2) { set %C.MahurWin $2 | %e Done $+ $chr(44) the winner of the lottery will be %C.MahurWin $+ $iif(!%C.Mahur,$chr(44) Mahur status is OFF) }
- else { %e The Mahur Status is $iif(%C.Mahur,ON,OFF) | lflood }
- lflood
- }
- If ($1 == NewWinner) {
- if (%C.NewWinnerCan) { LotteryNewWinner }
- else { %e Lottery new winner time has left }
- lflood
- }
- if ($1 == join) && ($2) { join $2 | %e Joining to $2 | lflood }
- if ($1 == nick) && ($2) { nick $2 | %e Changing nick to $2 | lflood }
- if ($istok(say msg text,$1,32)) && ($3) { msg $2- | lflood }
- if ($1 == del) && ($2) && (!$3) {
- if (%C.status) {
- if ($checkreg($2)) { write -dl $+ $v1 regs.txt | %e $2 was removed in success. ( $+ $lines(regs.txt) $+ / $+ %C.MAX $+ %Color1 $+ ) | lflood }
- else { %e $2 does'nt register to the lottery | lflood }
- }
- else { %c $LotteryOFF | lflood }
- }
- if ($1 == part) && ($2) { part $2 | %e Parting from $2 | lflood }
- if ($1 == Start) { if (%C.Status) %e Lottery is already running $+ $chr(44) to stop this lottery type $cmd(Stop) | else %e Check all the details about the lottery $+ $chr(44) if they are ok type $cmd(StartSure) $+ . | set -u15 %C.STARTSURE ON | lflood }
- if ($1 == Stop) { if (%C.Status) %e If You are sure that You want to stop the lottery type $cmd(StopSure) $+ . | else %e $LotteryOFF | lflood }
- if ($1 == StartSure) && (!%C.Status) { LotterySTART | %e Lottery is NOW starting at %Channel $+ $chr(44) Max users: %C.MAX Prize: %C.Prize blocktag: $iif(%C.blocktagstatus,ON,OFF) $iif(%C.blocktagstatus,- %C.Blocktag) }
- if ($1 == StopSure) && (%C.Status) { LotteryStop | %e Lottery stopped. }
- }
- }
- if ($target !ischan) {
- 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 $+ ) | inc -u5 %flood }
- 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 connected to admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) ( $+ $wildsite $+ ) | remini Admins.ini $Admins($right($wildsite,-4)).user Logged | inc -u5 %flood }
- elseif ($1 == Add && $5) {
- if ($2 == Admin) {
- if ($3 == %botpass) {
- if ($Admins($4).isin) { %n Error: the username $4 is already in use $+ $chr(44) please try another user name. }
- else { writeini Admins.ini $4 Pass $5 | %n Admin successfully added $+ $chr(44) for login /msg $me %Cign $+ login $4 $5 }
- }
- else { %n Error: the bot pass is wrong ! }
- }
- inc -u5 %flood
- }
- elseif ($1 == Del && $4) {
- if ($2 == Admin) {
- if ($3 == %botpass) {
- if ($Admins($4).isin) { remini Admins.ini $4 | %n Admin successfully removed $+ $chr(44) user: $4 }
- else { %n Error: the username $4 is not on the admins list. }
- }
- else { %n Error: the bot pass is wrong ! }
- }
- inc -u5 %flood
- }
- elseif ($1 == Change && $5) {
- if ($2 == Botpass) {
- if ($3 == %botpass) {
- if ($4 == $5) { %n The bot pass is successfully changed from %botpass to $4 | set %botpass $4 }
- else { %n Error: Wrong syntax. !Change botpass <botpass> <newbotpass> <newbotpass> }
- }
- else { %n Error: the bot pass is wrong ! }
- }
- inc -u5 %flood
- }
- }
- }
- if ($lines(regs.txt) == %C.MAX) { LotteryEND }
- }
- }
- on !@*:join:%Channel: {
- if ($level($ulist($nick $+ $address($nick,2))) == Blacklisted) && ($nick !== wowbot) && ($nick !== triviabot) { ban -k %Channel $nick 2 You are in my BLACKLIST. $iif($ulist($maddress).info,Reason: $ulist($maddress).info) }
- elseif ($level($ulist($nick $+ $address($nick,2))) == VIP) && ($nick !== wowbot) && ($nick !== triviabot) { Ctl # VIP Detected | .timer 1 1 Ctl # Nick: $nick $+ $chr(44) Address: $maddress $+ $Chr(44) Mode: $ulist($maddress).info | .timer 1 2 mode # + $+ $ulist($maddress).info $nick }
- }
- alias Admins {
- if ($1) {
- 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 } }
- if ($prop == login) && ($readini(Admins.ini,$gettok($1,1,32),Pass) == $gettok($1,2,32)) { return $true }
- if ($prop == isin) { var %x = 1 | while (%x <= $ini(Admins.ini,0)) { if ($1 == $ini(Admins.ini,%x)) { return $true | break } | inc %x } }
- 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 } }
- }
- 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))) }
- }
- menu * {
- Bot
- .Set Channel: var %p = $?=\"Type channel" | $iif($chr(35) isin %p,set %Channel %p,echo -a Error: Type the channel with "#")
- .Set Sign: var %p = $?=\"Type sign" | $iif(%p,set %Cign %p,echo -a Error: Type sign)
- .Set Botpass: var %p = $?=\"Type botpass" | $iif(%p,set %Botpass %p,echo -a Error: Type botpass)
- .Clear Admins: .remove Admins.ini
- .Open admins file: $iif($exists(Admins.ini),run Admins.ini,echo -a There is no admins.)
- .Styles dialog: dialog -m styless styless
- }
- on ^*:notice:*:?:{
- if ($nick == Q) {
- haltdef
- if (%floodnick) {
- if (%floodis <= 4) || (!%floodis) {
- Ctl %floodnick $1- | inc -u4 %floodis
- }
- }
- }
- }
- on *:part:%Channel: {
- if ($Admins($right($wildsite,-4)).logged) { Ctl $nick You have been disconnected from admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) Reason: Part ( $+ $wildsite $+ ) | Ctl # $nick has been disconnected from admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) Reason: Part ( $+ $wildsite $+ ) | remini Admins.ini $Admins($right($wildsite,-4)).user Logged }
- if ($checkreg($nick)) { write -dl $+ $v1 regs.txt | .timer 1 1 totalusr }
- }
- on *:quit: {
- if ($Admins($right($wildsite,-4)).logged) { Ctl %Channel $nick has been disconnected from admin account. User: $Admins($right($wildsite,-4)).user $+ $Chr(44) Reason: Quit ( $+ $wildsite $+ ) | remini Admins.ini $Admins($right($wildsite,-4)).user Logged }
- if ($checkreg($nick)) { write -dl $+ $v1 regs.txt | .timer 1 1 totalusr }
- }
- on *:kick:%Channel: {
- if ($Admins($right($address($knick,2),-4)).logged) { Ctl # $knick has been disconnected from admin account. User: $Admins($right($address($knick,2),-4)).user $+ $Chr(44) Reason: Kick ( $+ $address($knick,2) $+ ) | Ctl $knick You have been disconnected from admin account. User: $Admins($right($address($knick,2),-4)).user $+ $Chr(44) Reason: Kick ( $+ $address($knick,2) $+ ) | remini Admins.ini $Admins($right($address($knick,2),-4)).user Logged }
- if ($checkreg($knick)) { write -dl $+ $v1 regs.txt | .timer 1 1 totalusr }
- }
- on *:nick: {
- if ($nick == %C.Admin) { set %C.admin $newnick }
- if ($checkreg($nick)) { write -l $+ $v1 regs.txt $newnick }
- }
- ;; dialogs
- on *:dialog:artlot*:*:*:{
- if ($devent == init) {
- if (sty isin $dname) && (%dstyle) { did -c $dname %dstyle | halt }
- did -a $DName 25 %Channel
- did -a $DName 26 %C.prize
- did -a $DName 27 %C.MAX
- did -a $DName 28 %Cign
- did -a $DName 29 %C.admin
- did -a $DName 30 %C.tag
- did -a $DName 20 %C.blocktag
- did -a $DName 35 %C.MahurWin
- if (%C.Mahur) { did -c $DName 34 }
- else { did -b $DName 35 }
- if (%C.Blocktagstatus) { did -c $DName 21 }
- else { did -c $DName 23 | did -b $DName 20 }
- var %o = 1
- }
- if ($devent == sclick) {
- if (sty isin $dname) && ($did isnum 1-15) && ($did($did).state) { set %dstyle $did | setstyle $did | halt }
- If ($Did == 21) && ($did(21).state) { inc %C.Blocktagstatus | did -e $DName 20 }
- If ($Did == 23) && ($did(23).state) { unset %C.Blocktagstatus | did -b $DName 20 }
- If ($Did == 34) {
- if ($did(34).state) { inc %C.Mahur | did -e $DName 35 }
- else { unset %C.Mahur | did -b $DName 35 }
- }
- If ($Did == 31) {
- if (#* iswm $did(25)) { set %Channel $did(25) }
- if ($did(26)) { set %C.prize $did(26) }
- if ($did(27)) { set %C.MAX $did(27) }
- if ($did(28)) { set %Cign $did(28) }
- if ($did(29)) { set %C.Admin $did(29) }
- if ($did(30)) { set %C.tag $did(30) }
- if ($did(20)) { set %C.blocktag $did(20) }
- if ($did(35)) { set %C.MahurWin $did(35) }
- }
- If ($Did == 32) { dialog $iif($dialog(artlot.style),-v artlot.style,-m artlot.style artlot.style) }
- If ($Did == 4) {
- if (%C.status) { Ctle Lottery is already running. }
- else { LotterySTART }
- }
- If ($Did == 5) {
- if (%C.status) { LotterySTOP }
- else { Ctle Lottery is not running. }
- }
- If ($Did == 6) {
- if (%C.NewWinnerCan) { LotteryNewWinner }
- else { Ctle Lottery new winner time has left }
- }
- }
- }
- dialog artlot.style {
- title "Styles"
- size -1 -1 58 72
- option dbu notheme
- radio "1", 1, 7 16 15 10, push
- text "Styles", 22, 0 5 58 8, center
- radio "2", 2, 22 16 15 10, push
- radio "3", 3, 37 16 15 10, push
- radio "4", 4, 7 26 15 10, push
- radio "5", 5, 22 26 15 10, push
- radio "6", 6, 37 26 15 10, push
- radio "7", 7, 7 36 15 10, push
- radio "8", 8, 22 36 15 10, push
- radio "9", 9, 37 36 15 10, push
- radio "10", 10, 7 46 15 10, push
- radio "11", 11, 22 46 15 10, push
- radio "12", 12, 37 46 15 10, left push
- radio "13", 13, 7 56 15 10, left push
- radio "14", 14, 22 56 15 10, left push
- radio "15", 15, 37 56 15 10, left push
- }
- dialog artlot {
- 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 "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
- }
- ;; aliases
- alias lflood inc -u3 %flood
- alias Nickregistered write regs.txt $nick | Ctl # $nick $+ $chr(44) You have successfully registered to the lottery. ( $+ $lines(regs.txt) $+ / $+ %C.MAX $+ %Color1 $+ )
- alias LotteryON return Lottery is ON $+ $chr(44) the prize is %C.prize $+ ! There are $lines(regs.txt) registered users out of %C.MAX $+ .
- alias LotteryON2 return To enter the lottery use $cmd(Reg) $+ .
- alias LotteryOFF return Lottery is not running right now $+ $chr(44) last lottery was started at %C.Time $+ , %C.Date $+ .
- alias cmd if ($1) return %Color2 $+ %Cign $+ %Color1 $+ $1
- alias nCtl notice $1 %Ctyle1 %Color1 $+ 1 $+ $2- %Ctyle2
- alias totalusr if (!%flood) { Ctl # Total registered users: $lines(regs.txt) $+ / $+ %C.MAX | inc -u3 %flood }
- alias Ctl .msg $1 %Ctyle1 %Color1 $+ $2- %Ctyle2
- alias Ctle echo -a %Ctyle1 %Color1 $+ $1- %Ctyle2
- alias setWinner set -u3 %C.Winner $read(regs.txt)
- alias NewWinnerSet set -u20 %C.NewWinner $read(regs.txt)
- alias NewSetWinner {
- set -u400 %C.NewRegs %C.Regs
- set -u400 %C.NewMAX %C.MAX
- inc -u400 %C.NewWinnerCan
- }
- alias checkreg {
- if ($1) {
- var %x 1
- while (%x <= $lines(regs.txt)) {
- if ($1 == $read(regs.txt,%x)) { return %x | break }
- inc %x
- }
- }
- }
- alias artregs {
- unset %timer
- var %x 1,%k 1,%t
- while (%x <= $lines(regs.txt)) {
- var %t %t $read(regs.txt,%x) | inc %x | inc %k
- if (%k == 15) { inc %timer | .timer 1 $calc(%timer *5) Ctl # $replace(%t,$chr(32),$+($chr(44),$chr(32))) | var %k $null,%t $null }
- }
- if ($calc($lines(regs.txt) - %x) < 15) { inc %timer | .timer 1 $calc(%timer *5) Ctl # $replace(%t,$chr(32),$+($chr(44),$chr(32))) }
- inc $(-u $+ $calc(%timer *5 +5)) %flood
- .timer 1 $calc(%timer *5 +5) mode # -m
- unset %timer
- }
- alias SetStyle {
- goto $1
- :1 | Set %Ctyle1 8,1[15? | Set %Ctyle2 15,1?8,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :2 | Set %Ctyle1 12,1[15? | Set %Ctyle2 15,1?12,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :3 | Set %Ctyle1 9,1[15? | Set %Ctyle2 15,1?9,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :4 | Set %Ctyle1 10,1[15? | Set %Ctyle2 15,1?10,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :5 | Set %Ctyle1 4,1[15? | Set %Ctyle2 15,1?4,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :6 | Set %Ctyle1 7,1[15? | Set %Ctyle2 15,1?7,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :7 | Set %Ctyle1 | Set %Ctyle2 | Set %Color1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :8 | Set %Ctyle1 12,1[8? | Set %Ctyle2 8,1?12,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :9 | Set %Ctyle1 8,1[4? | Set %Ctyle2 4,1?8,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :10 | Set %Ctyle1 14,1[07? | Set %Ctyle2 7,1?14,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :11 | Set %Ctyle1 14,1[10? | Set %Ctyle2 10,1?14,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :12 | Set %Ctyle1 14,1[4? | Set %Ctyle2 4,1?14,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :13 | Set %Ctyle1 14,1[6? | Set %Ctyle2 6,1?14,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :14 | Set %Ctyle1 14,1[3? | Set %Ctyle2 3,1?14,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- :15 | Set %Ctyle1 14,1[9? | Set %Ctyle2 9,1?14,1] | Set %Color1 0,1 | Ctle - $+ $1 $+ - Bot: $+ %Color1 by Arthas | halt
- }
- alias LotteryNewWinner {
- NewWinnerSet
- mode %Channel +m
- timer 1 1 Ctl %Channel The new winner is now being randomly selected please wait...
- timer 1 7 Ctl %Channel The winner has been chosen.
- timer 1 8 Ctl %Channel And the new winner is...
- timer 1 12 Ctl %Channel The new winner is %C.NewWinner $+ .
- timer 1 13 Ctl %Channel You won a %C.Prize $+ .
- timer 1 14 Ctl %Channel The lottery ended.
- timer 1 14 Ctl %C.NewWinner You won at %Channel 's lottery $+ $chr(44) in the next minutes the admin of the lottery will contact You and You will get Your prize. ( $+ %C.prize $+ )
- unset %c.status
- timer 1 15 mode %Channel -m
- }
- alias LotteryEND {
- NewSetWinner
- setWinner
- var %win $iif(%C.Mahur,%C.MahurWin,%C.Winner)
- mode %Channel +m
- timer 1 1 Ctl %Channel The winner is now being randomly selected please wait...
- timer 1 7 Ctl %Channel The winner has been chosen.
- timer 1 8 Ctl %Channel And the winner is...
- timer 1 12 Ctl %Channel The winner is %win $+ .
- timer 1 13 Ctl %Channel You won a %C.Prize $+ .
- timer 1 14 Ctl %Channel The lottery ended.
- timer 1 14 Ctl %win You won at %Channel 's lottery $+ $chr(44) in the next minutes the admin of the lottery will contact You and You will get Your prize. ( $+ %C.prize $+ )
- unset %C.status
- remove regs.txt
- unset %C.Winner
- unset %C.MahurWin
- timer 1 15 mode %Channel -m
- }
- alias LotterySTART {
- timers off
- inc %C.status
- inc %C.number
- set %C.Time $time
- set %C.Date $date
- mode %Channel +m
- timer 1 1 Ctl %Channel Starting the lottery number %Color2 $+ %C.number $+ %Color1 $+ .
- timer 1 2 Ctl %Channel Max users: %Color2 $+ %C.Max $+ %Color1 $+ $chr(44) Prize: %Color2 $+ %C.Prize $+ %Color1 $+ .
- timer 1 3 Ctl %Channel Commands are $cmd(Reg) $+ $chr(44) $cmd(Del) & $cmd(Regs) $+ .
- timer 1 14 mode %Channel -m
- }
- alias LotterySTOP {
- unset %C.status
- remove regs.txt
- unset %C.Winner
- Ctl %Channel Lottery number %Color2 $+ %C.number $+ %Color1 stopped $+ $iif($nick !== $me,$chr(32) $+ by $nick) $+ .
- }
- ;; menu
- menu * {
- Lottery dialog: dialog -m artlot artlot
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement