18 lines
427 B
Plaintext
18 lines
427 B
Plaintext
|
//Sitting in bench
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oPlayer = GetLastUsedBy ();
|
||
|
object oChair;
|
||
|
if (GetIsPC (oPlayer))
|
||
|
{
|
||
|
oChair = GetNearestObjectByTag ("Bench", oPlayer, 0);
|
||
|
if (GetIsObjectValid(oChair) && !GetIsObjectValid (GetSittingCreature (oChair)))
|
||
|
{
|
||
|
AssignCommand (oPlayer, ActionSit (oChair));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|