You can use this (it's based on rAthena, I haven't tested on Hercules ;x. I presume it's compatible though!).
- shop #annie_shop -1,501:50,502:50,503:50
prontera,155,155,4 script Annie Shop 757,{
callshop "#annie_shop", 0;
npcshopattach "#annie_shop";
end;
OnBuyItem:
.@map$ = .jmpmaps$[rand(getarraysize(.jmpmaps$))];
getfreecell(.@map$, .@x, .@y);
specialeffect EF_TELEPORTATION2; // For the teleport effect
unitwarp getnpcid(0), .@map$, .@x, .@y;
dispbottom "Teleported NPC to " + .@map$ + " (" + .@x + ", " + .@y + ")";
end;
OnInit:
setarray .jmpmaps$, "hugel", "yuno", "comodo", "xmas", "aldebaran", "izlude", "payon", "geffen", "morocc", "prontera";
end;
}