以下仅为学习笔记~

function IXotakes nothing returns boolean
return(GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)and(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function IOo takes nothing returns nothing
call CustomDefeatBJ(GetEnumPlayer(),"不允许单人模式")
endfunction
function IRo takes nothing returns boolean
return(X<2)
endfunction
function IIo takes nothing returns nothing
set X=0
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=8
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(IXo())then
set X=(X+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(IRo())then
call ForForce(bj_FORCE_ALL_PLAYERS,function IOo)
else
set lx=true
endif
endfunction

set hS=CreateTrigger()
call TriggerRegisterTimerEventSingle(hS,.05)
call TriggerAddAction(hS,function IIo)

trigger hS=null