Arcane Sanctuary script?

Hello,
I have seen various community scripts for clearing or chestruns but never a dedicated script for Arcane Sanctuary and in particular not just pathing and clearing towards Summoner but covering all the 4 directions. It makes sense as Spectres are the highest chance monster for HRs. I have seen separate topics on attempts to develop such script but never a fully working one.

You could just run ghostbusters for that, and if you wanted to only run arcane you could just splice that bit out of ghostbusters into its own script

Thanks for the tip! While GhostBusters.js didn’t specifically include Arcane Sanctuary area I did manage to modify it and create a separate script for that area exclusively. While most of the times Summoner is cleared due to the Spectres nearby I need to find how to include him during clearing. Config.OpenChests works with the script as well.
Here is the script that I am currently using. For those who have nothing better it works fine:
ArcaneSanctuary.js

On the other hand there is a bug that I cannot solve. It might be due to the way Pather.js works or just how Lightning and Chain Lightning skills targeting works. Those skills may have problems in specific areas with obstacles. Most of the time the bug happens in the area of the impossible stairways (Penrose Stairway). The Lightning Sorceress will roll a map where the Spectres will be positioned around a pillar in such a way the pathing AI will place character behind the pillar obstructing the skill targeting to the monsters. This is pure RNG and sometimes it may not happen, most time will happen just once or in some occasions it may take twice the time to run the map if very unlucky.

I will post examples with the console output: