This should go through a kill everything.
PHP Code:
function onCreated() {
maxlooplimit = 100000;
temp.lvls.loadfolder("levels/*.nw", 1);
for (temp.lvl: temp.lvls) {
temp.npcs = findlevel(temp.lvl).npcs;
for (temp.npc: temp.npcs) {
temp.npc.destroy();
}
}
echo("EVERYTHING HAS BEEN DESTROYED");
}
Then you'll have to clearnpcs manually for your gmaps. I.e.
/clearnpcs yourworld.gmap