Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-12-2011, 09:11 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
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.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
  #2  
Old 05-12-2011, 09:15 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
can't you then just trigger it anyway?

HTML Code:
npc.onDoAction();
__________________
Reply With Quote
  #3  
Old 05-12-2011, 09:29 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Alright, I think I got it now. Thanks =)
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:49 PM.


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