NWScript:
#include "nw_i0_tool"
void main()
{
object oDoor = GetObjectByTag("STUCKDOOR");
object oPC = GetLastUsedBy();
int nLeverUnstuck = GetLocalInt(OBJECT_SELF, "UNSTUCK");
if (nLeverUnstuck == FALSE)
{
if (CheckPartyForItem(oPC, "JAROFOIL") == TRUE)
{
SetLocked(oDoor, FALSE);
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
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);
}
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.");
}
}