If you're trying to do what I think you're trying to do, I would probably do this:
In the class that is being joined via putnpc's
PHP Code:
//Store the NPC's name along with some way to indentify it in a database
function onCreated() {
(@ "DBNPC_NAME").(@ this.level.name @ "_" @ this.id) = this.name;
}
In a weapon:
PHP Code:
function getNPC( NPC_LEVEL, NPC_ID ) {
//Get the NPC's name
temp.npcname = (@ "DBNPC_NAME").(@ NPC_LEVEL @ "_" @ NPC_ID);
//Get the actual NPC object
temp.npc = findNPC( npcname );
//Bam
npc.DoServerSideStuff();
}