Anti-Poker

By Crazylicious on Jul 15, 2009

My First ever attempt at scripting

When someone pokes you it pokes them back

O_O Difficult Right?

On *:Action:*Poke*:#:{ 
   if (($me isin $1-) && (%antiflood)) { 
      set -u5 %antiflood 2
      inc %Slapexx
      describe $chan slaps $nick right back |Number Of Slapbacks| %slapexx
   }
}

Comments

Sign in to comment.
Jethro   -  Jul 18, 2009

Yes, we all know what's like to be new at one point in time, but you have to make sure the snippet you've submitted is in a working condition. As mountaindew pointed out, you should have added an exclamation mark in, and I quote, (!%antiflood))

Or you edit your script as soon as you receive suggestions from other people to perfect it.

 Respond  
Crazylicious   -  Jul 18, 2009

Thanks everyone, as i said this is my first ever script so im not that good yet

 Respond  
guest598594   -  Jul 17, 2009

Shouldn't it be

   if (($me isin $1-) && (!%antiflood)) { 
 Respond  
Jethro   -  Jul 17, 2009

To get technical with your script, you could do:

describe $chan slaps $nick right back the $ord(%slapexx) time.

Or

describe $chan slaps $nick right back %slapexx $iif(%slapexx == 1,time,times)
 Respond  
Noutrious   -  Jul 16, 2009
on *:action:*poke*:#:if $me isin $1- && !%slapantiflood { inc -u5 %slapantiflood | inc %slapnum | describe $chan slaps $nick right back.. ( $+ %slapnum slapbacks totally) }
 Respond  
knoeki   -  Jul 15, 2009

Thanks im kinda new to scripting

everyone has to start somewhere ;) that's why I'm giving you this tip :)

 Respond  
Crazylicious   -  Jul 15, 2009

Thanks im kinda new to scripting

 Respond  
knoeki   -  Jul 15, 2009

about your indenting: it looks like you heard the bell but are unaware of it's location ;_)

this looks a little bit more proper:

On *:Action:*Poke*:#:{ 
   if (($me isin $1-) && (%antiflood)) { 
      set -u5 %antiflood 2
      inc %Slapexx
      describe $chan slaps $nick right back %slapexx
   }
}

other than that, it seems to look fine ;_)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.