So I'm trying to make an npc that, when placed, will send a trigger through all other npcs in the area with the same class as itself (and the same dropper).
I've managed to get the following script to work so far:
PHP Code:
for(temp.n : findareanpcs(this.x - 32, this.y - 32, 64, 64){
echo(n.joinedclasses);
}
However, although this picks up other npcs in the area just fine, this one one the other hand will ignore itself and others like it. I'm assuming it's because the others are level npcs joined to a class, while this was placed with:
PHP Code:
temp.npc = putnpc2(<x>,<y>,"");
npc.join("<classname>");
npc.dropper = player.account;
On a similar note, if I try to match the npc.id to the ones found, I won't get any results. echoed results will consist of id's in the 1-30's, while echoing this.id onCreated returns 300.
Can anyone help me figure out what's going wrong?
This is all being done serverside if that makes a difference in this case.