Jump to content
EGGTCL

lovematch.tcl 1.0.0

   (0 reviews)

About This File

Love Match IRC Game Script

 

#### ++++ Author: MadaliN <madalinmen28@yahoo.com>
### ++++ TCL Name: Love & Hate
## ++++
#
# Commands:
#   !love nick1 nick2
#   !hate nick1 nick2
bind pub - !love love:pub
bind pub - !hate hate:pub

proc love:pub {nick uhost hand chan arg} {

   set nick1 [lindex [split $arg] 0]
   set nick2 [lindex [split $arg] 1]

   if {($nick1 != "") && ($nick2 != "") && [onchan $nick1 $chan] && [onchan $nick2 $chan]} {
      set lovematch [minmaxrand 0 101]

      if {$lovematch == "100"} {
         putserv "PRIVMSG $chan :Congratulations! Love match \00312$nick1\003 + \00312$nick2\003 = \00304\002$lovematch\002%"
      } else {
         putserv "PRIVMSG $chan :Love match \00312$nick1\003 + \00312$nick2\003 = \00304\002$lovematch\002%"
      }
   }
}

proc hate:pub {nick uhost hand chan arg} {

   set nick1 [lindex [split $arg] 0]
   set nick2 [lindex [split $arg] 1]

   if {($nick1 != "") && ($nick2 != "") && [onchan $nick1 $chan] && [onchan $nick2 $chan]} {
      set hatematch [minmaxrand 0 100]

      if {$hatematch == "100"} {
         putserv "PRIVMSG $chan :Congratulations! Hate match \002$nick1\002 + \002$nick2\002 = \00304\002$hatematch\002%"
      } else {
         putserv "PRIVMSG $chan :Hate match \002$nick1\002 + \002$nick2\002 = \002$hatematch\002%"
      }
   }
}

proc minmaxrand {min max} {

   set r [expr ([rand [expr ($max - $min)]] + $min)]
   return $r
}

putlog "+++ sucesfully loaded: \00312Love & Hate TCL Script"

 

  • Like 1

User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
×
×
  • Create New...