Area Changes and other fixes

Added CCOH
Fixed some on death issues
Fixed the gaurd
Added Server Enty/ooc
changed some areas back to original craftable
This commit is contained in:
2024-08-30 10:02:16 -04:00
parent 034a2cd838
commit d39928374d
5670 changed files with 373265 additions and 173083 deletions

View File

@@ -0,0 +1,44 @@
//Standard script to allow a placeable bench to sit two players
void main()
{
object oPlayer = GetLastUsedBy();
object oBench = OBJECT_SELF;
object oPillow1 = GetLocalObject( OBJECT_SELF, "Pillow 1" );
object oPillow2 = GetLocalObject( OBJECT_SELF, "Pillow 2" );
if( !GetIsObjectValid( oPillow1 ) )
{
object oArea = GetArea( oBench );
vector locBench = GetPosition( oBench );
float fOrient = GetFacing( oBench );
location locPillow1 = Location( oArea, locBench + AngleToVector( fOrient + 90.0f ) / 2.0f, fOrient );
location locPillow2 = Location( oArea, locBench + AngleToVector( fOrient - 90.0f ) / 2.0f, fOrient );
oPillow1 = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisobj", locPillow1 );
oPillow2 = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisobj", locPillow2 );
SetLocalObject( OBJECT_SELF, "Pillow 1", oPillow1 );
SetLocalObject( OBJECT_SELF, "Pillow 2", oPillow2 );
}
if( GetDistanceBetween( oPlayer, oPillow1 ) < GetDistanceBetween( oPlayer, oPillow2 ) )
{
if( !GetIsObjectValid( GetSittingCreature( oPillow1 ) ) )
{
AssignCommand( oPlayer, ActionSit( oPillow1 ) );
}
else
{
AssignCommand( oPlayer, ActionSit( oPillow2 ) );
}
}
else
{
if( !GetIsObjectValid( GetSittingCreature( oPillow2 ) ) )
{
AssignCommand( oPlayer, ActionSit( oPillow2 ) );
}
else
{
AssignCommand( oPlayer, ActionSit( oPillow1 ) );
}
}
}