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!
-
Torrevado
- Op
- Posts: 101
- Joined: Wed Aug 02, 2006 6:29 pm
Post
by Torrevado »
Code: Select all
bind pub - !kiss kiss
proc kiss {nick uhost hand chan arg} {
if {[lsearch {#channel } $chan] == -1} return
global afkiss
if {![onchan $nick $chan]} {return 0}
if {![info exists afkiss([set nickchan [string tolower $nick:$chan]])]} {
set afkiss($nickchan) [list [unixtime] 0]
}
foreach {t o} $afkiss($nickchan) {break}
if {[unixtime]-$t > 120} { set t [unixtime]; set o 0 }
if {[incr o] > 5} { return 0 }
set afkiss($nickchan) [list $t $o]
if {[onchan [set kissed [lindex [split $arg] 0]] $chan]} {
putserv "privmsg $chan :\00306$nick kisses $kissed\003 :o"
}
}
I'd like that if someone use
botnick, eggdrop will respond an alternative message
I'd like (if it's possible) the same thing to users asking for themselves
Note: this is Sir_Fiz's
rock script (modified)
Thanks
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
Code: Select all
bind pub - !kiss kiss
proc kiss {nick uhost hand chan arg} {
if {[lsearch {#channel } $chan] == -1} return
global afkiss
if {![onchan $nick $chan]} {return 0}
if {![info exists afkiss([set nickchan [string tolower $nick:$chan]])]} {
set afkiss($nickchan) [list [unixtime] 0]
}
foreach {t o} $afkiss($nickchan) {break}
if {[unixtime]-$t > 120} { set t [unixtime]; set o 0 }
if {[incr o] > 5} { return 0 }
set afkiss($nickchan) [list $t $o]
if {[onchan [set kissed [lindex [split $arg] 0]] $chan]} {
if {[isbotnick $kissed]} {
puthelp "privmsg $chan :<kissed botnick>"
} elseif {[string equal -nocase $nick $kissed]} {
puthelp "privmsg $chan :<kissed himself>"
} {
puthelp "privmsg $chan :\00306$nick kisses $kissed\003 :o"
}
}
}
Edit: Added other feature (self-kissing).
Last edited by
Sir_Fz on Sun Mar 04, 2007 10:51 am, edited 1 time in total.
-
Torrevado
- Op
- Posts: 101
- Joined: Wed Aug 02, 2006 6:29 pm
Post
by Torrevado »
First request works correctly (botnick)
I guess it's not easy to add the second one
Thanks
Last edited by
Torrevado on Sun Mar 25, 2007 11:44 am, edited 1 time in total.
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
Didn't notice the 2nd feature. I edited the code above; look at it, it's not hard at all so you should learn how to do it yourself now.