Код:
/run for i=1,GetNumBattlefields() do _,_,_,r=GetBattlegroundInfo(i) if r then JoinBattlefield(i) return end end
пробуйте.