Everyone ignore Dunc, he's trying to be friendly but it doesn't seem to be working very well.
Let's analyze this, shall we?
<PRI<FLJ0322:0201<FL+0322<SOU0022<CNP0200:0021:0000
<MSGOpened the chest.<NOD<GIT1002<IT+0002<EQ+0002<CLR
<CMU0010Got the =Map System=!<WAI0160<NOD<RMU<EVE0201
<PRI - This freezes the screen to prevent anything from moving while events function. Message boxes and the like still function.
<FLJ0322:0201 - This checks if flag 0322 is set, and if so jumps to event #0201.
<FL+0322 - This sets flag 0322.
<SOU0022 - This plays sound number 0022, which is probably the chest unlock sound.
<CNP0200:0021:0000 - This changes entity with event number 0200 to entity type 0021 (opened chest, I believe) in direction 0000 (left).
<MSG - This creates a message box on the bottom of the screen. The text that follows it is displayed within the message box.
<NOD - This forces the event to wait for user input to move on in the event.
<GIT1002 - This shows a little picture of item number 0002. Add 1000 to the value to show items.
<IT+0002 - This gives the player item 0002 (the map system).
<EQ+0002 - This equips the map system.
<CLR - This clears, but does not close, the message box.
<CMU0010 - This plays song 0010.
<WAI0160 - This forces the script to wait for 0160 ticks.
<RMU - This restores the music to the previous song.
<EVE0201 - This manually calls event #0201.
The chest becomes open using <CNP, and stays open when you come back into the map using a separate entity that is created if its flag number is set. The entity has a certain characteristic that allows it to do this which you can set in one of the game editors fairly easily. In this case, the open chest entity has flag 0322, so it appears when the closed chest event is called and <FL+0322 is used. Also, the closed chest entity disappears when you come back into the map if its flag number is set. In the original game's code, the open chest entity is placed above the closed chest entity so that it's easier to recognize.
I'm sorry if this is confusing. I've never been a very good teacher.