When someone slaps you i.e TheDreamLord slaps DreamBot around a bit with a large trout it shall say the following...
thats how it is eh?
YOURBOT chases $nick with a gun!
YOURBOT fires!
Damn i missed!/ WOO I HIT!
P.S Change YOURBOT to the name of your bot :P
on *:ACTION:*slaps $me around a bit with a large trout:#: {
msg $chan thats how it is eh?
describe $chan chases $nick with a gun!
describe $chan fires!
msg $chan $iif($r(1,2) == 1, damn i missed..., I hit! WOO!)
}
on :text:hello*:#:{
if (!%flood [ $+ [ $site ] ]) {
; if the dynamic %flood doesn't exist, we set it to 3 seconds before it's unset after 3 seconds have expired.
set -u3 %flood $+ $site $true
; we set it to 3 seconds. The code will ignore any trigger "hello" until 3 seconds have passed. This in turn will diminish the likelihood of trigger flood.
msg # Hello $nick
}
}
dont include the trout part.. just do
on *:action:$($+(*,slaps,*,$me,*)):#:{
msg $chan thats how it is eh?
.timer 1 2 describe $chan chases $nick with a gun!
.timer 1 3 describe $chan fires!
.timer 1 4 msg $chan $iif($r(1,2) == 1, damn i missed..., I hit! WOO!)
}
that way if they do something like /me slaps ... then it will still work
You should include some timers to make it happen in a given set of time, instead of all happening at once, and creating spam (which in some channels can get you kicked).
on *:ACTION:*slaps $me around a bit with a large trout:#: {
msg $chan thats how it is eh?
.timer 1 2 describe $chan chases $nick with a gun!
.timer 1 3 describe $chan fires!
.timer 1 4 msg $chan $iif($r(1,2) == 1, damn i missed..., I hit! WOO!)
}