Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON !*:TEXT:*:#: {
- tokenize 32 $strip($1-,burci)
- if ($1 == !bet) {
- if (!$check_mod($nick,$chan)) { .msg $chan ( $+ $nick $+ ): Error, You are NOT an channel moderator! | return }
- if (!$2) { .msg $chan ( $+ $nick $+ ): Error, Try again and enter the correct value, more info at !bethelp | return }
- if ($2 == open) || ($2 == start) || ($2 == on) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (%bet) { .msg $chan ( $+ $nick $+ ): Error, There is already an BET running try again later or use !bet stop to stop the bet! | return }
- set -e %bet $nick $chan
- .msg $chan ( $+ $nick $+ ): The BET has been started, use now !beton 1 or !beton 2 to enter the bet.
- }
- if ($2 == stop) || ($2 == end) || ($2 == off) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- unset %bet_win %bet_lose %bet %bet_pause
- .msg $chan ( $+ $nick $+ ): The BET has been stopped.
- }
- if ($2 == resume) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- if (!%bet_pause) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any bet paused since now! | return }
- unset %bet_pause
- .msg $chan ( $+ $nick $+ ): The BET has been resumed.
- }
- if ($2 == pause) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- if (%bet_pause) { .msg $chan ( $+ $nick $+ ): Error, The BET is already paused! | return }
- set -e %bet_pause $nick
- .msg $chan ( $+ $nick $+ ): The BET has been paused.
- }
- if ($2 == result) || ($2 == results) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- if (!$3) { .msg $chan ( $+ $nick $+ ): Error, Try again and enter the result win or lose . | return }
- if ($3 == 1) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- .msg $chan ( $+ $nick $+ ) The BET has been stopped to option 1..
- if (!%bet_win) { .msg $chan ( $+ $nick $+ ): There is NOT any user bet at 1. }
- elseif (%bet_win) { .msg $chan ( $+ $nick $+ ): The BET nick(s) are %bet_win - (Total: $numtok(%bet_win,44) $+ ) }
- if (%bet_lose) { bet_delpoints $chan %bet_lose }
- unset %bet_win %bet_lose %bet %bet_pause
- }
- if ($3 == 2) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- .msg $chan ( $+ $nick $+ ) The BET has been stopped to option 2..
- if (!%bet_lose) { .msg $chan ( $+ $nick $+ ): There is NOT any user bet at 2. }
- elseif (%bet_lose) { .msg $chan ( $+ $nick $+ ): The BET nick(s) are %bet_lose - (Total: $numtok(%bet_lose,44) $+ ) }
- if (%bet_win) { bet_addpoints $chan %bet_win }
- unset %bet_win %bet_lose %bet %bet_pause
- }
- }
- }
- if ($1 == !beton) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- if (%bet_pause) { return }
- if ($2 == 1) {
- if ($istok(%bet_win,$nick,44)) { .msg $chan ( $+ $nick $+ ): Error, You have already bet at 1! | return }
- if ($istok(%bet_lose,$nick,44)) { set -e %bet_lose $remtok(%bet_lose,$nick,1,44) | var %ch = 1 }
- set -e %bet_win $addtok(%bet_win,$nick,44)
- .msg $chan ( $+ $nick $+ ): You $iif(%ch,have change your,have) bet at 1. - Good luck!
- }
- elseif ($2 == 2) {
- if ($istok(%bet_lose,$nick,44)) { .msg $chan ( $+ $nick $+ ): Error, You have already bet at 2! | return }
- if ($istok(%bet_win,$nick,44)) { set -e %bet_win $remtok(%bet_win,$nick,1,44) | var %ch = 1 }
- set -e %bet_lose $addtok(%bet_lose,$nick,44)
- .msg $chan ( $+ $nick $+ ): You $iif(%ch,have change your,have) bet at 2. - Good luck!
- }
- }
- if ($1 == !remove) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- if (%bet_pause) { return }
- if ($istok(%bet_lose,$nick,44)) { set -e %bet_lose $remtok(%bet_lose,$nick,1,44) | .msg $chan ( $+ $nick $+ ): You have been removed from the bet at 2! }
- elseif ($istok(%bet_win,$nick,44)) { set -e %bet_win $remtok(%bet_win,$nick,1,44) | .msg $chan ( $+ $nick $+ ): You have been removed from the bet at 1! }
- else { .msg $chan ( $+ $nick $+ ): Error, You have NOT bet yet! }
- }
- if ($1 == !results) || ($1 == !stats) {
- if (!$check_mod($nick,$chan)) { .msg $chan ( $+ $nick $+ ): Error, You are NOT an channel moderator! | return }
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- if (%bet_pause) { return }
- .msg $chan ( $+ $nick $+ ): Bet(s) at 1: $iif(%bet_win,$numtok(%bet_win,44),0)
- .msg $chan ( $+ $nick $+ ): Bet(s) at 2: $iif(%bet_lose,$numtok(%bet_lose,44),0)
- .msg $chan ( $+ $nick $+ ): Total Bet(s): $calc($iif(%bet_win,$numtok(%bet_win,44),0) + $iif(%bet_lose,$numtok(%bet_lose,44),0))
- }
- if ($1 == !mybet) {
- if (%bet) && ($gettok(%bet,2,32) !== $chan) { return }
- if (!%bet) { .msg $chan ( $+ $nick $+ ): Error, There is NOT any BET running try again later or use !bet open to start a new bet! | return }
- if (%bet_pause) { return }
- if ($istok(%bet_lose,$nick,44)) { .msg $chan ( $+ $nick $+ ): You have bet at lose! }
- elseif ($istok(%bet_win,$nick,44)) { .msg $chan ( $+ $nick $+ ): You have bet at win! }
- else { .msg $chan ( $+ $nick $+ ): Error, You have NOT bet yet! }
- }
- if ($1 == !bethelp) { .msg $chan ( $+ $nick $+ ): BET Commands are: !Bet open - !Bet stop - !Bet pause - !Bet resume - !Bet result 1/2 - !Beton 1 - !Beton 2 - !remove - !results - !mybet }
- }
- alias check_mod {
- if (!$1) { return }
- if (!$2) { return }
- if ($me !ison $2) { return 0 }
- if ($1 !ison $2) { return 0 }
- var %f = mods.txt
- if (!$isfile(%f)) { return 0 }
- if (!$lines(%f)) { return 0 }
- var %r = $read(%f,nw,$1)
- if (%r) { return 1 }
- elseif (!%r) { return 0 }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement