if table.empty(flags) then return false else --Mithy: Check for existing locks local numflags, numlocked = table.getn(flags), 0 for k, v in flags do if v.CanBeCaptured == false then numlocked = numlocked + 1 end end if numlocked == numflags then return false end end