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