Another !pickpocket snippet

By Sharky_Dude on Apr 09, 2011

Okay I realize that this has been done, but drawing on some of the other ones I believe this brings the best of the best plus some of my own stuff. To activate it type !pickpocket nickname. Please don't comment on this snippet if you just want to put it down. I already know this snippet has no real function, it's just something to have fun with for the sake of writing irc code.

*** Flood protection added, credits got to Bielie, Thanks.

on *:text:!pickpocket*:#: {
  if (%flood [ $+ [ $nick ] ]) { return }
  set -u3 %flood [ $+ [ $nick ] ] $true
  if (!$2) { halt }
  if ($2 ison $Chan) { 
    msg $chan 4 $+ $me Tiptoes up to $2 quietly...
    .timer 1 3 msg $chan 4 $+ $me slowly reaches inside $2 $+ 's pocket and finds...
    var %item = $rand(1,30)
    if (%item == 1) .timer 1 6 msg $chan 4 $+ A half eaten lollypop
    if (%item == 2) .timer 1 6 msg $chan 4 $+ A 50 dollar bill!
    if (%item == 3) .timer 1 6 msg $chan 4 $+ A wallet! but it's empty D:  
    if (%item == 4) .timer 1 6 msg $chan 4 $+ A wad of lint :o
    if (%item == 5) .timer 1 6 msg $chan 4 $+ An ipod Touch Sc00r!
    if (%item == 6) .timer 1 6 msg $chan 4 $+ Cigarettes :/
    if (%item == 7) .timer 1 6 msg $chan 4 $+ A comb, is that a bug?
    if (%item == 8) .timer 1 6 msg $chan 4 $+ A plastic ring :(
    if (%item == 9) .timer 1 6 msg $chan 4 $+ A pocket protector. O:
    if (%item == 10) .timer 1 6 msg $chan 4 $+ Chewed up Bubble gum!
    if (%item == 11) .timer 1 6 msg $chan 4 $+ $2 $+ 's pocket was empty
    if (%item == 12) .timer 1 6 msg $chan 4 $+ Car keys! ~steals the car~
    if (%item == 13) .timer 1 6 msg $chan 4 $+ A parking ticket, let's just put that back.
    if (%item == 14) .timer 1 6 msg $chan 4 $+ A New Kids On The Block Tape?!?!?!
    if (%item == 15) .timer 1 6 msg $chan 4 $+ A buy one get one free coupon for OMG!!!
    if (%item == 16) .timer 1 6 msg $chan 4 $+ A dog treat, it's half eaten! Is that human teeth marks?
    if (%item == 17) .timer 1 6 msg $chan 4 $+ A lego. :/
    if (%item == 18) .timer 1 6 msg $chan 4 $+ NERD GLASSES!!!
    if (%item == 19) .timer 1 6 msg $chan 4 $+ A 1 megabite ROM stick?
    if (%item == 20) .timer 1 6 msg $chan 4 $+ EwWwWwWwWwWwW!!! ~presses Alt+F4~
    if (%item == 21) .timer 1 6 msg $chan 4 $+ An e-book, OMG you sicko x|
    if (%item == 22) .timer 1 6 msg $chan 4 $+ A dollar. :\
    if (%item == 23) .timer 1 6 msg $chan 4 $+ A smurf doll? Wtf?
    if (%item == 24) .timer 1 6 msg $chan 4 $+ Half of a banana.
    if (%item == 25) .timer 1 6 msg $chan 4 $+ A lint encrusted pop tart.
    if (%item == 26) .timer 1 6 msg $chan 4 $+ Oh! Oh! I'm sorry, I meant to go into your POCKET! :x
    if (%item == 27) .timer 1 6 msg $chan 4 $+ It's empty...
    if (%item == 28) .timer 1 6 msg $chan 4 $+ Plans to take over the world, huh, they're pretty good!
    if (%item == 29) .timer 1 6 msg $chan 4 $+ A love poem.
    if (%item == 30) .timer 1 6 msg $chan 4 $+ A rusted spoon.
  }
  else {
    msg $chan 4 $+ $Nick $2 is not in this room.
  }
}

Comments

Sign in to comment.
Jethro   -  Apr 15, 2011

I forgot to add that instead of setting a 6-second timer delay, you can take advantage of the /play command with its -r switch and its adjustable delay option:

.play -r $chan reasons.txt 6000

The dot prevents the internal mIRC confirmation message to be displayed. The -r switch tells the play command to play a random line, and the 6000 means the delay in 6 seconds before output. In your text file, place all the messages like so:> 4A half eaten lollypop
4A 50 dollar bill!
4A wallet! but it's empty D:
4A wad of lint :o
4An ipod Touch Sc00r!
4Cigarettes :/
so on and so forth...There is no need for $+

 Respond  
Jethro   -  Apr 15, 2011

Sharky_Dude, the info about it is in mIRC's Bible aka help file:> //echo $read(funny.txt)

Reads a random line from the file funny.txt.

 Respond  
Sharky_Dude   -  Apr 15, 2011

okay I haven't done this before so don't mind my questions here but does $read(reason.txt) automatically make it random? Could you give me a little more detail? As I said, never done that before.

 Respond  
Bielie   -  Apr 15, 2011

Nice seeing that you applied my fix ;)

Another idea is using $read(reason.txt) instead of all those variables. It makes the script a lot shorter.

Simply put all the lines in a notepadfile. and save it in %SYSTEMDRIVE%/Users/Appdata/Roaming/Mirc

Example of file buildup.

A  half eaten lollypop
An ipod Touch Sc00r!

then you can remove the:

var %item = $rand(1,30)
%item1 = etc etc

and put

.timer 1 6 msg $chan 4 $+ $read(reasons.txt)

Note: This doesnt apply on the script on here but its just a handy tip for you to use.

 Respond  
Sharky_Dude   -  Apr 14, 2011

Good Ideas thanks, I didn't realize you could change the timer's name.

 Respond  
Bielie   -  Apr 13, 2011

Nicely done but you forgot some things:
Add this under the on text event:

if (%flood [ $+ [ $nick ] ]) { return }
set -u3 %flood [ $+ [ $nick ] ] $true
if (!$2) { halt }

It wont trigger if no target is given and you cant get flooded by it :)

I also think that the timers are a bit too long.

Its also an idea to change the timers names. Like .timer itemtimer 3 & .timer reachtimer 2

 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.