Guest User

AllDayGrinding's Chat bot code

a guest
May 15th, 2014
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.83 KB | None | 0 0
  1. on $*:text:/^!commandadd !?(\S+)/iS:#test:{
  2. if ($nick !isop #) return
  3. writeini commands.ini commands $regml(1) $$3-
  4. }
  5.  
  6. on $*:text:/^!commandremove !?(\S+)/iS:#test:{
  7. if ($nick !isop #) return
  8. remini commands.ini commands $regml(1)
  9. }
  10.  
  11. on $*:text:/^!repeat !?(\S+) (off|\d+)/iS:#test:{
  12. if ($nick !isop #) return
  13.  
  14. var %command = $regml(1), %interval = $regml(2)
  15.  
  16. if ($timer(command. $+ %command)) {
  17. if (%interval == off) .timercommand. $+ %command off
  18. else msg # ! $+ %command is already repeating
  19. }
  20. elseif ($readini(commands.ini,n,commands,%command)) {
  21. var %response = $v1
  22. .timercommand. $+ %command 0 $iif(%interval < 5,5,%interval) msg # $safe(%response)
  23. msg # %response
  24. }
  25. }
  26.  
  27. on $*:text:/^!(\S+)/:#test:{
  28. if ($nick !isop #) return
  29. if ($readini(commands.ini,n,commands,$regml(1))) msg # $v1
  30. }
  31.  
  32. alias safe return $!decode( $encode($1,m) ,m)
  33. on *:TEXT:!roulette*:#: {
  34. if ((%floodroulette) || ($($+(%,floodroulette.,$nick),2))) { return }
  35. set -u10 %floodroulette On
  36. set -u30 %floodroulette. $+ $nick On
  37. var %rr = $rand(1,3)
  38. msg $chan $nick spins the chamber and squeezes the trigger...!
  39. if (%rr == 1) .timer 1 3 msg $chan CLICK! $nick got lucky.
  40. if (%rr == 2) .timer 1 3 msg $chan BANG! $chan watches $nick $+ 's brain splatter all over the wall.
  41. if (%rr == 3) .timer 1 3 msg $chan The gun jammed, $nick got lucky.
  42. }
  43. on *:TEXT:!permit*:#: {
  44. if ($nick isop #) && ($2) {
  45. write reglist.txt $2
  46. msg # $2 has been permited to post a link for 20 seconds
  47. .timerRemovePermit 1 20 RemovePermit # $2
  48. }
  49. if ($read(sreglist.txt,nw,$nick)) && ($2) {
  50. write reglist.txt $2
  51. msg # $2 has been permited to post a link for 20 seconds
  52. .timerRemovePermit 1 20 RemovePermit # $2
  53. }
  54. }
  55. on *:TEXT:!reg add*:#: {
  56. if ($nick isop #) {
  57. write reglist.txt $$3
  58. msg $chan $$3 has been added to the regular list!
  59. }
  60. if ($read(reglist.txt,nw,$nick)) {
  61. write reglist.txt $$3
  62. msg $chan $$3 has been added to the regular list!
  63. }
  64. }
  65. on *:TEXT:!reg del*:#: {
  66. if ($nick isop #) {
  67. if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt
  68. msg # $$3 has been removed from the regular list!
  69. }
  70. if ($read(reglist.txt,nw,$nick)) {
  71. if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt
  72. msg # $$3 has been removed from the regular list!
  73. }
  74. }
  75. on *:JOIN:#AllDayGrinding:{
  76. if %join. [ $+ [ $nick ] ] { return }
  77. set -u86400 %join. [ $+ [ $nick ] ] $true
  78. .timer 1 2 msg # Welcome to the stream $nick have a great time! c: OpieOP new viewer.
  79. }
  80. on *:TEXT:!better:#: {
  81. if ((%floodbetter) || ($($+(%,floodbetter.,$nick),2))) { return }
  82. set -u10 %floodbetter On
  83. set -u30 %floodbetter. $+ $nick On
  84. msg $chan Get Better Twitch TV here (all browsers): http://nightdev.com/betterttv/ $+
  85. }
  86. on *:TEXT:!youtube:#: {
  87. if ((%floodyoutube) || ($($+(%,floodyoutube.,$nick),2))) { return }
  88. set -u10 %floodyoutube On
  89. set -u30 %floodyoutube. $+ $nick On
  90. msg $chan My youtube is http://www.youtube.com/user/AllDayGrinding Don't forget to subscribe! $+
  91. }
  92. on *:TEXT:!twitter:#: {
  93. if ((%floodtwitter) || ($($+(%,floodtwitter.,$nick),2))) { return }
  94. set -u10 %floodtwitter On
  95. set -u30 %floodtwitter. $+ $nick On
  96. msg $chan Follow Grinding On Twitter -->> Twitter.com/IGrindDailyx $+
  97. }
  98. on *:TEXT:hello:#: {
  99. if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
  100. set -u10 %floodhello On
  101. set -u30 %floodhello. $+ $nick On
  102. msg $chan Welcome $nick to Grinding's live show! $+
  103. }
  104. on *:TEXT:!Links:#: {
  105. if ((%floodlinks) || ($($+(%,floodlinks.,$nick),2))) { return }
  106. set -u10 %floodlinks On
  107. set -u30 %floodlinks. $+ $nick On
  108. msg $chan YT -->> Youtube.com/user/AllDayGrinding - Twitter -->> Twitter.com/IGrindDaily $+
  109. }
  110. on *:TEXT:!Tweet:#: {
  111. if ((%floodtweet) || ($($+(%,floodtweet.,$nick),2))) { return }
  112. set -u10 %floodtweet On
  113. set -u30 %floodtweet. $+ $nick On
  114. msg $chan Want to help the cast? There are many ways, like following Grinding's Twitter! Once you follow you can receive tweets for when he is going online or changing games, and then retweet them out to all your friends! Thanks guys! https://twitter.com/IGrindDailyx $+
  115. }
  116. on *:TEXT:!follow:#: {
  117. if ((%floodfollow) || ($($+(%,floodfollow.,$nick),2))) { return }
  118. set -u10 %floodfollow On
  119. set -u30 %floodfollow. $+ $nick On
  120. msg $chan Follow Me for more entertaining stuff! You really want to - http://i.imgur.com/U9S8omA.gif $+
  121. }
  122. on *:TEXT:!english:#: {
  123. if ((%floodenglish) || ($($+(%,floodenglish.,$nick),2))) { return }
  124. set -u10 %floodenglish On
  125. set -u30 %floodenglish. $+ $nick On
  126. msg $chan English Please, S'il vous plaît Anglais, Inglés Por Favor, Englisch Bitte, Inglese Per favore, English Zaloguj, Engels Gelieve, Engelska tack $+
  127. }
  128. on *:TEXT:!Caps:#: {
  129. if ((%floodcaps) || ($($+(%,floodcaps.,$nick),2))) { return }
  130. set -u10 %floodcaps On
  131. set -u30 %floodcaps. $+ $nick On
  132. msg $chan Do NOT use FULL caps in chat as it is considered shouting and is quite rude. Using FULL CAPS Repeatedly will result in a Time Out. *This is a Warning* $+
  133. }
  134. on *:TEXT:!Rules:#: {
  135. if ((%floodrules) || ($($+(%,floodrules.,$nick),2))) { return }
  136. set -u10 %floodrules On
  137. set -u30 %floodrules$nick On
  138. msg $chan Rules: 1. Be nice and respectful of others. 2. Get permission from a moderator prior to posting any links. 3. No discussions encouraging illegal acts. 4. NO ABUSE OF CAPS. 5. Wait several minutes before repeating your questions/comments. 6. Speak in English please. 7. Feedback on Forum. 8. Make some friends and have a good time! 9. Follow Mod Guidance. $+
  139. }
  140. on *:TEXT:!AddMe:#: {
  141. if ((%floodAddMe) || ($($+(%,floodAddMe.,$nick),2))) { return }
  142. set -u10 %floodAddMe On
  143. set -u9999999999999999999999 %floodAddMe. $+ $nick On
  144. msg $chan !points add $nick 1, $nick you have been added to the point system! $+
  145. }
  146. on *:TEXT:!Commands:#: {
  147. if ((%floodCommands) || ($($+(%,floodCommands.,$nick),2))) { return }
  148. set -u10 %floodcommands On
  149. set -u30 %floodcommands. $+ $nick On
  150. msg $chan Commands are: $+
  151. }
  152. on *:TEXT:!Turbo:#: {
  153. if ((%floodturbo) || ($($+(%,floodturbo.,$nick),2))) { return }
  154. set -u10 %floodturbo On
  155. set -u30 %floodturbo. $+ $nick On
  156. msg $chan Twitch Turbo is $8.99 a month, and gives you a fancy badge before your name, exclusive chat colors, custom emoticons, no ads, and other awesome things! It directly supports Twitch to keep the website running and fully functioning! Click the "Go Turbo" button on the front of the Twitch page. https://secure.twitch.tv/products/turbo/ticket/new?ref=header $+
  157. }
  158. alias -l addPoints {
  159. if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
  160. var %topic $+($chan,.,$nick)
  161. var %points $calc($readini(Points.ini,%topic,Points) + $1)
  162. writeini -n Points.ini %topic Points %points
  163. return %points
  164. }
  165. alias -l lookUpPoints {
  166. var %topic $+($chan,.,$nick)
  167. var %points $readini(Points.ini,%topic,Points)
  168. return %points
  169. }
  170. alias doaddpoints {
  171. if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
  172. var %topic $+($1,.,$2)
  173. var %points $calc($readini(Points.ini,%topic,Points) + $3)
  174. writeini -n Points.ini %topic Points %points
  175. echo -a Added points for %topic
  176. }
  177.  
  178. alias dorempoints {
  179. var %topic $+($1,.,$2)
  180. remini -n Points.ini %topic Points
  181. echo -a Removed points for %topic
  182. }
  183.  
  184. on *:text:!points:#:{
  185. if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
  186. set -u10 %floodpoints On
  187. set -u30 %floodpoints. $+ $nick On
  188. msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
  189. }
  190.  
  191. on $*:text:/!points (add|remove)/Si:#:{
  192. if ($nick isop #) {
  193. if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
  194. writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
  195. { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
  196. }
  197. else { msg $chan This command is only available to moderators. }
  198. }
  199. on !*:join:#:{
  200. $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
  201. add.pts $+(#,.,$nick)
  202. }
  203. on !*:part:#:$+(.timerpoints.,#,.,$nick) off
  204. alias -l add.pts {
  205. writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
  206. }
  207. on *:text:!winner:#:{
  208. var %nick1 = $nick(#,$rand(1,$nick(#,0)))
  209. while (%nick1 == $me) { %nick1 = $nick(#,$r(1,$nick(#,0))) }
  210. msg # Randomly selected winner is %nick1 $+ ! Congratulations %nick1 you win... $eval($+(%,prize.,$network,.,#),2)
  211. }
  212. on @*:text:*:#:linkpost $1-
  213. on @*:action:*:#:linkpost $1-
  214. on @*:notice:*:#:linkpost $1-
  215. alias -l linkpost {
  216. if ((!%p) && (!$hfind(permit,$nick))) { inc -u4 %p
  217. var %purge /^!(link\so(n|ff)|(permit))\b/iS
  218. var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|ly|gl|gd|do|ai|be
  219. var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS
  220. if ($findtok(%chanon,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
  221. msg # .timeout $nick 1
  222. msg # Bad $nick $+ ! Ask a moderator to permit you before posting links.
  223. }
  224. elseif (($regex($1-,%purge)) && ($regml(1) = permit) && ($nick isop #) && ($$2 ison #)) {
  225. hadd -mz permit $v1 60 | notice $v1 You have 60 seconds to post a link. Starting now!
  226. }
  227. elseif (($regml(1) = link on) && ($nick isop #)) {
  228. goto $iif(!$istok(%chanon,#,32),a,b) | :a | set %chanon $addtok(%chanon,#,32) | msg # My Link Protection Is Now on in: $+($chr(2),#)
  229. halt | :b | msg # $nick $+ , link protection is already on.
  230. }
  231. elseif (($regml(1) = link off) && ($nick isop #)) {
  232. goto $iif($istok(%chanon,#,32),c,d) | :c | set %chanon $remtok(%chanon,#,1,32) | msg # My Link Protection Is Now off in: $+($chr(2),#)
  233. halt | :d | msg # $nick $+ , link protection is already off.
  234. }
  235. }
  236. }
  237. }
Add Comment
Please, Sign In to add comment