Determine if Events are near other Events

Hello.
I am trying to figure out if there is a way (plugin is fine if needed) to have an event, check if its near other events (I can set the distance) without having to use a hundred different variable branches.
For instance, I am trying to make like a resource placing system game inside my RPG, and I want a magic crystal to check if its near other magic crystals. If so, draw lines between each event and add to a variable to increase magic power.
I have found plugins for events to trigger based on player proximity but I want event to event proximity.
Any ideas?
Checking event proximity with a script call wouldn't be all that hard… but drawing lines is probably quite difficult.

The following script call in a Control Variables node will give you the distance between events 12 and 13:

JavaScript:
$gameMap.distance(this.character(12).x, this.character(12).y, this.character(13).x, this.character(13).y)

Use 0 for the player, or -1 for the currently running event.

Keep in mind that (assuming no plugns change it) this is "taxicab distance" and not "Euclidean distance". That means the distance to a diagonally-adjacent tile is 2, rather than 1.414 (square root of 2).

Original thread: https://forums.rpgmakerweb.com/threads/determine-if-events-are-near-other-events.182050/