D2NT - Mehrere CD-Keys - Wies wirklich geht.

06/27/2011 14:33 Klangsphaere#121
Warum sollte er? Ist doch nicht logisch!
06/27/2011 14:41 Mecco-Pekko#122
Quote:
Originally Posted by Klangsphaere View Post
Warum sollte er? Ist doch nicht logisch!
wer weiß :P

btw ich hab das mal ebend alles gemacht mit den mpq's und wollte nun beim leader in der NTBot.ntj das cd key switch auf true setzen nur gibt es das bei mir nicht sondern nur bei den leechern :/
oder macht der das von alleine wenn er mpq's drin hat?

Code:
///////////////////////////////////////////////////
//        characters in your game setting: 		 //		
///////////////////////////////////////////////////
var characterdiff        =  "40"; 	//use this to keep those pesky spam bots out of the f'ing game
									//note you must manually hit the check box the first time for this to work
var maxNumberOfPlayersss = "8";		//use this to set the maximum number of players allowed in your game

///////////////////////////////////////
//        Channel Settings: 		 //		/ /These controll what if any channel you join
///////////////////////////////////////
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			= "op ePvPBaal";		 // Channel you want your bot to join, leave blank to not join a private channel

///////////////////////////////////////
//        Message Settings: 		 //		// These controll what your bot sais to the leechers will also send a log incommand to a channel bot
///////////////////////////////////////
var chatMessageOnJoin			= ".login";	// Chat Message to say Login command for channel bot will only be sent once
var chatMessageAfterGame1		= "";		// Optional chat message Line #1 to say after each game on Channel
var chatMessageAfterGame2		= "";		// Optional chat message Line #2 to say after each game on Channel
var chatMessageAfterGame3		= "";		// Optional chat message Line #3 to say after each game on Channel
var chatMessageAfterGame4		= "";		// Optional chat message Line #4 to say after each game on Channel
var chatMessageAfterGame5		= "";		// Optional chat message Line #5 to say after each game on Channel

///////////////////////////////////////		// These will let you send a message with a game name password and time to your leechers
//      Game Message Settings:       //		// var saygamename must be true for any of these to work
///////////////////////////////////////		// You cant NOT have a - in you game name it will bug it out
var saygamename 			= true;						// Must be true for any of the game message settings to work
var nextgamemessage			= "Next is";	// This will come befor your next game name eg "New game is"
var saypassword 			= false;						// This will togle if the bot says your game pw
var saytime 				= false;						// This will togle if the bot says how much time till creation
var timemessage 			= "";				// This will come after your pw and befor the time eg. "in about" xx seconds say time MUST be true for this to be used

//////////////////////////////////////
//       Minimum Game Length:       //
//////////////////////////////////////

var gameMinLength		= 180000;	// time in milliseconds, minimum game length, 180 seconds default (1 game/3 minutes)

////////////////////////////////////////
//        Connection Settings:        //
////////////////////////////////////////

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		= 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	= 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)
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 waitBeforeNextLineChatMin	= 500;		// Minimum ammount of time to add after each text line	
var waitBeforeNextLineChatMax	= 1500;		// Maximum ammount of time to add after each text line

// 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 alreadyLoggedIn = false; // will only send the login command once leave as unless you want to login everytime you join a channel
var lastGameMade = GetTickCount();
var lastGameStatus = 0;
var nextGameMake = 0;
var inGameAt = 0;
var chatActionsDone = false;
var lastGameFailed = false;
var tempDelay = Random(waitBeforeNextLineChatMin, waitBeforeNextLineChatMax);
var gameInfo = "";
var bugignor = 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(!chatActionsDone)
		{
			chatActionsDone = true;
			Delay(Random(waitInChatBeforeActionsMin, waitInChatBeforeActionsMax));

			if(joinRandomChannel || joinChannelInChat != "")
			{
				Say("/join " + (joinRandomChannel ? getRandomString(Random(3,10)) : joinChannelInChat));
				Delay(1000);
					if(!alreadyLoggedIn){
   					alreadyLoggedIn = true;
					if (chatMessageOnJoin.length > 0){
						Say(chatMessageOnJoin);
					}
					}
				Delay(500);
				chatActionsDone = true;
			}
		}
	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:	
				password = (me.gamepassword);
				game = (getGameName(me.gamename));
				counter = (getGameCounter(me.gamename, false));
				time = (parseInt((nextGameMake - GetTickCount() - tempDelay)/1000+3.0));
				if (saygamename){{
					gameInfo += nextgamemessage + " " + game + counter;
				}
					if (saypassword){
					gameInfo += "//" + password
					}
						if (saytime){
						gameInfo += " " + timemessage + " " + time + " seconds"
						}
				}
				if(joinChatAfterGame){
					if(chatMessageAfterGame1.length > 0){
						Say(chatMessageAfterGame1);
						if(chatMessageAfterGame1.length > 0){
							Delay(tempDelay);
						}
					}
					if(chatMessageAfterGame2.length > 0){
						Say(chatMessageAfterGame2);
							if(chatMessageAfterGame2.length > 0){
								Delay(tempDelay);
							}
					}
					if(chatMessageAfterGame3.length > 0){
						Say(chatMessageAfterGame3);
						if(chatMessageAfterGame3.length > 0){
							Delay(tempDelay);
						}
					}
					if(chatMessageAfterGame4.length > 0){
						Say(chatMessageAfterGame4);
						if(chatMessageAfterGame4.length > 0){
							Delay(tempDelay);
						}
					}
					if(chatMessageAfterGame5.length > 0){
						Say(chatMessageAfterGame5);
						if(chatMessageAfterGame5.length > 0){
							Delay(tempDelay);
						}
					}
					if(saygamename) {
						if(bugignor){
							bugignor = false;
							gameInfo = "";
						}
					else{
						Say(gameInfo)
						Delay(tempDelay)
						gameInfo = "";
					}
					}
				}
				controlData.click(controlData.controls.lobby.button.create);
				//controlData.click(controlData.controls.lobby.create.button.useCharacterDifference);//checks the use character diff box...does this every time so no go
				controlData.setText(controlData.controls.lobby.create.editBox.characterDifference,(characterdiff)); //level restriction
				controlData.setText(controlData.controls.lobby.create.editBox.maxNumberOfPlayers, (maxNumberOfPlayersss)); //max players
				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, true);
		break;

	case 2: // Waiting In Line
		if(GetTickCount()-lastGameMade > waitInLineTimeout)
			controlData.click(controlData.controls.lobby.inLine.button.cancel);
		break;

	case 4: // Create Game
		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);

		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;
}
function getGameName(lastGameString)
{
   if(!lastGameString)
      return "";
   else
      return (lastGameString.split("-")[0] + "-");
}

function getGameCounter(lastGameString, simple)
{
   var myCount;
   if(!lastGameString)
      return "-1";
   else
   {
      switch(lastGameString.split("-")[1])
      {
         case "08":
            myCount = 9;
            break;
         case "09":
            myCount = 10;
            break;
		case "9999":
			myCount = 0000;
			break;
         default:
            myCount = parseInt(lastGameString.split("-")[1]) + 1;
            break;
      }
      if(!simple)
      {
         if(myCount <= 9)
            return ('0' + myCount);
      }
      return myCount;
   }
}
06/27/2011 14:58 Klangsphaere#123
Ich weiss nicht obs richtig ist, aber in dem fall müßten die variablen und scripte beim Leader nachgetragen werden. Weiss nicht ob sich jemand schonmal die Mühe gemacht hat. Könnte aber auch sein, dass er das automatisch erkennt, teste es halt und gib bescheid!
06/28/2011 10:47 TheCrazy11#124
Beim Leader wird das automatisch gemacht, da müssen keine weiteren Einstellungen mehr vorgenommen werden, wenn es im Manager eingetragen ist.
06/28/2011 12:14 modw89#125
mittlerweile ist es ja so das max 4 keys/ip aktiv in battle net sein können.
kann mir wer verrraten warum dann selbst wenn ich mit nem 2ten key rein gehe..der gekickt wird?? (connection timeout)?
06/30/2011 17:04 derfahnder#126
Hier mal für alle, die sich bisher mit den online Keys mit komischen Behelfslösungen abfinden mussten das neue Keychange Tool von Serby, das jetzt auch mit den 26char Keys zurecht kommt:

[Only registered and activated users can see links. Click Here To Register...]
06/30/2011 18:41 mirkoregge#127
Sollte in den Quicklinks eingepflegt werden.
Habs gleich mal in Anhang gepackt, spart ihr euch die 5 min Wartezeit.
07/06/2011 10:16 LordHHacken#128
Quote:
Originally Posted by derfahnder View Post
Hier mal für alle, die sich bisher mit den online Keys mit komischen Behelfslösungen abfinden mussten das neue Keychange Tool von Serby, das jetzt auch mit den 26char Keys zurecht kommt:

[Only registered and activated users can see links. Click Here To Register...]
Kann jemand bestätigen, dass das gepostete Tool auch korrekt ist?
07/06/2011 11:46 Muddy Waters#129
Quote:
Originally Posted by LordHHacken View Post
Kann jemand bestätigen, dass das gepostete Tool auch korrekt ist?
Denke schon, dazu gab es bereits ein Thema, welches [Only registered and activated users can see links. Click Here To Register...] zu finden ist. ;)

LG
Muddy
07/26/2011 08:48 HaiPvP#130
Hey, ich hab folgendes problem...

wenn ich mit 2 Chars in 1 Game joine kommt nach 1 min ein Disconnect... (Timeout)
jemand ne lösung?^^
07/26/2011 09:01 Klangsphaere#131
Versuch mal mit beiden verzögert zu joinen und nicht zeitgleich!
10/15/2011 10:43 badman#132
Moin!
Hab alles nach der Anleitung gemacht (mit dem 1.13 KeyCreator 16) aber wenn ich den Key einbinde kriege ich immer einen HALT fehler.

Habs mal mit einem anderen D2NT bot probiert, da gibt es ne access violation :/

Wenn ich nur einen anderen key haben will, nicht wechseln, muss ich doch bei #Games / Key die 0 drin lassen, oder?
10/25/2011 02:10 Winterkrieg#133
Ich komm auch damit irgendwie nicht klar. Also ich habe :

Keyset A
Keyset B
Keyset C

Bot Profil A
Bot Profil B

mit Keyset A hab ich mein Diablo installiert und lass Bot Profil A damit laufen.

Wenn ich jetzt Bot B laufen lassen will über den gleichen Manager, reicht es einfach Keyset B als mpq zu ertsellen und dann im Profil B dies einzutragen ?
10/25/2011 05:07 -Traceur-#134
@Winterkrieg

Ganz genau :)
10/25/2011 05:07 -Traceur-#135
sorry für doppelpost