string sDeny; string sOilCan; /* Script generated by Lilac Soul's NWN Script Generator, v. 1.2 For download info, please visit: http://www.angelfire.com/space/lilacsoul */ //Put this OnUsed void main() { object oPC = GetLastUsedBy(); if (!GetIsPC(oPC)) return; if (GetItemPossessedBy(oPC, "it_OilCan")== OBJECT_INVALID) { sDeny="This lever is too rusty to move. Maybe if it was oiled it could be moved..."; SendMessageToPC(oPC, sDeny); return; } object oTarget = GetItemPossessedBy(oPC, "it_OilCan"); DestroyObject(oTarget, 0.0); sOilCan="I could use Isaac's oil can to help move this rusty lever..."; SendMessageToPC(oPC, sOilCan); object oDoor = GetNearestObjectByTag ("CarlasCellDoor"); if (GetLocalInt (OBJECT_SELF, "m_bActivated") == TRUE) { SetLocalInt (OBJECT_SELF, "m_bActivated", FALSE); PlayAnimation (ANIMATION_PLACEABLE_DEACTIVATE); AssignCommand (oDoor, ActionCloseDoor (oDoor)); SetLocked (oDoor,TRUE); } else { SetLocalInt (OBJECT_SELF, "m_bActivated", TRUE); PlayAnimation (ANIMATION_PLACEABLE_ACTIVATE); AssignCommand (oDoor, ActionOpenDoor (oDoor)); SetLocked (oDoor,FALSE); } }