How to do a check on an event in another map

So I need to figure out how to check if a self switch on a event in another map is on using script calls. I don't want to use switches to check for this because the particular thing I'm making is going to be a common part of the game and I might end up with needing to map hundreds of switches.
So whats going to happen is that when you open a door there is a chance of it making noise, you can reduce this by oiling the hinges. Now after entering through the now oiled door and going to the next map that door needs to also show it has oiled hinges. This is going to be a common thing so I don't want to use switches to check for this because its just going to get really hard to manage, so a script call is the best solution, but I'm not certain how to do this.
$gameSelfSwitches.value([mapId, eventId, 'switch'])==true
You can exclude the ==true part though.
So it would look something like

$gameSelfSwitches.value([2, 1, 'a'])==true
Not 'a'. It's 'A'.
Hey thanks that worked perfect!
Just one added info:
This only works because switch data is stored outside all maps.

Other event data can't be accessed that way because only one map exists at any given time. That is why the maps reset on load - they're loaded from file, deleting the previous map data, and only the data that is not stored on the map itself is retained.
So what data is stored outside of maps besides switches? I'm assuming variables also because that data seems to cross between maps.
only switches and variables.
you can see it on the name - anything datamap and gamemap is overwritten
Why don't you just use a switch that activates when the self switch of the previous map activates? The only info that can travel through maps are switches, variables and basically anything in the database.
Because with the way this is going to work and that these types of events are going to be fairly common managing all those switches is going to get way to hard.
Using a script command may seem more complicated but it actually frees up a lot more room for me to use switches for other things that need them.
The solution provided works absolutely perfect and means I don't have to make a new switch for every event.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-do-a-check-on-an-event-in-another-map.127676/