25 lines
603 B
Plaintext
25 lines
603 B
Plaintext
|
void main()
|
||
|
{
|
||
|
|
||
|
// Get the character using the object.
|
||
|
object oPlayer = GetLastUsedBy();
|
||
|
|
||
|
// Make certain that the character is a PC.
|
||
|
if( GetIsPC( oPlayer ) )
|
||
|
{
|
||
|
|
||
|
// Get the object being sat on.
|
||
|
object oChair = OBJECT_SELF;
|
||
|
|
||
|
// If the object is valid and nobody else is currently sitting on it.
|
||
|
if( GetIsObjectValid( oChair ) &&
|
||
|
!GetIsObjectValid( GetSittingCreature( oChair ) ) )
|
||
|
{
|
||
|
// Let the player sit on the object.
|
||
|
AssignCommand( oPlayer, ActionSit( oChair ) );
|
||
|
}
|
||
|
|
||
|
} // End if
|
||
|
|
||
|
} // End main
|