Change skills targeting random enemies to targeting adjacent enemies?

A skill's scope can have it target 2, 3, or 4 randomly picked enemies, which I like a lot as it gives a bit of a middle ground between targeting one enemy and targeting all of them. That said, I would love if there were a way to give a player more control over these attacks by changing it from random to targeting adjacent enemies. E.g. a skill targeting two enemies can target any two enemies next to each other of your choice. Is this doable?
You'll need a script for this, and that depends on the maker you're using.

You posted in the section for RMVXAce, but your profile says you're using RMXP

If you're asking for Ace, Yanfly should have a script for area of effect targeting
I'm using VX Ace. My profile still says XP because that's what I have the most experience with, but I use multiple versions.

Where could I find Yanfly's script?
his new website is www.yanfly.moe
but several of his older scripts need a bit of search through his github link that you should also find there

EDIT:
sorry, better start here:
Thanks, I appreciate it!
@level2janitor I edited my post while you were also posting
This is really interesting. Doesn't quite do what I was looking for, but using visible areas of effect is fun. I'll probably use this one if I can't find a script closer to what I asked for.

Original thread: https://forums.rpgmakerweb.com/threads/change-skills-targeting-random-enemies-to-targeting-adjacent-enemies.158051/