Aantioch_Infernum/_module/nss/sitchairbreak.nss
Jaysyn904 22947ad4b6 Initial Upload
Initial Upload
2023-08-08 16:22:17 -04:00

37 lines
1.1 KiB
Plaintext

/* Breakable Chairs Script #2, created by Chimera (naoki_7@sluggy.net)
This is the script with the action: When this script is activated, the PC
recieves a message, is pushed out of the chair, knocked to the floor, cusses (wouldn't you?),
and the chair is destroyed and replaced by a broken one.
*/
void main()
{
object oChair = OBJECT_SELF;
location lChair = GetLocation(OBJECT_SELF);
object oSitter = GetSittingCreature(oChair);
int iWeight = GetWeight(oSitter);
if (GetIsPC(oSitter)) // Checks to make sure PC is still sitting
{
FloatingTextStringOnCreature("Your chair could not handle the weight you carry!", oSitter);
AssignCommand(oSitter, ClearAllActions()); // This makes the PC stand up
DestroyObject(oChair);
CreateObject(OBJECT_TYPE_PLACEABLE,"BrokenChair3",
lChair,FALSE,"SitBrokenChair"); // This last tag must match the
//tag of the broken chair placeable with the "sitchairfix" script
AssignCommand(oSitter, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_BACK, 1.0, 3.0));
//Haha, splayed on the ground, Shallow-Hal style. ^_^
PlayVoiceChat(VOICE_CHAT_CUSS, oSitter);
}
}