oxy("rule _Debug46 active runImmediately { "); oxy("if((trTime()-cActivationTime) >= 2.00000000){"); oxy("xsSetContextPlayer(0);"); for(i=0;<8) { oxy("trChatSendSpoofed(0,\"Player:"+i+"rmGetPlayerCiv:"+rmGetPlayerCiv(i)+"\");"); oxy("trChatSendSpoofed(0,\"Player:"+i+"rmGetPlayerCulture:"+rmGetPlayerCulture(i)+"\");"); oxy("trChatSendSpoofed(0,\"Player:"+i+"rmGetPlayerTeam:"+rmGetPlayerTeam(i)+"\");"); oxy("trChatSendSpoofed(0,\"Player:"+i+"rmGetHomeCityLevel:"+rmGetHomeCityLevel(i)+"\");"); oxy("trChatSendSpoofed(0,\"Player:"+i+"rmGetNumberFairLocs:"+rmGetNumberFairLocs(i)+"\");");
} for(i=0;<=3) { oxy("trChatSendSpoofed(0,\"Team:"+i+"rmGetNumberPlayersOnTeam:"+rmGetNumberPlayersOnTeam(i)+"\");"); } oxy("trChatSendSpoofed(0,\"rmGetHighHomeCityLevel:"+rmGetHighHomeCityLevel()+"\");"); oxy("trChatSendSpoofed(0,\"rmGetAverageHomeCityLevel:"+rmGetAverageHomeCityLevel()+"\");"); oxy("trChatSendSpoofed(0,\"rmGetIsRelicCapture:"+rmGetIsRelicCapture()+"\");"); oxy("trChatSendSpoofed(0,\"rmGetLowHomeCityLevel:"+rmGetLowHomeCityLevel()+"\");");
oxy("trChatSendSpoofed(0,\"rmGetMapXSize:"+rmGetMapXSize()+"\");"); oxy("trChatSendSpoofed(0,\"rmGetMapZSize:"+rmGetMapZSize()+"\");"); oxy("trChatSendSpoofed(0,\"rmGetNomadStart:"+rmGetNomadStart()+"\");"); oxy("trChatSendSpoofed(0,\"rmGetSeaLevel:"+rmGetSeaLevel()+"\");"); oxy("xsDisableRule(\"_Debug46\");"); oxyZ("}} /*");
rule _Debug46 active runImmediately { if((trTime()-cActivationTime) >= 2.00000000){ xsSetContextPlayer(0); trChatSendSpoofed(0,"Player:0rmGetPlayerName:大自然"); trChatSendSpoofed(0,"Player:0rmGetPlayerCiv:0"); trChatSendSpoofed(0,"Player:0rmGetPlayerCulture:-1"); trChatSendSpoofed(0,"Player:0rmGetPlayerTeam:-1"); trChatSendSpoofed(0,"Player:0rmGetHomeCityLevel:10"); trChatSendSpoofed(0,"Player:0rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Player:1rmGetPlayerName:1"); trChatSendSpoofed(0,"Player:1rmGetPlayerCiv:20"); trChatSendSpoofed(0,"Player:1rmGetPlayerCulture:12"); trChatSendSpoofed(0,"Player:1rmGetPlayerTeam:0"); trChatSendSpoofed(0,"Player:1rmGetHomeCityLevel:131"); trChatSendSpoofed(0,"Player:1rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Player:2rmGetPlayerName:拿破仑"); trChatSendSpoofed(0,"Player:2rmGetPlayerCiv:3"); trChatSendSpoofed(0,"Player:2rmGetPlayerCulture:1"); trChatSendSpoofed(0,"Player:2rmGetPlayerTeam:0"); trChatSendSpoofed(0,"Player:2rmGetHomeCityLevel:10"); trChatSendSpoofed(0,"Player:2rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Player:3rmGetPlayerName:海华沙"); trChatSendSpoofed(0,"Player:3rmGetPlayerCiv:15"); trChatSendSpoofed(0,"Player:3rmGetPlayerCulture:11"); trChatSendSpoofed(0,"Player:3rmGetPlayerTeam:1"); trChatSendSpoofed(0,"Player:3rmGetHomeCityLevel:10"); trChatSendSpoofed(0,"Player:3rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Player:4rmGetPlayerName:阿克巴大帝"); trChatSendSpoofed(0,"Player:4rmGetPlayerCiv:21"); trChatSendSpoofed(0,"Player:4rmGetPlayerCulture:13"); trChatSendSpoofed(0,"Player:4rmGetPlayerTeam:0"); trChatSendSpoofed(0,"Player:4rmGetHomeCityLevel:10"); trChatSendSpoofed(0,"Player:4rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Player:5rmGetPlayerName:拿骚的莫里斯"); trChatSendSpoofed(0,"Player:5rmGetPlayerCiv:5"); trChatSendSpoofed(0,"Player:5rmGetPlayerCulture:1"); trChatSendSpoofed(0,"Player:5rmGetPlayerTeam:1"); trChatSendSpoofed(0,"Player:5rmGetHomeCityLevel:10"); trChatSendSpoofed(0,"Player:5rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Player:6rmGetPlayerName:夸乌特莫克"); trChatSendSpoofed(0,"Player:6rmGetPlayerCiv:17"); trChatSendSpoofed(0,"Player:6rmGetPlayerCulture:9"); trChatSendSpoofed(0,"Player:6rmGetPlayerTeam:0"); trChatSendSpoofed(0,"Player:6rmGetHomeCityLevel:10"); trChatSendSpoofed(0,"Player:6rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Player:7rmGetPlayerName:Kira"); trChatSendSpoofed(0,"Player:7rmGetPlayerCiv:27"); trChatSendSpoofed(0,"Player:7rmGetPlayerCulture:15"); trChatSendSpoofed(0,"Player:7rmGetPlayerTeam:1"); trChatSendSpoofed(0,"Player:7rmGetHomeCityLevel:10"); trChatSendSpoofed(0,"Player:7rmGetNumberFairLocs:0"); trChatSendSpoofed(0,"Team:0rmGetNumberPlayersOnTeam:4"); trChatSendSpoofed(0,"Team:1rmGetNumberPlayersOnTeam:4"); trChatSendSpoofed(0,"Team:2rmGetNumberPlayersOnTeam:0"); trChatSendSpoofed(0,"Team:3rmGetNumberPlayersOnTeam:0"); trChatSendSpoofed(0,"rmGetHighHomeCityLevel:131"); trChatSendSpoofed(0,"rmGetAverageHomeCityLevel:25"); trChatSendSpoofed(0,"rmGetIsRelicCapture:0"); trChatSendSpoofed(0,"rmGetLowHomeCityLevel:10"); trChatSendSpoofed(0,"rmGetMapXSize:310"); trChatSendSpoofed(0,"rmGetMapZSize:310"); trChatSendSpoofed(0,"rmGetNomadStart:0"); trChatSendSpoofed(0,"rmGetSeaLevel:0.000000"); xsDisableRule("_Debug46"); }
一般来说:rm命令不建议使用rmGetPlayerName,会出严重问题 1.AI名称由于stringtabley不统一造成无法同步(我曾经用来测试两个人分别加载不同地形) 2.触发程序因为中文字全部失效 3.自己体会
取而代之可以使用kbGetPlayerName;只能用于触发程序 oxy("rule _Debug47 active runImmediately { "); oxy("if((trTime()-cActivationTime) >= 2.00000000){"); for(i=0;<=8) { oxy("xsSetContextPlayer("+i+");"); oxy("trChatSendSpoofed(0,\"Player:"+i+";kbGetPlayerName("+i+"):\"+kbGetPlayerName("+i+"));");
} oxy("xsDisableSelf();"); oxyZ("}} /*");
上面最终输出,因为原代码层不涉及中文字,所以能成功输出 rule _Debug47 active runImmediately { if((trTime()-cActivationTime) >= 2.00000000){ xsSetContextPlayer(0); trChatSendSpoofed(0,"Player:0;kbGetPlayerName(0):"+kbGetPlayerName(0)); xsSetContextPlayer(1); trChatSendSpoofed(0,"Player:1;kbGetPlayerName(1):"+kbGetPlayerName(1)); xsSetContextPlayer(2); trChatSendSpoofed(0,"Player:2;kbGetPlayerName(2):"+kbGetPlayerName(2)); xsSetContextPlayer(3); trChatSendSpoofed(0,"Player:3;kbGetPlayerName(3):"+kbGetPlayerName(3)); xsSetContextPlayer(4); trChatSendSpoofed(0,"Player:4;kbGetPlayerName(4):"+kbGetPlayerName(4)); xsSetContextPlayer(5); trChatSendSpoofed(0,"Player:5;kbGetPlayerName(5):"+kbGetPlayerName(5)); xsSetContextPlayer(6); trChatSendSpoofed(0,"Player:6;kbGetPlayerName(6):"+kbGetPlayerName(6)); xsSetContextPlayer(7); trChatSendSpoofed(0,"Player:7;kbGetPlayerName(7):"+kbGetPlayerName(7)); xsSetContextPlayer(8); trChatSendSpoofed(0,"Player:8;kbGetPlayerName(8):"+kbGetPlayerName(8)); xsDisableSelf(); }}
|