Slap script

By Mfoust on Jan 12, 2011

Just a little slap back script i made awhile ago thought i would upload it just to see some feedback.

intended for people who play runescape or have knowledge of it.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;                                ;
;      Created by Mfoust         ;
;                                ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:ACTION:slaps*:#: {
  if ($me isin $1-) {
    msg $chan Oh Hell No...
    set %slap $rand(1,5)
    if (%slap == 1) describe $chan pulls out a bronze dagger and stabs $nick dealing $rand(1,990) damage
    if (%slap == 2) describe $chan cast ice barrage on $nick hitting a $rand(1,400)
    if (%slap == 3) describe $chan Pulls out a dark bow specing a $rand(1,500) $rand(1,500) on $nick
    if (%slap == 4) describe $chan Pulls out an ags and deals $rand(1,990) damage to $nick
    if (%slap == 5) describe $chan pulls out dragon claws and specs hitting $rand(1,500) $rand(1,250) $rand(1,125) $rand(1,125) on $nick
    inc %slapback 1
    msg $chan Total morons slapped back: %slapback 
  }
}

Comments

Sign in to comment.
Jethro   -  Jan 13, 2011

Yes, napa182, the -l switch I've suggested will get that %slap variable functioned as a local one.

 Respond  
napa182   -  Jan 13, 2011

why not just use a local var instead of the global? unless you are going to also use that global as some kind of flood control.

 Respond  
Jethro   -  Jan 12, 2011

You can do the "slaps $me" within the match text section of the event:

on *:ACTION:$($+(*,slaps,$chr(32),$me,*)):#: {

And add the -l switch to your %slap > set -l %slap $rand(1,5)so you don't end up having it left behind in your variables.

 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.