| View previous topic :: View next topic |
| Author |
Message |
romeo5k Halfop
Joined: 28 Jul 2006 Posts: 46
|
Posted: Mon Jun 11, 2007 6:31 pm Post subject: Slap Attacks |
|
|
| 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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Jun 11, 2007 6:40 pm Post subject: |
|
|
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 |
|
 |
romeo5k Halfop
Joined: 28 Jul 2006 Posts: 46
|
Posted: Mon Jun 11, 2007 7:16 pm Post subject: |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Jun 11, 2007 7:21 pm Post subject: |
|
|
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 |
|
 |
romeo5k Halfop
Joined: 28 Jul 2006 Posts: 46
|
Posted: Mon Jun 11, 2007 10:20 pm Post subject: |
|
|
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 |
|
 |
|