|
You last visited: Today at 23:11
Advertisement
[FIXED] D2NT Leechbot
Discussion on [FIXED] D2NT Leechbot within the Diablo 2 forum part of the Other Online Games category.
08/01/2010, 13:35
|
#1
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
[FIXED] D2NT Leechbot
Einige von euch habens vielleicht selber schon gemerkt, dass der Leechbot nach jedem game einen restart macht, sobald man mehr wie einen CDKey used und, dass es bei einigen vorkommt, dass man den Leechbot nur auf Deutsch usen kann.
Hier der Fix: (NTBotLeech.ntj)
Code:
// =============================================================================
// Leader Account settings
// =============================================================================
var leaderAccountName = "yyy";
var leaderName = "xxx";
// =============================================================================
// Game password (leave blank if none)
// =============================================================================
var gamepassword = "zzz";
// =============================================================================
// UseCDKeyChangeTrick :
// if true, the follow bot will say his gamename/gamepwd (set in the OOG) in chat before each game
// in order to increment his number of runs (to switch CDKeys after xx runs)
// if false, the follow bot will never change his CDKey
// =============================================================================
var UseCDKeyChangeTrick = false;
// =============================================================================
// Debug : set to true if you are experiencing problems with your JoinBot
// it will log in your OOG the lobby chat actions
// =============================================================================
var Debug = false;
////////////////////////////////////////////////////////////////////////////////
// Lobby chat settings :
////////////////////////////////////////////////////////////////////////////////
// Set to true to join the chat after each game (needed for JoinBot)
var joinChatAfterGame = true;
// Message said when you first enter the chat
var firstJoinMessage = "Hello world!";
// Message said after each game
var chatMessageAfterGame = "/me had fun!";
// if this is true, will join a random channel, otherwise it will use the channel below..
var joinRandomChannel = false;
// Name of the channel you want to join (leave blank if you want to stay in the default channel)
var joinChannelInChat = "op JoinBot-Doud";
////////////////////////////////////////////////////////////////////////////////
// Delays:
////////////////////////////////////////////////////////////////////////////////
// Minimum game length, waits in the lobby if last game was too short
// I recommend to keep a value > 300000 (milliseconds) to avoid bnet temporary ban
var gameMinLength = 420000;
// realm delays (minutes)
var unableToConnectRetry = 5;
var realmDownRetry = 120;
var disconnectedRetry = 5;
var cdkeyInUseRetry = 5;
// interface delays (milliseconds)
var connectingToBnetTimeout = 20000;
var characterScreenTimeout = 10000;
var pleaseWaitTimeout = 10000;
var createGameThreshold = 10000;
var createGameThresholdRandom = 1000;
var createGameTimeout = 15000;
var waitInLineTimeout = 15000;
var characterSelectDelay = 1000;
var loginDelay = 1000;
var clickDelay = 500;
var textDelay = 500;
var clickDelayRandom = 500;
var textDelayRandom = 500;
var gameDoesNotExistDelayMin = 600000;
var gameDoesNotExistDelayMax = 900000;
var gameDoesNotExistTimeout = 30000;
var waitBeforeEnterChatMin = 1000;
var waitBeforeEnterChatMax = 2000;
var waitInChatBeforeActionsMin = 2000;
var waitInChatBeforeActionsMax = 3000;
// Only for JoinBot (friend list delay, milliseconds)
var LeaderOfflineDelay = 30000;
var LeaderInChatDelay = 10000;
var GameIsFullDelay = 30000;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// DO NOT EDIT ANYTHING BELOW THIS
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//D2NT Manager Command
const D2NT_MGR_LOADING = 1;
const D2NT_MGR_READY = 2;
const D2NT_MGR_LOGIN = 3;
const D2NT_MGR_CREATE_GAME = 4;
const D2NT_MGR_INGAME = 5;
const D2NT_MGR_RESTART = 6;
const D2NT_MGR_CHICKEN = 7;
const D2NT_MGR_PRINT_STATUS = 8;
const D2NT_MGR_PRINT_LOG = 9;
var lastGameMade = GetTickCount();
var lastGameStatus = 0;
var nextGameMake = 0;
var inGameAt = 0;
var chatActionsDone = false;
var lastGameFailed = false;
var sayChatMsgAfterGame = false;
Include("libs/controlInfo.ntl");
var controlData = new controlInfo();
var game = '';
var _gamename = "";
var _gamepassword = "";
var _leaderOfflineTick = -LeaderOfflineDelay;
var _leaderInChatTick = -LeaderInChatDelay;
var _GameIsFullTick = -GameIsFullDelay;
function NTMain()
{
Delay(1000);
var _ingame = false;
controlData.clickDelay = clickDelay;
controlData.textDelay = textDelay;
controlData.clickDelayRandom = clickDelayRandom;
controlData.textDelayRandom = textDelayRandom;
while(1)
{
if(me.ingame)
{
_gamename = me.gamename;
_gamepassword = me.gamepassword;
if(!inGameAt)
inGameAt = GetTickCount();
if(!_ingame)
{
RunGC(); // run garbage collector between each game
if(Load("NTBot/NTBotGame.ntj"))
{
_ingame = true;
if(me.playtype > 0)
sendEventToOOG(D2NT_MGR_INGAME, "In Game[IP:" + me.gameserverip.split(".")[3] + "]", 0);
else
sendEventToOOG(D2NT_MGR_INGAME, "In Game", 0);
lastGameStatus = 2; // in game successful
// To exit game as soon as the leader quits
//Load("NTBot/NTCheckLeader.ntj");
// to party only the leader
//Load("NTBot/tools/NTTools_AutoPartyJoinFriendGames.ntj");
}
}
Delay(1000);
}
else
{
if(_ingame)
{
_ingame = false;
sayChatMsgAfterGame = true;
sendEventToOOG(D2NT_MGR_READY, "", 0);
}
locationAction(controlData.getLocation());
Delay(500);
}
}
}
function locationAction(location)
{
switch(location.id)
{
case 3: // Lobby Chat
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
if(!chatActionsDone)
{
Delay(Random(waitInChatBeforeActionsMin, waitInChatBeforeActionsMax));
if(joinRandomChannel || joinChannelInChat != "")
{
Say("/join " + (joinRandomChannel ? getRandomString(Random(3,10)) : joinChannelInChat));
Delay(1000);
}
if(firstJoinMessage)
{
Say(firstJoinMessage);
Delay(200);
}
chatActionsDone = true;
}
if (chatMessageAfterGame && _gamename != "" && sayChatMsgAfterGame == true)
{
Say(chatMessageAfterGame);
sayChatMsgAfterGame = false;
Delay(200);
}
game = '';
var _tick = GetTickCount();
if ((_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_GameIsFullTick < 0 || (_GameIsFullTick + GameIsFullDelay) < _tick))
{
DebugInOOG('Locating the leader : '+leaderAccountName);
Say('/f l');
Delay(1500);
}
if(chat = controlData.get(controlData.controls.lobby.chat.textBox.channelText))
{
var found_leader = false;
lines = chat.GetText();
for (var line_id = lines.length - 1; line_id > -1; line_id--)
{
if (found_leader) // useless... :/
break;
if (lines[line_id].substring(0,1) == " ")
continue;
// retrieving the whole message
var msg = lines[line_id].replace(/^\s+|\s+$/, "");
var msglines = 1;
while (lines[line_id+msglines] != undefined && lines[line_id+msglines].substring(0,2) == " ")
{
msg += " " + lines[line_id+msglines].replace(/^\s+|\s+$/, "");
msglines++;
}
if (msg.lastIndexOf(leaderName) >= 0)
DebugInOOG("ÿc8found him :;"+msg);
// checking if the msg is a friendly whisper
if (msg.lastIndexOf(leaderName + ' (*' +leaderAccountName+')') > -1)
{
var regGameNameWhispered=/^.*(game|partie|spiel|partita|partida).*(nomm[^\s]*|called|chiamata)\s*([\w\s-]*\w)\s*\.\s*$/gi;
if (msg.match(regGameNameWhispered))
game = msg.replace(regGameNameWhispered, "$3");
if (game != '')
{
found_leader = true;
break;
}
}
// checking if the msg is from the friend list
if (msg.lastIndexOf(': '+leaderAccountName+',') > -1)
{
found_leader = true;
var regOffline=/^.*(offline|desconectado).*$/gi;
var regInChat=/^.*(channel|canale?)\s*([\w\s-]*\w)\.?\s*$/gi;
var regGameName=/^.*(game|partie|spiel|partita|partida)\s*([\w\s-]*\w)\s*\(priv[^\)]*\)\.\s*$/gi;
if (msg.match(regOffline)
&& (_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick))
{
DebugInOOG('Leader is offline, delay '+Math.round(LeaderOfflineDelay/1000)+' sec for next /f l.');
_leaderOfflineTick = GetTickCount();
}
else if (msg.match(regInChat)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick))
{
DebugInOOG('Leader is in the chat "'+msg.replace(regInChat, "$2")+'", delay '+Math.round(LeaderInChatDelay/1000)+' sec for next /f l.');
_leaderInChatTick = GetTickCount();
}
else if (msg.match(regGameName)
&& ((_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)))
{
game = msg.replace(regGameName, "$2");
}
else if ((_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick))
{
// unhandled line, supposelly "In Realm"
DebugInOOG('The leader was in the the lobby but not in chat, delay '+Math.round(LeaderInChatDelay/1000)+' sec for next /f l.');
_leaderInChatTick = GetTickCount();
}
break;
}
}
if (found_leader == false)
DebugInOOG('I couldn\'t find the leader in my friend list!');
if (game!="")
{
if (UseCDKeyChangeTrick)
{
// increasing the number of runs in the OOG (for CDKey switch)
// Problem : the gamename/gamepassword set in your OOG will be typed in the lobbyChat
// this may output a red message in the lobby chat if you have a password set (not a real problem)
// I recommend to set a gamename like "Run" and no gamepassword in your OOG. -> this will output "Run-01", "Run-02", etc in lobby chat before joining games
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
Delay(1000);
}
DebugInOOG('Leader is in the game "' + game + '"');
controlData.click(controlData.controls.lobby.button.join);
Delay(100);
}
}
else
{
DebugInOOG('I can\'t read the chat!');
//DebugInOOG('You probably haven\'t added the lobby chat controlinfo coordinates!');
Delay(30000);
}
break;
case 1: // Lobby
if(location.id == 1 && joinChatAfterGame)
{
Delay(Random(waitBeforeEnterChatMin, waitBeforeEnterChatMax));
controlData.click(controlData.controls.lobby.button.enterChat);
break;
}
break;
case 2: // Waiting In Line
if(GetTickCount()-lastGameMade > waitInLineTimeout)
controlData.click(controlData.controls.lobby.inLine.button.cancel);
break;
case 4: // Create Game
if(!controlData.get(controlData.controls.lobby.create.editBox.gameName))
{
controlData.click(controlData.controls.lobby.button.join);
Delay (500);
controlData.click(controlData.controls.lobby.button.create);
Delay (500);
break;
}
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
locationTimeout(5000, location);
lastGameMade = GetTickCount();
lastGameStatus = 1; // pending creation
break;
case 5: // Join Game
if (game)
{
controlData.setText( controlData.controls.lobby.join.editBox.gameName, game);
Delay (100);
controlData.setText( controlData.controls.lobby.join.editBox.password, gamepassword);
Delay (100);
controlData.click(controlData.controls.lobby.join.button.joinGame);
RunGC(); // run garbage collector between each game
locationTimeout(5000, location);
lastGameStatus = 1; // pending join
}
else
{
DebugInOOG('No game to join : cancelling');
me.Cancel(1);
Delay(1000);
}
break;
case 6: // Ladder
break;
case 7: // Channel List
break;
case 8: // Main Menu
if(controlData.getCurrentRealmIndex() == me.gatewayid)
{
outputGameLength();
controlData.click(controlData.gameTypes[me.playtype]);
}
else
controlData.click(controlData.controls.mainMenu.button.gateway);
break;
case 9: // Login
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
Delay(loginDelay);
controlData.setText(controlData.controls.login.editBox.accountName, me.account);
sendEventToOOG(D2NT_MGR_LOGIN, location.name, 0);
locationTimeout(5000, location);
break;
case 10: // Login Error (this is a fatal error, so stop)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 10);
Delay(3500);
break;
case 11: // Unable To Connect
timeoutDelay(unableToConnectRetry*60*1000, location)
controlData.click(controlData.controls.login.unableToConnect.button.ok);
break;
case 12: // Character Select
var _time, _control;
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
for(_time = 0 ; _time < characterScreenTimeout ; _time += 500)
{
_control = controlData.get(controlData.controls.characterSelect.textBox.characterInfo[me.charloc]);
if(_control && _control.GetText() != undefined)
break;
Delay(500);
}
if(_time < characterScreenTimeout)
{
Delay(characterSelectDelay);
controlData.click(controlData.controls.characterSelect.textBox.characters[me.charloc], 0, 0, 1);
controlData.click(controlData.controls.characterSelect.textBox.characterInfo[me.charloc], 0, 0, 1);
// reset last game made, so it doesnt make a game immediately
inGameAt = 0;
setNextGameMake();
}
else
{
controlData.click(controlData.controls.characterSelect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
}
break;
case 13: // Realm Down - Character Select screen
controlData.click(controlData.controls.characterSelect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
break;
case 14: // Character Select - Disconnected
timeoutDelay(disconnectedRetry*60*1000, location);
controlData.click(controlData.controls.characterSelect.disconnected.button.ok);
break;
case 15: // New Character
break;
case 16: // Character Select - Please Wait popup
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.characterSelect.pleaseWait.button.cancel);
break;
case 17: // Lobby - Lost Connection - just click okay, since we're toast anyway
controlData.click(controlData.controls.lobby.lostConnection.button.ok);
break;
case 18: // D2 Splash
controlData.click(controlData.controls.d2Splash.textBox.copyright);
break;
case 19: // Login - Cdkey In Use
timeoutDelay(cdkeyInUseRetry*60*1000, location);
controlData.click(controlData.controls.login.cdkeyInUse.button.ok);
break;
case 20: // Single Player - Select Difficulty
controlData.click(controlData.singlePlayerDifficulties[me.diff]);
break;
case 21: // Main Menu - Connecting
if(!locationTimeout(connectingToBnetTimeout, location))
controlData.click(controlData.controls.mainMenu.connecting.button.cancel);
break;
case 22: // Login - Invalid Cdkey (classic or xpac)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 3600);
Delay(3500);
break;
case 23: // Character Select - Connecting
if(!locationTimeout(characterScreenTimeout, location))
controlData.click(controlData.controls.characterSelect.button.exit);
break;
case 24: // Server Down - not much to do but wait..
break;
case 25: // Lobby - Please Wait
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.lobby.pleaseWait.button.cancel);
break;
case 26: // Lobby - Game Name Exists
sendEventToOOG(D2NT_MGR_PRINT_LOG, "ÿE00000Game already exists", 0);
inGameAt = 0;
lastGameStatus = 0;
setNextGameMake();
locationTimeout(15000, location);
break;
case 27: // Gateway Select
controlData.clickRealmEntry(me.gatewayid);
controlData.click(controlData.controls.gateway.button.ok);
break;
case 28: // Lobby - Game Does Not Exist
inGameAt = Random(gameDoesNotExistDelayMin, gameDoesNotExistDelayMax);
lastGameStatus = 0;
setNextGameMake();
locationTimeout(gameDoesNotExistTimeout, location);
break;
default:
DebugInOOG("Unhandled location : "+location.id);
break;
}
DebugInOOG("Location : "+location.id);
}
function sendEventToOOG(locationId, statusString, pendingTime)
{
return SendCopyData("D2NT Manager", null, (locationId<<16)|pendingTime, statusString);
}
function setNextGameMake()
{
lastGameMade = GetTickCount();
nextGameMake = lastGameMade + createGameThreshold + Random(0-createGameThresholdRandom, createGameThresholdRandom) + inGameAt;
inGameAt = 0;
chatActionsDone = false;
}
function outputGameLength()
{
if(inGameAt)
{
duration = GetTickCount() - inGameAt;
inGameAt = (duration < gameMinLength ? gameMinLength - duration : 0);
}
}
function locationTimeout(time, location)
{
endtime = GetTickCount() + time;
while(controlData.getLocation().id == location.id && endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(500);
}
return (controlData.getLocation().id != location.id);
}
function timeoutDelay(time, location)
{
endtime = GetTickCount() + time;
while(endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(1000);
}
}
function getRandomString(_length)
{
_retString = "";
_charSet = "0123456789abcdefghijklmnopqrstuvwxyz";
while(_length--)
{
_retString += _charSet.charAt(Random(0, _charSet.length-1));
Delay(1);
}
return _retString;
}
function DebugInOOG(logString)
{
if (Debug)
return SendCopyData("D2NT Manager", null, 9<<16, "-- Debug : " + logString);
else
return false;
}
Was genau wurde gefixt?
Wenn der Leecher im channel steht kommt ja die Meldung wenn sich der Leader in ein game eingeloggt. Diese Meldung ist im Normalfall 2 Zeilen lang. Hat der Leader jetzt aber noch einen etwas längeren Namen und das Game auch, werden aus den 2 Zeilen plötzlich 3 Zeilen, was der Bot nichtmehr verarbeiten kann.
Dank dem Fix verarbeitet der Bot jetzt die 3 zeilen perfekt.
Der Leecher macht nichtmehr die ganzen Restarts bei Multikeys und man kann den Leecher auch auf Englisch laufen lassen
ACHTUNG:
Ihr solltet den Fix nur verwenden, wenn eure Message 3 Zeilen lang ist. Der bot kann mit diesem Script KEINE 2 Zeiler mehr verarbeiten
|
|
|
09/05/2010, 22:49
|
#2
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
Bump
|
|
|
09/05/2010, 23:32
|
#3
|
elite*gold: 139
Join Date: Oct 2006
Posts: 12,058
Received Thanks: 24,256
|
Wer sich bedanken will, der tut das am besten bei , denn das Script ist 1:1 aus dem entnommen, das einzige was du daran gemacht hast ist die Credits aus der ersten Zeile zu löschen.
Code:
//credit for this goes to D2od who knows way more than I do
|
|
|
09/06/2010, 23:26
|
#4
|
elite*gold: 0
Join Date: Nov 2008
Posts: 434
Received Thanks: 87
|
höö? wie mit 3 zeilen? Wenn er /f l macht oder wie?
|
|
|
09/08/2010, 18:05
|
#5
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
Quote:
Originally Posted by lanara
Wer sich bedanken will, der tut das am besten bei , denn das Script ist 1:1 aus dem entnommen, das einzige was du daran gemacht hast ist die Credits aus der ersten Zeile zu löschen.
Code:
//credit for this goes to D2od who knows way more than I do
|
ich hab das script auf eon in den stickys gefunden und in ein paar topics, da ich selber das problem hatte außerdem hab ich das script 1:1 von eon kopiert und nichts raus gelöscht
müssen die bei eon schon gemacht haben
wegen den 3 zeilen:
wenn der acc + char name etwas länger is, erscheint die /f l meldung über 3 zeilen, was der bot im normalfall nicht verkraftet
|
|
|
09/08/2010, 19:45
|
#6
|
elite*gold: 0
Join Date: Nov 2008
Posts: 434
Received Thanks: 87
|
:s meine geht nur 2 zeilen und der spackt rum
/edit Funzt jetzt weiß ich wie das mit den 2 zeilen sein darf ^^
|
|
|
09/09/2010, 13:51
|
#7
|
elite*gold: 0
Join Date: Jul 2010
Posts: 40
Received Thanks: 1
|
ich hab sternenloopers bot und wo muss ich das jetz reinkopieren?
|
|
|
09/09/2010, 17:45
|
#8
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
Quote:
Originally Posted by Ineeedthis
ich hab sternenloopers bot und wo muss ich das jetz reinkopieren?
|
in die NTBotLeech datei im scripts ordner (einfach ersetzen)
|
|
|
11/05/2010, 00:47
|
#9
|
elite*gold: 1
Join Date: May 2008
Posts: 729
Received Thanks: 58
|
hab das eingefügt nun auf einmal habe ich nur 2 zeilen was soll cih machen?
habe mal 2 dann wider 3 zeilen kommt auf game numemr an^^
|
|
|
11/05/2010, 00:53
|
#10
|
elite*gold: 1
Join Date: May 2008
Posts: 729
Received Thanks: 58
|
Quote:
Originally Posted by King Deluxe
:s meine geht nur 2 zeilen und der spackt rum
/edit Funzt jetzt weiß ich wie das mit den 2 zeilen sein darf ^^
|
wie denn?
habe grad das peoblem!!
|
|
|
11/06/2010, 00:40
|
#11
|
elite*gold: 0
Join Date: Feb 2010
Posts: 460
Received Thanks: 346
|
Bitte nicht verwechseln. Oben schreibt er NTBaalLeech.ntj
Gemeint ist aber wohl die NTBotLeech.ntj
Nicht das ihr da dann im Bot Verz. rum eiert und eigentlich keine Ahnung habt was ihr da macht. Also nochmal. Zu ersetzen ist die NTBotLeech.ntj
|
|
|
12/13/2010, 16:16
|
#12
|
elite*gold: 0
Join Date: Oct 2010
Posts: 343
Received Thanks: 18
|
Wow geile bin zufällig auf dich gestoßen und geshen das du fixed leechbot hast..
Weil das gleiche problem hab ich auch gerade bkeommen. hab bot auf 2 keys eingestellt und steidem crasht er immer.
Hab dein Script geholt reingezogen noch alles eingestellt und läuft perfekt thx
ein proble,m hab ich
bot schreibt immer wenn der leader game aufmacht
gfdg- und dan die nummer des games is nervig finde aber in dem script nix wo das steht
|
|
|
12/18/2010, 12:32
|
#13
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
Quote:
Originally Posted by proezler
Bitte nicht verwechseln. Oben schreibt er NTBaalLeech.ntj
Gemeint ist aber wohl die NTBotLeech.ntj
Nicht das ihr da dann im Bot Verz. rum eiert und eigentlich keine Ahnung habt was ihr da macht. Also nochmal. Zu ersetzen ist die NTBotLeech.ntj
|
das is völlig egal wie die datei genannt wird =)
Hauptsache du hast sie dann bei deinem char als entrypoint eingestellt
Quote:
Originally Posted by Tanker_Tank
Wow geile bin zufällig auf dich gestoßen und geshen das du fixed leechbot hast..
Weil das gleiche problem hab ich auch gerade bkeommen. hab bot auf 2 keys eingestellt und steidem crasht er immer.
Hab dein Script geholt reingezogen noch alles eingestellt und läuft perfekt thx
ein proble,m hab ich
bot schreibt immer wenn der leader game aufmacht
gfdg- und dan die nummer des games is nervig finde aber in dem script nix wo das steht
|
poste mal deine Leechdatei
|
|
|
12/18/2010, 12:51
|
#14
|
elite*gold: 0
Join Date: Oct 2010
Posts: 343
Received Thanks: 18
|
// ================================================== ===========================
// Leader Account settings
// ================================================== ===========================
var leaderAccountName = "Cry_Rand";
var leaderName = "Hesperiden";
// ================================================== ===========================
// Game password (leave blank if none)
// ================================================== ===========================
var gamepassword = "";
// ================================================== ===========================
// UseCDKeyChangeTrick :
// if true, the follow bot will say his gamename/gamepwd (set in the OOG) in chat before each game
// in order to increment his number of runs (to switch CDKeys after xx runs)
// if false, the follow bot will never change his CDKey
// ================================================== ===========================
var UseCDKeyChangeTrick = true;
// ================================================== ===========================
// Debug : set to true if you are experiencing problems with your JoinBot
// it will log in your OOG the lobby chat actions
// ================================================== ===========================
var Debug = false;
////////////////////////////////////////////////////////////////////////////////
// Lobby chat settings :
////////////////////////////////////////////////////////////////////////////////
// Set to true to join the chat after each game (needed for JoinBot)
var joinChatAfterGame = true;
// Message said when you first enter the chat
var firstJoinMessage = "";
// Message said after each game
var chatMessageAfterGame = "";
// if this is true, will join a random channel, otherwise it will use the channel below..
var joinRandomChannel = false;
// Name of the channel you want to join (leave blank if you want to stay in the default channel)
var joinChannelInChat = "op zsbaal";
////////////////////////////////////////////////////////////////////////////////
// Delays:
////////////////////////////////////////////////////////////////////////////////
// Minimum game length, waits in the lobby if last game was too short
// I recommend to keep a value > 300000 (milliseconds) to avoid bnet temporary ban
var gameMinLength = 180000;
// realm delays (minutes)
var unableToConnectRetry = 5;
var realmDownRetry = 120;
var disconnectedRetry = 5;
var cdkeyInUseRetry = 5;
// interface delays (milliseconds)
var connectingToBnetTimeout = 20000;
var characterScreenTimeout = 10000;
var pleaseWaitTimeout = 10000;
var createGameThreshold = 10000;
var createGameThresholdRandom = 1000;
var createGameTimeout = 15000;
var waitInLineTimeout = 15000;
var characterSelectDelay = 1000;
var loginDelay = 1000;
var clickDelay = 500;
var textDelay = 500;
var clickDelayRandom = 500;
var textDelayRandom = 500;
var gameDoesNotExistDelayMin = 600000;
var gameDoesNotExistDelayMax = 900000;
var gameDoesNotExistTimeout = 30000;
var waitBeforeEnterChatMin = 1000;
var waitBeforeEnterChatMax = 2000;
var waitInChatBeforeActionsMin = 2000;
var waitInChatBeforeActionsMax = 3000;
// Only for JoinBot (friend list delay, milliseconds)
var LeaderOfflineDelay = 30000;
var LeaderInChatDelay = 10000;
var GameIsFullDelay = 30000;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// DO NOT EDIT ANYTHING BELOW THIS
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//D2NT Manager Command
const D2NT_MGR_LOADING = 1;
const D2NT_MGR_READY = 2;
const D2NT_MGR_LOGIN = 3;
const D2NT_MGR_CREATE_GAME = 4;
const D2NT_MGR_INGAME = 5;
const D2NT_MGR_RESTART = 6;
const D2NT_MGR_CHICKEN = 7;
const D2NT_MGR_PRINT_STATUS = 8;
const D2NT_MGR_PRINT_LOG = 9;
var lastGameMade = GetTickCount();
var lastGameStatus = 0;
var nextGameMake = 0;
var inGameAt = 0;
var chatActionsDone = false;
var lastGameFailed = false;
var sayChatMsgAfterGame = false;
Include("libs/controlInfo.ntl");
var controlData = new controlInfo();
var game = '';
var _gamename = "";
var _gamepassword = "";
var _leaderOfflineTick = -LeaderOfflineDelay;
var _leaderInChatTick = -LeaderInChatDelay;
var _GameIsFullTick = -GameIsFullDelay;
function NTMain()
{
Delay(1000);
var _ingame = false;
controlData.clickDelay = clickDelay;
controlData.textDelay = textDelay;
controlData.clickDelayRandom = clickDelayRandom;
controlData.textDelayRandom = textDelayRandom;
while(1)
{
if(me.ingame)
{
_gamename = me.gamename;
_gamepassword = me.gamepassword;
if(!inGameAt)
inGameAt = GetTickCount();
if(!_ingame)
{
RunGC(); // run garbage collector between each game
if(Load("NTBot/NTBotGame.ntj"))
{
_ingame = true;
if(me.playtype > 0)
sendEventToOOG(D2NT_MGR_INGAME, "In Game[IP:" + me.gameserverip.split(".")[3] + "]", 0);
else
sendEventToOOG(D2NT_MGR_INGAME, "In Game", 0);
lastGameStatus = 2; // in game successful
// To exit game as soon as the leader quits
//Load("NTBot/NTCheckLeader.ntj");
// to party only the leader
//Load("NTBot/tools/NTTools_AutoPartyJoinFriendGames.ntj");
}
}
Delay(1000);
}
else
{
if(_ingame)
{
_ingame = false;
sayChatMsgAfterGame = true;
sendEventToOOG(D2NT_MGR_READY, "", 0);
}
locationAction(controlData.getLocation());
Delay(500);
}
}
}
function locationAction(location)
{
switch(location.id)
{
case 3: // Lobby Chat
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
if(!chatActionsDone)
{
Delay(Random(waitInChatBeforeActionsMin, waitInChatBeforeActionsMax));
if(joinRandomChannel || joinChannelInChat != "")
{
Say("/join " + (joinRandomChannel ? getRandomString(Random(3,10)) : joinChannelInChat));
Delay(1000);
}
if(firstJoinMessage)
{
Say(firstJoinMessage);
Delay(200);
}
chatActionsDone = true;
}
if (chatMessageAfterGame && _gamename != "" && sayChatMsgAfterGame == true)
{
Say(chatMessageAfterGame);
sayChatMsgAfterGame = false;
Delay(200);
}
game = '';
var _tick = GetTickCount();
if ((_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_GameIsFullTick < 0 || (_GameIsFullTick + GameIsFullDelay) < _tick))
{
DebugInOOG('Locating the leader : '+leaderAccountName);
Say('/f l');
Delay(1500);
}
if(chat = controlData.get(controlData.controls.lobby.chat.te xtBox.channelText))
{
var found_leader = false;
lines = chat.GetText();
for (var line_id = lines.length - 1; line_id > -1; line_id--)
{
if (found_leader) // useless... :/
break;
if (lines[line_id].substring(0,1) == " ")
continue;
// retrieving the whole message
var msg = lines[line_id].replace(/^\s+|\s+$/, "");
var msglines = 1;
while (lines[line_id+msglines] != undefined && lines[line_id+msglines].substring(0,2) == " ")
{
msg += " " + lines[line_id+msglines].replace(/^\s+|\s+$/, "");
msglines++;
}
if (msg.lastIndexOf(leaderName) >= 0)
DebugInOOG("ÿc8found him :;"+msg);
// checking if the msg is a friendly whisper
if (msg.lastIndexOf(leaderName + ' (*' +leaderAccountName+')') > -1)
{
var regGameNameWhispered=/^.*(game|partie|spiel|partita|partida).*(nomm[^\s]*|called|chiamata)\s*([\w\s-]*\w)\s*\.\s*$/gi;
if (msg.match(regGameNameWhispered))
game = msg.replace(regGameNameWhispered, "$3");
if (game != '')
{
found_leader = true;
break;
}
}
// checking if the msg is from the friend list
if (msg.lastIndexOf(': '+leaderAccountName+',') > -1)
{
found_leader = true;
var regOffline=/^.*(offline|desconectado).*$/gi;
var regInChat=/^.*(channel|canale?)\s*([\w\s-]*\w)\.?\s*$/gi;
var regGameName=/^.*(game|partie|spiel|partita|partida)\s*([\w\s-]*\w)\s*\(priv[^\)]*\)\.\s*$/gi;
if (msg.match(regOffline)
&& (_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick))
{
DebugInOOG('Leader is offline, delay '+Math.round(LeaderOfflineDelay/1000)+' sec for next /f l.');
_leaderOfflineTick = GetTickCount();
}
else if (msg.match(regInChat)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick))
{
DebugInOOG('Leader is in the chat "'+msg.replace(regInChat, "$2")+'", delay '+Math.round(LeaderInChatDelay/1000)+' sec for next /f l.');
_leaderInChatTick = GetTickCount();
}
else if (msg.match(regGameName)
&& ((_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)))
{
game = msg.replace(regGameName, "$2");
}
else if ((_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick))
{
// unhandled line, supposelly "In Realm"
DebugInOOG('The leader was in the the lobby but not in chat, delay '+Math.round(LeaderInChatDelay/1000)+' sec for next /f l.');
_leaderInChatTick = GetTickCount();
}
break;
}
}
if (found_leader == false)
DebugInOOG('I couldn\'t find the leader in my friend list!');
if (game!="")
{
if (UseCDKeyChangeTrick)
{
// increasing the number of runs in the OOG (for CDKey switch)
// Problem : the gamename/gamepassword set in your OOG will be typed in the lobbyChat
// this may output a red message in the lobby chat if you have a password set (not a real problem)
// I recommend to set a gamename like "Run" and no gamepassword in your OOG. -> this will output "Run-01", "Run-02", etc in lobby chat before joining games
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
Delay(1000);
}
DebugInOOG('Leader is in the game "' + game + '"');
controlData.click(controlData.controls.lobby.butto n.join);
Delay(100);
}
}
else
{
DebugInOOG('I can\'t read the chat!');
//DebugInOOG('You probably haven\'t added the lobby chat controlinfo coordinates!');
Delay(30000);
}
break;
case 1: // Lobby
if(location.id == 1 && joinChatAfterGame)
{
Delay(Random(waitBeforeEnterChatMin, waitBeforeEnterChatMax));
controlData.click(controlData.controls.lobby.butto n.enterChat);
break;
}
break;
case 2: // Waiting In Line
if(GetTickCount()-lastGameMade > waitInLineTimeout)
controlData.click(controlData.controls.lobby.inLin e.button.cancel);
break;
case 4: // Create Game
if(!controlData.get(controlData.controls.lobby.cre ate.editBox.gameName))
{
controlData.click(controlData.controls.lobby.butto n.join);
Delay (500);
controlData.click(controlData.controls.lobby.butto n.create);
Delay (500);
break;
}
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
locationTimeout(5000, location);
lastGameMade = GetTickCount();
lastGameStatus = 1; // pending creation
break;
case 5: // Join Game
if (game)
{
controlData.setText( controlData.controls.lobby.join.editBox.gameName, game);
Delay (100);
controlData.setText( controlData.controls.lobby.join.editBox.password, gamepassword);
Delay (100);
controlData.click(controlData.controls.lobby.join. button.joinGame);
RunGC(); // run garbage collector between each game
locationTimeout(5000, location);
lastGameStatus = 1; // pending join
}
else
{
DebugInOOG('No game to join : cancelling');
me.Cancel(1);
Delay(1000);
}
break;
case 6: // Ladder
break;
case 7: // Channel List
break;
case 8: // Main Menu
if(controlData.getCurrentRealmIndex() == me.gatewayid)
{
outputGameLength();
controlData.click(controlData.gameTypes[me.playtype]);
}
else
controlData.click(controlData.controls.mainMenu.bu tton.gateway);
break;
case 9: // Login
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
Delay(loginDelay);
controlData.setText(controlData.controls.login.edi tBox.accountName, me.account);
sendEventToOOG(D2NT_MGR_LOGIN, location.name, 0);
locationTimeout(5000, location);
break;
case 10: // Login Error (this is a fatal error, so stop)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 10);
Delay(3500);
break;
case 11: // Unable To Connect
timeoutDelay(unableToConnectRetry*60*1000, location)
controlData.click(controlData.controls.login.unabl eToConnect.button.ok);
break;
case 12: // Character Select
var _time, _control;
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
for(_time = 0 ; _time < characterScreenTimeout ; _time += 500)
{
_control = controlData.get(controlData.controls.characterSele ct.textBox.characterInfo[me.charloc]);
if(_control && _control.GetText() != undefined)
break;
Delay(500);
}
if(_time < characterScreenTimeout)
{
Delay(characterSelectDelay);
controlData.click(controlData.controls.characterSe lect.textBox.characters[me.charloc], 0, 0, 1);
controlData.click(controlData.controls.characterSe lect.textBox.characterInfo[me.charloc], 0, 0, 1);
// reset last game made, so it doesnt make a game immediately
inGameAt = 0;
setNextGameMake();
}
else
{
controlData.click(controlData.controls.characterSe lect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
}
break;
case 13: // Realm Down - Character Select screen
controlData.click(controlData.controls.characterSe lect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
break;
case 14: // Character Select - Disconnected
timeoutDelay(disconnectedRetry*60*1000, location);
controlData.click(controlData.controls.characterSe lect.disconnected.button.ok);
break;
case 15: // New Character
break;
case 16: // Character Select - Please Wait popup
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.characterSe lect.pleaseWait.button.cancel);
break;
case 17: // Lobby - Lost Connection - just click okay, since we're toast anyway
controlData.click(controlData.controls.lobby.lostC onnection.button.ok);
break;
case 18: // D2 Splash
controlData.click(controlData.controls.d2Splash.te xtBox.copyright);
break;
case 19: // Login - Cdkey In Use
timeoutDelay(cdkeyInUseRetry*60*1000, location);
controlData.click(controlData.controls.login.cdkey InUse.button.ok);
break;
case 20: // Single Player - Select Difficulty
controlData.click(controlData.singlePlayerDifficul ties[me.diff]);
break;
case 21: // Main Menu - Connecting
if(!locationTimeout(connectingToBnetTimeout, location))
controlData.click(controlData.controls.mainMenu.co nnecting.button.cancel);
break;
case 22: // Login - Invalid Cdkey (classic or xpac)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 3600);
Delay(3500);
break;
case 23: // Character Select - Connecting
if(!locationTimeout(characterScreenTimeout, location))
controlData.click(controlData.controls.characterSe lect.button.exit);
break;
case 24: // Server Down - not much to do but wait..
break;
case 25: // Lobby - Please Wait
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.lobby.pleas eWait.button.cancel);
break;
case 26: // Lobby - Game Name Exists
sendEventToOOG(D2NT_MGR_PRINT_LOG, "ÿE00000Game already exists", 0);
inGameAt = 0;
lastGameStatus = 0;
setNextGameMake();
locationTimeout(15000, location);
break;
case 27: // Gateway Select
controlData.clickRealmEntry(me.gatewayid);
controlData.click(controlData.controls.gateway.but ton.ok);
break;
case 28: // Lobby - Game Does Not Exist
inGameAt = Random(gameDoesNotExistDelayMin, gameDoesNotExistDelayMax);
lastGameStatus = 0;
setNextGameMake();
locationTimeout(gameDoesNotExistTimeout, location);
break;
default:
DebugInOOG("Unhandled location : "+location.id);
break;
}
DebugInOOG("Location : "+location.id);
}
function sendEventToOOG(locationId, statusString, pendingTime)
{
return SendCopyData("D2NT Manager", null, (locationId<<16)|pendingTime, statusString);
}
function setNextGameMake()
{
lastGameMade = GetTickCount();
nextGameMake = lastGameMade + createGameThreshold + Random(0-createGameThresholdRandom, createGameThresholdRandom) + inGameAt;
inGameAt = 0;
chatActionsDone = false;
}
function outputGameLength()
{
if(inGameAt)
{
duration = GetTickCount() - inGameAt;
inGameAt = (duration < gameMinLength ? gameMinLength - duration : 0);
}
}
function locationTimeout(time, location)
{
endtime = GetTickCount() + time;
while(controlData.getLocation().id == location.id && endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(500);
}
return (controlData.getLocation().id != location.id);
}
function timeoutDelay(time, location)
{
endtime = GetTickCount() + time;
while(endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(1000);
}
}
function getRandomString(_length)
{
_retString = "";
_charSet = "0123456789abcdefghijklmnopqrstuvwxyz";
while(_length--)
{
_retString += _charSet.charAt(Random(0, _charSet.length-1));
Delay(1);
}
return _retString;
}
function DebugInOOG(logString)
{
if (Debug)
return SendCopyData("D2NT Manager", null, 9<<16, "-- Debug : " + logString);
else
return false;
}
|
|
|
12/18/2010, 13:14
|
#15
|
elite*gold: 250
Join Date: Mar 2010
Posts: 840
Received Thanks: 184
|
Teste mal bitte das script hier:
Ich wollte gerade dein script mal bei mir testen doch das funktioniert bei mir schonmal garnicht^^
Code:
// =============================================================================
// Leader Account settings
// =============================================================================
var leaderAccountName = "";
var leaderName = "";
// =============================================================================
// Game password (leave blank if none)
// =============================================================================
var gamepassword = "";
// =============================================================================
// UseCDKeyChangeTrick :
// if true, the follow bot will say his gamename/gamepwd (set in the OOG) in chat before each game
// in order to increment his number of runs (to switch CDKeys after xx runs)
// if false, the follow bot will never change his CDKey
// =============================================================================
var UseCDKeyChangeTrick = true;
// =============================================================================
// Debug : set to true if you are experiencing problems with your JoinBot
// it will log in your OOG the lobby chat actions
// =============================================================================
var Debug = false;
////////////////////////////////////////////////////////////////////////////////
// Lobby chat settings :
////////////////////////////////////////////////////////////////////////////////
// Set to true to join the chat after each game (needed for JoinBot)
var joinChatAfterGame = true;
// Message said when you first enter the chat
var firstJoinMessage = "";
// Message said after each game
var chatMessageAfterGame = "";
// if this is true, will join a random channel, otherwise it will use the channel below..
var joinRandomChannel = false;
// Name of the channel you want to join (leave blank if you want to stay in the default channel)
var joinChannelInChat = "op lastbaal";
////////////////////////////////////////////////////////////////////////////////
// Delays:
////////////////////////////////////////////////////////////////////////////////
// Minimum game length, waits in the lobby if last game was too short
// I recommend to keep a value > 300000 (milliseconds) to avoid bnet temporary ban
var gameMinLength = 180000;
// realm delays (minutes)
var unableToConnectRetry = 5;
var realmDownRetry = 120;
var disconnectedRetry = 5;
var cdkeyInUseRetry = 5;
// interface delays (milliseconds)
var connectingToBnetTimeout = 20000;
var characterScreenTimeout = 10000;
var pleaseWaitTimeout = 10000;
var createGameThreshold = 10000;
var createGameThresholdRandom = 1000;
var createGameTimeout = 15000;
var waitInLineTimeout = 15000;
var characterSelectDelay = 1000;
var loginDelay = 1000;
var clickDelay = 500;
var textDelay = 500;
var clickDelayRandom = 500;
var textDelayRandom = 500;
var gameDoesNotExistDelayMin = 600000;
var gameDoesNotExistDelayMax = 900000;
var gameDoesNotExistTimeout = 30000;
var waitBeforeEnterChatMin = 1000;
var waitBeforeEnterChatMax = 2000;
var waitInChatBeforeActionsMin = 2000;
var waitInChatBeforeActionsMax = 3000;
// Only for JoinBot (friend list delay, milliseconds)
var LeaderOfflineDelay = 30000;
var LeaderInChatDelay = 10000;
var GameIsFullDelay = 30000;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// DO NOT EDIT ANYTHING BELOW THIS
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//D2NT Manager Command
const D2NT_MGR_LOADING = 1;
const D2NT_MGR_READY = 2;
const D2NT_MGR_LOGIN = 3;
const D2NT_MGR_CREATE_GAME = 4;
const D2NT_MGR_INGAME = 5;
const D2NT_MGR_RESTART = 6;
const D2NT_MGR_CHICKEN = 7;
const D2NT_MGR_PRINT_STATUS = 8;
const D2NT_MGR_PRINT_LOG = 9;
var lastGameMade = GetTickCount();
var lastGameStatus = 0;
var nextGameMake = 0;
var inGameAt = 0;
var chatActionsDone = false;
var lastGameFailed = false;
var sayChatMsgAfterGame = false;
Include("libs/controlInfo.ntl");
var controlData = new controlInfo();
var game = '';
var _gamename = "";
var _gamepassword = "";
var _leaderOfflineTick = -LeaderOfflineDelay;
var _leaderInChatTick = -LeaderInChatDelay;
var _GameIsFullTick = -GameIsFullDelay;
function NTMain()
{
Delay(1000);
var _ingame = false;
controlData.clickDelay = clickDelay;
controlData.textDelay = textDelay;
controlData.clickDelayRandom = clickDelayRandom;
controlData.textDelayRandom = textDelayRandom;
while(1)
{
if(me.ingame)
{
_gamename = me.gamename;
_gamepassword = me.gamepassword;
if(!inGameAt)
inGameAt = GetTickCount();
if(!_ingame)
{
RunGC(); // run garbage collector between each game
if(Load("NTBot/NTBotGame.ntj"))
{
_ingame = true;
if(me.playtype > 0)
sendEventToOOG(D2NT_MGR_INGAME, "In Game[IP:" + me.gameserverip.split(".")[3] + "]", 0);
else
sendEventToOOG(D2NT_MGR_INGAME, "In Game", 0);
lastGameStatus = 2; // in game successful
// To exit game as soon as the leader quits
//Load("NTBot/NTCheckLeader.ntj");
// to party only the leader
//Load("NTBot/tools/NTTools_AutoPartyJoinFriendGames.ntj");
}
}
Delay(1000);
}
else
{
if(_ingame)
{
_ingame = false;
sayChatMsgAfterGame = true;
sendEventToOOG(D2NT_MGR_READY, "", 0);
}
locationAction(controlData.getLocation());
Delay(500);
}
}
}
function locationAction(location)
{
switch(location.id)
{
case 3: // Lobby Chat
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
if(!chatActionsDone)
{
Delay(Random(waitInChatBeforeActionsMin, waitInChatBeforeActionsMax));
if(joinRandomChannel || joinChannelInChat != "")
{
Say("/join " + (joinRandomChannel ? getRandomString(Random(3,10)) : joinChannelInChat));
Delay(1000);
}
if(firstJoinMessage)
{
Say(firstJoinMessage);
Delay(200);
}
chatActionsDone = true;
}
if (chatMessageAfterGame && _gamename != "" && sayChatMsgAfterGame == true)
{
Say(chatMessageAfterGame);
sayChatMsgAfterGame = false;
Delay(200);
}
game = '';
var _tick = GetTickCount();
if ((_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_GameIsFullTick < 0 || (_GameIsFullTick + GameIsFullDelay) < _tick))
{
DebugInOOG('Locating the leader : '+leaderAccountName);
Say('/f l');
Delay(1500);
}
if(chat = controlData.get(controlData.controls.lobby.chat.textBox.channelText))
{
var found_leader = false;
lines = chat.GetText();
for (var line_id = lines.length - 1; line_id > -1; line_id--)
{
if (found_leader) // useless... :/
break;
if (lines[line_id].substring(0,1) == " ")
continue;
// retrieving the whole message
var msg = lines[line_id].replace(/^\s+|\s+$/, "");
var msglines = 1;
while (lines[line_id+msglines] != undefined && lines[line_id+msglines].substring(0,2) == " ")
{
msg += " " + lines[line_id+msglines].replace(/^\s+|\s+$/, "");
msglines++;
}
if (msg.lastIndexOf(leaderName) >= 0)
DebugInOOG("ÿc8found him :;"+msg);
// checking if the msg is a friendly whisper
if (msg.lastIndexOf(leaderName + ' (*' +leaderAccountName+')') > -1)
{
var regGameNameWhispered=/^.*(game|partie|spiel|partita|partida).*(nomm[^\s]*|called|chiamata)\s*([\w\s-]*\w)\s*\.\s*$/gi;
if (msg.match(regGameNameWhispered))
game = msg.replace(regGameNameWhispered, "$3");
if (game != '')
{
found_leader = true;
break;
}
}
// checking if the msg is from the friend list
if (msg.lastIndexOf(': '+leaderAccountName+',') > -1)
{
found_leader = true;
var regOffline=/^.*(offline|desconectado).*$/gi;
var regInChat=/^.*(channel|canale?)\s*([\w\s-]*\w)\.?\s*$/gi;
var regGameName=/^.*(game|partie|spiel|partita|partida)\s*([\w\s-]*\w)\s*\(priv[^\)]*\)\.\s*$/gi;
if (msg.match(regOffline)
&& (_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick))
{
DebugInOOG('Leader is offline, delay '+Math.round(LeaderOfflineDelay/1000)+' sec for next /f l.');
_leaderOfflineTick = GetTickCount();
}
else if (msg.match(regInChat)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick))
{
DebugInOOG('Leader is in the chat "'+msg.replace(regInChat, "$2")+'", delay '+Math.round(LeaderInChatDelay/1000)+' sec for next /f l.');
_leaderInChatTick = GetTickCount();
}
else if (msg.match(regGameName)
&& ((_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick)
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)))
{
game = msg.replace(regGameName, "$2");
}
else if ((_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_leaderOfflineTick < 0 || (_leaderOfflineTick + LeaderOfflineDelay) < _tick))
{
// unhandled line, supposelly "In Realm"
DebugInOOG('The leader was in the the lobby but not in chat, delay '+Math.round(LeaderInChatDelay/1000)+' sec for next /f l.');
_leaderInChatTick = GetTickCount();
}
break;
}
}
if (found_leader == false)
DebugInOOG('I couldn\'t find the leader in my friend list!');
if (game!="")
{
if (UseCDKeyChangeTrick)
{
// increasing the number of runs in the OOG (for CDKey switch)
// Problem : the gamename/gamepassword set in your OOG will be typed in the lobbyChat
// this may output a red message in the lobby chat if you have a password set (not a real problem)
// I recommend to set a gamename like "Run" and no gamepassword in your OOG. -> this will output "Run-01", "Run-02", etc in lobby chat before joining games
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
Delay(1000);
}
DebugInOOG('Leader is in the game "' + game + '"');
controlData.click(controlData.controls.lobby.button.join);
Delay(100);
}
}
else
{
DebugInOOG('I can\'t read the chat!');
//DebugInOOG('You probably haven\'t added the lobby chat controlinfo coordinates!');
Delay(30000);
}
break;
case 1: // Lobby
if(location.id == 1 && joinChatAfterGame)
{
Delay(Random(waitBeforeEnterChatMin, waitBeforeEnterChatMax));
controlData.click(controlData.controls.lobby.button.enterChat);
break;
}
break;
case 2: // Waiting In Line
if(GetTickCount()-lastGameMade > waitInLineTimeout)
controlData.click(controlData.controls.lobby.inLine.button.cancel);
break;
case 4: // Create Game
if(!controlData.get(controlData.controls.lobby.create.editBox.gameName))
{
controlData.click(controlData.controls.lobby.button.join);
Delay (500);
controlData.click(controlData.controls.lobby.button.create);
Delay (500);
break;
}
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
locationTimeout(5000, location);
lastGameMade = GetTickCount();
lastGameStatus = 1; // pending creation
break;
case 5: // Join Game
if (game)
{
controlData.setText( controlData.controls.lobby.join.editBox.gameName, game);
Delay (100);
controlData.setText( controlData.controls.lobby.join.editBox.password, gamepassword);
Delay (100);
controlData.click(controlData.controls.lobby.join.button.joinGame);
RunGC(); // run garbage collector between each game
locationTimeout(5000, location);
lastGameStatus = 1; // pending join
}
else
{
DebugInOOG('No game to join : cancelling');
me.Cancel(1);
Delay(1000);
}
break;
case 6: // Ladder
break;
case 7: // Channel List
break;
case 8: // Main Menu
if(controlData.getCurrentRealmIndex() == me.gatewayid)
{
outputGameLength();
controlData.click(controlData.gameTypes[me.playtype]);
}
else
controlData.click(controlData.controls.mainMenu.button.gateway);
break;
case 9: // Login
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
Delay(loginDelay);
controlData.setText(controlData.controls.login.editBox.accountName, me.account);
sendEventToOOG(D2NT_MGR_LOGIN, location.name, 0);
locationTimeout(5000, location);
break;
case 10: // Login Error (this is a fatal error, so stop)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 10);
Delay(3500);
break;
case 11: // Unable To Connect
timeoutDelay(unableToConnectRetry*60*1000, location)
controlData.click(controlData.controls.login.unableToConnect.button.ok);
break;
case 12: // Character Select
var _time, _control;
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
for(_time = 0 ; _time < characterScreenTimeout ; _time += 500)
{
_control = controlData.get(controlData.controls.characterSelect.textBox.characterInfo[me.charloc]);
if(_control && _control.GetText() != undefined)
break;
Delay(500);
}
if(_time < characterScreenTimeout)
{
Delay(characterSelectDelay);
controlData.click(controlData.controls.characterSelect.textBox.characters[me.charloc], 0, 0, 1);
controlData.click(controlData.controls.characterSelect.textBox.characterInfo[me.charloc], 0, 0, 1);
// reset last game made, so it doesnt make a game immediately
inGameAt = 0;
setNextGameMake();
}
else
{
controlData.click(controlData.controls.characterSelect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
}
break;
case 13: // Realm Down - Character Select screen
controlData.click(controlData.controls.characterSelect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
break;
case 14: // Character Select - Disconnected
timeoutDelay(disconnectedRetry*60*1000, location);
controlData.click(controlData.controls.characterSelect.disconnected.button.ok);
break;
case 15: // New Character
break;
case 16: // Character Select - Please Wait popup
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.characterSelect.pleaseWait.button.cancel);
break;
case 17: // Lobby - Lost Connection - just click okay, since we're toast anyway
controlData.click(controlData.controls.lobby.lostConnection.button.ok);
break;
case 18: // D2 Splash
controlData.click(controlData.controls.d2Splash.textBox.copyright);
break;
case 19: // Login - Cdkey In Use
timeoutDelay(cdkeyInUseRetry*60*1000, location);
controlData.click(controlData.controls.login.cdkeyInUse.button.ok);
break;
case 20: // Single Player - Select Difficulty
controlData.click(controlData.singlePlayerDifficulties[me.diff]);
break;
case 21: // Main Menu - Connecting
if(!locationTimeout(connectingToBnetTimeout, location))
controlData.click(controlData.controls.mainMenu.connecting.button.cancel);
break;
case 22: // Login - Invalid Cdkey (classic or xpac)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 3600);
Delay(3500);
break;
case 23: // Character Select - Connecting
if(!locationTimeout(characterScreenTimeout, location))
controlData.click(controlData.controls.characterSelect.button.exit);
break;
case 24: // Server Down - not much to do but wait..
break;
case 25: // Lobby - Please Wait
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.lobby.pleaseWait.button.cancel);
break;
case 26: // Lobby - Game Name Exists
sendEventToOOG(D2NT_MGR_PRINT_LOG, "ÿE00000Game already exists", 0);
inGameAt = 0;
lastGameStatus = 0;
setNextGameMake();
locationTimeout(15000, location);
break;
case 27: // Gateway Select
controlData.clickRealmEntry(me.gatewayid);
controlData.click(controlData.controls.gateway.button.ok);
break;
case 28: // Lobby - Game Does Not Exist
inGameAt = Random(gameDoesNotExistDelayMin, gameDoesNotExistDelayMax);
lastGameStatus = 0;
setNextGameMake();
locationTimeout(gameDoesNotExistTimeout, location);
break;
default:
DebugInOOG("Unhandled location : "+location.id);
break;
}
DebugInOOG("Location : "+location.id);
}
function sendEventToOOG(locationId, statusString, pendingTime)
{
return SendCopyData("D2NT Manager", null, (locationId<<16)|pendingTime, statusString);
}
function setNextGameMake()
{
lastGameMade = GetTickCount();
nextGameMake = lastGameMade + createGameThreshold + Random(0-createGameThresholdRandom, createGameThresholdRandom) + inGameAt;
inGameAt = 0;
chatActionsDone = false;
}
function outputGameLength()
{
if(inGameAt)
{
duration = GetTickCount() - inGameAt;
inGameAt = (duration < gameMinLength ? gameMinLength - duration : 0);
}
}
function locationTimeout(time, location)
{
endtime = GetTickCount() + time;
while(controlData.getLocation().id == location.id && endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(500);
}
return (controlData.getLocation().id != location.id);
}
function timeoutDelay(time, location)
{
endtime = GetTickCount() + time;
while(endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(1000);
}
}
function getRandomString(_length)
{
_retString = "";
_charSet = "0123456789abcdefghijklmnopqrstuvwxyz";
while(_length--)
{
_retString += _charSet.charAt(Random(0, _charSet.length-1));
Delay(1);
}
return _retString;
}
function DebugInOOG(logString)
{
if (Debug)
return SendCopyData("D2NT Manager", null, 9<<16, "-- Debug : " + logString);
else
return false;
}
|
|
|
|
|
Similar Threads
|
d2nt bot v3.1 leechbot help
07/29/2010 - Diablo 2 - 6 Replies
kann mir jmd eine genaue Anleitung geben irwie bleibt mein leecher immer im channel sitzen und postet sooft die f list bis ich realm down hab ^^.
...ja ich sollte in den bot topic posten aber bitte... bei 314 Seiten durchlesen ne? :D also pls
|
leechbot bb v1.1 d2nt
06/09/2010 - Diablo 2 - 2 Replies
hi ich habe das problem er nimmt bei mir das tp net und wenn er es nimmt dann geht er runter und leave dann das game! oda er wartet nur 20 sek auf tp dann leavt er-.- kA hilfe bitte =) ihr seit klasse
|
PRoblem mit d2nt leechbot
05/31/2010 - Diablo 2 - 3 Replies
Ich versuch atm mit der amazone zu leechen bei baal
naja problem besteht darin wenn sie in town steht so paar sek. leavt sie das game und wartet bis ein neues offen ist woran liegt das?
|
D2NT-Bot + leechbot ?
05/31/2010 - Diablo 2 - 12 Replies
Hey!
Gibt es eine Möglichkeit D2NT-Bot und leechbot gleichzeitig zu benutzen?
Leechbot läuft unter redvex, D2NT nicht.
Wenn jmd. weiß wie, wäre ich über eine schnelle Antwort sehr dankbar.
MfG
|
d2nt Leechbot Dia & Baal?
05/09/2010 - Diablo 2 - 1 Replies
Moin,
ich würde gerne auf Rechner Nr.1 meinen Hammerdin Dia & Baal Pub Runs machen lassen und von Rechner Nr.2 aus meine SoSo via Leechbot hinterher Joinen lassen. Nun möchte ich halt das die auch bei Dia mit am Start ist gibts sowas schon oder is leechen nur bei Baal möglich?
Und gibts ne Anleitung in der steht wie genau man den Leechbot einstellen muss bei mir fragt der immer nur die friendlist ab aber joint nicht nach...
MFG
Dirk
|
All times are GMT +1. The time now is 23:11.
|
|