; !add <locations separated by comma> : <items separated by comma>
; (the $gettok($v1,1-,32) will remove leading/trailing spaces of locations/items)
on *:text:!add *:#: {
tokenize 58 $2-
var %n = 1
while ($gettok($1,%n,44)) {
var %location = $replace($gettok($v1,1-,32),$chr(32),_), %x = 1
while ($gettok($$2-,%x,44)) {
hadd -m items %location $addtok($hget(items,%location),$gettok($v1,1-,32),44)
inc %x
}
inc %n
}
}