This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
LinkinPark
Voice
Posts: 7 Joined: Tue Apr 26, 2011 7:03 am
Location: Cambodia
Post
by LinkinPark » Tue Apr 26, 2011 7:20 am
Hello all coders/scripters
I want to make a request for Love Match..
Example:
<me> !Love nick1 nick2
<bot> Love Match nick1 + nick2 = 85%
and
<me> !Love nick1 nick2
<bot> Congratulations! Love Match nick1 + nick2 = 100%
Percentage start from 1-100%
also with trigger !Hate nick1 nick2 the same as !Love
Thanks for help me!
Madalin
Master
Posts: 310 Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:
Post
by Madalin » Thu Jan 31, 2013 4:45 pm
I don`t know if 100% will be triggered to often but thats because its a random process
nick1 and nick2 must be in the channel if they are not the script won`t work
Code: Select all
#### ++++ 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"