Excaliber's post made me giggle.
Spanky, there's a predefined NPC function in the editor. It pastes in an already made NPC and uses the variables you type in.
You just add a .txt file to levels/npcs/, like this one:
PHP Code:
//#COMMENTS Changes the tileset of the level
//#EDIT Tileset pics1.png
//#CLIENTSIDE
function onPlayerEnters() {
addtiledef(Tileset, level, 0);
}
You can then go to 'Predefined NPCs' in the level editor, select this one, type in the tileset image, and place it in the level.