random slap

By Stewie1k94 on Apr 08, 2011

this is a random slap that i made

the command is !slap and it should choose a random message

and i have tryed it and it does work

on *:TEXT:!slap*:#: {

  if (%flood [ $+ [ $nick ] ]) { return }
  set -eu3 %flood [ $+ [ $nick ] ] $true

  msg $chan 4 $nick 3gets ready to slap someone
  set %slap $rand(1,6)

  if (%slap == 1) msg $chan 3slaps 4 $2 3around a bit with a large trout
  if (%slap == 2) msg $chan 3slaps 4 $2 3around the head with a ruler
  if (%slap == 3) msg $chan 3slaps 4 $2 3on the head with an eskimo
  if (%slap == 4) msg $chan 4 $2 3just go slapped muhahahaha
  if (%slap == 5) msg $chan 3slaps 4 $2 $+ 's 3ass

  set %kick $rand(1,2)

  if (%slap == 1) kick $chan $nick 4I just kicked you out the channel for slapping people 
  if (%slap == 2) kick $chan $nick 4stop slapping people 
}

Comments

Sign in to comment.
IllogicTC   -  Apr 15, 2011

Bigpunisher305: You would place these in the "Remotes" tab.

 Respond  
Bigpunisher305   -  Apr 11, 2011

I am new to this where do i put most of these snippets on my mIRC

 Respond  
IllogicTC   -  Apr 09, 2011

The reasoning behind Jethro_'s way is to add flood protection, toclafane1 (since he didn't explicitly say so, I will lol). This will protect users of your script from getting hit with flood attacks. Also, with the setup of the lines below the goto, it is very easy to add more lines if you want more than 5 choices.

 Respond  
Jethro   -  Apr 08, 2011

Bielie, this line of code doesn't make sense:> notice $nick $iif($read(slapreasons.txt),$v1,No slap reason found)How can a stored message not be found? $read(slapreasons.txt) will read any line at random if the text file exists. It should have been:

notice $nick $iif($isfile(slapreasons.txt),$read(slapreasons.txt),slapreasons.txt isn't found)

toclafane, you can do it like so, which will be more safer:

alias -l rgame {
  goto $rand(1,5)
  :1 | return slaps %2 around a bit with a large trout
  :2 | return slaps %2 around the head with a ruler
  :3 | return slaps %2 on the head with an eskimo
  :4 | return %2 just go slapped muhahahaha
  :5 | return slaps %2 $+ 's ass
}
on *:TEXT:$($iif(!slap * iswm $strip($1),$1)):#:{
  if (!%fp) { inc -u3 %fp | set -u3 %2 $2 | msg # $rgame }
}
 Respond  
Stewie1k94   -  Apr 08, 2011

well as im not very good at scrioting yet im only seeing what i can make but nvm

 Respond  
Bielie   -  Apr 08, 2011

Use /slapreasons (reason) to add slap reasons

on *:TEXT:!slap*:{

  if (%flood [ $+ [ $nick ] ]) { return }
  set -eu3 %flood [ $+ [ $nick ] ] $true

  notice $nick $iif($read(slapreasons.txt),$v1,No slap reason found)
  halt
}

alias slapreasons {
  /echo writing $1- into the slapreasons.txt file!
  /write slapreasons.txt $1-
}
 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.