The Idea: Each area has a list of possible targets that is priorized.
Whenever you get into a room, it tries to order the things in the room by that priority to attack.
New possible targets are added by killing them once.
Use "kconfig bashing" to toggle the script on and off.
"kconfig bashing prios" shows the list of known areas.
"kconfig bashing prios <area name>" or click on area in the list shows the target prio list and lets you manage it.
The keybinding F2 starts the automatic attacking, F3 lets you flee into the last room you visited. To change the direction use "flee <direction>" to set a new direction.
The script fires the events "keneanung.bashing.targetList.changed" on any change of the target list and additionally "keneanung.bashing.targetList.firstChanged" on changing the next target (with the target as argument).
Please let me know, when you have issues, ideas, bugs etc.