|
You last visited: Today at 01:40
Advertisement
[Tutorial] Minimierte Kukbot spiele erstellen
Discussion on [Tutorial] Minimierte Kukbot spiele erstellen within the Diablo 2 forum part of the Other Online Games category.
10/22/2011, 23:04
|
#46
|
elite*gold: 0
Join Date: Oct 2009
Posts: 798
Received Thanks: 165
|
haste mal den etal leecher probiert? ich hab die files umgebaut da... moment
Code:
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// added a line that sends whisper game name for leechers when in game revised by stairbuilder on 1-2-11 //
// added fix for white screen of death credit to korean modders revised by stairbuilder on 2-17-11 //
// added fix for creation button sticking revised by stairbuilder on 2-17-11 //
//////////// for use with NTLeechStarter2.ntj /////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////
// characters in your game setting: //
///////////////////////////////////////////////////
var characterdiff = "90"; //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 Ep-Clan"; // 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 = "That was Fun!"; // 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 game should be"; // 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 = "in about"; // 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 = 100000; // time in milliseconds, minimum game length, 180 seconds default (1 game/3 minutes)
////////////////////////////////////////
// Connection Settings: //
////////////////////////////////////////
var unableToConnectRetry = 15; // time in minutes to retry connecting on connection fail (real value is +/- 1 min)
var realmDownRetry = 900; // 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 = 10000; // time in milliseconds to wait between making games
var createGameThresholdRandom = 1; // time in milliseconds to randomly add +/- to the game create time
var createGameTimeout = 20000; // 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");
Include("libs/common/NTColorConverter.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
_ingame = true;
sendEventToOOG(D2NT_MGR_INGAME, "In Game", 0);
Say("/f m in_new_game " + me.gamename); // this is for leechers to join only after leader is in game
lastGameStatus = 2; // in game successful
}
Delay(1000);
}
else
{
if(_ingame)
{
My_ExitGame_Check(); // out of korean modded d2nt fixes white screen of death
_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;
}
LogPrintSimple(me.account + "MyAccountTest.txt", me.account + " / " + me.charname) // this is to check for 2nd account login
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 = "";
}
}
}
_control = controlData.get(controlData.controls.lobby.button.create); // fixes creation stuck button bug out of unmodded d2nt
if(_control && _control.pressed)
{
controlData.click(controlData.controls.lobby.button.join);
Delay(500);
}
controlData.click(controlData.controls.lobby.button.create);
_control = controlData.get(controlData.controls.lobby.create.button.useCharacterDifference);
if(_control && !_control.pressed)
{
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, COLOR_1 + "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);
//Delay(inGameAt);
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 "99":
myCount = 00;
break;
default:
myCount = parseInt(lastGameString.split("-")[1]) + 1;
break;
}
if(!simple)
{
if(myCount <= 9)
return ('0' + myCount);
}
return myCount;
}
}
function My_ExitGame_Check()
{
for (var i = 0; i < 40; i++)
{
if (controlData.getLocation().id != undefined)
break;
if (i > 38)
{
LogPrintSimple(me.account + " StarterTest.txt", "White Screen of Death: Restarting")
sendEventToOOG(D2NT_MGR_PRINT_LOG, COLOR_1 + "White Screen of Death: Restarting", 0);
sendEventToOOG(D2NT_MGR_RESTART, "", 5);
My_Delay(); // make sure and add this also
}
Delay(500);
}
}
function My_Delay(retry)
{
if (arguments.length < 1)
retry = 20;
while (retry-- > 0)
Delay(1000);
}
function LogPrintSimple(filepath, mesg){
var _filepath = filepath;
var _mesg = mesg;
var date = new Date().toLocaleFormat("<%a, %b %d, %H:%M>");
var logfile = FileOpen(_filepath, 2); // opens file
if(!logfile)
var logfile = FileOpen(_filepath, 1); // if file not there then creates it
logfile.WriteLine(date + " " + _mesg );
logfile.Close();
}
mit dem script joint er channel und haut wenn er denn ingame ist eine FL nachricht mit dem Gamenamen für leech bots raus.
das entsprechende leacher script für einen 2ten Kukbot im selben spiel:
Code:
// credit for this goes to D2od who knows way more than I do
// revised on 1-2-11 by stairbuilder Credit for mod goes to Justin.Killen and I was pointed to it by fellgar
// will now join game only when leader sends message from game. must use NTLeaderStarter2 with this or will not join game
// commented out the /f l line, but can be uncommented if you wich
// added white screen of death fix and also some print txt for testing 2-17-11 stairbuilder
// =============================================================================
// 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 = "The Void";
////////////////////////////////////////////////////////////////////////////////
// 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 = 20;
var realmDownRetry = 480;
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");
Include("libs/common/NTColorConverter.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)
{
if(!inGameAt)
inGameAt = GetTickCount();
if(!_ingame)
{
RunGC(); // run garbage collector between each game
_ingame = true;
Delay(1000);
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)
{
My_ExitGame_Check(); // out of korean modded d2nt fixes white screen of death
_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);
//LogPrintSimple(me.account + "MyAccountTest.txt", me.account + " / " + me.charname) // this is to check for 2nd account login
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) // maybe play with this so it skips it for 30 seconds
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_GameIsFullTick < 0 || (_GameIsFullTick + GameIsFullDelay) < _tick))
{
Delay(500);
DebugInOOG('Locating the leader : '+leaderAccountName);
//Say('/f l');
}
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) // need to modify this and then add another to handle the "@USWest
{ // should be just a matter of leaderName + '@' and then register the 2nd line as game name
var regGameNameWhispered=/^.*in_new_game\s+(.*)$/gi; // replaced below with this to join on mesage upon entering game
//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, "$1"); // replaced below with this to join on mesage upon entering game
//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)
{
LogPrintSimple(me.account + "MyAccountTest.txt", me.account + " / " + me.charname) // this is to check for 2nd account login
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;
}
function My_ExitGame_Check()
{
for (var i = 0; i < 40; i++)
{
if (controlData.getLocation().id != undefined)
break;
if (i > 38)
{
LogPrintSimple(me.account + " StarterTest.txt", "White Screen of Death: Restarting")
sendEventToOOG(D2NT_MGR_PRINT_LOG, "yc1White Screen of Death: Restarting", 0);
sendEventToOOG(D2NT_MGR_RESTART, "", 5);
My_Delay(); // make sure and add this also
}
Delay(500);
}
}
function My_Delay(retry)
{
if (arguments.length < 1)
retry = 20;
while (retry-- > 0)
Delay(1000);
}
function LogPrintSimple(filepath, mesg){
var _filepath = filepath;
var _mesg = mesg;
var date = new Date().toLocaleFormat("<%a, %b %d, %H:%M>");
var logfile = FileOpen(_filepath, 2); // opens file
if(!logfile)
var logfile = FileOpen(_filepath, 1); // if file not there then creates it
logfile.WriteLine(date + " " + _mesg );
logfile.Close();
}
und das entsprechnde FL Leech Join Script vom original etal:
Code:
// credit for this goes to D2od who knows way more than I do
// revised on 1-2-11 by stairbuilder Credit for mod goes to Justin.Killen and I was pointed to it by fellgar
// will now join game only when leader sends message from game. must use NTLeaderStarter2 with this or will not join game
// commented out the /f l line, but can be uncommented if you wich
// added white screen of death fix and also some print txt for testing 2-17-11 stairbuilder
// =============================================================================
// 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 = "The Void";
////////////////////////////////////////////////////////////////////////////////
// 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 = 20;
var realmDownRetry = 480;
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");
Include("libs/common/NTColorConverter.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)
{
My_ExitGame_Check(); // out of korean modded d2nt fixes white screen of death
_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);
//LogPrintSimple(me.account + "MyAccountTest.txt", me.account + " / " + me.charname) // this is to check for 2nd account login
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) // maybe play with this so it skips it for 30 seconds
&& (_leaderInChatTick < 0 || (_leaderInChatTick + LeaderInChatDelay) < _tick)
&& (_GameIsFullTick < 0 || (_GameIsFullTick + GameIsFullDelay) < _tick))
{
Delay(500);
DebugInOOG('Locating the leader : '+leaderAccountName);
//Say('/f l');
}
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) // need to modify this and then add another to handle the "@USWest
{ // should be just a matter of leaderName + '@' and then register the 2nd line as game name
var regGameNameWhispered=/^.*in_new_game\s+(.*)$/gi; // replaced below with this to join on mesage upon entering game
//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, "$1"); // replaced below with this to join on mesage upon entering game
//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)
{
LogPrintSimple(me.account + "MyAccountTest.txt", me.account + " / " + me.charname) // this is to check for 2nd account login
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;
}
function My_ExitGame_Check()
{
for (var i = 0; i < 40; i++)
{
if (controlData.getLocation().id != undefined)
break;
if (i > 38)
{
LogPrintSimple(me.account + " StarterTest.txt", "White Screen of Death: Restarting")
sendEventToOOG(D2NT_MGR_PRINT_LOG, "yc1White Screen of Death: Restarting", 0);
sendEventToOOG(D2NT_MGR_RESTART, "", 5);
My_Delay(); // make sure and add this also
}
Delay(500);
}
}
function My_Delay(retry)
{
if (arguments.length < 1)
retry = 20;
while (retry-- > 0)
Delay(1000);
}
function LogPrintSimple(filepath, mesg){
var _filepath = filepath;
var _mesg = mesg;
var date = new Date().toLocaleFormat("<%a, %b %d, %H:%M>");
var logfile = FileOpen(_filepath, 2); // opens file
if(!logfile)
var logfile = FileOpen(_filepath, 1); // if file not there then creates it
logfile.WriteLine(date + " " + _mesg );
logfile.Close();
}
|
|
|
10/23/2011, 15:55
|
#47
|
elite*gold: 0
Join Date: Jan 2009
Posts: 3,170
Received Thanks: 1,191
|
Damit klappts jetzt auch mit den Game-Ansagen im Channel. Thx!
|
|
|
02/20/2012, 18:08
|
#48
|
elite*gold: 2
Join Date: May 2009
Posts: 1,024
Received Thanks: 114
|
warum wurde das hier gelöscht? 
funktionierte das nichtmehr??
|
|
|
02/20/2012, 18:19
|
#49
|
elite*gold: 0
Join Date: Jan 2009
Posts: 3,170
Received Thanks: 1,191
|
Talltree hat doch eine Lösung gepostet; 2 Posts über deinem^^
|
|
|
02/20/2012, 18:23
|
#50
|
elite*gold: 2
Join Date: May 2009
Posts: 1,024
Received Thanks: 114
|
Quote:
Originally Posted by mirkoregge
Talltree hat doch eine Lösung gepostet; 2 Posts über deinem^^
|
das ist aber nur für den etal oder? ich benutze muddys
|
|
|
02/20/2012, 18:42
|
#51
|
elite*gold: 0
Join Date: Jan 2009
Posts: 3,170
Received Thanks: 1,191
|
Beim EntryPoint müsst es egal sein; ich selber nutz es atm nicht. Kann mich aber entsinnen, dass ich es bei meinem Muddys auch drin hab. Probiers doch einfach aus
|
|
|
02/22/2012, 15:57
|
#52
|
elite*gold: 2
Join Date: May 2009
Posts: 1,024
Received Thanks: 114
|
Quote:
Originally Posted by mirkoregge
Beim EntryPoint müsst es egal sein; ich selber nutz es atm nicht. Kann mich aber entsinnen, dass ich es bei meinem Muddys auch drin hab. Probiers doch einfach aus 
|
danke 
hat geklappt, alles supi
|
|
|
 |
|
Similar Threads
|
Kukbot Key Dateien manuell erstellen?
05/24/2010 - Diablo 2 - 1 Replies
Hi,
hab ein Problem mit dem Keymaker vom Kukbot, bekomme beim Erstellen immer einen Autoit Error.
Hab schon alles mögliche probiert, Kleinschreibung, Großschreibung, mit / ohne Bindestriche. Und ja, ich hab alles gelesen was es zum Key erstellen zu lesen gibt und auch google liefert mir keine Lösung.
Gibts irgendwie eine Möglichkeit die Key Dateien selbst zu erstellen?
|
[Tutorial] Wie spiele ich auf einem Private-Server?
01/10/2010 - Aion Guides & Strategies - 50 Replies
Also, ich hab mir gedacht mal ein Tutorial dazu zumachen. Es ist zwar ganz einfach, aber einige verstehen vielleicht kein Englisch oder stehen etwas auf dem Schlauch. Deshalb mache ich hier ein ganz simples Tutorial und hoffe, dass danach es wirklich alle schaffen ihren Char dort zu erstellen.
Als allererstes solltet ihr euch den chinesischen Client herunterladen. Ich habe dazu einen relativ fixen und guterreichbaren Link herausgesucht.
http://games.on.net/filelist.php?app=1565&men u=1
...
|
Server erstellen wo nur ich spiele?
12/08/2009 - Metin2 Private Server - 1 Replies
Hey,wer könnte mir einen server erstellen wo nur ich auf meinem pc sozusagen spiele.
habe die serverfiles und ich könnte es über teamviewer machen
habe icq,bitte helft mir als belohnung würde ich auch wenn der server geht einen acc der auf mosha funktioniert geben x3
liebe grüße
jenny ( muh009)
|
Maus Klicks an minimierte Programme senden
08/14/2009 - AutoIt - 18 Replies
Hallo,
ich hoffe ich werde nicht gleich erschlagen für die topic :)
ich habe schon einige tage danach gesucht wie ich per autoit
einen Maus klick an ein im hintergrund bzw minimiertes Fenster / Programm
( Ragnarok Online ) senden kann.
Spez.: Es soll ein Npc angeklickt werden.
Doch leider ohne erfolg,
es funktioniert kein ControlClick, _MouseClickPlus oder MouseSend.
|
[Tutorial] Portale erstellen
03/15/2009 - WoW Private Server - 5 Replies
Hallo, ich werde euch jetzt erklären, wie ihr Portale erstellen könnt!!
1. Öffnet eure Datenbank mit navicat, und dann öffnet ihr teleport_coords (sry falls es anders heißt)
2. Nun macht ihr eine neue Spalte, indem ihr auf das "+" unten links klickt.
Macht irgendeine ID, hauptsache sie ist NICHT vergeben. Schreibt sie auf!
Als Name macht ihr
Teleport to
Beispiel:
Teleport to Bossarea
|
All times are GMT +1. The time now is 01:40.
|
|