It's fairly easy to send data from serverside > clientside via attr[]'s. You can do checks like that if you'd like.
What I also did was set-up a DBNPC that would intercept the triggerserver's/triggerclient's from the local NPC, and then do the communication in the DBNPC itself and then resend the function. However, I only did this for clientside > serverside, so I'm not particularly sure of how that'd work the other way around
DBNPC:
PHP Code:
function onActionServerside(cmd,lvl,checkid) {
if (cmd == "checkhit") {
for (temp.i: findlevel(lvl).npcs) {
if (i.id == checkid) {
i.test();
break;
}
}
}
}
And in the level itself(from the clientside):
PHP Code:
triggerserver("npc","mydbnpc","checkhit",this.level.name,this.id);