Files
HeroesStone_PRC8/_module/nss/cr_vampire_inc.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

35 lines
968 B
Plaintext

object GetGoodCoffin( object oSeeker, int bShade = FALSE )
{
object oCoffin, oResult;
string sTag = GetTag( oSeeker );
int i = 0;
if( !bShade ) sTag += "_SHAD";
oCoffin = GetObjectByTag( sTag, i );
while( GetIsObjectValid( oCoffin ) )
{
if( GetObjectType( oCoffin ) == OBJECT_TYPE_PLACEABLE &&
!GetLocalInt( oCoffin, "VAMPIRE_INSIDE" ) )
oResult = oCoffin;
oCoffin = GetObjectByTag( sTag, ++i );
} // while valid coffin
return oResult;
}
void CloseInterveningDoors( object oWalker, object oTarget )
{
object oArea = GetArea( oTarget );
if( GetArea( oWalker ) == oArea ) return;
object oDoor = GetFirstObjectInArea( GetArea( OBJECT_SELF ) );
while( GetIsObjectValid( oDoor ) )
{
if( GetArea( GetTransitionTarget( oDoor ) ) == oArea )
AssignCommand( oDoor, ActionCloseDoor( oDoor ) );
oDoor = GetNextObjectInArea();
}
}
// void main(){}