Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias pollset {
- /timer 11:00 1 1 /newpoll Netherlands Chile
- /timer 15:00 1 1 /newpoll Croatia Mexico
- ;/timer 15:00 1 1 /newpoll Cameroon Brazil
- }
- alias newpoll {
- if ($2) {
- unset %vote*
- set %vote1_name $1 | set %vote2_name $2-
- set %vote1 0 | set %vote2 0 | set %vote3 0
- /timer 1 $calc(30*60) /msg #worldcup 0430 minutes till the match!! 12Who will win? 4Vote using .vote $+(<,%vote1_name,|Draw|,%vote2_name,>)
- /timer 1 $calc(55*60) /msg #worldcup 045 minutes till the match!! 12Who will win? 4Vote using .vote $+(<,%vote1_name,|Draw|,%vote2_name,>) 12(Voting ends in 15mins)
- /timer 1 $calc(68*60) /msg #worldcup 04Gentleman, place your final bets. 12Last call for votes.
- /timer 1 $calc(70*60) /endpoll
- set %poll on
- msg #worldcup 4New poll: Who will win %vote1_name or %vote2_name $+ ? - Vote using .vote $+(<,%vote1_name,|Draw|,%vote2_name,>)
- }
- }
- on $*:text:/^[!.](vote)(\s|$)/Si:#worldcup: {
- if ($($+(%,botflood.,$nick),2)) {
- if ($($+(%,botflood.,$nick),2) >= 50) {
- ignore -u60 $address($nick,2)
- msg $chan $+($nick,$chr(44)) You have been put on ignore for 60secs for abusing the bot.
- halt
- }
- elseif ($($+(%,botflood.,$nick),2) >= 40) {
- msg $chan $+($nick,$chr(44)) Please do not flood the bot.
- inc -z $+(%,botflood.,$nick) 20
- halt
- }
- else { inc -z $+(%,botflood.,$nick) 25 }
- }
- else { inc -z $+(%,botflood.,$nick) 25 }
- if (%poll == off) {
- if (%pollflood != true) {
- msg $chan 4Poll Closed - Results: $poll
- set -u30 %pollflood true
- }
- halt
- }
- if ($istok(%voted,$address($nick,2),44)) {
- msg $chan Sorry $nick $+ , you have already voted on this match.
- }
- else {
- if (($2 isin %vote1_name) || ($2 isin %vote2_name) || ($2 == Draw)) {
- if ($2 isin %vote1_name) { inc %vote1 }
- elseif ($2 isin %vote2_name) { inc %vote2 }
- elseif ($2 isin Draw) { inc %vote3 }
- set %voted $addtok(%voted,$address($nick,2),44)
- msg $chan $poll
- }
- else {
- msg $chan $nick $+ , try .vote $+(<,%vote1_name,|Draw|,%vote2_name,>)
- }
- }
- }
- on *:input:#worldcup: {
- if (($1 == .vote) || ($1 == !vote)) {
- if (($2 isin %vote1_name) || ($2 isin %vote2_name) || ($2 == Draw)) {
- if ($2 isin %vote1_name) { inc %vote1 }
- elseif ($2 isin %vote2_name) { inc %vote2 }
- elseif ($2 == Draw) { inc %vote3 }
- set %voted $addtok(%voted,$address($nick,2),44)
- .timer -m 1 100 msg $chan $poll
- }
- }
- }
- on $*:text:/^[!.](poll)(\s|$)/Si:#worldcup: {
- if ($($+(%,botflood.,$nick),2)) {
- if ($($+(%,botflood.,$nick),2) >= 50) {
- ignore -u60 $address($nick,2)
- msg $chan $+($nick,$chr(44)) You have been put on ignore for 60secs for abusing the bot.
- halt
- }
- elseif ($($+(%,botflood.,$nick),2) >= 40) {
- msg $chan $+($nick,$chr(44)) Please do not flood the bot.
- inc -z $+(%,botflood.,$nick) 20
- halt
- }
- else { inc -z $+(%,botflood.,$nick) 25 }
- }
- else { inc -z $+(%,botflood.,$nick) 25 }
- msg $chan 4 $+ $iif(%poll == on,Current poll:,Final Poll Results:) $poll
- }
- alias endpoll {
- set %poll off
- msg #worldcup Final Poll Results: $+(3,%vote1_name,:) %vote1 $percent(%vote1) - $+(4,%vote2_name,:) %vote2 $percent(%vote2) - 7Draw: %vote3 $percent(%vote3)
- }
- alias poll {
- return Who will win? $+(3,%vote1_name,:) %vote1 $percent(%vote1) - $+(4,%vote2_name,:) %vote2 $percent(%vote2) - 7Draw: %vote3 $percent(%vote3)
- }
- alias percent {
- var %votes $calc(%vote1 + %vote2 + %vote3)
- return $+($chr(40),$gettok($calc($calc($1 / %votes) * 100),1,$asc(.)),%,$chr(41),)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement