Initial Upload
Initial Upload
This commit is contained in:
30
_module/nss/sitchair.nss
Normal file
30
_module/nss/sitchair.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Breakable Chairs Script #3, created by Chimera (naoki_7@sluggy.net)*/
|
||||
|
||||
void main()
|
||||
{
|
||||
object oChair = OBJECT_SELF;
|
||||
object oPC = GetLastUsedBy();
|
||||
int iWeight = GetWeight(oPC); // Reads the weight carried by the sitter.
|
||||
|
||||
if (GetIsPC(oPC))
|
||||
{
|
||||
if (GetIsObjectValid(oChair) && !GetIsObjectValid (GetSittingCreature(oChair)))
|
||||
{
|
||||
AssignCommand(oPC, ActionSit(oChair));
|
||||
|
||||
if (iWeight >= 1000) //The 2000 reads as 200 o.O
|
||||
{
|
||||
|
||||
DelayCommand(10.0, ExecuteScript("sitchairbreak", oChair));
|
||||
//This activates the second script after 15 seconds of sitting.
|
||||
//If the sitter gets up before then, nothing happens.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user