for id = 1, MAX_BOSS_FRAMES do local frame = _G[("mBoss%uTargetFrame"):format(id)] if frame then RegisterStateDriver(frame, "visibility", ("[@boss%u,exists] show; hide"):format(id)) end end