Initial Upload
Initial Upload
This commit is contained in:
34
_module/nss/sei_sit.nss
Normal file
34
_module/nss/sei_sit.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// NWSit
|
||||
//
|
||||
// Script to make the PC using the object sit on it.
|
||||
//
|
||||
// (c) Shir'le E. Illios, 2002 (shirle@drowwanderer.com)
|
||||
//
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user