| View previous topic :: View next topic |
| Author |
Message |
Joatle Voice
Joined: 13 Jun 2007 Posts: 2
|
Posted: Wed Jun 13, 2007 7:51 pm Post subject: slap back |
|
|
Can someone make an slap back script that makes the bot slap people back when it get slaped?
Would also be nice if there was some random there..
like:
* nick slaps bot around a bit with a large trout
* Bot slaps Nick around..
* nick slaps bot around a bit with a large trout
* Bot slaps Nick right back..
* nick slaps bot around a bit with a large trout
* Bot slaps Nick over the head with an dead cat..
Something like that.. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Jun 13, 2007 8:00 pm Post subject: |
|
|
| Code: | set actReplies {
"around..."
"right back.."
"over the head with an dead cat.."
}
bind ctcp - ACTION slap:back
proc slap:back {nick uhost hand chan kw arg} {
global botnick actReplies
if {![validchan $chan]} {return 0}
if {[string match "slaps $botnick around a bit with a large trout" $arg]} {
puthelp "privmsg $chan :\001ACTION slaps $nick [lindex $actReplies [rand [llength $actReplies]]]\001"
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Joatle Voice
Joined: 13 Jun 2007 Posts: 2
|
Posted: Wed Jun 13, 2007 8:03 pm Post subject: |
|
|
that was quic
Thanks  |
|
| Back to top |
|
 |
romeo5k Halfop
Joined: 28 Jul 2006 Posts: 46
|
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Jun 14, 2007 10:53 pm Post subject: |
|
|
That will get you no closer.
You will wait, you will be patient, you will make an attempt on your part instead of sitting back and doing nothing.
It would be a good idea (using the resources of these forums) to at least attempt writing your own script or modifying another.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
romeo5k Halfop
Joined: 28 Jul 2006 Posts: 46
|
Posted: Fri Jun 15, 2007 11:13 am Post subject: |
|
|
alchera i did, and i got a result, but the result had a problem, and no one has responded yet in maybe 4 days or so. Thats why i'm giving up on it. Cause it seems i have a problem no one has ever heard of.
http://forum.egghelp.org/viewtopic.php?t=13593 |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Jun 15, 2007 11:06 pm Post subject: |
|
|
That is so simple to figure out and that is why no-one has responded as it is actually staring you right in the face; you actually have the script sending the text twice to the channel.
Remove either of these lines:
| Code: | putserv "PRIVMSG $chan :\001ACTION slaps $target around a bit with a larger trout\001"
puthelp "PRIVMSG $chan :\001ACTION slaps $target around a bit with the remains of a big Smelly Trout!\001" |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
romeo5k Halfop
Joined: 28 Jul 2006 Posts: 46
|
|
| Back to top |
|
 |
mindcry Voice
Joined: 05 Mar 2007 Posts: 10 Location: Central Java Indonesia
|
Posted: Mon Jun 18, 2007 11:56 am Post subject: simple action reverser |
|
|
proc act:reply {nick uhost hand chan arg} {
global botnick
regsub -all -nocase $botnick $arg $nick arg
putserv "PRIVMSG $chan :\001ACTION $arg\001"
}
its better idea to make another procedure to stops action floodings on channel.  _________________ mindcry |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Jun 18, 2007 9:31 pm Post subject: Re: simple action reverser |
|
|
| mindcry wrote: | its better idea to make another procedure to stops action floodings on channel.  |
It's a better idea to enclose code within [code][/code] tags.
Please edit your post accordingly. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
mindcry Voice
Joined: 05 Mar 2007 Posts: 10 Location: Central Java Indonesia
|
Posted: Tue Jun 19, 2007 2:43 pm Post subject: action reverse |
|
|
| Code: |
bind CTCP - ACTION act:reply
proc act:reply {nick uhost hand dest key arg} {
global botnick
if {[validchan $dest]} {
set chan [string tolower $dest]
if {![string match -nocase *$botnick* $arg] || ![onchan $nick $chan]} {return 0}
regsub -all -nocase $botnick $arg $nick arg
putserv "PRIVMSG $chan :\001ACTION $arg\001"
}
|
this code will do action reverse if someone slapping (or anything) to your bot. adding anti flood procedure will make this code better.
ty for your opinion alchera.
im newbie in here  _________________ mindcry |
|
| Back to top |
|
 |
|