Files
Anphillia_PRC8/_module/nss/charbanelever.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

31 lines
1.0 KiB
Plaintext

#include "nw_i0_tool"
void main()
{
object oDoor = GetObjectByTag("STUCKDOOR"); // assign oDoor the stuck door
object oPC = GetLastUsedBy(); // assign oPC to the player who pulls the lever
int nLeverUnstuck = GetLocalInt(OBJECT_SELF, "UNSTUCK"); // get the status of the lever
if (nLeverUnstuck == FALSE) // is the lever stuck?
{
if (CheckPartyForItem(oPC, "s_item_oilflask") == TRUE) //does the party have some oil?
{
SetLocked(oDoor, FALSE); // unlock the door
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE); // move the lever
PlaySound("as_sw_lever1");
AssignCommand(oDoor, PlaySound("gui_picklockopen"));
SendMessageToPC(oPC, "After pouring a few drops of oil on it, you are able to tug the lever forward.");
SetLocalInt(OBJECT_SELF, "UNSTUCK", TRUE); // set the lever status to unstuck
}
else
{
SendMessageToPC(oPC, "The lever appears to be rusted in place, and will not move.");
}
}
else
{
SendMessageToPC(oPC, "The lever is broken and refuses to budge.");
}
}