function 队伍_等等队伍集合(nDis,nOutTime,szCtrl,跳转标签)
local bsult = false
nOutTime = nOutTime or -1
nDis = nDis or 5
local fn = function ()
local nMax = 10
local tlist = M_取队伍属性()
local nCount = 0
if tlist and tlist.numGroupMembers then
if tlist.numGroupMembers ~= 0 and tlist.tTeamInfo and #tlist.tTeamInfo > 0 then
nMax = #tlist.tTeamInfo
for k,v in ipairs(tlist.tTeamInfo) do
if GetDis(v.nX,v.nY,v.nZ) <= nDis then
nCount = nCount + 1
end
end
end
end
return nCount,nMax
end
local nStart = os.time()
while true do
local nCount,nMax = fn()
OutputMessage("人数:%d/%d,范围:%d",nCount,nMax,nDis)
if nOutTime ~= -1 and os.time() - nStart >= nOutTime then
OutputMessage("超时退出..")
break
end
if nCount == nMax then
bsult = true
OutputMessage("全部到齐")
break
end
end
条件跳转至标签(szCtrl,跳转标签,bsult)
return bsult
end
local bsult = false
nOutTime = nOutTime or -1
nDis = nDis or 5
local fn = function ()
local nMax = 10
local tlist = M_取队伍属性()
local nCount = 0
if tlist and tlist.numGroupMembers then
if tlist.numGroupMembers ~= 0 and tlist.tTeamInfo and #tlist.tTeamInfo > 0 then
nMax = #tlist.tTeamInfo
for k,v in ipairs(tlist.tTeamInfo) do
if GetDis(v.nX,v.nY,v.nZ) <= nDis then
nCount = nCount + 1
end
end
end
end
return nCount,nMax
end
local nStart = os.time()
while true do
local nCount,nMax = fn()
OutputMessage("人数:%d/%d,范围:%d",nCount,nMax,nDis)
if nOutTime ~= -1 and os.time() - nStart >= nOutTime then
OutputMessage("超时退出..")
break
end
if nCount == nMax then
bsult = true
OutputMessage("全部到齐")
break
end
end
条件跳转至标签(szCtrl,跳转标签,bsult)
return bsult
end