I did something similar a while ago.
I have a weapon script which creates an NPC using putnpc2. When that NPC is touched it triggers an action on the weapon NPC.
In the placed npc I just have triggeraction(0,0,"serverside","npc name",params);
I'm pretty sure that works,
if not, you can always use findweapon.
Master
NPC Code:
//#CLIENTSIDE
function onCreated(){
findweapon("Chompy/Test").trigger();
}
Chompy/Test
NPC Code:
function onActionServerside()
{
if ( params[ 0] == "actiontest")
echo( params[ 1]);
}
//#CLIENTSIDE
public function trigger() {
triggeraction(0,0,"serverside","Chompy/Test","actiontest");
}