Just a simple slap counter with a twist XD. when someone slaps you it makes you take out gun and it counts each time u do that. please feel free to suggest things if it can be neater/better. and Enjoy!
on *:action:$($+(*,slaps,*,$me,*)):#:{
if ($2 == $me) {
inc %slaps
describe $chan pulls out an 12AK47...
.timer 1 2 msg $chan 9Bitch do 4NOT 9fucking slap me!
.timer 1 4 describe $chan points the AK at 6 $nick
.timer 1 6 msg $chan 7Got it?!
.timer 1 8 msg $chan 9I pulled out this AK15 %slaps 9times now.
.timer 1 10 msg $chan 7,1CREDITS TO 15,1PHIL
}
@Jethro_ not everyone is a pro at regex like you are lol
As for the 50 "if ($2 == $me)" one will suffice and enclose them in brackets
on *:action:$($+(*,slaps,*,$me,*)):#:{
if ($2 == $me) {
inc %slaps
describe $chan pulls out an 12AK47...
.timer 1 2 msg $chan 9Bitch do 4NOT 9fucking slap me!
.timer 1 4 describe $chan points the AK at 6 $nick
.timer 1 6 msg $chan 7Got it?!
.timer 1 9 msg $chan 9I pulled out this AK15 %slaps 9times now.
}
}
Why the if $2 == $me? You already have that taken care of in the match text section of the event. That if statement becomes pointless. If you must use an if condition, then:
on *:action:*:*:{
if ($strip($1-2) == slap $me) {
msg $iif(#,#,$nick) blah blah
But I prefer regex
on $*:action:$(/\bslaps?\s(\Q $+ $me $+ \E)\b/iS):#:{
Reason being, if you use wilcard, like $2 isin $me or $me , it'll often result in false positives. Using $istok or $1-2 == $me also has a downfall that won't trigger if someone adds a punctuation mark in front or at the end of your main nick.