Charmander

TITLE

Aug 23rd, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. on *:text:*!vote*:#: {
  2. if (%witty.stage == vote) {
  3. if ($2 isnum 1-) {
  4. if ($2 <= %witty.number) {
  5. var %witty.vote $2
  6. }
  7. }
  8. else {
  9. msg $nick Syntax is vote #
  10. halt
  11. }
  12. tokenize 32 %witty.answer [ $+ [ $2 ] ]
  13. if ($nick == $1) {
  14. msg $nick You can't vote for yourself!
  15. halt
  16. }
  17. if (!$findtok(%witty.voted,$nick,1,32) && $findtok(%witty.answered,$nick,1,32)) {
  18. set %witty.voted %witty.voted $nick
  19. set %witty.votes [ $+ [ %witty.vote ] ] %witty.votes [ $+ [ %witty.vote ] ] $nick
  20. msg $nick You voted for $+(04,%witty.vote,!)
  21. }
  22. }
  23. }
  24. on *:text:*!wittyend*:#: {
  25. if (($nick == firecape) && (%witty.witty == on) && ($me == firebot)) {
  26. msg $chan witty has been ended.
  27. unset %witty.*
  28. unset %a.witty
  29. .timers off
  30. halt }
  31. elseif (($nick == wildeep) && (%witty.witty == on) && ($me == firebot)) {
  32. msg $chan witty has been ended.
  33. unset %witty.*
  34. unset %a.witty
  35. .timers off
  36. halt }
  37. elseif (($nick == ditto) && (%witty.witty == on) && ($me == firebot)) {
  38. msg $chan witty has been ended.
  39. unset %witty.*
  40. unset %a.witty
  41. .timers off
  42. halt }
  43. elseif (($nick == tennisace) && (%witty.witty == on) && ($me == firebot)) {
  44. msg $chan witty has been ended.
  45. unset %witty.*
  46. unset %a.witty
  47. .timers off
  48. halt }
  49. elseif (($nick == nexus) && (%witty.witty == on) && ($me == firebot)) {
  50. msg $chan witty has been ended
  51. unset %witty.*
  52. unset %a.witty
  53. .timers off
  54. halt }
  55. elseif (($nick == matthew) && (%witty.witty == on) && ($me == firebot)) {
  56. msg $chan witty has been ended.
  57. unset %witty.*
  58. unset %a.witty
  59. .timers off
  60. halt }
  61. }
  62. on *:text:!next:#: {
  63. if (($nick == firecape) && (%witty.witty == on) && ($me == firebot)) {
  64. msg $chan 0,1Ok fine...
  65. wittygame $chan }
  66. elseif (($nick == wildeep) && (%witty.witty == on) && ($me == firebot)) {
  67. msg $chan 0,1Ok fine...
  68. wittygame $chan }
  69. elseif (($nick == ditto) && (%witty.witty == on) && ($me == firebot)) {
  70. msg $chan 0,1Ok fine...
  71. wittygame $chan }
  72. elseif (($nick == tennisace) && (%witty.witty == on) && ($me == firebot)) {
  73. msg $chan 0,1Ok fine...
  74. wittygame $chan }
  75. elseif (($nick == nexus) && (%witty.witty == on) && ($me == firebot)) {
  76. msg $chan 0,1Ok fine...
  77. wittygame $chan }
  78. elseif (($nick == matthew) && (%witty.witty == on) && ($me == firebot)) {
  79. msg $chan 0,1Ok fine...
  80. wittygame $chan }
  81. }
  82. on *:text:!witty:#: {
  83. if ((%witty.witty != on) && ($me == firebot)) {
  84. set %a.witty 1
  85. wittygame $chan
  86. }
  87. }
  88. alias wittygame {
  89. .timers off
  90. unset %witty.*
  91. set %witty.chan $$1
  92. set %witty.witty on
  93. if (%a.witty == 1) {
  94. msg %witty.chan 0,1A new game begins! }
  95. if (%a.witty < 6) {
  96. msg %witty.chan 0,1Round %a.witty out of 5 begins! }
  97. if (%a.witty == 6) {
  98. msg %witty.chan 0,1Game over, round 5 reached!
  99. msg %witty.chan 0,1Calculating winner...
  100. msg %witty.chan 0,1firecape wins!
  101. unset %witty.*
  102. unset %a.witty
  103. .timers off
  104. halt }
  105. msg %witty.chan 0,1Get ready...
  106. set %witty.prompt $read(prompts.txt)
  107. msg %witty.chan 4,1Prompt:4,1 8,1 $+ %witty.prompt
  108. msg %witty.chan 0,1You have 60 seconds to come up with an answer!
  109. set %witty.stage answer
  110. .timer 1 60 endanswer
  111. .timer 1 30 /msg %witty.chan 0,1Hurry up! 30 seconds left!
  112. }
  113. on *:text:*:?: {
  114. if ($me != firebot) {
  115. halt
  116. }
  117. if ($1 == wittysubmission: && %witty.stage != answer) {
  118. msg firecape firecape, $nick has submitted $+(",$2-,") as a witty prompt
  119. msg $nick Thank you, your submission will be reviewed and then added if you are not a retard.
  120. }
  121. if (%witty.stage == answer) {
  122. if ($nick !isin %witty.gaveanswer) {
  123. inc %witty.number
  124. set %witty.answer [ $+ [ %witty.number ] ] $nick $1-
  125. msg %witty.chan $+([,%witty.number,]) was submitted.
  126. msg $nick The answer $+(04,$1-,) was submitted.
  127. set %witty.gaveanswer %witty.gaveanswer $nick
  128. }
  129. else {
  130. set %witty.mexico 1
  131. while (%witty.mexico <= $var(%witty.answer*,0)) {
  132. if ($gettok($var(%witty.answer*,%witty.mexico).value,1,32) == $nick) {
  133. set $var(%witty.answer*,%witty.mexico) $nick $1-
  134. msg $nick Your submission was changed to 04 $+ $1- $+ .
  135. }
  136. inc %witty.mexico
  137. }
  138. unset %witty.mexico
  139. }
  140. }
  141. if (%witty.stage == vote) {
  142. if ($2 isnum 1-) {
  143. if ($2 <= %witty.number) {
  144. var %witty.vote $2
  145. }
  146. }
  147. else {
  148. msg $nick Syntax is vote #
  149. halt
  150. }
  151. tokenize 32 %witty.answer [ $+ [ $2 ] ]
  152. if ($nick == $1) {
  153. msg $nick You can't vote for yourself!
  154. halt
  155. }
  156. if (!$findtok(%witty.voted,$nick,1,32) && $findtok(%witty.gaveanswer,$nick,1,32)) {
  157. set %witty.voted %witty.voted $nick
  158. set %witty.votes [ $+ [ %witty.vote ] ] %witty.votes [ $+ [ %witty.vote ] ] $nick
  159. msg $nick You voted for $+(04,%witty.vote,!)
  160. }
  161. }
  162. }
  163. alias endanswer {
  164. if (%witty.number >= 3) {
  165. msg %witty.chan Time is up...
  166. msg %witty.chan 4,1Prompt:4,1 8,1 $+ %witty.prompt
  167. set %witty.count 1
  168. while (%witty.count <= %witty.number) {
  169. tokenize 32 %witty.answer [ $+ [ %witty.count ] ]
  170. msg %witty.chan $+([,%witty.count,]) $+ $2-
  171. inc %witty.count
  172. }
  173. set %witty.stage vote
  174. msg %witty.chan 0,1 $+ Please start voting for the best candidate! You have 60 seconds to vote!
  175. .timer 1 60 endvote
  176. .timer 1 30 /msg %witty.chan Hurry up! Only 30 seconds left to vote!
  177. }
  178. else {
  179. msg %witty.chan 0,1 $+ Three people required to play witty, game over.
  180. unset %witty.*
  181. unset %a.witty
  182. }
  183. }
  184. alias endvote {
  185. if ($me != firebot) { halt }
  186. unset %witty.stage
  187. msg %witty.chan 0,1Voting is over.
  188. msg %witty.chan 4,1Prompt:4,1 8,1 $+ %witty.prompt
  189. set %witty.count 1
  190. while (%witty.count <= %witty.number) {
  191. tokenize 32 %witty.answer [ $+ [ %witty.count ] ]
  192. inc %witty.points [ $+ [ $nick ] ] $numtok(%witty.votes [ $+ [ %witty.count ] ],32)
  193. msg %witty.chan $+([,%witty.count,],[,$1,]) $2- : $iif($1 isin %witty.voted,$numtok(%witty.votes [ $+ [ %witty.count ] ],32),0)
  194. inc %witty.count }
  195. if (%witty.number > %record.witty) {
  196. set %record.witty %witty.number
  197. msg %witty.chan 4New record of %record.witty submissions!
  198. }
  199. set %a.witty $calc(%a.witty + 1)
  200. wittygame %witty.chan
  201. }
Advertisement
Add Comment
Please, Sign In to add comment