egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

slap back

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Joatle
Voice


Joined: 13 Jun 2007
Posts: 2

PostPosted: Wed Jun 13, 2007 7:51 pm    Post subject: slap back Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Jun 13, 2007 8:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Joatle
Voice


Joined: 13 Jun 2007
Posts: 2

PostPosted: Wed Jun 13, 2007 8:03 pm    Post subject: Reply with quote

that was quic Smile Smile

Thanks Smile
Back to top
View user's profile Send private message
romeo5k
Halfop


Joined: 28 Jul 2006
Posts: 46

PostPosted: Thu Jun 14, 2007 12:32 pm    Post subject: Reply with quote

nice... i needed this too.. now i need the slap attack one.. http://forum.egghelp.org/viewtopic.php?t=13585

Thank you.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Jun 14, 2007 10:53 pm    Post subject: Reply with quote

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. Smile
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
romeo5k
Halfop


Joined: 28 Jul 2006
Posts: 46

PostPosted: Fri Jun 15, 2007 11:13 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Jun 15, 2007 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
romeo5k
Halfop


Joined: 28 Jul 2006
Posts: 46

PostPosted: Sat Jun 16, 2007 1:18 pm    Post subject: Reply with quote

http://forum.egghelp.org/viewtopic.php?t=13585
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
mindcry
Voice


Joined: 05 Mar 2007
Posts: 10
Location: Central Java Indonesia

PostPosted: Mon Jun 18, 2007 11:56 am    Post subject: simple action reverser Reply with quote

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. Laughing
_________________
mindcry
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Jun 18, 2007 9:31 pm    Post subject: Re: simple action reverser Reply with quote

mindcry wrote:
its better idea to make another procedure to stops action floodings on channel. Laughing

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
View user's profile Send private message Visit poster's website
mindcry
Voice


Joined: 05 Mar 2007
Posts: 10
Location: Central Java Indonesia

PostPosted: Tue Jun 19, 2007 2:43 pm    Post subject: action reverse Reply with quote

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. Smile

ty for your opinion alchera.
im newbie in here Very Happy
_________________
mindcry
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber