Random Slap
mIRC Code
+ 0 likes
Please Register to submit score.
| 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.
Command: /slap nick
Post your suggestions and comments.
mIRC Snippet:
Random Slap
Posted on Sep 24, 2009 11:17 am
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
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. } } |
mIRC Snippet:
Random Slap
Posted on Sep 24, 2009 11:29 am
Posted on Sep 24, 2009 11:29 am
Changing
to
Will eliminate a line of the code that'll be un-needed :o.
| Code: |
| set %randmsg $rand(1,6) —— unset %randmsg |
| Code: |
| Var %RandMSG $Rand(1,6) |
mIRC Snippet:
Random Slap
Posted on Sep 24, 2009 12:56 pm
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) } |
mIRC Snippet:
Random Slap
Posted on Sep 24, 2009 11:20 pm
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.
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.
| Code: |
| alias slap { describe # $read(slap.txt) } |
mIRC Snippet:
Random Slap
Posted on Sep 25, 2009 5:12 am
Posted on Sep 25, 2009 5:12 am
NNS has already got a lot of good slaps ... lol




