Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   testnpc2 (https://forums.graalonline.com/forums/showthread.php?t=84032)

Angel_Light 02-05-2009 12:36 AM

testnpc2
 
PHP Code:

testnpc2xywidthheight);

EXAMPLE:
testnpc2player.1player.1player.3player.4); 

simply how, onwall2 improved onwall. I'm very disappointed this has yet to be implemented, should be done for all test objects (testplayer, testitem, etc)

Tigairius 02-05-2009 12:47 AM

PHP Code:

TServerLevel.findareanpcs(floatfloatfloatfloat) - returns object
TServerLevel
.getareanpcs(floatfloatfloatfloat) - returns object 

Example:
PHP Code:

for (temp.nfindareanpcs(this.xthis.y44)) {
  if (
temp.n.30) {
    
temp.n.chat "Hello";
  }



Angel_Light 02-05-2009 01:11 AM

Oh wow, thanks, xp, rep++

but! :p

I want, kinda need, it so i can put it in a simple if statement with other variables to check with.

DustyPorViva 02-05-2009 01:15 AM

Quote:

Originally Posted by Angel_Light (Post 1462978)
Oh wow, thanks, xp, rep++

but! :p

I want, kinda need, it so i can put it in a simple if statement with other variables to check with.

Not following.

Tigairius 02-05-2009 01:16 AM

Quote:

Originally Posted by Angel_Light (Post 1462978)
Oh wow, thanks, xp, rep++

but! :p

I want, kinda need, it so i can put it in a simple if statement with other variables to check with.

You'll have to explain it a little better.

DustyPorViva 02-05-2009 01:19 AM

If you put it in a loop like Tig had, each instance of n will be a variable that you can manipulate and extract information from. No different than what you requested. More specifically, each instance will be one of the NPCs.

Angel_Light 02-05-2009 01:38 AM

dusty got it, ill explain it anyways, just as if i were using testnpc2 instead f that chunck

Admins 02-05-2009 10:26 PM

Well like if (findareanpcs(this.x, this.y, 4, 4).size() > 0) echo("detected an npc!"); ?
findareanpcs() is returning an array of npcs at the specified rectangle.


All times are GMT +2. The time now is 09:11 PM.

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