The macro to prevent automatic exclusion from the game (anti-AFC) is implemented simply, but its function is very useful for accumulating experience or time in game events. Just enter the gym, activate the macro, and it will start working, protecting you from being kicked for inaction until the end of the match.