Author Sticky: Post Working Scripts Here
SDxEair Posted: Wednesday, 17 July 11:20AM
1. Script Name: object GetFirstPCInArea(object oArea) and object GetNextPCInArea(object oArea)

2. What it does: Uses the standard GetNextPC()/GetFirstPC() to get PC's in a specific Area.

3. Notes: Written By Eair


NWScript:
//Written By Eair

object GetFirstPCInArea(object oAreaTest)

{

    object oPCTestValid = GetFirstPC();

    while(GetArea(oPCTestValid)!=oAreaTest&&GetIsObjectValid(oPCTestValid))

        oPCTestValid = GetNextPC();

    return(oPCTestValid);

}

object GetNextPCInArea(object oAreaTest)

{

    object oPCTestValid = GetNextPC();

    while(GetArea(oPCTestValid)!=oAreaTest&&GetIsObjectValid(oPCTestValid))

        oPCTestValid = GetNextPC();

    return(oPCTestValid);

}



Pls tell me if you find any problems with this script