Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:*!vote*:#: {
- if (%witty.stage == vote) {
- if ($2 isnum 1-) {
- if ($2 <= %witty.number) {
- var %witty.vote $2
- }
- }
- else {
- msg $nick Syntax is vote #
- halt
- }
- tokenize 32 %witty.answer [ $+ [ $2 ] ]
- if ($nick == $1) {
- msg $nick You can't vote for yourself!
- halt
- }
- if (!$findtok(%witty.voted,$nick,1,32) && $findtok(%witty.answered,$nick,1,32)) {
- set %witty.voted %witty.voted $nick
- set %witty.votes [ $+ [ %witty.vote ] ] %witty.votes [ $+ [ %witty.vote ] ] $nick
- msg $nick You voted for $+(04,%witty.vote,!)
- }
- }
- }
- on *:text:*!wittyend*:#: {
- if (($nick == firecape) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan witty has been ended.
- unset %witty.*
- unset %a.witty
- .timers off
- halt }
- elseif (($nick == wildeep) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan witty has been ended.
- unset %witty.*
- unset %a.witty
- .timers off
- halt }
- elseif (($nick == ditto) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan witty has been ended.
- unset %witty.*
- unset %a.witty
- .timers off
- halt }
- elseif (($nick == tennisace) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan witty has been ended.
- unset %witty.*
- unset %a.witty
- .timers off
- halt }
- elseif (($nick == nexus) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan witty has been ended
- unset %witty.*
- unset %a.witty
- .timers off
- halt }
- elseif (($nick == matthew) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan witty has been ended.
- unset %witty.*
- unset %a.witty
- .timers off
- halt }
- }
- on *:text:!next:#: {
- if (($nick == firecape) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan 0,1Ok fine...
- wittygame $chan }
- elseif (($nick == wildeep) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan 0,1Ok fine...
- wittygame $chan }
- elseif (($nick == ditto) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan 0,1Ok fine...
- wittygame $chan }
- elseif (($nick == tennisace) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan 0,1Ok fine...
- wittygame $chan }
- elseif (($nick == nexus) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan 0,1Ok fine...
- wittygame $chan }
- elseif (($nick == matthew) && (%witty.witty == on) && ($me == firebot)) {
- msg $chan 0,1Ok fine...
- wittygame $chan }
- }
- on *:text:!witty:#: {
- if ((%witty.witty != on) && ($me == firebot)) {
- set %a.witty 1
- wittygame $chan
- }
- }
- alias wittygame {
- .timers off
- unset %witty.*
- set %witty.chan $$1
- set %witty.witty on
- if (%a.witty == 1) {
- msg %witty.chan 0,1A new game begins! }
- if (%a.witty < 6) {
- msg %witty.chan 0,1Round %a.witty out of 5 begins! }
- if (%a.witty == 6) {
- msg %witty.chan 0,1Game over, round 5 reached!
- msg %witty.chan 0,1Calculating winner...
- msg %witty.chan 0,1firecape wins!
- unset %witty.*
- unset %a.witty
- .timers off
- halt }
- msg %witty.chan 0,1Get ready...
- set %witty.prompt $read(prompts.txt)
- msg %witty.chan 4,1Prompt:4,1 8,1 $+ %witty.prompt
- msg %witty.chan 0,1You have 60 seconds to come up with an answer!
- set %witty.stage answer
- .timer 1 60 endanswer
- .timer 1 30 /msg %witty.chan 0,1Hurry up! 30 seconds left!
- }
- on *:text:*:?: {
- if ($me != firebot) {
- halt
- }
- if ($1 == wittysubmission: && %witty.stage != answer) {
- msg firecape firecape, $nick has submitted $+(",$2-,") as a witty prompt
- msg $nick Thank you, your submission will be reviewed and then added if you are not a retard.
- }
- if (%witty.stage == answer) {
- if ($nick !isin %witty.gaveanswer) {
- inc %witty.number
- set %witty.answer [ $+ [ %witty.number ] ] $nick $1-
- msg %witty.chan $+([,%witty.number,]) was submitted.
- msg $nick The answer $+(04,$1-,) was submitted.
- set %witty.gaveanswer %witty.gaveanswer $nick
- }
- else {
- set %witty.mexico 1
- while (%witty.mexico <= $var(%witty.answer*,0)) {
- if ($gettok($var(%witty.answer*,%witty.mexico).value,1,32) == $nick) {
- set $var(%witty.answer*,%witty.mexico) $nick $1-
- msg $nick Your submission was changed to 04 $+ $1- $+ .
- }
- inc %witty.mexico
- }
- unset %witty.mexico
- }
- }
- if (%witty.stage == vote) {
- if ($2 isnum 1-) {
- if ($2 <= %witty.number) {
- var %witty.vote $2
- }
- }
- else {
- msg $nick Syntax is vote #
- halt
- }
- tokenize 32 %witty.answer [ $+ [ $2 ] ]
- if ($nick == $1) {
- msg $nick You can't vote for yourself!
- halt
- }
- if (!$findtok(%witty.voted,$nick,1,32) && $findtok(%witty.gaveanswer,$nick,1,32)) {
- set %witty.voted %witty.voted $nick
- set %witty.votes [ $+ [ %witty.vote ] ] %witty.votes [ $+ [ %witty.vote ] ] $nick
- msg $nick You voted for $+(04,%witty.vote,!)
- }
- }
- }
- alias endanswer {
- if (%witty.number >= 3) {
- msg %witty.chan Time is up...
- msg %witty.chan 4,1Prompt:4,1 8,1 $+ %witty.prompt
- set %witty.count 1
- while (%witty.count <= %witty.number) {
- tokenize 32 %witty.answer [ $+ [ %witty.count ] ]
- msg %witty.chan $+([,%witty.count,]) $+ $2-
- inc %witty.count
- }
- set %witty.stage vote
- msg %witty.chan 0,1 $+ Please start voting for the best candidate! You have 60 seconds to vote!
- .timer 1 60 endvote
- .timer 1 30 /msg %witty.chan Hurry up! Only 30 seconds left to vote!
- }
- else {
- msg %witty.chan 0,1 $+ Three people required to play witty, game over.
- unset %witty.*
- unset %a.witty
- }
- }
- alias endvote {
- if ($me != firebot) { halt }
- unset %witty.stage
- msg %witty.chan 0,1Voting is over.
- msg %witty.chan 4,1Prompt:4,1 8,1 $+ %witty.prompt
- set %witty.count 1
- while (%witty.count <= %witty.number) {
- tokenize 32 %witty.answer [ $+ [ %witty.count ] ]
- inc %witty.points [ $+ [ $nick ] ] $numtok(%witty.votes [ $+ [ %witty.count ] ],32)
- msg %witty.chan $+([,%witty.count,],[,$1,]) $2- : $iif($1 isin %witty.voted,$numtok(%witty.votes [ $+ [ %witty.count ] ],32),0)
- inc %witty.count }
- if (%witty.number > %record.witty) {
- set %record.witty %witty.number
- msg %witty.chan 4New record of %record.witty submissions!
- }
- set %a.witty $calc(%a.witty + 1)
- wittygame %witty.chan
- }
Advertisement
Add Comment
Please, Sign In to add comment