|
下面這段是目前使用中的原碼
想必紅色的部分就是控制語言的部分
目前只能用英文版的跑Leech
想跪求神人幫忙修正成 中文版D2也能跑leech
感激不盡
Delay(2000);
Say('/f l');
if(chat = controlData.get(controlData.controls.lobby.chat.textBox.channelText))
{
var errors = '';
var found_leader = false;
lines = chat.GetText();
for (var friend = 0; friend < lines.length; friend++)
{
if (lines[friend].lastIndexOf(': '+leaderAccountName+',') > -1)
{
game = '';
found_leader = true;
var regOfflineEnglish=/^\d\s?:\s?(\w*)\s?,\s?offline\s*$/gi;
var regGameNameEnglish=/^\s*(the\s)?(game\s)?([\w\s-]*\w)\s\(private\)\.\s*$/gi;
var regGameNameFrench=/^\s*(la\s)?(partie\s)?([\w\s-]*\w)\s\(priv[^\)]*\)\.\s*$/gi;
if (lines[friend].match(regOfflineEnglish))
{
errors += (errors == '' ? '' : ' ') + 'leader is offline';
}
if (lines[friend + 1].match(regGameNameEnglish) && lines[friend+1].substr(1, 1) != ':')
{
game = lines[friend + 1].replace(regGameNameEnglish, "$3");
}
if (!game && lines[friend + 1].match(regGameNameFrench) && lines[friend+1].substr(1, 1) != ':')
{
game = lines[friend + 1].replace(regGameNameFrench, "$3");
}
if (game != '' && game != samegame && game != oldgame)
//if (game != '' && game != oldgame)
{
controlData.click(controlData.controls.lobby.button.join);
Delay(200);
controlData.setText( controlData.controls.lobby.join.editBox.gameName, game);
Delay (200);
controlData.setText( controlData.controls.lobby.join.editBox.password, gamepassword);
Delay (200);
controlData.click(controlData.controls.lobby.join.button.joinGame);
check = 1;
}
else
{
if(!errors)
{
errors = 'leader is not in game.';
}
}
}
}
if (!found_leader && joinChannelInChat)
{
if (errors)
Say('Errors : ' + errors);
else
Say('I couldn\'t find the leader in my friend list.');
Delay(1500);
}
}
else
{
if (joinChannelInChat)
Say('I can\'t read the chat!');
}
}
errors = '';
if(game != '')
samegame = game;
break; |
|