You can save the chest's state. I believe you do this by writing a number to Screen->Misc[] when the chest is opened. Then, when the screen loads, have the FFC script check Screen->Misc[], and if Screen->Misc[] contains that number, then change the chest to its open state and terminate the script.
Here's an example:
ffc script DoStuff { void run() { if (Screen->Misc[2] == 500) { //Yes, that number is a little extreme. Quit(); } bool Open = true; while (Open) { if (true) { //Enter your condition here. //Do stuff here. Screen->Misc[2] = 500; Open = false; } Waitframe(); } } }
That's basically how you do that. I'm not really an expert scripter, so I might be wrong. But that's how I think you would do it.