By Leviathan.Comeatmebro 2018-05-21 15:15:46
It's certainly possible, limitation would be what the client knows. For party members or anyone logged in on your current PC, that's simple as you have an active list of all debuffs. Just prioritize them from most to least important(the macro would probably not be used in high stress situations anyway, just a lazy way to remove single debuffs) and check which debuffs are active on the target.
For anyone that's not in your immediate party or on your local PC, you could still track spells and TP used, but it becomes much much more complicated at that point. You have no way of telling if a TP move that did damage inflicted a status on anyone outside of your immediate party, nor when the debuff caused would have wore off. The best that could be easily done in these cases is a rough guideline, where the -na changes based on last TP move used against them.