Originally Posted by fireundubh
Your first try was almost correct. Here's an example from the game:

Code
IF
CharacterUsedItem(_,ITEMGUID_S_RC_DF_WitchCellar_Lever_000_77969906-64c9-45cd-9740-2270e5b3d5ab)
AND
ItemIsOpened(ITEMGUID_S_RC_DF_WitchCellar_Door_000_27406f3b-4e45-482b-a386-581fd5b99aa6,0)
THEN
ItemUnlockAndOpen(ITEMGUID_S_RC_DF_WitchCellar_Door_000_27406f3b-4e45-482b-a386-581fd5b99aa6);

IF
CharacterUsedItem(_,ITEMGUID_S_RC_DF_WitchCellar_Lever_000_77969906-64c9-45cd-9740-2270e5b3d5ab)
AND
ItemIsOpened(ITEMGUID_S_RC_DF_WitchCellar_Door_000_27406f3b-4e45-482b-a386-581fd5b99aa6,1)
THEN
ItemCloseAndLock(ITEMGUID_S_RC_DF_WitchCellar_Door_000_27406f3b-4e45-482b-a386-581fd5b99aa6,"NO_KEY");


The ItemUnlockAndOpen and ItemCloseAndLock procedures are from the shared __PROC story script.

They should be available to custom campaigns, if you're working on one.


Worked perfectly! Thanks!