mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
49 lines
1.0 KiB
Plaintext
49 lines
1.0 KiB
Plaintext
/**********************************************************************
|
|
|
|
*
|
|
* Title: player_seated.script
|
|
* Description: script for handling seated players
|
|
|
|
**********************************************************************/
|
|
|
|
/***** INCLUDES ********************************************************/
|
|
|
|
include library.furniture;
|
|
|
|
/***** CONSTANTS *******************************************************/
|
|
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
trigger OnAttach()
|
|
{
|
|
if ( !hasObjVar(self, furniture.VAR_PLAYER_SEAT_ID) )
|
|
{
|
|
detachScript(self, furniture.SCRIPT_PLAYER_SEATED);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnChangedPosture(int before, int after)
|
|
{
|
|
if ( before == POSTURE_SITTING )
|
|
{
|
|
furniture.unseat(self);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnEnteredCombat()
|
|
{
|
|
queueCommand(self, ##"stand", null, "", COMMAND_PRIORITY_FRONT);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnLogout()
|
|
{
|
|
furniture.unseat(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
|
|
/***** TRIGGERS ********************************************************/
|