Ancordia_PRC8/_module/nss/bjsitdown.nss
Jaysyn904 102ba7dab6 Initial Commit
Initial Commit
2023-09-21 19:51:32 -04:00

25 lines
658 B
Plaintext

/**
* Run when someone sits down
*
* Copyright (C) 2002-2003 Jim Woodgate - woody@realtime.net
*/
void main()
{
object oPC = GetLastUsedBy();
object oChair = OBJECT_SELF;
string oMyTag = GetTag(OBJECT_SELF);
string oDealerTag = GetSubString(oMyTag, 0, GetStringLength(oMyTag)-1);
object oDealer = GetObjectByTag(oDealerTag);
if (GetIsPC(oPC) && GetSittingCreature(oChair) == OBJECT_INVALID) {
AssignCommand(oPC, ActionSit(oChair));
SetCommandable(FALSE, oPC);
if (oDealer != OBJECT_INVALID) {
AssignCommand(oDealer, ActionWait(1.0));
AssignCommand(oDealer, SignalEvent(oDealer, EventUserDefined(210)));
}
}
}