!Pickpocket w/ !additem and !delitem

By Callmepeer on Nov 19, 2016

Syntax: !pickpocket
user must be inside the channel
!additem
!delitem

There are no pre-loaded items here so you must add items yourself first.

############################################################
##             Pickpocket Script                          ##
##             Version: 1.0                              ##
##             By: Rotatoskr                              ##
##             irc.lunarirc.net #Fraxinus                 ##
############################################################

on *:TEXT:!additem*:#: {
  if (!$read(items.txt, nw, $2)) {
    write items.txt $2-
    msg # $2- is successfully added in the items list. 
  }
  else {
    msg # $2- is already in the items list.
  }
}

on *:TEXT:!delitem*:#: {
  if (!$read(items.txt, nw, $2)) {
    msg # $2- is not on the items list.
  }
  else {
    write -dl $+ $2- items.txt
    msg # $2- is successfully deleted in the items list.
  }
}

on *:TEXT:!pickpocket*:#: {
  var %items = $read(items.txt)
  if (!$2) { notice $nick Syntax: !pickpocket <anyone in the channel> }
  if ($2 == $me) { notice $nick I would not harass myself! }
  if ($2 ison $chan) 
  timer 1 1 describe $chan gets near to $2 $+ !
  timer 1 3 describe $chan reaches in $2 $+ 's pocket and finds... a %items $+ !
    }
    else notice $nick $2 is not in $chan $+ !
  }
}

Comments

Sign in to comment.
Karlien   -  6 days ago

Nice job with the rip off. Been using the pickpocket script for a couple years...

 Respond  
ocattt   -  Dec 28, 2016

Fun script, you should just add an anti flood

on :TEXT:!additem:#: {
if (%additem) halt
set -u5 %additem 1
if (!$read(items.txt, nw, $2)) {
write items.txt $2-
msg # $2- is successfully added in the items list.
}
else {
msg # $2- is already in the items list.
}
}

on :TEXT:!delitem:#: {
if (%delitem) halt
set -u5 %delitem 1
if (!$read(items.txt, nw, $2)) {
msg # $2- is not on the items list.
}
else {
write -dl $+ $2- items.txt
msg # $2- is successfully deleted in the items list.
}
}

on :TEXT:!pickpocket:#: {
if (%pickpocket) halt
set -u10 %pickpocket 1
var %items = $read(items.txt)
if (!$2) { notice $nick Syntax: !pickpocket }
if ($2 == $me) { notice $nick I would not harass myself! }

timer 1 1 describe $chan gets near to $2 $+ !
timer 1 3 describe $chan reaches in $2 $+ 's pocket and finds... a %items $+ !
}
else notice $nick $2 is not in $chan $+ !
}
}

/////// the set -u5 or -u10 is the time between 2 commands

 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.