Don't know if this has been brought up before, but in osbot/tribot APIs you can access information about interactions.
Ex: Whether an NPC is interacting with you, which NPC/Player a character is interacting with, what characters are attacking you, etc.
Tribot example:
RSCharacter
RSCharacter...