Advertisement
Techman

sexdice.tcl by TechJose (not me)

Sep 17th, 2017
648
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 4.90 KB | None | 0 0
  1. #---------------------------------------------------------------------#
  2. # TechJoose:SexDice                                             v1.0a #
  3. #                                                                     #
  4. # Rolls the sex dice on a random or chosen person                     #
  5. #                                                                     #
  6. # Usage:                                                              #
  7. #   !sexdice [nick]                                                   #
  8. #                                                                     #
  9. # ChangeLog:                                                          #
  10. #   1.0a - First public alpha release                                 #
  11. #                                                                     #
  12. # TODO:                                                               #
  13. #   - More customization for display of information                   #
  14. #   - Ideas? Email me.                                                #
  15. #                                                                     #
  16. # http://www.techjoose.net                                            #
  17. # macbrando@gmail.com                                                 #
  18. # BeBoo @ irc.techjoose.net / #bar                                    #
  19. #---------------------------------------------------------------------#
  20.  
  21. #---------------------------------------------------------------------#
  22. #                                                                     #
  23. # Settings                                                            #
  24. #                                                                     #
  25. #---------------------------------------------------------------------#
  26. namespace eval techjoose {
  27.   namespace eval sexdice {
  28.  
  29.     # Set this to the command character you want to use for the binds.
  30.     # Only use one command character. (Default "!")
  31.       variable command_char "."
  32.  
  33.     # Set this to your preferred binds separated by spaces. i.e. "one two"
  34.     # (Default "sexdice")
  35.       variable binds "sexdice"
  36.  
  37. #---------------------------------------------------------------------#
  38. #                    ***End of Settings ***                           #
  39. #   Do not edit below this line unless you know what you are doing!   #
  40. #---------------------------------------------------------------------#
  41.  
  42.     variable version "TechJoose:SexDice-1.0a"
  43.     variable versionNum "1.0a"
  44.   }
  45. }
  46.  
  47. # bind the public bind
  48. foreach bind [split $techjoose::sexdice::binds " "] {
  49.   bind pub -|- "${techjoose::sexdice::command_char}$bind" techjoose::sexdice::roll
  50. }
  51.  
  52. namespace eval techjoose {
  53.   namespace eval sexdice {
  54.     proc roll {nick uhost handle chan args} {
  55.       global botnick
  56.       global rep
  57.  
  58.       set mylist [chanlist $chan]
  59.  
  60.       #
  61.       # Remove the bot from the list (life's too short to kiss bots!)
  62.       #
  63.       set wb [lsearch $mylist $botnick]
  64.       set mylist [lreplace $mylist $wb $wb]
  65.  
  66.       #
  67.       # Remove the invoking nick from the list
  68.       #
  69.       set wn [lsearch $mylist $nick]
  70.       set mylist [lreplace $mylist $wn $wn]
  71.  
  72.       # Check to see if they specified someone
  73.       if {[lindex $args 0] != ""} {
  74.     # Check to see if the nick is on the channel
  75.     if {![onchan [lindex $args 0] $chan]} {
  76.       putserv "PRIVMSG $chan :\002\00305\[\003 \00312SEX DICE\003 \00305\]\002\003 Sorry, ${nick}, [lindex $args 0] doesn't appear to be on this chan."
  77.       return
  78.     } else {
  79.       if {[lindex $args 0] == $nick } {putserv "PRIVMSG $chan :\002\00305\[\003 \00312SEX DICE\003 \00305\]\002\003 You can't roll the dice on yourself, ${nick}! That's no fun.";return}
  80.       set result [lindex $args 0]
  81.     }
  82.       } else {
  83.     #Choose someone randomly
  84.         set mylength [llength $mylist]
  85.         if {$mylength == 0} {
  86.           putserv "PRIVMSG $chan :Well, $nick, there's no one to play with! :("
  87.           return
  88.         }
  89.         set myindex [rand $mylength]
  90.         set result [lindex $mylist $myindex]
  91.       }
  92.       set dice1 {
  93.     "kiss"
  94.     "fondle"
  95.     "lick"
  96.     "suck"
  97.     "touch"
  98.     "nibble"
  99.     "do anything you want to"
  100.     "do anything you want to"
  101.       }
  102.  
  103.       set dice2 {
  104.     "lips"
  105.     "neck"
  106.     "chest"
  107.     "ears"
  108.     "anywhere you want"
  109.     "anywhere you want"
  110.     "nipple"
  111.     "toe"
  112.     "ass"
  113.     "crotch"
  114.       }
  115.  
  116.       putserv "PRIVMSG $chan :\002\00305\[\003 \00312SEX DICE\003 \00305\]\002\003 ${nick} rolled the Sex Dice!"
  117.       set choice1 [lindex $dice1 [rand [llength $dice1]]]
  118.       set choice2 [lindex $dice2 [rand [llength $dice2]]]
  119.       if {$choice2 == "anywhere you want" } {
  120.     putserv "PRIVMSG $chan :\002\00305\[\003 \00312SEX DICE\003 \00305\]\002\003 ${nick}, you have to ${choice1} ${result} ${choice2}!"
  121.       } else {
  122.     putserv "PRIVMSG $chan :\002\00305\[\003 \00312SEX DICE\003 \00305\]\002\003 ${nick}, you have to ${choice1} ${result} on the ${choice2}!"
  123.       }
  124.     }
  125.   }
  126. }
  127.  
  128. putlog " - \002Sex Dice\002 version $techjoose::sexdice::versionNum loaded."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement