Initial Commit
Initial Commit
This commit is contained in:
24
_module/nss/bjsitdown.nss
Normal file
24
_module/nss/bjsitdown.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user