Top

Random Slap


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Sep 24, 2009
Last Updated  Sep 24, 2009
Tags  leonardo  leonardol  random  randomslap  slap 

Description

This is a random slap script that I made, when you type /slap (nick) it slaps the nick with random stuff. :D
Command: /slap nick

Post your suggestions and comments.

Grab the Code

alias slap {
  var %r $r(1,6)
  if ( %r == 1 ) { describe $chan slaps $1 around a bit with a large trout. }
  if ( %r == 2 ) { describe $chan slaps $1 with a television. }
  if ( %r == 3 ) { describe $chan slaps $1 with a fish. }
  if ( %r == 4 ) { describe $chan slaps $1 with a pair of sunglasses. }
  if ( %r == 5 ) { describe $chan bitch slaps $1 $+ . }
  if ( %r == 6 ) { describe $chan slaps $1 with a birthday cake. }
}

Comments

  (6)  RSS
gooshie
Comments: 181
 
mIRC Snippet:  Random Slap
Posted on Sep 24, 2009 11:17 am
No need for a global set variable here.
Use a local variable to avoid harddrive writes and reads.
ANYWHERE $chan works the short form # will work.
The main reason $chan exist is for doing more elaborate
things like $chan(0) $chan(#).topic etc etc
$r(1,6) is short for $rand(1,6)
This should be in a nicklist popup because of $1




Code:
menu nicklist {
  Random Slap $$1:slap $1
}
alias slap {
    var %r $r(1,6)
    if %r == 1 { describe # slaps $1 around a bit with a large trout. }
    if %r == 2 { describe # slaps $1 with a television. }
    if %r == 3 { describe # slaps $1 with a fish. }
    if %r == 4 { describe # slaps $1 with a pair of sunglasses. }
    if %r == 5 { describe # bitch slaps $1 $+ . }
    if %r == 6 { describe # slaps $1 with a birthday cake. }
}
Testor
Comments: 103
 
mIRC Snippet:  Random Slap
Posted on Sep 24, 2009 11:29 am
Changing
Code:
  set %randmsg $rand(1,6) ——   unset %randmsg
to
Code:
 Var %RandMSG $Rand(1,6)
Will eliminate a line of the code that'll be un-needed :o.
Jethro_
Comments: 940
 
mIRC Snippet:  Random Slap
Posted on Sep 24, 2009 12:56 pm
Only one /describe command is needed to randomize the %randmsg
Code:
alias slap {
  var %randmsg = slaps $1 around a bit with a large trout.:slaps $1 with a fish.:slaps $1 with a pair of sunglasses.:bitch slaps $1 $+ .:slaps $1 with a birthday cake.
  describe $chan $gettok(%randmsg,$rand(1,$numtok(%randmsg,58)),58)
}
LeonardoL
Comments: 2
 
mIRC Snippet:  Random Slap
Posted on Sep 24, 2009 7:11 pm
Shorten the script.
Jethro_
Comments: 940
 
mIRC Snippet:  Random Slap
Posted on Sep 24, 2009 11:20 pm
You can even shorten the script further by placing those slap messages, including the $1 identifier line by line vertically, in a txt file called, say, 'slap.txt' and then play them to the targeted person on the channel.
Code:
alias slap { describe # $read(slap.txt) }
This way a random line from slap.txt will be played upon the trigger of slap alias. Of course, more messages can be added in the future.
VinX
Comments: 61
 
mIRC Snippet:  Random Slap
Posted on Sep 25, 2009 5:12 am
NNS has already got a lot of good slaps ... lol


Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom