Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Using findareanpcs and joinedclasses with a putnpc2 npc. (https://forums.graalonline.com/forums/showthread.php?t=134263206)

Jiroxys7 05-12-2011 09:11 PM

Using findareanpcs and joinedclasses with a putnpc2 npc.
 
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.findareanpcs(this.32this.326464){
  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.

xAndrewx 05-12-2011 09:15 PM

can't you then just trigger it anyway?

HTML Code:

npc.onDoAction();

Jiroxys7 05-12-2011 09:29 PM

Alright, I think I got it now. Thanks =)


All times are GMT +2. The time now is 09:41 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.