Jaysyn904 22947ad4b6 Initial Upload
Initial Upload
2023-08-08 16:22:17 -04:00

31 lines
743 B
Plaintext

/* 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.
}
}
}
}