|
You last visited: Today at 19:14
Advertisement
Mein Bluebird soll im channel NG ansagen!
Discussion on Mein Bluebird soll im channel NG ansagen! within the Diablo 2 forum part of the Other Online Games category.
10/26/2010, 15:11
|
#1
|
elite*gold: 0
Join Date: May 2010
Posts: 13
Received Thanks: 0
|
Mein Bluebird soll im channel NG ansagen!
Da bräucht ich mal hilfe
Einen channel Joinenn tut er, aber dort soll er nun zum beispiel:
"Gz-DiaBaal-04"
ansagen.
Wo und wie muss man das schreiben?
Danke für Hilfe!
|
|
|
10/26/2010, 15:14
|
#2
|
elite*gold: 0
Join Date: Apr 2010
Posts: 241
Received Thanks: 34
|
Schau dir deine BotLeech.ntj an ;D
next Time sufu oder im Thread posten wo du den Bot herhast
greetz
Shub-Niggurath
|
|
|
10/26/2010, 15:25
|
#3
|
elite*gold: 0
Join Date: Aug 2009
Posts: 706
Received Thanks: 135
|
Quote:
Originally Posted by Shub-Niggurath
Schau dir deine BotLeech.ntj an ;D
|
Und was soll er da zu Gameannouncements finden? ^^
findest du eine Erweiterung dafür, aber es wär für alle besser, wenn du das nchste mal die SuFu benutzt ;p
Grüße und so
|
|
|
10/26/2010, 15:36
|
#4
|
elite*gold: 0
Join Date: Apr 2010
Posts: 241
Received Thanks: 34
|
Quote:
Originally Posted by G[oz]U
Und was soll er da zu Gameannouncements finden? ^^
findest du eine Erweiterung dafür, aber es wär für alle besser, wenn du das nchste mal die SuFu benutzt ;p
Grüße und so
|
So Mr.G[oz]U
Schauen sie sich das mal an :
Code:
//###################################################################
//###########################Einstellungen###########################
//###################################################################
var leaderAccountName = "";
var leaderName = "";
var gamepassword = "";
var JoinGameAgain = true; // wenn der Bot nach chicken oder disconnect ins selbe Spiel nochmal gehen soll, auf true stellen
var UseCDKeyChangeTrick = true; // Wenn der LeechBot mehrere CD Keys nutzen soll, dann auf true stellen.
var joinRandomChannel = false;
var joinChannelInChat = "";
[B]var firstJoinMessage = ""; // Soll der leechbot etwas sagen, wenn er in den Chat kommt, dann hier eintragen
var chatMessageAfterGame = ""; // Soll der leechbot etwas sagen, wenn er aus dem Spiel kommt, dann hier eintragen
[/B]
//###################################################################
//##############################Delays###############################
//###################################################################
var gameMinLength = 180000;
// realm delays (minutes)
var unableToConnectRetry = 2;
var realmDownRetry = 60;
var disconnectedRetry = 2;
var cdkeyInUseRetry = 2;
// 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 CHANGE 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 samegame = '';
var oldgame = '';
var game = '';
var _gamename = "";
var _gamepassword = "";
var _leaderOfflineTick = -LeaderOfflineDelay;
var _leaderInChatTick = -LeaderInChatDelay;
var _GameIsFullTick = -GameIsFullDelay;
var Debug = false;
var joinChatAfterGame = true;
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("yc8found 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!="")
{
DebugInOOG('Leader is in the game "' + game + '"');
//controlData.click(controlData.controls.lobby.button.join);
//Delay(100);
if(!JoinGameAgain)
{
if (game != samegame)
{
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);
}
controlData.click(controlData.controls.lobby.button.join);
Delay (200);
}
else
Delay(30000);
}
else
{
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);
}
controlData.click(controlData.controls.lobby.button.join);
Delay (200);
}
}
}
else
{
DebugInOOG('I can\'t read the chat!');
//DebugInOOG('You probably haven\'t added the lobby chat controlinfo coordinates!');
Delay(30000);
}
if(game != '')
samegame = game;
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, "yE00000Game 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;
}
Greetz
Shub-Niggurath
|
|
|
10/26/2010, 19:34
|
#5
|
elite*gold: 139
Join Date: Oct 2006
Posts: 12,058
Received Thanks: 24,256
|
Schön, nur ist die nicht bei jedem Bot so drin Mr. Shub-Niggurath.
|
|
|
10/26/2010, 20:02
|
#6
|
elite*gold: 0
Join Date: Aug 2009
Posts: 706
Received Thanks: 135
|
Quote:
Originally Posted by Shub-Niggurath
So Mr.G[oz]U
[blub...]
|
Ich finds super, dass du hier im Forum so höflich auftrittst! ^.-
Jedoch möchte ich dich darauf hinweisen, dass diese Datei bei dem D2NT Bluebird - welcher von dem Threadersteller benutzt wird - wie folgt aussieht:
Code:
var gameMinLength = 90000; // time in milliseconds, minimum game length, 180 seconds default (1 game/3 minutes)
var unableToConnectRetry = 5; // time in minutes to retry connecting on connection fail (real value is +/- 1 min)
var realmDownRetry = 260; // time in minutes to retry connecting on a realm down (default is 120 minutes)
var disconnectedRetry = 5; // time in minutes to retry on a disconnection (usually ip ban related)
var cdkeyInUseRetry = 5; // time in minutes to retry on a cdkey in use error message (set to 0 to stop)
var connectingToBnetTimeout = 20000; // time in milliseconds to wait for a login to time out and click cancel and retry
var characterScreenTimeout = 10000; // time in milliseconds to wait for character screen to appear
var pleaseWaitTimeout = 10000; // time in milliseconds to wait for a please wait popup
var createGameThreshold = 5000; // time in milliseconds to wait between making games
var createGameThresholdRandom = 1000; // time in milliseconds to randomly add +/- to the game create time
var createGameTimeout = 15000; // time in milliseconds to register a failed to create game
var waitInLineTimeout = 60000; // time in milliseconds to wait in lines for a create game (60 second default)
var characterSelectDelay = 1000; // time in milliseconds to wait before selecting a character on the char screen
var loginDelay = 1000; // time in milliseconds to wait before submitting login information
var clickDelay = 500; // wait X milliseconds before next action after a click event
var textDelay = 500; // wait X milliseconds before next action after inserting text into a textbox
var clickDelayRandom = 500; // random amount of time to add to a click
var textDelayRandom = 500; // random amount of time to add to a text set
var gameDoesNotExistDelayMin = 1000; // how long to wait when a Game Does Not Exist occurs - minimum - default 10 minutes
var gameDoesNotExistDelayMax = 1000; // how long to wait when a Game Does Not Exist occurs - maximum - default 15 minutes
var gameDoesNotExistTimeout = 30000; // how long to wait for the dialog to disappear (default 30 seconds, don't change this)
var joinChatAfterGame = true; // join chat after leaving a game
var joinRandomChannel = false; // if this is true, will join a random channel, otherwise it will use the channel below..
var joinChannelInChat = ""; // leave blank to not join a private channel
var waitBeforeEnterChatMin = 1000; // min how long to wait before entering chat
var waitBeforeEnterChatMax = 2000; // max how long to wait before entering chat
var waitInChatBeforeActionsMin = 2000; // min how long to wait before joining channel
var waitInChatBeforeActionsMax = 3000; // max how long to wait before joining channel
var JoinFromChat = true;
var leaderAccountName = "ACCOUNTNAME"; // Hier den ACCOUNTNAMEN des Leaders anzeigen. Der Name muss so geschrieben werden, wie er in der Freundesliste angezeigt wird!!!
var gamepassword = ''; // Wenn du ein Passwort für deine Baalruns verwendest, schreibe es hier zwischen die zwei ''
var samegame = '';
var oldgame = '';
var check = 1;
// DONT 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;
Include("libs/controlInfo.ntl");
//Include("joinBotSettings.ntl");
var controlData = new controlInfo();
var game = '';
function NTMain()
{
Delay(1000);
var _ingame = false;
controlData.clickDelay = clickDelay;
controlData.textDelay = textDelay;
controlData.clickDelayRandom = clickDelayRandom;
controlData.textDelayRandom = textDelayRandom;
while(1)
{
if(me.ingame)
{
if(!inGameAt)
inGameAt = GetTickCount();
if(!_ingame)
{
if(Load("NTBot/NTBotGame.ntj"))
{
_ingame = true;
sendEventToOOG(D2NT_MGR_INGAME, "In Game", 0);
lastGameStatus = 2; // in game successful
}
}
Delay(1000);
}
else
{
if(_ingame)
{
_ingame = false;
sendEventToOOG(D2NT_MGR_READY, "", 0);
}
locationAction(controlData.getLocation());
Delay(500);
}
}
}
function locationAction(location)
{
switch(location.id)
{
case 3: // Lobby Chat
if(!chatActionsDone)
{
chatActionsDone = true;
Delay(Random(waitInChatBeforeActionsMin, waitInChatBeforeActionsMax));
if(joinRandomChannel || joinChannelInChat != "")
{
Say("/join " + (joinRandomChannel ? getRandomString(Random(3,10)) : joinChannelInChat));
Delay(1000);
if(check == 1)
{
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
outputGameLength();
lastGameStatus = 0;
setNextGameMake();
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
check = check + 1;
}
}
}
if(JoinFromChat){
game = '';
if (joinChannelInChat)
Delay (1200);
//Say('Locating the leader : '+leaderAccountName);
Say('/f l');
Delay(2000);
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;
var regGameNameGerman=/^\s*(Destruction\s)?(in\s)?(das\s)?(Spiel\s)?\'([\w\s-]*\w)\'\s\(privat[^\)]*\)\.\s*$/gi;
if (lines[friend].match(regOfflineEnglish))
{
errors += (errors == '' ? '' : ' ') + 'leader is offline';
//if (joinChannelInChat)
//Say('Leader is offline, delay 10 sec.');
//Delay(5000);
}
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 && lines[friend + 1].match(regGameNameGerman) && lines[friend+1].substr(1, 1) != ':')
{
game = lines[friend + 1].replace(regGameNameGerman, "$5");
}
if (!game && lines[friend + 1].match(regGameNameFrench) && lines[friend+1].substr(1, 1) != ':')
{
game = lines[friend + 1].replace(regGameNameFrench, "$3");
}
if (game != '' && game != samegame)
{
if (joinChannelInChat)
Delay(500);
//Say('I found him! In the game ' + game);
controlData.click(controlData.controls.lobby.button.join);
Delay (200);
}
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!');
Delay(1500);
}
}
errors = '';
if(game != '')
samegame = game;
break;
case 1: // Lobby
if(location.id == 1 && joinChatAfterGame)
{
Delay(Random(waitBeforeEnterChatMin, waitBeforeEnterChatMax));
controlData.click(controlData.controls.lobby.button.enterChat);
break;
}
if(GetTickCount() > nextGameMake)
{
lastGameFailed = false;
switch(lastGameStatus)
{
case 0:
controlData.click(controlData.controls.lobby.button.create);
nextGameMake = GetTickCount() + createGameTimeout; // set our timeout
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
break;
case 1: // game failed, rollover to reset timer
//inGameAt = GetTickCount(); // reset inGameAt, to wait how long we should have waited..
lastGameFailed = true;
case 2:
outputGameLength();
lastGameStatus = 0;
setNextGameMake();
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
break;
}
}
//else
// timeoutDelay(nextGameMake-GetTickCount(), location);
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);
}
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
RunGC(); // run garbage collector between each game
locationTimeout(5000, location);
lastGameMade = GetTickCount();
lastGameStatus = 1; // pending creation
break;
case 5: // Join Game
if(!controlData.get(controlData.controls.lobby.join.editBox.gameName))
{
controlData.click(controlData.controls.lobby.button.create);
Delay (1000);
controlData.click(controlData.controls.lobby.button.join);
Delay (1000);
}
if (game != '')
{
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);
RunGC(); // run garbage collector between each game
//locationTimeout(1000, location);
lastGameStatus = 1; // pending join
check = 1;
}
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
RunGC(); // run garbage collector between each game
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, "Game 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;
}
}
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;
}
Vielen Dank für die Aufmerksamkeit, lieber Herr Shub-Niggurath
|
|
|
10/26/2010, 20:05
|
#7
|
elite*gold: 0
Join Date: Apr 2010
Posts: 241
Received Thanks: 34
|
Ok Mr.lanara ich lese es grad selbst Bluebird
das muss ich wohl übersehen haben ...
Aber dann kann ich dem Thread steller nur Empfehlen die Public botten für Dummies D2NT Version zu nehmen ;D
Damit Leeche ich schon ne Woche durch und einfach einzustellen
MIT BotLeech.ntj ;D
ansonsten Mr.G[oz]U's schönen Link nehmen
€: Ich bin soweit immer freundlich und ich hab jetzt auch gesehen das es sich um den Bluebird handelt trotzdem Danke nochmal für den Hinweis
greetz
Shub-Niggurath
|
|
|
10/26/2010, 21:19
|
#8
|
elite*gold: 1
Join Date: Jul 2006
Posts: 382
Received Thanks: 51
|
probiers mal mit der NTBot.ntj
Code:
var gameMinLength = 90000; // time in milliseconds, minimum game length, 180 seconds default (1 game/3 minutes)
var unableToConnectRetry = 5; // time in minutes to retry connecting on connection fail (real value is +/- 1 min)
var realmDownRetry = 300; // time in minutes to retry connecting on a realm down (default is 300 minutes)
var disconnectedRetry = 5; // time in minutes to retry on a disconnection (usually ip ban related)
var cdkeyInUseRetry = 5; // time in minutes to retry on a cdkey in use error message (set to 0 to stop)
var connectingToBnetTimeout = 20000; // time in milliseconds to wait for a login to time out and click cancel and retry
var characterScreenTimeout = 10000; // time in milliseconds to wait for character screen to appear
var pleaseWaitTimeout = 10000; // time in milliseconds to wait for a please wait popup
var createGameThreshold = 15000; // time in milliseconds to wait between making games
var createGameThresholdRandom = 5000; // time in milliseconds to randomly add +/- to the game create time
var createGameTimeout = 15000; // time in milliseconds to register a failed to create game
var waitInLineTimeout = 60000; // time in milliseconds to wait in lines for a create game (60 second default)
var characterSelectDelay = 1000; // time in milliseconds to wait before selecting a character on the char screen
var loginDelay = 1000; // time in milliseconds to wait before submitting login information
var clickDelay = 1000; // wait X milliseconds before next action after a click event
var textDelay = 1000; // wait X milliseconds before next action after inserting text into a textbox
var clickDelayRandom = 500; // random amount of time to add to a click
var textDelayRandom = 500; // random amount of time to add to a text set
var gameDoesNotExistDelayMin = 600000; // how long to wait when a Game Does Not Exist occurs - minimum - default 10 minutes
var gameDoesNotExistDelayMax = 900000; // how long to wait when a Game Does Not Exist occurs - maximum - default 15 minutes
var gameDoesNotExistTimeout = 30000; // how long to wait for the dialog to disappear (default 30 seconds, don't change this)
[b]var joinChatAfterLogin = true;[/b] // join chat after login
var joinRandomChannel = false; // if this is true, will join a random channel, otherwise it will use the channel below..
[b]var joinChannelInChat = "CHANNEL HIER EINTRAGEN";[/b] // leave blank not to join a private channel
[b]var channelLogin = false;[/b] // type ".login" once after joining the channel
var channelUsers = new Array(); // dynamic array that holds channel users
//---------------------------------------------------------------------------------------------------------------------------------------------------------
// add any char/account here that is supposed to perform chat actions/game announcements or join a private channel
[b]channelUsers.push("AccountName");
channelUsers.push("CharName");[/b]
//----------------------------------------------------------------------------------------------------------------------------------------------------------
//These key expressions are replaced that way: %game --> "gamename-",%counter --> number of the next game, %time --> time in seconds till game creation, %password --> game password
//Note that the announcement will start after the first run, so there won't be any anncouncement right after login
[b]var gameAnnouncement = "Next Game: Join %game%counter in %time seconds.";[/b] // leave blank not to post a channel announcement
var gameAnnouncementDelay = 5000; // wait X milliseconds before posting the announcement message (don't set this too low!)
var gameAnnouncementDelayRandom = 500; // random amount of time to add to a to the announcement delay
//----------------------------------------------------------------------------------------------------------------------------------------------------------
var waitBeforeEnterChatMin = 1000; // min how long to wait before entering chat
var waitBeforeEnterChatMax = 2000; // max how long to wait before entering chat
var waitInChatBeforeActionsMin = 2000; // min how long to wait before joining channel
var waitInChatBeforeActionsMax = 3000; // max how long to wait before joining channel
// DONT 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 joinedChannel = false;
var justJoined = true;
Include("libs/controlInfo.ntl");
var controlData = new controlInfo();
function NTMain()
{
Delay(1000);
var _ingame = false;
controlData.clickDelay = clickDelay;
controlData.textDelay = textDelay;
controlData.clickDelayRandom = clickDelayRandom;
controlData.textDelayRandom = textDelayRandom;
while(1)
{
if(me.ingame)
{
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
}
}
Delay(1000);
}
else
{
if(_ingame)
{
_ingame = false;
sendEventToOOG(D2NT_MGR_READY, "", 0);
}
locationAction(controlData.getLocation());
Delay(500);
}
}
}
function locationAction(location)
{
switch(location.id)
{
case 3: // Lobby Chat
if(justJoined)
{
justJoined = false;
if(isChannelUser(me.account, me.charname))
{
for(var i = 0; i < 3; i++)
{
SetStatusText("ÿc2Chat actions enabled!");
Delay(750);
SetStatusText("");
Delay(750);
}
}
else
{
for(var i = 0; i < 3; i++)
{
SetStatusText("ÿc1Chat actions disabled!");
Delay(750);
SetStatusText("");
Delay(750);
}
}
}
if(!chatActionsDone && isChannelUser(me.account, me.charname))
{
chatActionsDone = true;
Delay(Random(waitInChatBeforeActionsMin, waitInChatBeforeActionsMax));
if(!joinedChannel && (joinRandomChannel || joinChannelInChat != ""))
{
var rndChannel = getRandomString(Random(3,10));
SetStatusText("ÿc8Joining Channel " + (joinRandomChannel ? rndChannel : joinChannelInChat) );
Delay(1000);
Say("/join " + (joinRandomChannel ? rndChannel : joinChannelInChat));
joinedChannel = true;
Delay(1000);
if(channelLogin)
{
SetStatusText("ÿc8Channel Login...");
Say(".login");
Delay(1000);
}
}
}
case 1: // Lobby
if(location.id == 1 && joinChatAfterLogin)
{
Delay(Random(waitBeforeEnterChatMin, waitBeforeEnterChatMax));
controlData.click(controlData.controls.lobby.button.enterChat);
break;
}
if(GetTickCount() > nextGameMake)
{
var _control;
lastGameFailed = false;
switch(lastGameStatus)
{
case 0:
_control = controlData.get(controlData.controls.lobby.button.create);
if(_control && _control.pressed)
{
controlData.click(controlData.controls.lobby.button.join);
Delay(500);
}
controlData.click(controlData.controls.lobby.button.create);
nextGameMake = GetTickCount() + createGameTimeout; // set our timeout
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
break;
case 1: // game failed, rollover to reset timer
inGameAt = GetTickCount();
lastGameFailed = true;
Delay(5000);
case 2:
outputGameLength();
lastGameStatus = 0;
setNextGameMake();
if(lastGameFailed)
{
SetStatusText("ÿc1Failed to join!");
sendEventToOOG(D2NT_MGR_PRINT_LOG, "ÿE00000Game " + ((getGameCounter(me.gamename, true)) ? ("(" + getGameCounter(me.gamename, true) + ")") : "") + " creation failed!", 0)
Delay(2500);
}
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
break;
}
}
else
{
if(joinChannelInChat && gameAnnouncement && me.gamename && isChannelUser(me.account, me.charname))
{
var tempDelay = (gameAnnouncementDelay > 5000) ? gameAnnouncementDelay : 5000 +
(gameAnnouncementDelayRandom > 500) ? Random(0, gameAnnouncementDelayRandom) : 500;
var gameText = gameAnnouncement;
gameText = gameText.replace("%password", me.gamepassword);
gameText = gameText.replace("%game", getGameName(me.gamename));
gameText = gameText.replace("%counter", getGameCounter(me.gamename, false));
gameText = gameText.replace("%time", parseInt((nextGameMake - GetTickCount() - tempDelay)/1000+3.0));
if(parseInt((nextGameMake - GetTickCount() - tempDelay)/1000+3.0) > 5)
{
Delay(tempDelay);
Say(gameText);
}
}
timeoutDelay(nextGameMake-GetTickCount(), location, true);
}
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);
}
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
locationTimeout(5000, location);
lastGameMade = GetTickCount();
lastGameStatus = 1; // pending creation
break;
case 5: // Join Game
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);
SetStatusText("ÿc1Game akready exists!");
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;
}
}
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, showNextGameStatus)
{
if(arguments.length < 3)
showNextGameStatus = false;
endtime = GetTickCount() + time;
while(endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
if(showNextGameStatus)
{
if(lastGameFailed && parseInt((endtime-GetTickCount())/1000) > 30)
{
if(parseInt((endtime-GetTickCount())/1000) % 30 == 0)
{
SetStatusText("ÿc1Last game failed!");
Delay(5000);
}
if(me.gamename && getGameCounter(me.gamename, false))
SetStatusText("ÿc8Next game: " + getGameName(me.gamename) + getGameCounter(me.gamename, false) + " (" + parseInt((endtime-GetTickCount())/1000) + "s)");
else
SetStatusText("ÿc8Game creation pending... (" + parseInt((endtime-GetTickCount())/1000) + "s)");
}
else if(parseInt((endtime-GetTickCount())/1000) >= 0)
{
if(me.gamename && getGameCounter(me.gamename, false))
SetStatusText("ÿc8Next game: " + getGameName(me.gamename) + getGameCounter(me.gamename, false) + " (" + parseInt((endtime-GetTickCount())/1000) + "s)");
else
SetStatusText("ÿc8Game creation pending... (" + parseInt((endtime-GetTickCount())/1000) + "s)");
}
if(me.ingame)
endtime = GetTickCount();
}
Delay(1000);
}
if(showNextGameStatus)
SetStatusText("ÿc8Creating game...");
}
function getRandomString(_length)
{
_retString = "";
_charSet = "0123456789abcdefghijklmnopqrstuvwxyz";
while(_length--)
{
_retString += _charSet.charAt(Random(0, _charSet.length-1));
Delay(1);
}
return _retString;
}
function getGameName(lastGameString)
{
if(!lastGameString)
return "";
else
return (lastGameString.substr(0, lastGameString.lastIndexOf('-')+1));
}
function getGameCounter(lastGameString, simple)
{
var myCount, countString;
if(!lastGameString)
return "-1";
else
{
countString = lastGameString.slice(lastGameString.lastIndexOf('-')+1);
switch(countString)
{
case "08":
myCount = 9;
break;
case "09":
myCount = 10;
break;
default:
myCount = parseInt(countString) + 1;
break;
}
if(!simple)
{
if(myCount <= 9)
return ('0' + myCount);
}
return myCount;
}
}
function isChannelUser(accountname, charname)
{
for(var i = 0; i < channelUsers.length; i++)
{
if(accountname.toLowerCase() == channelUsers[i].toLowerCase() || charname.toLowerCase() == channelUsers[i].toLowerCase())
return true;
}
return false;
}
Einfach alles markieren kopieren und in deine NTBot.ntj einfügen, kopiere deine alte allerdings vorher.
|
|
|
10/26/2010, 21:20
|
#9
|
elite*gold: 0
Join Date: Jan 2009
Posts: 7,310
Received Thanks: 2,205
|
seid lieb und mehret euch....
closed
|
|
|
|
Similar Threads
|
The Bluebird bot / Bot soll stoppen wenn Kiste voll
09/03/2010 - Diablo 2 Programming - 8 Replies
Also hier muss es doch ein paar schlaue köpfe geben die mir sagen können wie mans hinbekommt das der Bot automatisch stoppt wenn die Truhe voll ist.
bitte net so antworten wie wenn er am morgen voll is dann nehm net soviel mist mit^^
Also es muss doch möglich sein dem zu sagen wenn kiste voll dann stopp.
|
Mein Youtube Channel...
06/19/2010 - Music - 2 Replies
....mit dem Neusten aus Techno.
Ich Uplaode jeden Tag bis zu 5 neue Musikstücke, die ich alle aus den Charts entnehme oder selbst bewerte. Musikwünsche werden per PN hochgeladen.
Hier der Channel: YouTube - Kanal von NewestTechno
Ich hoffe er gefällt euch ;) Abonnieren wäre schön, muss aber nicht weil ich es gerne mache.
MFG 0p3ra aka. NewestTechno
http://www.LupiUpload.de/images/2010/06/17/b9afb0 4fdbec14aac3d9aa5a352dbee8633c8b32.jpg
|
d2nt bluebird channel frage
05/07/2010 - Diablo 2 - 6 Replies
hi leutz
ne frage wie mache ich das, das er nach dem login in denn channel joint wo ich hin will und dann den game name schreibt was ich gemacht habe??
mfg toby
ps: ja ich weis gehört ins topic von blue hab 2 mal rein gepostet aber niemand antwortet mir
|
d2nt bluebird schreibt einfach nich in channel
05/03/2010 - Diablo 2 - 1 Replies
hi leutz ich hab es nun hin bekommen das mein d2nt bluebird bot scho mal in channel geht aber er will einfach nich das game schreiben würde mich freuen wenn mir des vllt jemand per teamviewer einstelltn würder =)
mfg toby
|
All times are GMT +2. The time now is 19:14.
|
|