Posted to tcl by an7y at Thu Jul 18 07:02:45 GMT 2019view raw

  1. # Script : Tourettes v1.00 by David Proper (Dr. Nibble [DrN])
  2. # Copyright 2004 Radical Computer Systems
  3. # All Rights Reserved
  4. # -=: Currently in closed alpha testing -=- Not for distrabution :=-
  5. #
  6. # _ _ _ _______ ______ __ _ _____ __ _ ______
  7. # | | | |_____| |_____/ | \ | | | \ | | ____ .
  8. # |__|__| | | | \_ | \_| __|__ | \_| |_____| .
  9. #
  10. # If you are easily offended, do not like profanity, or are just
  11. # a general puritan asshole, do NOT run nor view any more of this script!
  12. #
  13. #
  14. #
  15. # Testing
  16. # Platforms : Linux 2.4.18 TCL v8.3.4
  17. # Eggdrop v1.5.4
  18. # Eggdrop v1.6.12
  19. # And : SunOS 5.8 TCL v8.3
  20. # Eggdrop v1.5.4
  21. #
  22. # Description : I was wrong about decide.tcl... THIS is the lamest script
  23. # I have ever done... What Tourettes does is... well...
  24. # it gives your bot tourettes syndrom.
  25. # It will randomly spew forth profanity into the channel(s)
  26. # Don't you want to hurry up and load this into your bot?
  27. # LOL OK. So this will prob be one of my least liked, much
  28. # less, used scripts I've ever done.
  29. #
  30. # History : 01/22/2004 - First Release
  31. # 01/22/2004 - v1.01
  32. # o Oh fuck. Forgot to reset the timer. DOH
  33. #
  34. # Donations : https://www.paypal.com/xclick/business=rainbows%40chaotix.net
  35. # (If you don't have PayPal and want to donate, EMail me for an address.
  36. # Will take money or hardware/computer donations)
  37. # Significant (or even non-significant donations) can be published on a
  38. # web site if you so choose.
  39. #
  40. # Future Plans : Fix Bugs. :)
  41. #
  42. # Author Contact : Email - DProper@chaotix.net
  43. # Homepage - http://www.chaotix.net/~dproper
  44. # IRC - Primary Nick: DrN
  45. # UseNet - alt.irc.bots.eggdrop
  46. # Support Channels: #RCS @UnderNet.Org
  47. # #RCS @DALnet
  48. # #RCS @EFnet
  49. # #RCS @Choatix Addiction
  50. # Other channels - Check contact page for current list
  51. #
  52. # Current contact information can be located at:
  53. # http://rcs.chaotix.net/contact.html
  54. #
  55. # New TCL releases are sent to the following sites as soon as they're released:
  56. #
  57. # FTP Site | Directory
  58. # ---------------------------+-------------------------------
  59. # ftp.chaotix.net | /pub/RCS
  60. # ftp.eggheads.org | Various
  61. # ftp.egghelp.org | Various
  62. #
  63. # Chaotix.Net has returned. Web site and mailing list back online
  64. #
  65. # Radical Computer Systems - http://rcs.chaotix.net/
  66. # To subscribe to the RCS mailing list:
  67. # http://www.chaotix.net/mailman/listinfo/rcs-list
  68. #
  69. # Feel free to Email me any suggestions/bug reports/etc.
  70. #
  71. # You are free to use this TCL/script as long as:
  72. # 1) You don't remove or change author credit
  73. # 2) You don't release it in modified form. (Only the original)
  74. #
  75. # If you have a "too cool" modification, send it to me and it'll be
  76. # included in the official release. (With your credit)
  77. #
  78. # Commands Added:
  79. # Where F CMD F CMD F CMD F CMD
  80. # ------- - ---------- - ------------ - ----------- - ----------
  81. # Public: N/A
  82. # MSG: N/A
  83. # DCC: N/A
  84. #
  85. # Public Matching: N/A
  86. #
  87.  
  88.  
  89.  
  90. set tourettes(ver) "v1.00.01"
  91.  
  92. # [0/1] If set to 1, will give letters a random chance of being bold,
  93. # reverse, or colored
  94. set tourettes(funkify) 1
  95.  
  96. # Base time before going spaz again
  97. # Total delay is figured as: time + ( rand 0 - timepad)
  98. # With the default values of 30 and 20, a spazattack will be triggered
  99. # anytime between 30 and 50 minutes apart.
  100. set tourettes(time) 30
  101. set tourettes(timepad) 20
  102.  
  103. # Set this to the channels you want to spaz on. Set to * for all chans.
  104. set tourettes(channel) "#RCS #Freak"
  105.  
  106. # Nicks to ignore when getting a random nick
  107. set tourettes(bots) "W X ChanServ ^Elviraa^ LadySin IsleBot GoD UWorld Freakywok HoneyDew AcidGod CyrixSux"
  108.  
  109.  
  110. # Maximum number of words to spew
  111. set tourettes(wordcount) 6
  112.  
  113. # Minimum number of words to spew
  114. set tourettes(minwords) 3
  115.  
  116. # List of words to spew
  117. set tourettes(words) {
  118. {fuck}
  119. {shit}
  120. {piss}
  121. {cunt}
  122. {bitch}
  123. {cock}
  124. {pussy}
  125. {twat}
  126. }
  127.  
  128. # List of phrases to say. $words will be replaces with the words picked.
  129. set tourettes(phrases) {
  130. {\001ACTION starts to twitch and yells '$words'!\001}
  131. {$words!}
  132. {BAWK! BAWK! $words!}
  133. {AAAAAAAAAAAA! $words}
  134. {\001ACTION gets up and screams '$words'\001}
  135. {\001ACTION grabs $nick's crotch.... '$words'\001}
  136. {Hey $nick, $words}
  137. {\001ACTION smacks $nick and yells '$words'}
  138. {BOOGER! BOOGER! $words}
  139. }
  140.  
  141. # Random crap to put between words to spew.
  142. set tourettes(worddiv) {
  143. {}
  144. { }
  145. {!}
  146. }
  147.  
  148. proc tourettes.gospaz {} {
  149. global tourettes
  150. set chans $tourettes(channel)
  151. if {$chans == "*"} {set chans [string tolower [channels]]}
  152.  
  153. foreach chan $chans {
  154. set outmsg [randomline $tourettes(phrases)]
  155. set wordcount [rand $tourettes(wordcount)]
  156. if {$wordcount < $tourettes(minwords)} {set wordcount $tourettes(minwords)}
  157.  
  158. set words "";
  159. for {set l 0} {$l < $wordcount} {incr l} {
  160. set rword [string tolower [randomline $tourettes(words)]]
  161. set nword ""
  162. for {set l2 0} {$l2 < [string length $rword]} {incr l2} {
  163. set letter [string index $rword $l2]
  164. if {[rand 2] == 1} {set letter [string toupper $letter]}
  165. if {$tourettes(funkify) == 1} {set rn [rand 5]} {set rn 0}
  166.  
  167. switch $rn {
  168. "0" {set letter "\002$letter\002"}
  169. "2" {set letter "\026$letter\026"}
  170. "4" {set letter "\003[string index "0123456789" [rand 11]]$letter\003"}
  171. }
  172. set nword $nword$letter
  173. }
  174. set words "${words}${nword}[randomline $tourettes(worddiv)]"
  175. }
  176.  
  177. set user [tourettes.rnduser $chan]
  178. regsub -all {\$nick} $outmsg $user outmsg
  179. regsub -all {\$words} $outmsg $words outmsg
  180. regsub -all {\\001} $outmsg \001 outmsg
  181. regsub -all {\\002} $outmsg \002 outmsg
  182. putserv "PRIVMSG $chan :$outmsg"
  183. }
  184. set tourettes(timerid) [timer [expr $tourettes(time) + [rand $tourettes(timepad)]] tourettes.gospaz]
  185. }
  186. set tourettes(timerid) [timer [expr $tourettes(time) + [rand $tourettes(timepad)]] tourettes.gospaz]
  187.  
  188.  
  189. proc randomline {text} {
  190. return [lindex $text [rand [llength $text]]]
  191. }
  192.  
  193. proc tourettes.rnduser {chan} {
  194. global botnick tourettes
  195. set clist [chanlist $chan]
  196. if {([llength $clist] == 1)} {set clist "$clist her"}
  197. set pickeduser 0
  198. while {$pickeduser == 0} {
  199. set user [lindex $clist [rand [llength $clist]]]
  200. set pickeduser 1
  201.  
  202. foreach n $tourettes(bots) {
  203. if {([string tolower $user] == [string tolower $n])} {set pickeduser 0}
  204. }
  205.  
  206. }
  207. set uhand [nick2hand $user $chan]
  208. return $user
  209. }
  210.  
  211. putlog "Tourettes $tourettes(ver) by David Proper (DrN) -:LoadeD:-"
  212. return "Tourettes $tourettes(ver) by David Proper (DrN) -:LoadeD:-"
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. These timers:
  221. set tourettes(timerid) [timer [expr $tourettes(time) + [rand $tourettes(timepad)]] tourettes.gospaz]
  222. }
  223. set tourettes(timerid) [timer [expr $tourettes(time) + [rand $tourettes(timepad)]] tourettes.gospaz]
  224.  
  225. why are there 2 of them?
  226.  
  227. Why aren't they resetted?
  228.  
  229. How to reset them after successful usage?