PDA

View Full Version : Area Effect Script


harIII
09-17-2009, 08:29 AM
May I please get a script that affects everybody except party members and only those that are hostile within five feet of the PC?

Star Admiral
09-17-2009, 11:53 PM
void main() {
object oTarget = GetFirstObjectInShape( SHAPE_SPHERE, 5.00, GetLocation( GetFirstPC() ), FALSE, OBJECT_TYPE_CREATURE );
while( GetIsObjectValid( oTarget ) ) {
if( GetIsEnemy( oTarget, GetFirstPC() ) ) {
// Stuff Happens.
}
oTarget = GetNextObjectInShape( SHAPE_SPHERE, 5.00, GetLocation( GetFirstPC() ), FALSE, OBJECT_TYPE_CREATURE );
}
}

Voila. Hope it works.

- Star Admiral