说句实话,我完全不想用这决定版搞测试,3060显卡光是一句循环输出就可以搞到卡个1分钟又或者无响应 for(i=1;<15){trChatSendSpoofed(0,i+":"+kbIsPlayerValid(i));}
亚洲王朝无论怎样输出都没问题,我甚至还试过16分钟输出48万次
暂时记录一下数据: rule _Debug70 minInterval 2 active runImmediately { if((trTime()-cActivationTime) >= 1.00000000){ xsSetContextPlayer(1); for(i=1;<=8){trChatSendSpoofed(0,"kbIsPlayerValid"+i+":"+kbIsPlayerValid(i));} for(i=1;<=8){trChatSendSpoofed(0,"kbIsPlayerEnemy"+i+":"+kbIsPlayerEnemy(i));} for(i=1;<=8){trChatSendSpoofed(0,"kbIsPlayerAlly"+i+":"+kbIsPlayerAlly(i));} for(i=1;<=8){trChatSendSpoofed(0,"kbIsPlayerHuman"+i+":"+kbIsPlayerHuman(i));} for(i=1;<=8){trChatSendSpoofed(0,"kbIsPlayerNeutral"+i+":"+kbIsPlayerNeutral(i));} for(i=1;<=8){trChatSendSpoofed(0,"kbIsPlayerResigned"+i+":"+kbIsPlayerResigned(i));} xsDisableSelf(); }}
kbIsPlayerValid若当前玩家存在返回1,不存在返回0 kbIsPlayerEnemy若当前对象玩家是敌人返回1,否则返回0;(需要用xsSetContextPlayer指定相对于哪个玩家) kbIsPlayerAlly若当前对象玩家是盟友返回1,否则返回0;(需要用xsSetContextPlayer指定相对于哪个玩家) kbIsPlayerResigned若当前对象玩家不存在或者已出局,返回1,否则返回0
无语,我彻底服了 注入式地图触发中while循环不能添加任何判断式,否则无法解析
aoebbs("rule _Debug70 minInterval 2 active runImmediately {"); aoebbs("if((trTime()-cActivationTime) >= 1.00000000){"); aoebbs("bool whilebool = true;"); aoebbs("int PlayerCount = 1;"); aoebbs("while(whilebool)"); aoebbs("{"); aoebbs("if(kbIsPlayerValid(PlayerCount))"); aoebbs("{"); aoebbs("PlayerCount = PlayerCount + 1;"); aoebbs("}"); aoebbs("else"); aoebbs("{"); aoebbs("whilebool = false;"); aoebbs("}"); aoebbs("}");
aoebbs("PlayerCount = PlayerCount - 1;"); aoebbs("trChatSendSpoofed(0,\"PlayerCount:\"+PlayerCount);");
aoebbs("for(PlayerID=1;<=PlayerCount)"); aoebbs("{"); aoebbs("xsSetContextPlayer(PlayerID);"); //aoebbs("for(EnemyAlive=0;<0){}"); aoebbs("static int EnemyAlive=0;"); aoebbs("for(i=1;<=PlayerCount)"); aoebbs("{"); aoebbs("if(kbIsPlayerEnemy(i)) "); aoebbs("{"); aoebbs("if(trPlayerActive(i))"); aoebbs("{"); aoebbs("EnemyAlive = 1;"); aoebbs("}"); aoebbs("}"); aoebbs("}");
aoebbs("if(EnemyAlive == 0)"); aoebbs("{"); aoebbs("if(trCurrentPlayer() == PlayerID && trPlayerActive(PlayerID))"); aoebbs("{"); aoebbs("trYouWin(true);"); aoebbs("}"); aoebbs("}"); aoebbs("}");
|