Paste this into your bots remotes and when someone says sit it will say me sits and waits for nick to give me a treat and it will saay i have been told to sit xamount of times you can tell im bored lmao 3 scripts in one night anyways if you would like to get in contact with me my server is /server -m irc.oxsh.net:6665 or /server irc.oxsh.net:6665 depending on if your connected to another server or not
on 2:text:Sit*:#:{
inc %Sit
describe $chan Sits and Waits For A Treat From $nick
/msg $chan i Have Been Told To Sit %Sit $+ Times
}
Typo instead of useing a ton of $iif \'s why not use a $gettok
on *:text:$($+(*,sit,*,$me,*)):#:{
if (!$($+(%,test,$nick),2)) {
set -u30 $+(%,test,$nick) 1
inc %Sit
var %r treat,kick in the butt,ice cold soda,command to get up
describe $chan Sits and waits for a $gettok(%r,$r(1,4),44) from $nick $+ .
msg $chan I have been told to sit %Sit times.
}
}
I actually released a snippet for trigger protection that works with any number of triggers. You simply add a IF check using my identifier to your on text event(s) and they will be protected.
Have a look http://www.hawkee.com/snippet/4664/
Its much more thorough protectin as it protects the trigger against being reused by the same host within 10 seconds and it also stops any host from triggering it for 3 seconds.
Also, yours could be shortened by killing the timer by using the -u option with set to unset the variable like so.
on *:TEXT:<whatever in here>:#:{
if ( %test. [ $+ [ $nick ] ] == $null ) {
set -u30 %test. [ $+ [ $nick ] ] 1
.msg $nick <message or action>
}
}
and if your going to give code why not make it work? Why do people give examples without taking the time to make them usable.
on *:text:$(Sit $me):#:{
if ( %test. [ $+ [ $nick ] ] == $null ) {
set -u30 %test. [ $+ [ $nick ] ] 1
inc %Sit
var %r $r(1,4)
describe $chan Sits and waits for a $iif(%r == 1,treat,$iif(%r == 2,kick in the butt,$iif(%r == 3,ice cold soda,$iif(%r == 4,command to get up)))) from $nick $+ .
msg $chan I have been told to sit %Sit times.
}
}
Thats with cherions protection method. The users will not be notified when the trigger protection stops the command from working, it will just not work.
The advantages to my methid of trigger protection is it has both a primary and secondary/final warning when the flood protection stops the command from triggering and it uses the host, the trigger name, and the cid in the variables, also, it can be used to protect unlimited triggers since its an identifier.
LOL at the amount of comments for this snippet now.
i hear what you saying typo and like i said in the first place i agree totally.. the reference to the fact that it works was only an acknowledgemt where alot of timewasters post useless stuff that will not even work. but that was the only fact for the reference.. nothing more
another thing missing there is an anti-flood to stop people flooding out the bot hehe.. (might not be a bad thing in this case though lol)
easily done though. this is what i did for my own usage. this is my own http://www.hawkee.com/snippet/3874/
on *:TEXT::#:{
if ( %test. [ $+ [ $nick ] ] == $null ) {
set %test. [ $+ [ $nick ] ] 1
.msg $nick
.timer 1 30 unset %test. [ $+ [ $nick ] ]
}
}
it is as basic as it gets yes i know...... but it still prevents users causing the bot to flood out from over use of the commands or txt.
mutt, your on the right track but thats not the way to go. To check if $me iswm $1- wouldnt help be sure it wasnt spamming when not meant to be triggered because the $me could be anywhere in the sentence. If your goint to look for $me atleast look where you want it to be which would be $2. I would go about it differently tho.
Instead of going...
on *:text:sit*:#:{ if ($me == $2) { commands here }
I think the beter method would be...
on *:text:$(sit $me):#:{ commands here }
My code from above has been updated with this change.
He also has a needless $+ in the message that makes it show for instance \"3times\" instead of \"3 times\" and he uses a / infront of message when /\'s arent needed in scripts and here is no punctuation and the capitalization is wacky.
And btw, \"It works\" shouldn\'t be all that matters. On *:text:jump:#:{ msg # How high? } works too but that doesnt mean I should release it.
This shows no originality and ide hate to see another ten scripts like it be released cause they all have something different like changing the bot sitting waitng for a treat to the bot dancing and how many times he danced.
I mean, if your going to release a script like this why not atleast make it so that people can actually give it a treat while its sitting or set a variable to track if its still sitting or not so that people have to tell it to stand up before it can sit again or it will just say \"Im already sitting dummy\" or you could add multiple triggers or random responses or something fun like that.
Heres an example with just adding random responses.
on *:text:$(Sit $me):#:{
inc %Sit
var %r $r(1,4)
describe $chan Sits and waits for a $iif(%r == 1,treat,$iif(%r == 2,kick in the butt,$iif(%r == 3,ice cold soda,$iif(%r == 4,command to get up)))) from $nick $+ .
msg $chan I have been told to sit %Sit times.
}
Then if it was named Bot and I was Typo it could say all 4 of the following and will switch between them randomly.
Bot Sits and waits for a treat from Typo.
Bot sits and waits for a kick in the butt from Typo.
Bot sits and waits for a ice cold soda from Typo.
Bot sits and waits for a command to get up from Typo.
I was letting you be but you insist on releasing absolutely useless scripts.
I will now rate them accordingly instead of ignoring them so maybe other people will follow suite to make sure this stops before hawkee is filled with this crap.
1/10 = Bad/Ripped and this qualifies. Rating a 3 at not useful would be far too high a score.
Perhaps build a snippet with a lot of these types of triggers in one or something but you keep releasing these one line scripts that people can make themselves with the most basic of scripting knowledge.
I understand the desire to share and especially as you learn new things but like for instance the last three things you released could have been one release.
Maybe Im just in a bad mood and being too harsh. I dunno....