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 Attacks

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
romeo5k
Halfop


Joined: 28 Jul 2006
Posts: 46

PostPosted: Mon Jun 11, 2007 6:31 pm    Post subject: Slap Attacks Reply with quote

Code:
bind pub - !slap slap:target

   proc slap:target {nick uhost hand chan arg} {
       set target "[lindex [split $arg] 0]"
         putserv "PRIVMSG $chan :\001ACTION slaps $target around a bit with a larger trout\001"
     "PRIVMSG $chan :\001ACTION slaps $target around a bit with the remains of a big Smelly Trout!\001"
}

I must be writing this wrong.. i took the one u posted on here... and im just trying to add more comments to em so i have a variet, but its not reading. Im sure its on my end, but i cant gfigure how and why... Somone pls help!

ref: http://forum.egghelp.org/viewtopic.php?t=5784
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Jun 11, 2007 6:40 pm    Post subject: Reply with quote

It would seem you're missing a puthelp/putserv command on the second ctcp-action message. Also, it would be advisable to use puthelp rather than putserv in this case (both will work, however).
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
romeo5k
Halfop


Joined: 28 Jul 2006
Posts: 46

PostPosted: Mon Jun 11, 2007 7:16 pm    Post subject: Reply with quote

ok.. i did that, and it seems to work okay so far, but i just had a noob come into the channel, and he just did something i can see me having a prob with He does !slap BOTNICK
and bot continuosly slaps himself.
If im not mistaken, is there a way to use the IF, Else commands to tell it is someone says !slap BOTNICK, ignore it, or if they do that, slap that individual for being stoopid.. Something like that!
Thanks
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Jun 11, 2007 7:21 pm    Post subject: Reply with quote

You probably would like to test $target using the isbotnick function (documented in doc/tcl-commands.doc)
Use with if/elseif/else-constructs to determine what your bot should do.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
romeo5k
Halfop


Joined: 28 Jul 2006
Posts: 46

PostPosted: Mon Jun 11, 2007 10:20 pm    Post subject: Reply with quote

got a new problem,
Code:
bind pub - !slap slap:target

   proc slap:target {nick uhost hand chan arg} {
       set target "[lindex [split $arg] 0]"
         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"
}

when i say, !slap boodah <--(NICK)
it displays both slaps one after another. So if i was to add 10 more variety slaps, it would display all 10 back to back. Where is my error now. ?? dang, im feeeling real dumb now.!

edit** Would it be better for me to just ask someone to just crate me a script rather than trying to edit and add to someone elses, beeing that im not a pro at it yet. Cause i dont wanna fustrate anyone with my ignorance.
If anyone does wanna just create one from scratch , please feel free, i posted the things i would like on it is possible.
Just a slapp script so i can add other slaps and an if command incase a dummy wants to play with bot and have the bot slap him self, bot slaps him/her. thanks
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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