HAHAHA 18 EVENTS?! that's the most retarded way I've ever heard.
Zeriab told you the basics. He's not into telling you the answer, he's into helping you find it for yourself so that it sinks in more.
But unfortunately he is gone, and since you're doing it just a dumb way, then I will tell you how.
ONE EVENT.
Make an event for your chest.
Make it 2 pages.
On the SECOND PAGE, turn on one of the conditions as a self switch (which ever letter you want, I use 'A' first.)
Back on the 1st page, make the event player activated.
In the event commands you only need 2 things. A movement command and a selfswitch trigger.
Movement:
Face LEFT
Wait: 5 Frames
Face RIGHT
Wait: 5 Frames
SelfSwitch A: ON
On your second page of the event, make sure that it's set to PARALLEL PROCESS. Make sure that the graphic for the second page is set as the chest that you want to open at COMPLETELY OPEN. (The last frame of the open chest.)
Now in the event commands, place whatever you need in there. The chest is open now. To end the second page, either end the event commands with a SelfSwitch A: OFF, or SelfSwitch B: ON and create new page that is the chest open and empty, or Exit Event Processing.
There you go. 1 event and maybe 4 different commands. Easier.
But if you still think making 18 different events to do this same thing is easier for you, then have fun, cause it's probably going to be similar to taking it up the butt for the first time...every time.