|
You last visited: Today at 05:47
Advertisement
[Release] Muddy's D2NT
Discussion on [Release] Muddy's D2NT within the Diablo 2 Programming forum part of the Diablo 2 category.
05/24/2011, 21:55
|
#2056
|
elite*gold: 0
Join Date: Mar 2010
Posts: 539
Received Thanks: 418
|
Bei mir bringt der Bot schon längers folgende Fehlermeldung:
Quote:
|
<D2NT Error> [D2NT-Pfad]\scripts\libs\common\NTCubing.ntl (1673): TypeError: _cubeItems[0].name is undefined
|
Diese ist bis jetzt gekommen wenn im Cube noch ein PA, PS oder Baal-SC gelegen ist.
Kann nicht nachvollziehen, wann der Error kommt, kommt nur ca. alle 100 Games und auch immer bei unterschiedlichen Bots, haben alle die gleiche Cube- & Craft-Config:
Code:
//------------------------------------------------------------------------------
// Cubing Configuration
//------------------------------------------------------------------------------
// Set to true to log cubing of gems in the manager's common log.
MWConfig_ShowCubedGemsInCommonLog = true;
// Set to true to always remove all items from cube after transmuting. If set to false, the item will remain in cube and is not removed until it interferes with another recipe.
MWConfig_ClearCubeAfterCubing = false;
// Set to true to enable an advanced cubing algorithm that allows collecting ingredients for multiple recipes at the same time.
MWConfig_UseAdvancedCubingAlgorithm = true;
// Set to true if you do not want kept low runes or gems to be used for cubing. Set to false to use them anyway.
MWConfig_RestrictKeptItemsFromCubing = false;
// *********************** Misc ***********************
//NTConfig_CubingItem.push([NTCU_ESSENCE, 653]); // Essences --> Token
// ****************** Transmute Gems ******************
NTConfig_CubingItem.push([NTCU_GEM, 560]); // Flawless Amethyst
NTConfig_CubingItem.push([NTCU_GEM, 565]); // Flawless Topaz
//NTConfig_CubingItem.push([NTCU_GEM, 570]); // Flawless Saphire
//NTConfig_CubingItem.push([NTCU_GEM, 575]); // Flawless Emerald
NTConfig_CubingItem.push([NTCU_GEM, 580]); // Flawless Ruby
//NTConfig_CubingItem.push([NTCU_GEM, 585]); // Flawless Diamond
NTConfig_CubingItem.push([NTCU_GEM, 600]); // Flawless Skull
//NTConfig_CubingItem.push([NTCU_MAGIC, 420]); // Magic Tiara
//NTConfig_CubingItem.push([NTCU_MAGIC, 421]); // Magic Diadem
// ************* Transmute magic and rares *************
NTConfig_CubingItem.push([NTCU_MAGIC_CHARM, 603]); // Magic Small Charm
NTConfig_CubingItem.push([NTCU_MAGIC_CHARM, 605]); // Magic Grand Charm
NTConfig_CubingItem.push([MWCU_RARE, 421]); // Rare Diadem
// ********************** Crafting *********************
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_GLOVES, 336]); // Craft Chain Gloves
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_GLOVES, 382]); // Craft Heavy Bracers
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_GLOVES, 452]); // Craft Vambraces
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_RING, 522]); // Craft Ring
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_HELM, 354]); // Craft Casque
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_HELM, 424]); // Craft Armet
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BOOTS, 388]); // Craft Battle Boots
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BOOTS, 458]); // Craft Mirrored Boots
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_GLOVES, 381]); // Craft Sharkskin Gloves
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_GLOVES, 451]); // Craft Vampirebone Gloves
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BELT, 392]); // Craft Mesh Belt
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BELT, 462]); // Craft Mithril Coil
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_AMULET, 520]); // Craft Amulet
NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_RING, 522]); // Craft Ring
//NTConfig_CubingItem.push([NTCU_CRAFT_CASTER_BOOTS, 455]); // Craft Wyrmhide Boots
NTConfig_CubingItem.push([NTCU_CRAFT_CASTER_AMULET, 520]); // Craft Amulet
NTConfig_CubingItem.push([NTCU_CRAFT_CASTER_AMULET, 520]); // Craft Amulet
//NTConfig_CubingItem.push([NTCU_CRAFT_SAFETY_SHIELD, 447]); // Craft Monarch
//NTConfig_CubingItem.push([NTCU_CRAFT_SAFETY_AMULET, 520]); // Craft Amulet
// ****************** Transmute runes ******************
//NTConfig_CubingItem.push([NTCU_RUNE_THUL, 562]); // Transmute 3xTHUL --> 1xAMN
//NTConfig_CubingItem.push([NTCU_RUNE_AMN, 557]); // Transmute 3xAMN --> 1xSOL
//NTConfig_CubingItem.push([NTCU_RUNE_SOL, 567]); // Transmute 3xSOL --> 1xSHAEL
//NTConfig_CubingItem.push([NTCU_RUNE_SHAEL, 577]); // Transmute 3xSHAEL --> 1xDOL
//NTConfig_CubingItem.push([NTCU_RUNE_DOL, 572]); // Transmute 3xDOL --> 1xHEL
//NTConfig_CubingItem.push([NTCU_RUNE_HEL, 582]); // Transmute 3xHEL --> 1xIO
//NTConfig_CubingItem.push([NTCU_RUNE_IO, 563]); // Transmute 3xIO --> 1xLUM
//NTConfig_CubingItem.push([NTCU_RUNE_LUM, 558]); // Transmute 3xLUM --> 1xKO
//NTConfig_CubingItem.push([NTCU_RUNE_KO, 568]); // Transmute 3xKO --> 1xFAL
//NTConfig_CubingItem.push([NTCU_RUNE_FAL, 578]); // Transmute 3xFAL --> 1xLEM
NTConfig_CubingItem.push([NTCU_RUNE_LEM, 573]); // Transmute 3xLEM --> 1xPUL
NTConfig_CubingItem.push([NTCU_RUNE_PUL, 583]); // Transmute 2xPUL --> 1xUM
NTConfig_CubingItem.push([NTCU_RUNE_UM, 564]); // Transmute 2xUM --> 1xMAL
NTConfig_CubingItem.push([NTCU_RUNE_MAL, 559]); // Transmute 2xMAL --> 1xIST
//NTConfig_CubingItem.push([NTCU_RUNE_IST, 569]); // Transmute 2xIST --> 1xGUL
NTConfig_CubingItem.push([NTCU_RUNE_GUL, 579]); // Transmute 2xGUL --> 1xVEX
//NTConfig_CubingItem.push([NTCU_RUNE_VEX, 574]); // Transmute 2xVEX --> 1xOHM
//NTConfig_CubingItem.push([NTCU_RUNE_OHM, 584]); // Transmute 2xOHM --> 1xLO
//NTConfig_CubingItem.push([NTCU_RUNE_LO, 565]); // Transmute 2xLO --> 1xSUR
//NTConfig_CubingItem.push([NTCU_RUNE_SUR, 560]); // Transmute 2xSUR --> 1xBER
//NTConfig_CubingItem.push([NTCU_RUNE_BER, 570]); // Transmute 2xBER --> 1xJAH
//NTConfig_CubingItem.push([NTCU_RUNE_JAH, 580]); // Transmute 2xJAH --> 1xBER
//NTConfig_CubingItem.push([NTCU_RUNE_CHAM, 575]); // Transmute 2xCHAM --> 1xZOD
// ******************* Socket items ********************
// Primary item must be included in one of your .nip Files
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 429]); // Socket Dusk Shroud
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 430]); // Socket Wyrmhide
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 431]); // Socket Scarab Husk
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 432]); // Socket Wire Fleece
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 433]); // Socket Diamond Mail
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 434]); // Socket Loricated Mail
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 435]); // Socket Bone Weave
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 436]); // Socket Great Hauberk
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 437]); // Socket Balrog Skin
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 438]); // Socket Hellforge Plate
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 439]); // Socket Kraken Shell
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 440]); // Socket Lacquered Plate
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 441]); // Socket Shadow Plate
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 442]); // Socket Sacred Armor
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 443]); // Socket Archon Plate
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 199]); // Socket War Spike
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 200]); // Socket Berserker Axe
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 255]); // Socket Thresher
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 256]); // Socket Cryptic Axe
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 257]); // Socket Great Poleaxe
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 258]); // Socket Giant Thresher
//NTConfig_CubingItem.push([NTCU_SOCKET_SHIELD, 447]); // Socket Monarch
//NTConfig_CubingItem.push([NTCU_SOCKET_SHIELD, 498]); // Socket Sacred Targe
//NTConfig_CubingItem.push([NTCU_SOCKET_SHIELD, 502]); // Socket Vortex Shield
// ******************* Upgrade items *******************
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_WEAPON, 295]);// Titan's Revenge : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_N_UNIQUE_ARMOR, 337]); // Magefist : Normal -> Exceptional
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 360]); // Skin of the Vipermagi : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 383]); // Magefist or Lava Gout : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 389]); // Gore Rider : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 477]); // Arreat's Face : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 481]); // Herald Of Zakarum : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_N_UNIQUE_ARMOR, 342]); // Goblin Toe N -> E
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 388]); // Goblin Toe E -> E
Weiß aber nicht ob vor oder nach dem cuben, der Cube war auf jeden Fall immer offen.
Der Fehler nervt insofern, dass der eine Bot dadurch einfach hängt und die Games auf maxtime gehen.
Leider habe ich keine API-Referenz (D2NT/D2BS) gefunden, wo GetItems() dokumentiert ist.
Habe auch in der Ur-D2NT nachgesehen, da wird die name-Eigenschaft auch so verwendet wie bei Muddy's.
EDIT: Bei KingHigh scheint es das gleiche Problem zu sein, die Property name passt wohl nicht ganz?
|
|
|
05/24/2011, 22:03
|
#2057
|
elite*gold: 0
Join Date: Oct 2010
Posts: 211
Received Thanks: 44
|
Bei KingHigh tippe ich aber auf einen Fehler in der PickIt, versuch dich doch mal an dem NipCheck aus dem 2 Post im Thread hier, der gibt genauere Infos obs an der PickIt liegt
Bei TheCrazy11 kenn ich mich nicht gut genug aus, sry
|
|
|
05/24/2011, 22:36
|
#2058
|
elite*gold: 0
Join Date: Mar 2009
Posts: 382
Received Thanks: 45
|
Quote:
Originally Posted by KingHigh
Ich bekomme bei meinen Probleläufen mit dem Bot relativ häufig folgende Fehlermldung:
<D2NT Error> C:\Programme\D2bot\Muddy's D2NT V1.22 THIS\Muddy's D2NT\scripts\libs\common\NTSnagit.ntj (168):TypeError:_item.name is undefined
Ich habe an der NTSnagit.ntj nicht geändert, es ist also die gleiche wie die in der release-Version. Die Zeilen 167 und 168 sehen so aus:
Code:
else if(MWConfig_ShowPotionPickups)
Print("Picked up " + _item.name.split("\n")[0]);
Da es hier anscheinend um das picken von Potions geht habe ich geschaut was ich an pickits aktiviert habe und was davon interessant sein könnte. So sieht es in der charconfig aus:
Code:
NTConfig_NIPFilePath.push("private/normal.nip");
NTConfig_NIPFilePath.push("private/magic_rare.nip");
//NTConfig_NIPFilePath.push("private/set.nip");
NTConfig_NIPFilePath.push("private/unique.nip");
//NTConfig_NIPFilePath.push("private/craft.nip");
//NTConfig_NIPFilePath.push("private/temp.nip");
Potions sind in der normal.nip festgelegt, dort sieht es so aus:
Code:
// ##### Potions #######################
[Name] == GreaterHealingPotion
[Name] == SuperHealingPotion
[Name] == GreaterManaPotion
[Name] == SuperManaPotion
[Name] == RejuvenationPotion
[Name] == FullRejuvenationPotion
Abgesehen von flawless und perfect diamonds und skulls sowie Gold ab 100 habe ich alles andere in dieser .nip ausgestellt.
Hat jemand eine Idee was das sein könnte/ wo ich nach einem Fehler suchen kann?
Das Problem tritt leider viel zu häufig auf als das man es ignorieren könnte....
|
schau mal  nach
|
|
|
05/24/2011, 22:44
|
#2059
|
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
|
hmm gibts für muddy's nen leech und leechfight script? direkt dabei scheint nix zu sein
|
|
|
05/24/2011, 22:56
|
#2060
|
elite*gold: 0
Join Date: Mar 2009
Posts: 382
Received Thanks: 45
|
Quote:
Originally Posted by Rondo80
hmm gibts für muddy's nen leech und leechfight script? direkt dabei scheint nix zu sein
|
von haus aus net ... gibt aber hier im forum diverse, kann dir aber zumindest die posten welche ich verwende
ntbotleech.ntj
//################################################## #################
//###########################Einstellungen########## #################
//################################################## #################
var leaderAccountName = "";
var leaderName = "";
var gamepassword = "";
var JoinGameAgain = false; // 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 = "";
var firstJoinMessage = "/o igw"; // 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
//################################################## #################
//##############################Delays############## #################
//################################################## #################
var gameMinLength = 0;
// realm delays (minutes)
var unableToConnectRetry = 2;
var realmDownRetry = 2;
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/MWBotGame.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(500);
}
if(chat = controlData.get(controlData.controls.lobby.chat.te xtBox.channelText))
{
var found_leader = false;
lines = chat.GetText();
for (var line_id = lines.length - 1; line_id > -1; line_id--)
{
if (found_leader) // useless... :/
break;
if (lines[line_id].substring(0,1) == " ")
continue;
// retrieving the whole message
var msg = lines[line_id].replace(/^\s+|\s+$/, "");
var msglines = 1;
while (lines[line_id+msglines] != undefined && lines[line_id+msglines].substring(0,2) == " ")
{
msg += " " + lines[line_id+msglines].replace(/^\s+|\s+$/, "");
msglines++;
}
if (msg.lastIndexOf(leaderName) >= 0)
DebugInOOG("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/500)+' 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/500)+' 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.butto n.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.butto n.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.butto n.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.butto n.enterChat);
break;
}
break;
case 2: // Waiting In Line
if(GetTickCount()-lastGameMade > waitInLineTimeout)
controlData.click(controlData.controls.lobby.inLin e.button.cancel);
break;
case 4: // Create Game
if(!controlData.get(controlData.controls.lobby.cre ate.editBox.gameName))
{
controlData.click(controlData.controls.lobby.butto n.join);
Delay (500);
controlData.click(controlData.controls.lobby.butto n.create);
Delay (500);
break;
}
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
locationTimeout(5000, location);
lastGameMade = GetTickCount();
lastGameStatus = 1; // pending creation
break;
case 5: // Join Game
if (game)
{
controlData.setText( controlData.controls.lobby.join.editBox.gameName, game);
Delay (100);
controlData.setText( controlData.controls.lobby.join.editBox.password, gamepassword);
Delay (100);
controlData.click(controlData.controls.lobby.join. button.joinGame);
RunGC(); // run garbage collector between each game
locationTimeout(5000, location);
lastGameStatus = 1; // pending join
}
else
{
DebugInOOG('No game to join : cancelling');
me.Cancel(1);
Delay(1000);
}
break;
case 6: // Ladder
break;
case 7: // Channel List
break;
case 8: // Main Menu
if(controlData.getCurrentRealmIndex() == me.gatewayid)
{
outputGameLength();
controlData.click(controlData.gameTypes[me.playtype]);
}
else
controlData.click(controlData.controls.mainMenu.bu tton.gateway);
break;
case 9: // Login
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
Delay(loginDelay);
controlData.setText(controlData.controls.login.edi tBox.accountName, me.account);
sendEventToOOG(D2NT_MGR_LOGIN, location.name, 0);
locationTimeout(5000, location);
break;
case 10: // Login Error (this is a fatal error, so stop)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 10);
Delay(3500);
break;
case 11: // Unable To Connect
timeoutDelay(unableToConnectRetry*60*1000, location)
controlData.click(controlData.controls.login.unabl eToConnect.button.ok);
break;
case 12: // Character Select
var _time, _control;
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
for(_time = 0 ; _time < characterScreenTimeout ; _time += 500)
{
_control = controlData.get(controlData.controls.characterSele ct.textBox.characterInfo[me.charloc]);
if(_control && _control.GetText() != undefined)
break;
Delay(500);
}
if(_time < characterScreenTimeout)
{
Delay(characterSelectDelay);
controlData.click(controlData.controls.characterSe lect.textBox.characters[me.charloc], 0, 0, 1);
controlData.click(controlData.controls.characterSe lect.textBox.characterInfo[me.charloc], 0, 0, 1);
// reset last game made, so it doesnt make a game immediately
inGameAt = 0;
setNextGameMake();
}
else
{
controlData.click(controlData.controls.characterSe lect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
}
break;
case 13: // Realm Down - Character Select screen
controlData.click(controlData.controls.characterSe lect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
break;
case 14: // Character Select - Disconnected
timeoutDelay(disconnectedRetry*60*1000, location);
controlData.click(controlData.controls.characterSe lect.disconnected.button.ok);
break;
case 15: // New Character
break;
case 16: // Character Select - Please Wait popup
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.characterSe lect.pleaseWait.button.cancel);
break;
case 17: // Lobby - Lost Connection - just click okay, since we're toast anyway
controlData.click(controlData.controls.lobby.lostC onnection.button.ok);
break;
case 18: // D2 Splash
controlData.click(controlData.controls.d2Splash.te xtBox.copyright);
break;
case 19: // Login - Cdkey In Use
timeoutDelay(cdkeyInUseRetry*60*1000, location);
controlData.click(controlData.controls.login.cdkey InUse.button.ok);
break;
case 20: // Single Player - Select Difficulty
controlData.click(controlData.singlePlayerDifficul ties[me.diff]);
break;
case 21: // Main Menu - Connecting
if(!locationTimeout(connectingToBnetTimeout, location))
controlData.click(controlData.controls.mainMenu.co nnecting.button.cancel);
break;
case 22: // Login - Invalid Cdkey (classic or xpac)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 3600);
Delay(3500);
break;
case 23: // Character Select - Connecting
if(!locationTimeout(characterScreenTimeout, location))
controlData.click(controlData.controls.characterSe lect.button.exit);
break;
case 24: // Server Down - not much to do but wait..
break;
case 25: // Lobby - Please Wait
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.lobby.pleas eWait.button.cancel);
break;
case 26: // Lobby - Game Name Exists
sendEventToOOG(D2NT_MGR_PRINT_LOG, "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.but ton.ok);
break;
case 28: // Lobby - Game Does Not Exist
inGameAt = Random(gameDoesNotExistDelayMin, gameDoesNotExistDelayMax);
lastGameStatus = 0;
setNextGameMake();
locationTimeout(gameDoesNotExistTimeout, location);
break;
default:
DebugInOOG("Unhandled location : "+location.id);
break;
}
DebugInOOG("Location : "+location.id);
}
function sendEventToOOG(locationId, statusString, pendingTime)
{
return SendCopyData("D2NT Manager", null, (locationId<<16)|pendingTime, statusString);
}
function setNextGameMake()
{
lastGameMade = GetTickCount();
nextGameMake = lastGameMade + createGameThreshold + Random(0-createGameThresholdRandom, createGameThresholdRandom) + inGameAt;
inGameAt = 0;
chatActionsDone = false;
}
function outputGameLength()
{
if(inGameAt)
{
duration = GetTickCount() - inGameAt;
inGameAt = (duration < gameMinLength ? gameMinLength - duration : 0);
}
}
function locationTimeout(time, location)
{
endtime = GetTickCount() + time;
while(controlData.getLocation().id == location.id && endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(500);
}
return (controlData.getLocation().id != location.id);
}
function timeoutDelay(time, location)
{
endtime = GetTickCount() + time;
while(endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(1000);
}
}
function getRandomString(_length)
{
_retString = "";
_charSet = "0123456789abcdefghijklmnopqrstuvwxyz";
while(_length--)
{
_retString += _charSet.charAt(Random(0, _charSet.length-1));
Delay(1);
}
return _retString;
}
function DebugInOOG(logString)
{
if (Debug)
return SendCopyData("D2NT Manager", null, 9<<16, "-- Debug : " + logString);
else
return false;
}
baalleechfight.ntj
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
if(!NTTM_CheckAct())
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
return;
}
if(me.areaid != 109)
{
if(!NTTM_TownMove("waypoint"))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_TownMove()");
return;
}
if(!NTM_TakeWaypoint(109))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
}
NTTMGR_TownManager();
if(NTConfig_precast)
{
NTM_TakeWaypoint(129)
NTP_DoPrecast(true);
Delay(500)
NTM_TakeWaypoint(109)
}
NTTM_TownMove("portalspot");
for(i = 0; i <= 100; i++)
{
if(NTC_InMyParty(NTConfig_Leader))
break;
Delay(200);
}
while(me.areaid == 109 && NTC_InMyParty(NTConfig_Leader))
{
if(NTConfig_CoLeechTPMsg == "")
NTM_UsePortal("BluePortal", 131, NTConfig_Leader); // 50
Delay(1000);
}
if(NTConfig_precast)
NTM_MakeTP();
else
NTA_ClearPosition(20, true, 2);
NTP_DoPrecast(true);
NTM_MakeTP();
while(NTC_InMyParty(NTConfig_Leader))
{
NT_ClearThroneInt();
while(1)
{
if(me.classid == NTC_CHAR_CLASS_PALADIN || me.classid == NTC_CHAR_CLASS_BARBARIAN)
NTM_MoveTo(me.areaid, 15092, 5028);
else
NTM_MoveTo(me.areaid, 15089, 5010);
if(me.GetState(2))
NTC_PutSkill(109, NTC_HAND_RIGHT);
for(i = 0 ; i < 6 ; i++)
{
_wave = NT_ThroneCheckInt();
if(_wave > 0)
break;
NTC_Delay(500);
}
_starttick = GetTickCount();
while(_wave == 0)
{
if(!NT_ThronePreAttackInt())
NTC_Delay(200);
if(GetTickCount()-_starttick > 15000)
{
NT_ClearThroneInt();
_starttick = GetTickCount();
}
_wave = NT_ThroneCheckInt();
}
switch(_wave)
{
case 1:
NTA_ClearPosition(40, true, 2);
NTP_DoPrecast(true);
break;
case 2:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true);
NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
break;
case 3:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true, 2);
NTSI_PickItems();
NT_CheckHydraInt();
break;
case 4:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true, 2);
break;
case 5:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true, 2);
break;
default:
NTA_ClearPosition(40, true, 1);
break;
}
if(_wave == 5)
break;
}
if(NTConfig_KillBaal)
{
var _portal;
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
NTM_MoveTo(me.areaid, 15092, 5010);
NTP_DoPrecast(true);
while(NTC_FindUnit(NTC_UNIT_MONSTER, 543))
NTC_Delay(500);
_portal = NTC_FindUnit(NTC_UNIT_OBJECT, 563, 1);
if(!_portal)
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTC_FindUnit()");
return;
}
if(!NTM_UsePortal("Portal", 132, null, _portal))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTM_UsePortal()");
return;
}
NTM_MoveTo(me.areaid, 15138, 5916);
NTA_Initialize()
if(!NTA_KillMonster(544))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTA_KillMonster()");
return;
}
NTSI_PickItems();
}
}
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
}
// Internal function
function NT_ClearThroneInt()
{
var _attackpos = [15112, 5068, 15085, 5065, 15114, 5045, 15114, 5012, 15095, 5024, 15078, 5013, 15092, 5040];
for(var i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(30, true, 2);
}
NTM_MoveTo(me.areaid, 15093, 5041);
NTA_ClearPosition(50, true, 2);
}
function NT_ThroneCheckInt()
{
var _monster;
if(!NTC_FindUnit(NTC_UNIT_MONSTER, 543))
return 5;
_monster = NTC_FindUnit(NTC_UNIT_MONSTER);
if(_monster)
{
do
{
if(NTA_IsValidMonster(_monster))
{
if(_monster.classid == 23 || _monster.classid == 62)
return 1;
if(_monster.classid == 105 || _monster.classid == 381)
return 2;
if(_monster.classid == 557)
return 3;
if(_monster.classid == 558)
return 4;
if(_monster.classid == 571)
return 5;
}
} while(_monster.GetNext());
}
return 0;
}
function NT_ThronePreAttackInt()
{
if(me.classid == NTC_CHAR_CLASS_SORCERESS)
{
if(NTConfig_AttackSkill[3] == 56 || NTConfig_AttackSkill[3] == 59)
return NTC_CastSkill(NTConfig_AttackSkill[3], 0, 15092, 5028);
}
else if(me.classid == NTC_CHAR_CLASS_PALADIN)
{
if(NTConfig_AttackSkill[3] == 112)
{
if(NTConfig_AttackSkill[4] > 0)
NTC_PutSkill(NTConfig_AttackSkill[4], NTC_HAND_RIGHT);
return NTC_CastSkill(NTConfig_AttackSkill[3], 2);
}
}
return false;
}
function NT_CheckHydraInt()
{
var _hydra1, _hydra2, _hydra3;
_hydra1 = NTC_FindUnit(NTC_UNIT_MONSTER, 351);
_hydra2 = NTC_FindUnit(NTC_UNIT_MONSTER, 352);
_hydra3 = NTC_FindUnit(NTC_UNIT_MONSTER, 353);
if((_hydra1 && _hydra1.GetStat(172) != 2 && _hydra1.GetState(105))
|| (_hydra2 && _hydra2.GetStat(172) != 2 && _hydra2.GetState(105))
|| (_hydra3 && _hydra3.GetStat(172) != 2 && _hydra3.GetState(105)))
{
NTM_MoveTo(me.areaid, 15118, 5002);
if(me.GetState(2))
NTC_PutSkill(109, NTC_HAND_RIGHT);
NTC_PingDelay(5000);
}
}
function NT_GameMsgEvents(msg, type)
{
if(type == 0 && msg.indexOf(NTConfig_Leader) != -1 && msg.indexOf(NTConfig_CoLeechTPMsg) != -1 && NTConfig_CoLeechTPMsg != "")
{
while(me.areaid == 109)
{
NTM_UsePortal("BluePortal", 131, NTConfig_Leader);
}
}
}
diabloleechfight.ntj
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
if(!NTTM_CheckAct())
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
return;
}
if(me.areaid != 103)
{
if(!NTTM_TownMove("waypoint"))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_TownMove()");
return;
}
if(!NTM_TakeWaypoint(103))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
}
NTTMGR_TownManager();
NTTM_TownMove("portalspot");
for(i = 0; i <= 100; i++)
{
if(NTC_InMyParty(NTConfig_Leader))
break;
Delay(200);
}
while(me.areaid == 103 && NTC_InMyParty(NTConfig_Leader))
{
if(NT_GetLeader(NTConfig_Leader).areaid >= 129)
{
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
return;
}
NTM_UsePortal("BluePortal", 108, NTConfig_Leader); // 50
Delay(1000);
}
NTP_DoPrecast(true);
NTA_ClearPosition(10, true);
NTM_MoveTo(me.areaid, 7792, 5291);
NTA_ClearPosition(20, true);
NTM_MoveTo(me.areaid, 7792, 5291);
NTA_ClearPosition(30, true);
if(!NT_OpenSealsInt())
{
NTC_SendMsgToScript("MWBotGame.ntj", "NT_OpenSealsInt()");
return;
}
if(NTConfig_PublicMode)
Say(NTConfig_KillDiaMsg);
NTM_MoveTo(me.areaid, 7792, 5292);
NTP_DoPrecast(true);
NTC_FindUnit(NTC_UNIT_MONSTER, 243, 100);
NTA_KillMonster(243);
NTSI_PickItems();
Say(NTConfig_DiaNxtGame);
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
// Internal function
function NT_OpenSealsInt()
{
var i, _unit;
var _result;
_unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);
if(!_unit)
return false;
_result = false;
for(i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id == 396)
{
if(_unit[i].roomy*5 + _unit[i].y == 5275)
_result = NT_OpenVizierSealInt(1);
else
_result = NT_OpenVizierSealInt(2);
break;
}
}
if(!_result)
return false;
NTA_ClearPosition(30, true, 2);
NTP_DoPrecast(false);
_result = false;
for(i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id == 394)
{
if(_unit[i].roomx*5 + _unit[i].x == 7773)
_result = NT_OpenDeSeisSealInt(1);
else
_result = NT_OpenDeSeisSealInt(2);
break;
}
}
if(!_result)
return false;
NTA_ClearPosition(30, true, 2);
NTP_DoPrecast(true);
_result = false;
for(i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id == 392)
{
if(_unit[i].roomx*5 + _unit[i].x == 7893)
_result = NT_OpenVenomSealInt(1);
else
_result = NT_OpenVenomSealInt(2);
break;
}
}
return _result;
}
function NT_OpenVizierSealInt(type)
{
var _monstername = GetLocaleString(2851);
var i, n;
var i, n;
var _attackpos = [7740, 5300, 7792, 5291, 7740, 5280, 7720, 5280, 7720, 5300];
for(i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(25, true, 2);
}
NTM_MoveTo(me.areaid, 7735, 5291);
NTA_ClearPosition(40, true, 2);
for(i = 0 ; i < 3 ; i++)
{
if(type == 1)
{
NTM_MoveTo(me.areaid, 7695, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7664, 5314);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7673, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7662, 5276);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7676, 5294);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7678, 5292);
}
else
{
NTM_MoveTo(me.areaid, 7695, 5316);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7664, 5314);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7654, 5281);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7695, 5316);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7676, 5320);
}
for(n = 0 ; n < 10 ; n++)
{
NTC_Delay(200);
if(NTA_KillMonster(_monstername))
{
NTA_ClearPosition(40);
NTSI_PickItems();
return NTM_MoveTo(me.areaid, 7792, 5291);
}
}
}
return false;
}
function NT_OpenDeSeisSealInt(type)
{
var i, n;
var _monstername = GetLocaleString(2852);
var _attackpos = [7780, 5255, 7800, 5255, 7800, 5235, 7780, 5235, 7774, 5214];
var _monstername = GetLocaleString(2852);
for(i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(25, true, 2);
}
NTM_MoveTo(me.areaid, 7790, 5244);
NTA_ClearPosition(40, true, 2);
for(i = 0 ; i < 3 ; i++)
{
if(type == 1)
{
NTM_MoveTo(me.areaid, 7773, 5194);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7813, 5188);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7809, 5155);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7777, 5155);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7768, 5206);
else
NTM_MoveTo(me.areaid, 7774, 5220);
}
else
{
NTM_MoveTo(me.areaid, 7810, 5202);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7774, 5180);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7785, 5153);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7809, 5154);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7773, 5178);
else
NTM_MoveTo(me.areaid, 7788, 5192);
}
for(n = 0 ; n < 10 ; n++)
{
NTC_Delay(200);
if(NTA_KillMonster(_monstername))
{
NTA_ClearPosition(40);
NTSI_PickItems();
NTP_DoPrecast(false);
return NTM_MoveTo(me.areaid, 7792, 5291);
}
}
}
return false;
}
function NT_OpenVenomSealInt(type)
{
var i, n;
var _monstername = GetLocaleString(2853);
var _attackpos = [7835, 5280, 7835, 5300, 7855, 5300, 7855, 5280];
for(i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(25, true, 2);
}
NTM_MoveTo(me.areaid, 7843, 5292);
NTA_ClearPosition(40, true, 2);
for(i = 0 ; i < 3 ; i++)
{
if(type == 1)
{
NTM_MoveTo(me.areaid, 7871, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7893, 5307);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7912, 5280);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7931, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7908, 5293);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7892, 5298);
}
else
{
NTM_MoveTo(me.areaid, 7893, 5274);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7927, 5280);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7930, 5308);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7929, 5294);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7927, 5275);
}
for(n = 0 ; n < 10 ; n++)
{
NTC_Delay(200);
if(NTA_KillMonster(_monstername))
{
NTSI_PickItems();
NTA_ClearPosition(40, true, 2);
}
if(NTC_PutSkill(124, NTC_HAND_RIGHT))
NTC_PingDelay(1000);
}
return true;
}
return false;
}
function NT_GetLeader(_name)
{
_player = GetPlayerUnit();
if(_player)
{
while(_player.GetNext())
{
if(_player.name == _name)
{ return _player; }
}
}
}
}
und in deiner charconfig musst du dann noch
MWConfig_Script.push(["", 5]); NTConfig_KillBaal = true; NTConfig_precast = false;
NTConfig_Leader = "" // Name vom Leader-Char, Groß- und Kleinschreibung beachten!
NTConfig_CoLeechTPMsg = ""; // Bei dieser Message vom Leader geht der Bot ins TP. Wenn er jederzeit rein gehen soll, leer lassen.
einfügen
ich hoffe ich hab nix vergessen O_o
|
|
|
05/24/2011, 23:22
|
#2061
|
Administrator
elite*gold: 41364
Join Date: Jan 2010
Posts: 22,727
Received Thanks: 12,652
|
Quote:
Originally Posted by Aceridos
Afaik(!) funzt das mit dem cuben wie folgt:
Du stellst ein was er cuben soll, sagen wir... Blutgürtel
Code:
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BELT, 392]); // Craft Mesh Belt
in dieser Zeile entfernen wir dann die "//", soweit klar
Nun wird dein Bot die Zutaten zum Gürtel (Tal Rune, Juwel, PRuby) erst sammeln, wenn das entsprechende Craftitem im Stash ist(ergo gefunden wurde)
Dieser Gürtel(in dem Beispiel ein normaler Mesh Belt), muss aber durch deine PickIt zum aufheben und behalten freigegeben/definiert werden, die Zeile oben in der Codebox definiert wohl nur das cuben an sich + Zusatzmaterial, nicht aber den Gurt an sich
Vlt hilft dir das weiter, ich cube nicht, meine das aber so hier im Thread an verschiedenen Stellen aufgeschnappt zu haben
Vlt hat er bei dir einfach nur das Hauptitem(welches gecraftet werden soll) nicht gefunden und du hattest die Zusatzmats aber in der PickIt definiert, so hört sich das für mich jedenfalls an
Ringe und Amulette werden wohl auch erst ab 94 oder 95 gecrafted, wenn sie beim gambln "gefunden" wurden, weil das ilvl des gambled Items ja irgendwie Charlvl minus 5(oder 4) oder so ist, und eben erst ab ilvl 89/90+ dann +2 Skills möglich sind
Genaue Werte zum letzten Absatz hab ich nicht im Kopf, im groben dürfte das aber passen
----------------------------
@Bashtour
PublicMode auf false?
|
Das Basis Item, also in dem Fall der Mesh Belt hat nichts in deinen .nips verloren!
Lediglich für Sockel und Upgrade Rezepte muss das Basisitem in den .nips stehen.
Quote:
Originally Posted by xtoa
so da mein sumonner gerade fertig geworden ist musst ich das script ja gleich mal versuchen 
sieht fantastisch aus.
Ich hätt noch eine frage .. . mein nec benuzt hoto in einem slot und beast ( zum auraspenden im 2.) wäre es möglich das er bei bossen auf diesen beast slot switcht und den hoto slot nur zum telen / sumonner benuzt ? schonmal danke
|
Ohne größeren Aufwand eher nicht.
Spricht irgendwas gegen Fastmod und Beast permanent im 1. Slot?
Mir würde so ehrlich gesagt auch das CTA fehlen, ich würde eher dauerhaft zum Hoto greifen, als das CTA links liegen zu lassen.
Quote:
Originally Posted by KingHigh
Ich bekomme bei meinen Probleläufen mit dem Bot relativ häufig folgende Fehlermldung:
<D2NT Error> C:\Programme\D2bot\Muddy's D2NT V1.22 THIS\Muddy's D2NT\scripts\libs\common\NTSnagit.ntj (168):TypeError:_item.name is undefined
Ich habe an der NTSnagit.ntj nicht geändert, es ist also die gleiche wie die in der release-Version. Die Zeilen 167 und 168 sehen so aus:
Code:
else if(MWConfig_ShowPotionPickups)
Print("Picked up " + _item.name.split("\n")[0]);
Da es hier anscheinend um das picken von Potions geht habe ich geschaut was ich an pickits aktiviert habe und was davon interessant sein könnte. So sieht es in der charconfig aus:
Code:
NTConfig_NIPFilePath.push("private/normal.nip");
NTConfig_NIPFilePath.push("private/magic_rare.nip");
//NTConfig_NIPFilePath.push("private/set.nip");
NTConfig_NIPFilePath.push("private/unique.nip");
//NTConfig_NIPFilePath.push("private/craft.nip");
//NTConfig_NIPFilePath.push("private/temp.nip");
Potions sind in der normal.nip festgelegt, dort sieht es so aus:
Code:
// ##### Potions #######################
[Name] == GreaterHealingPotion
[Name] == SuperHealingPotion
[Name] == GreaterManaPotion
[Name] == SuperManaPotion
[Name] == RejuvenationPotion
[Name] == FullRejuvenationPotion
Abgesehen von flawless und perfect diamonds und skulls sowie Gold ab 100 habe ich alles andere in dieser .nip ausgestellt.
Hat jemand eine Idee was das sein könnte/ wo ich nach einem Fehler suchen kann?
Das Problem tritt leider viel zu häufig auf als das man es ignorieren könnte....
|
In der SnagIt library war müsste noch ein Fehler sein, versuch es deshalb mal mit dieser hier, dann sollte das Problem nicht mehr auftreten:
Code:
/**
* This file was modified by
* Check the programming section for updates and further scripts
* Last Update: 12:56 09.05.2011
*/
var _NTSI_IgnoredList = new Array(
526, // Arrows quiver
528, // Bolts quiver
518, // Tome of Town Portal
519, // Tome of Identify
514, // Antidote potion
513, // Stamina potion
517, // Thawing potion
80, // Rancid Gas Pot
81, // Oil Potion
82, // Choking Gas Pot
83, // Exploding Pot
84, // Strangling Gas
85); // Fulminating Pot
function NTSI_LoadNIPFiles(filepath, checkNips)
{
if(arguments.length < 2)
checkNips = true;
for(var i = 0; i < NTConfig_NIPFilePath.length; i++)
NTIPOpenFile(filepath + "/" + NTConfig_NIPFilePath[i]);
if(MWConfig_RunNipCheck && checkNips)
MWIPCheckNips();
}
function NTSI_PickItems(pickValuables, flag)
{
var i, _mode;
if(pickValuables && !MWConfig_PickUpMoneymakers)
return;
for(i = 0 ; i < 25 ; i++)
{
_mode = me.mode;
if((_mode >= 1 && _mode <= 3) || _mode == 5 || _mode == 6)
break;
NTC_Delay(NTC_DELAY_FRAME);
}
if(i < parseInt(NTConfig_SnagDelay/NTC_DELAY_FRAME))
NTC_PingDelay(NTConfig_SnagDelay-(i*NTC_DELAY_FRAME));
NTSI_SnagIt(pickValuables, flag);
}
function NTSI_SnagIt(pickValuables)
{
var i, j;
var _item;
var _checkeditem, _checkeditems;
var _value;
var _minindex, _mindistance;
if(arguments.length < 1)
pickValuables = false;
_item = NTC_FindUnit(NTC_UNIT_ITEM);
if(!_item)
return;
_checkeditems = new Array();
do
{
if(_item.mode == 3 || _item.mode == 5)
{
if(NTSI_IsIgnoredItemInt(_item.classid))
continue;
if(GetDistance(me, _item) <= NTConfig_SnagRange)
{
_value = NTSI_CheckItem(_item, true);
if(_item.classid == 529 && MWConfig_MinimumTpScrollCount != 0 || _item.classid == 530 && MWConfig_MinimumIdScrollCount != 0 || _item.classid == 543 && MWConfig_CarryKeys)
_value = 1;
if(pickValuables && (_value == 0 || _value == 3) && MWSI_IsValuable(_item))
_value = 4;
if(_value != 0 && _value != 3)
{
_checkeditem = new NTSI_ItemInt(_item, _value);
if(_checkeditem)
_checkeditems.push(_checkeditem);
}
}
}
} while(_item.GetNext());
while(_checkeditems.length > 0)
{
_mindistance = 100000;
for(i = 0; i < _checkeditems.length; i++)
{
if(MWConfig_PickUpPriorityItemsFirst && !_checkeditems[i].HasPriority()) // If the item at index i is a low priority item
{
for(j = 0; j < _checkeditems.length; j++) // Loop through all items in pickup queue
{
if(j == i)
continue;
if(_checkeditems[j].HasPriority())
break;
}
// If the loop was aborted due to a high priority item in the pickup queue, skip the item at index i
if(j < _checkeditems.length)
continue;
}
_value = GetDistance(me.x, me.y, _checkeditems[i].x, _checkeditems[i].y);
if(_value < _mindistance)
{
_minindex = i;
_mindistance = _value;
}
}
_checkeditem = _checkeditems.splice(_minindex, 1)[0];
_item = NTC_FindUnit(NTC_UNIT_ITEM, _checkeditem.GID);
if(_item)
{
if(!NTSI_IsLimitedItemInt(_item))
{
if(MWConfig_ShowOverheadStatus)
MWC_PrintOverheadStatus("Picking up items...");
if(NTT_CheckSpace(_item.xsize, _item.ysize) || _checkeditem.ClassID == 523 || _item.itemtype == 4 || _item.classid == 543 || _item.itemtype == 22 || _item.itemtype >= 76 && _item.itemtype <= 78)
{
MWI_WriteLoc(_item);
if(NTSI_PickUpItemInt(_item))
{
if(_item && _item.name && _item.itemtype != 22 && _checkeditem.ClassID != 523 && _item.itemtype != 4 && _item.classid != 543)
{
if(_item.itemtype < 76 || _item.itemtype > 81)
{
Print("Picked up " + NTC_ItemQualityToD2Color[MWC_GetItemColorInt(_item)] + _item.name.split("\n")[0] + ((_checkeditem.Status == 4) ? " ÿc8[" + MWC_InsertDigitSeperator(_item.GetItemCost(1)) + "]" : ""));
NTC_SendMsgToScript("MWBotGame.ntj", "SET_PICKED_1");
if(!pickValuables)
{
if(MWSI_IsCommonLogItem(_item))
NTC_SendMsgToScript("MWBotGame.ntj", "SET_COMMONITEM_" + _item.classid);
if(_item.quality < 4 && _checkeditem.Status < 2)
{
if(MWConfig_UseXMLItemlog)
MWI_WriteLog(_item, 0);
if(_item.classid <= 609 || _item.classid >= ((MWConfig_LowestRuneToLog < 0 || MWConfig_LowestRuneToLog > 32) ? 0 : MWConfig_LowestRuneToLog) + 610)
MWI_WriteManagerLog(_item, 0);
}
}
}
else if(MWConfig_ShowPotionPickups)
Print("Picked up " + _item.name.split("\n")[0]);
}
}
}
else
{
if(!_checkeditem.Retry && !pickValuables)
{
_checkeditem.Retry = true;
if(MWConfig_IdentAfterPickup)
MWL_IDItemsAfterPickup(true);
if(!NTT_CheckSpace(_checkeditem.xSize, _checkeditem.ySize))
{
if(!NTTMGR_VisitTown())
return;
}
_checkeditems.push(_checkeditem);
}
}
}
}
}
if(MWConfig_IdentAfterPickup)
MWL_IDItemsAfterPickup();
}
function NTSI_CheckItem(item, checkQuantity)
{
var _result;
if(arguments.length < 2)
checkQuantity = false;
switch(item.quality)
{
case 5:
case 8:
_result = NTIPCheckItem(item, checkQuantity);
break;
default:
_result = NTIPCheckItem(item, checkQuantity);
if(NTCU_CheckItem(item, _result))
_result = 2;
break;
}
if(item.itemflag&0x4000000)
_result = 1;
return _result;
}
// Internal function
function NTSI_ItemInt(item, checkedstatus)
{
this.ClassID = item.classid;
this.GID = item.gid;
this.ItemType = item.itemtype;
this.x = item.x;
this.y = item.y;
this.xSize = item.xsize;
this.ySize = item.ysize;
this.Status = checkedstatus;
this.Retry = false;
this.HasPriority = function()
{
if(this.ItemType >= 91 && this.ItemType <= 102 // Gem
|| this.ItemType >= 76 && this.ItemType <= 81 // Potions
|| this.ClassID == 543 || this.ItemType == 4 // Gold
|| this.ClassID >= 610 && this.ClassID <= 629 // Runes <= FAL
|| this.ClassID == 529 || this.ClassID == 530 // Scrolls
|| this.ClassID == 543) // Keys
return false;
return true;
}
}
function NTSI_PickUpItemInt(snagitem)
{
var _classid;
var _tome, _scrollPreCount;
var _keys, _gold;
_classid = snagitem.classid;
// Save properties that will be invalidated at pickup
_gold = snagitem.GetStat(14);
_keys = snagitem.GetStat(70);
// The successful pickup of a scroll is determined by the change of quantity
if(_classid == 529 || _classid == 530)
{
_tome = NTT_GetTome(Math.abs(snagitem.classid - 530));
if(!_tome)
return false;
_scrollPreCount = _tome.GetStat(70); // Save the quantity before pickup
}
for(var i = 0; i < 40; i++)
{
if((i % 10) == 0 && (snagitem.mode == 3 || snagitem.mode == 5))
{
if(MWConfig_UseTelekinesis && i < 20 && (_classid == 523 || snagitem.itemtype == 4 || _classid == 543 || _classid == 529 || _classid == 530 || snagitem.itemtype >= 76 && snagitem.itemtype <= 81) && NTC_GetSkillLevel(MWS_TELEKINESIS) > 0)
MWC_CastTelekinesis(snagitem);
else
{
if(GetDistance(me, snagitem) > 3)
NTM_MoveTo(snagitem.areaid, snagitem.x, snagitem.y, 3, false, 0, false);
if(NTC_ClearCursor())
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, snagitem);
}
}
NTC_Delay(NTC_DELAY_FRAME);
if(_classid == 529 || _classid == 530) // Scrolls
{
_tome = NTT_GetTome(Math.abs(_classid - 530));
if(_tome && _tome.GetStat(70) != _scrollPreCount) // The scroll was picked up successfully if the quantity after pickup differs from the one before
return true;
}
else if(_classid == 543) // Keys
{
if(snagitem.GetStat(70) == -1) // The quantity property turns to -1 after the key was picked
{
if(_keys > 1)
Print("Picked up " + _keys + " Keys");
else
Print("Picked up Key");
return true;
}
}
else if(_classid == 523 || snagitem.itemtype == 4) // Gold
{
if(snagitem.GetStat(14) == -1) // The gold property turns to -1 after the gold was picked
{
if(MWConfig_ShowGoldPickupsPerScript)
NTC_SendMsgToScript("MWBotGame.ntj", "SET_SCRIPTGOLD_" + _gold);
if(MWConfig_ShowGoldPickups)
Print("Picked up " + MWC_InsertDigitSeperator(_gold) + " Gold");
return true;
}
if(i % 10 == 0 && NTC_CharGoldFull())
{
NTC_SendMsgToScript("MWBotGame.ntj", "STOP_STATUS_TEXT_UPDATE");
SetStatusText("ÿc8Visiting Town...");
NTTMGR_VisitTown();
SetStatusText("ÿc8Done!");
NTC_SendMsgToScript("MWBotGame.ntj", "SET_DEFAULT_STATUS");
}
return true;
}
else if(snagitem.mode != 3 && snagitem.mode != 5)
return true;
}
return false;
}
function NTSI_IsIgnoredItemInt(classid)
{
for(var i = 0 ; i < _NTSI_IgnoredList.length ; i++)
{
if(classid == _NTSI_IgnoredList[i])
return true;
}
return false;
}
function NTSI_IsLimitedItemInt(item)
{
var i;
var _items, _tome, _keys;
if(item.itemtype >= 76 && item.itemtype <= 78)
{
if(!MWT_IsPotionRequired(item.code))
return true;
}
else if(item.quality == 7 && item.classid >= 603 && item.classid <= 605)
{
_items = me.GetItems(item.classid);
if(_items.length > 0)
return true;
}
else if(item.classid == 529 || item.classid == 530) // Scrolls
{
_tome = NTT_GetTome(Math.abs(item.classid - 530));
if(!_tome || _tome.GetStat(70) == 20 || item.classid == 529 && _tome.GetStat(70) >= MWConfig_MinimumTpScrollCount || item.classid == 530 && _tome.GetStat(70) >= MWConfig_MinimumIdScrollCount)
return true;
}
else if(item.classid == 543) // Keys
{
_keys = MWTMGR_GetKeyQuantity();
if(_keys >= 12 || _keys + item.GetStat(70) > 12)
return true;
}
else if(item.classid == NTC_UNIT_CUBE)
{
_items = me.GetItems(NTC_UNIT_CUBE);
if(_items.length > 0)
return true;
}
else if(NTSI_CheckItem(item, true) == 3)
return true;
return false;
}
function MWSI_PickupItem(search)
{
var _item;
if(arguments.length < 1)
return false;
_item = NTC_FindUnit(NTC_UNIT_ITEM);
if(_item)
{
do
{
if(_item.classid == search || _item.gid == search || _item.name == search || _item.itemprefix == search || _item.itemsuffix == search)
{
if(NTT_CheckSpace(_item.xsize, _item.ysize) && NTSI_PickUpItemInt(_item))
{
MWI_WriteLoc(_item);
Print("Picked up " + NTC_ItemQualityToD2Color[MWC_GetItemColorInt(_item)] + _item.name.split("\n")[0]);
if(MWSI_IsCommonLogItem(_item))
NTC_SendMsgToScript("MWBotGame.ntj", "SET_COMMONITEM_" + _item.classid);
if(GetUIState(0x01) && me.itemoncursor)
{
NTCU_CheckCubeInventoryInt();
NTCU_MoveItemToInventoryInt(_item);
}
return true;
}
}
} while(_item.GetNext());
}
return false;
}
function MWSI_IsCommonLogItem(item)
{
if(item.classid >= 610 && item.classid <= 642) // Rune
return true;
if(item.classid >= 647 && item.classid <= 657) // Key/Organ/Essence
return true;
if(item.itemtype >= 91 && item.itemtype <= 102) // Gem
return true;
return false;
}
function MWSI_IsValuable(item)
{
if(item.quality >= 2)
{
if(item.itemtype == 12 || item.itemtype == 24 || item.itemtype == 25 && item.quality > 3 || item.itemtype == 74 && item.classid >= 622) // Amulets/Scepters/Wands/Runes >= SHAEL
return true;
if(item.itemclass >= 1)
{
switch(item.itemtype)
{
case 19: // Belts
case 32: // Knives
case 37: // Helms
case 42: // Throwing Knives
case 67: // Claws
if(item.quality < 4)
break;
case 3: // Armors
case 65: // Circlets
case 68: // Orbs
return true;
}
}
if(item.itemclass >= 2)
{
switch(item.itemtype)
{
case 2: // Shields
case 32: // Knives
case 37: // Helms
case 69: // Voodooheads
case 72: // Pelts
return true;
case 15: // Boots
case 16: // Gloves
case 42: // Throwing Knives
case 67: // Claws
if(item.quality > 3)
return true;
}
}
switch(item.classid)
{
case 196: // Tomahawk
case 210: // Truncheon
case 214: // Tyrant Club
case 215: // Reinforced Mace
case 216: // Devil Star
case 221: // Falcata
case 222: // Ataghan
case 223: // Elegant Blade
case 224: // Hydra Edge
case 226: // Conquest Sword
case 227: // Cryptic Sword
case 228: // Mythical Sword
case 240: // Flying Axe
case 259: // Walking Stick
case 324: // Gothic Plate
case 325: // Full Plate Mail
case 326: // Ancient Armor
case 498: // Sacred Target
case 499: // Sacred Rondache
case 502: // Vortex Shield
return true;
}
}
if(MWT_IsSellable(item) && item.GetItemCost(1) >= 25E3)
return true;
return false;
}
Quote:
Originally Posted by TheCrazy11
Bei mir bringt der Bot schon längers folgende Fehlermeldung:
Diese ist bis jetzt gekommen wenn im Cube noch ein PA, PS oder Baal-SC gelegen ist.
Kann nicht nachvollziehen, wann der Error kommt, kommt nur ca. alle 100 Games und auch immer bei unterschiedlichen Bots, haben alle die gleiche Cube- & Craft-Config:
Code:
//------------------------------------------------------------------------------
// Cubing Configuration
//------------------------------------------------------------------------------
// Set to true to log cubing of gems in the manager's common log.
MWConfig_ShowCubedGemsInCommonLog = true;
// Set to true to always remove all items from cube after transmuting. If set to false, the item will remain in cube and is not removed until it interferes with another recipe.
MWConfig_ClearCubeAfterCubing = false;
// Set to true to enable an advanced cubing algorithm that allows collecting ingredients for multiple recipes at the same time.
MWConfig_UseAdvancedCubingAlgorithm = true;
// Set to true if you do not want kept low runes or gems to be used for cubing. Set to false to use them anyway.
MWConfig_RestrictKeptItemsFromCubing = false;
// *********************** Misc ***********************
//NTConfig_CubingItem.push([NTCU_ESSENCE, 653]); // Essences --> Token
// ****************** Transmute Gems ******************
NTConfig_CubingItem.push([NTCU_GEM, 560]); // Flawless Amethyst
NTConfig_CubingItem.push([NTCU_GEM, 565]); // Flawless Topaz
//NTConfig_CubingItem.push([NTCU_GEM, 570]); // Flawless Saphire
//NTConfig_CubingItem.push([NTCU_GEM, 575]); // Flawless Emerald
NTConfig_CubingItem.push([NTCU_GEM, 580]); // Flawless Ruby
//NTConfig_CubingItem.push([NTCU_GEM, 585]); // Flawless Diamond
NTConfig_CubingItem.push([NTCU_GEM, 600]); // Flawless Skull
//NTConfig_CubingItem.push([NTCU_MAGIC, 420]); // Magic Tiara
//NTConfig_CubingItem.push([NTCU_MAGIC, 421]); // Magic Diadem
// ************* Transmute magic and rares *************
NTConfig_CubingItem.push([NTCU_MAGIC_CHARM, 603]); // Magic Small Charm
NTConfig_CubingItem.push([NTCU_MAGIC_CHARM, 605]); // Magic Grand Charm
NTConfig_CubingItem.push([MWCU_RARE, 421]); // Rare Diadem
// ********************** Crafting *********************
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_GLOVES, 336]); // Craft Chain Gloves
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_GLOVES, 382]); // Craft Heavy Bracers
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_GLOVES, 452]); // Craft Vambraces
//NTConfig_CubingItem.push([NTCU_CRAFT_HITPOWER_RING, 522]); // Craft Ring
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_HELM, 354]); // Craft Casque
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_HELM, 424]); // Craft Armet
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BOOTS, 388]); // Craft Battle Boots
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BOOTS, 458]); // Craft Mirrored Boots
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_GLOVES, 381]); // Craft Sharkskin Gloves
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_GLOVES, 451]); // Craft Vampirebone Gloves
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BELT, 392]); // Craft Mesh Belt
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_BELT, 462]); // Craft Mithril Coil
//NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_AMULET, 520]); // Craft Amulet
NTConfig_CubingItem.push([NTCU_CRAFT_BLOOD_RING, 522]); // Craft Ring
//NTConfig_CubingItem.push([NTCU_CRAFT_CASTER_BOOTS, 455]); // Craft Wyrmhide Boots
NTConfig_CubingItem.push([NTCU_CRAFT_CASTER_AMULET, 520]); // Craft Amulet
NTConfig_CubingItem.push([NTCU_CRAFT_CASTER_AMULET, 520]); // Craft Amulet
//NTConfig_CubingItem.push([NTCU_CRAFT_SAFETY_SHIELD, 447]); // Craft Monarch
//NTConfig_CubingItem.push([NTCU_CRAFT_SAFETY_AMULET, 520]); // Craft Amulet
// ****************** Transmute runes ******************
//NTConfig_CubingItem.push([NTCU_RUNE_THUL, 562]); // Transmute 3xTHUL --> 1xAMN
//NTConfig_CubingItem.push([NTCU_RUNE_AMN, 557]); // Transmute 3xAMN --> 1xSOL
//NTConfig_CubingItem.push([NTCU_RUNE_SOL, 567]); // Transmute 3xSOL --> 1xSHAEL
//NTConfig_CubingItem.push([NTCU_RUNE_SHAEL, 577]); // Transmute 3xSHAEL --> 1xDOL
//NTConfig_CubingItem.push([NTCU_RUNE_DOL, 572]); // Transmute 3xDOL --> 1xHEL
//NTConfig_CubingItem.push([NTCU_RUNE_HEL, 582]); // Transmute 3xHEL --> 1xIO
//NTConfig_CubingItem.push([NTCU_RUNE_IO, 563]); // Transmute 3xIO --> 1xLUM
//NTConfig_CubingItem.push([NTCU_RUNE_LUM, 558]); // Transmute 3xLUM --> 1xKO
//NTConfig_CubingItem.push([NTCU_RUNE_KO, 568]); // Transmute 3xKO --> 1xFAL
//NTConfig_CubingItem.push([NTCU_RUNE_FAL, 578]); // Transmute 3xFAL --> 1xLEM
NTConfig_CubingItem.push([NTCU_RUNE_LEM, 573]); // Transmute 3xLEM --> 1xPUL
NTConfig_CubingItem.push([NTCU_RUNE_PUL, 583]); // Transmute 2xPUL --> 1xUM
NTConfig_CubingItem.push([NTCU_RUNE_UM, 564]); // Transmute 2xUM --> 1xMAL
NTConfig_CubingItem.push([NTCU_RUNE_MAL, 559]); // Transmute 2xMAL --> 1xIST
//NTConfig_CubingItem.push([NTCU_RUNE_IST, 569]); // Transmute 2xIST --> 1xGUL
NTConfig_CubingItem.push([NTCU_RUNE_GUL, 579]); // Transmute 2xGUL --> 1xVEX
//NTConfig_CubingItem.push([NTCU_RUNE_VEX, 574]); // Transmute 2xVEX --> 1xOHM
//NTConfig_CubingItem.push([NTCU_RUNE_OHM, 584]); // Transmute 2xOHM --> 1xLO
//NTConfig_CubingItem.push([NTCU_RUNE_LO, 565]); // Transmute 2xLO --> 1xSUR
//NTConfig_CubingItem.push([NTCU_RUNE_SUR, 560]); // Transmute 2xSUR --> 1xBER
//NTConfig_CubingItem.push([NTCU_RUNE_BER, 570]); // Transmute 2xBER --> 1xJAH
//NTConfig_CubingItem.push([NTCU_RUNE_JAH, 580]); // Transmute 2xJAH --> 1xBER
//NTConfig_CubingItem.push([NTCU_RUNE_CHAM, 575]); // Transmute 2xCHAM --> 1xZOD
// ******************* Socket items ********************
// Primary item must be included in one of your .nip Files
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 429]); // Socket Dusk Shroud
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 430]); // Socket Wyrmhide
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 431]); // Socket Scarab Husk
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 432]); // Socket Wire Fleece
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 433]); // Socket Diamond Mail
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 434]); // Socket Loricated Mail
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 435]); // Socket Bone Weave
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 436]); // Socket Great Hauberk
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 437]); // Socket Balrog Skin
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 438]); // Socket Hellforge Plate
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 439]); // Socket Kraken Shell
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 440]); // Socket Lacquered Plate
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 441]); // Socket Shadow Plate
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 442]); // Socket Sacred Armor
NTConfig_CubingItem.push([NTCU_SOCKET_BODYARMOR, 443]); // Socket Archon Plate
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 199]); // Socket War Spike
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 200]); // Socket Berserker Axe
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 255]); // Socket Thresher
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 256]); // Socket Cryptic Axe
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 257]); // Socket Great Poleaxe
NTConfig_CubingItem.push([NTCU_SOCKET_WEAPON, 258]); // Socket Giant Thresher
//NTConfig_CubingItem.push([NTCU_SOCKET_SHIELD, 447]); // Socket Monarch
//NTConfig_CubingItem.push([NTCU_SOCKET_SHIELD, 498]); // Socket Sacred Targe
//NTConfig_CubingItem.push([NTCU_SOCKET_SHIELD, 502]); // Socket Vortex Shield
// ******************* Upgrade items *******************
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_WEAPON, 295]);// Titan's Revenge : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_N_UNIQUE_ARMOR, 337]); // Magefist : Normal -> Exceptional
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 360]); // Skin of the Vipermagi : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 383]); // Magefist or Lava Gout : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 389]); // Gore Rider : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 477]); // Arreat's Face : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 481]); // Herald Of Zakarum : Exceptional -> Elite
//NTConfig_CubingItem.push([NTCU_UPGRADE_N_UNIQUE_ARMOR, 342]); // Goblin Toe N -> E
//NTConfig_CubingItem.push([NTCU_UPGRADE_E_UNIQUE_ARMOR, 388]); // Goblin Toe E -> E
Weiß aber nicht ob vor oder nach dem cuben, der Cube war auf jeden Fall immer offen.
Der Fehler nervt insofern, dass der eine Bot dadurch einfach hängt und die Games auf maxtime gehen.
Leider habe ich keine API-Referenz (D2NT/D2BS) gefunden, wo GetItems() dokumentiert ist.
Habe auch in der Ur-D2NT nachgesehen, da wird die name-Eigenschaft auch so verwendet wie bei Muddy's.
EDIT: Bei KingHigh scheint es das gleiche Problem zu sein, die Property name passt wohl nicht ganz?
|
"Passt wohl nicht ganz" ist der falsche Ausdruck, die Eigenschaft hat ganz einfach den Wert undefined. Das wäre an sich nicht problematisch, nur wird eben über diese Eigenschaft noch die Split() Methode der String Klasse aufgerufen und die lässt sich natürlich nur über ein String Objekt aufrufen.
Es sollte an sich schon reichen, wenn man einfach vor der Ausgabe kontrolliert, ob die Eigenschaft name definiert ist. Demnach müsste die Zeile davor, also Zeile 1672 so aussehen:
Code:
if(_cubeItems[0].name && (MWConfig_ShowCubedGemsInCommonLog || _cubeItems[0].itemtype < 91))
LG
Muddy
|
|
|
05/24/2011, 23:56
|
#2062
|
elite*gold: 0
Join Date: Oct 2010
Posts: 211
Received Thanks: 44
|
Ah, dann hab ich das mit den Sockelrezepten gelesen und auf die Craftrezepte übertragen, dankeschön
|
|
|
05/25/2011, 00:03
|
#2063
|
elite*gold: 0
Join Date: Aug 2009
Posts: 435
Received Thanks: 159
|
mir ist gerade was sehr seltsames passiert:
wollte wie von Gruener Apfel beschrieben mir mal die Leechscripte mit einbauen.
Hab mir also 2 Bot-scripte im "bots" Ordner erstellt und den von Gruener apfel genannten Inhalt eingefügt. ebenso mit dem Entrypoint und in der Charconfig. Nach einem Manager-Restart, kommt D2 aber nicht mal mehr über den Loading screen hinaus -.-
Passiert mir nicht zum ersten Mal. Also hab ich nur die beiden Bot-Scripte im "bots" Ordner wieder gelöscht und nach nem Manager-Restart funzte alles wie gehabt
Kann mir wer jetzt bitte erklären wieso das so ist? Ich kann mir absolut keine eigenen Scripte einfügen  egal was drin steht, D2 bleibt beim Loading-screen stehen, "klickt" sich also nicht durch den Splash-Screen oder versucht überhaupt sich einzuloggen oder irgendwas
|
|
|
05/25/2011, 00:08
|
#2064
|
elite*gold: 0
Join Date: Mar 2009
Posts: 382
Received Thanks: 45
|
war das nur bei den von mir geposteten scripten so, oder is das generell der fall ?
weil n fehler beim copy pasten habe ich eigentlich nicht gemacht und was vergessen habe ich, denke ich, auch net
|
|
|
05/25/2011, 00:08
|
#2065
|
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
|
Quote:
Originally Posted by GruenerApfel
von haus aus net ... gibt aber hier im forum diverse, kann dir aber zumindest die posten welche ich verwende
ntbotleech.ntj
//################################################## #################
//###########################Einstellungen########## #################
//################################################## #################
var leaderAccountName = "";
var leaderName = "";
var gamepassword = "";
var JoinGameAgain = false; // 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 = "";
var firstJoinMessage = "/o igw"; // 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
//################################################## #################
//##############################Delays############## #################
//################################################## #################
var gameMinLength = 0;
// realm delays (minutes)
var unableToConnectRetry = 2;
var realmDownRetry = 2;
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/MWBotGame.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(500);
}
if(chat = controlData.get(controlData.controls.lobby.chat.te xtBox.channelText))
{
var found_leader = false;
lines = chat.GetText();
for (var line_id = lines.length - 1; line_id > -1; line_id--)
{
if (found_leader) // useless... :/
break;
if (lines[line_id].substring(0,1) == " ")
continue;
// retrieving the whole message
var msg = lines[line_id].replace(/^\s+|\s+$/, "");
var msglines = 1;
while (lines[line_id+msglines] != undefined && lines[line_id+msglines].substring(0,2) == " ")
{
msg += " " + lines[line_id+msglines].replace(/^\s+|\s+$/, "");
msglines++;
}
if (msg.lastIndexOf(leaderName) >= 0)
DebugInOOG("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/500)+' 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/500)+' 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.butto n.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.butto n.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.butto n.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.butto n.enterChat);
break;
}
break;
case 2: // Waiting In Line
if(GetTickCount()-lastGameMade > waitInLineTimeout)
controlData.click(controlData.controls.lobby.inLin e.button.cancel);
break;
case 4: // Create Game
if(!controlData.get(controlData.controls.lobby.cre ate.editBox.gameName))
{
controlData.click(controlData.controls.lobby.butto n.join);
Delay (500);
controlData.click(controlData.controls.lobby.butto n.create);
Delay (500);
break;
}
sendEventToOOG(D2NT_MGR_CREATE_GAME, location.name, 0);
locationTimeout(5000, location);
lastGameMade = GetTickCount();
lastGameStatus = 1; // pending creation
break;
case 5: // Join Game
if (game)
{
controlData.setText( controlData.controls.lobby.join.editBox.gameName, game);
Delay (100);
controlData.setText( controlData.controls.lobby.join.editBox.password, gamepassword);
Delay (100);
controlData.click(controlData.controls.lobby.join. button.joinGame);
RunGC(); // run garbage collector between each game
locationTimeout(5000, location);
lastGameStatus = 1; // pending join
}
else
{
DebugInOOG('No game to join : cancelling');
me.Cancel(1);
Delay(1000);
}
break;
case 6: // Ladder
break;
case 7: // Channel List
break;
case 8: // Main Menu
if(controlData.getCurrentRealmIndex() == me.gatewayid)
{
outputGameLength();
controlData.click(controlData.gameTypes[me.playtype]);
}
else
controlData.click(controlData.controls.mainMenu.bu tton.gateway);
break;
case 9: // Login
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
Delay(loginDelay);
controlData.setText(controlData.controls.login.edi tBox.accountName, me.account);
sendEventToOOG(D2NT_MGR_LOGIN, location.name, 0);
locationTimeout(5000, location);
break;
case 10: // Login Error (this is a fatal error, so stop)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 10);
Delay(3500);
break;
case 11: // Unable To Connect
timeoutDelay(unableToConnectRetry*60*1000, location)
controlData.click(controlData.controls.login.unabl eToConnect.button.ok);
break;
case 12: // Character Select
var _time, _control;
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name, 0);
for(_time = 0 ; _time < characterScreenTimeout ; _time += 500)
{
_control = controlData.get(controlData.controls.characterSele ct.textBox.characterInfo[me.charloc]);
if(_control && _control.GetText() != undefined)
break;
Delay(500);
}
if(_time < characterScreenTimeout)
{
Delay(characterSelectDelay);
controlData.click(controlData.controls.characterSe lect.textBox.characters[me.charloc], 0, 0, 1);
controlData.click(controlData.controls.characterSe lect.textBox.characterInfo[me.charloc], 0, 0, 1);
// reset last game made, so it doesnt make a game immediately
inGameAt = 0;
setNextGameMake();
}
else
{
controlData.click(controlData.controls.characterSe lect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
}
break;
case 13: // Realm Down - Character Select screen
controlData.click(controlData.controls.characterSe lect.button.exit);
timeoutDelay(realmDownRetry*60*1000, location);
break;
case 14: // Character Select - Disconnected
timeoutDelay(disconnectedRetry*60*1000, location);
controlData.click(controlData.controls.characterSe lect.disconnected.button.ok);
break;
case 15: // New Character
break;
case 16: // Character Select - Please Wait popup
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.characterSe lect.pleaseWait.button.cancel);
break;
case 17: // Lobby - Lost Connection - just click okay, since we're toast anyway
controlData.click(controlData.controls.lobby.lostC onnection.button.ok);
break;
case 18: // D2 Splash
controlData.click(controlData.controls.d2Splash.te xtBox.copyright);
break;
case 19: // Login - Cdkey In Use
timeoutDelay(cdkeyInUseRetry*60*1000, location);
controlData.click(controlData.controls.login.cdkey InUse.button.ok);
break;
case 20: // Single Player - Select Difficulty
controlData.click(controlData.singlePlayerDifficul ties[me.diff]);
break;
case 21: // Main Menu - Connecting
if(!locationTimeout(connectingToBnetTimeout, location))
controlData.click(controlData.controls.mainMenu.co nnecting.button.cancel);
break;
case 22: // Login - Invalid Cdkey (classic or xpac)
sendEventToOOG(D2NT_MGR_RESTART, location.name, 3600);
Delay(3500);
break;
case 23: // Character Select - Connecting
if(!locationTimeout(characterScreenTimeout, location))
controlData.click(controlData.controls.characterSe lect.button.exit);
break;
case 24: // Server Down - not much to do but wait..
break;
case 25: // Lobby - Please Wait
if(!locationTimeout(pleaseWaitTimeout, location))
controlData.click(controlData.controls.lobby.pleas eWait.button.cancel);
break;
case 26: // Lobby - Game Name Exists
sendEventToOOG(D2NT_MGR_PRINT_LOG, "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.but ton.ok);
break;
case 28: // Lobby - Game Does Not Exist
inGameAt = Random(gameDoesNotExistDelayMin, gameDoesNotExistDelayMax);
lastGameStatus = 0;
setNextGameMake();
locationTimeout(gameDoesNotExistTimeout, location);
break;
default:
DebugInOOG("Unhandled location : "+location.id);
break;
}
DebugInOOG("Location : "+location.id);
}
function sendEventToOOG(locationId, statusString, pendingTime)
{
return SendCopyData("D2NT Manager", null, (locationId<<16)|pendingTime, statusString);
}
function setNextGameMake()
{
lastGameMade = GetTickCount();
nextGameMake = lastGameMade + createGameThreshold + Random(0-createGameThresholdRandom, createGameThresholdRandom) + inGameAt;
inGameAt = 0;
chatActionsDone = false;
}
function outputGameLength()
{
if(inGameAt)
{
duration = GetTickCount() - inGameAt;
inGameAt = (duration < gameMinLength ? gameMinLength - duration : 0);
}
}
function locationTimeout(time, location)
{
endtime = GetTickCount() + time;
while(controlData.getLocation().id == location.id && endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(500);
}
return (controlData.getLocation().id != location.id);
}
function timeoutDelay(time, location)
{
endtime = GetTickCount() + time;
while(endtime > GetTickCount())
{
sendEventToOOG(D2NT_MGR_PRINT_STATUS, location.name + " (" + parseInt((endtime-GetTickCount())/1000) + "s)", 0);
Delay(1000);
}
}
function getRandomString(_length)
{
_retString = "";
_charSet = "0123456789abcdefghijklmnopqrstuvwxyz";
while(_length--)
{
_retString += _charSet.charAt(Random(0, _charSet.length-1));
Delay(1);
}
return _retString;
}
function DebugInOOG(logString)
{
if (Debug)
return SendCopyData("D2NT Manager", null, 9<<16, "-- Debug : " + logString);
else
return false;
}
baalleechfight.ntj
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
if(!NTTM_CheckAct())
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
return;
}
if(me.areaid != 109)
{
if(!NTTM_TownMove("waypoint"))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_TownMove()");
return;
}
if(!NTM_TakeWaypoint(109))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
}
NTTMGR_TownManager();
if(NTConfig_precast)
{
NTM_TakeWaypoint(129)
NTP_DoPrecast(true);
Delay(500)
NTM_TakeWaypoint(109)
}
NTTM_TownMove("portalspot");
for(i = 0; i <= 100; i++)
{
if(NTC_InMyParty(NTConfig_Leader))
break;
Delay(200);
}
while(me.areaid == 109 && NTC_InMyParty(NTConfig_Leader))
{
if(NTConfig_CoLeechTPMsg == "")
NTM_UsePortal("BluePortal", 131, NTConfig_Leader); // 50
Delay(1000);
}
if(NTConfig_precast)
NTM_MakeTP();
else
NTA_ClearPosition(20, true, 2);
NTP_DoPrecast(true);
NTM_MakeTP();
while(NTC_InMyParty(NTConfig_Leader))
{
NT_ClearThroneInt();
while(1)
{
if(me.classid == NTC_CHAR_CLASS_PALADIN || me.classid == NTC_CHAR_CLASS_BARBARIAN)
NTM_MoveTo(me.areaid, 15092, 5028);
else
NTM_MoveTo(me.areaid, 15089, 5010);
if(me.GetState(2))
NTC_PutSkill(109, NTC_HAND_RIGHT);
for(i = 0 ; i < 6 ; i++)
{
_wave = NT_ThroneCheckInt();
if(_wave > 0)
break;
NTC_Delay(500);
}
_starttick = GetTickCount();
while(_wave == 0)
{
if(!NT_ThronePreAttackInt())
NTC_Delay(200);
if(GetTickCount()-_starttick > 15000)
{
NT_ClearThroneInt();
_starttick = GetTickCount();
}
_wave = NT_ThroneCheckInt();
}
switch(_wave)
{
case 1:
NTA_ClearPosition(40, true, 2);
NTP_DoPrecast(true);
break;
case 2:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true);
NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
break;
case 3:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true, 2);
NTSI_PickItems();
NT_CheckHydraInt();
break;
case 4:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true, 2);
break;
case 5:
NTM_MoveTo(me.areaid, me.x, me.y-1);
NTA_ClearPosition(40, true, 2);
break;
default:
NTA_ClearPosition(40, true, 1);
break;
}
if(_wave == 5)
break;
}
if(NTConfig_KillBaal)
{
var _portal;
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
NTM_MoveTo(me.areaid, 15092, 5010);
NTP_DoPrecast(true);
while(NTC_FindUnit(NTC_UNIT_MONSTER, 543))
NTC_Delay(500);
_portal = NTC_FindUnit(NTC_UNIT_OBJECT, 563, 1);
if(!_portal)
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTC_FindUnit()");
return;
}
if(!NTM_UsePortal("Portal", 132, null, _portal))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTM_UsePortal()");
return;
}
NTM_MoveTo(me.areaid, 15138, 5916);
NTA_Initialize()
if(!NTA_KillMonster(544))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTA_KillMonster()");
return;
}
NTSI_PickItems();
}
}
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
}
// Internal function
function NT_ClearThroneInt()
{
var _attackpos = [15112, 5068, 15085, 5065, 15114, 5045, 15114, 5012, 15095, 5024, 15078, 5013, 15092, 5040];
for(var i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(30, true, 2);
}
NTM_MoveTo(me.areaid, 15093, 5041);
NTA_ClearPosition(50, true, 2);
}
function NT_ThroneCheckInt()
{
var _monster;
if(!NTC_FindUnit(NTC_UNIT_MONSTER, 543))
return 5;
_monster = NTC_FindUnit(NTC_UNIT_MONSTER);
if(_monster)
{
do
{
if(NTA_IsValidMonster(_monster))
{
if(_monster.classid == 23 || _monster.classid == 62)
return 1;
if(_monster.classid == 105 || _monster.classid == 381)
return 2;
if(_monster.classid == 557)
return 3;
if(_monster.classid == 558)
return 4;
if(_monster.classid == 571)
return 5;
}
} while(_monster.GetNext());
}
return 0;
}
function NT_ThronePreAttackInt()
{
if(me.classid == NTC_CHAR_CLASS_SORCERESS)
{
if(NTConfig_AttackSkill[3] == 56 || NTConfig_AttackSkill[3] == 59)
return NTC_CastSkill(NTConfig_AttackSkill[3], 0, 15092, 5028);
}
else if(me.classid == NTC_CHAR_CLASS_PALADIN)
{
if(NTConfig_AttackSkill[3] == 112)
{
if(NTConfig_AttackSkill[4] > 0)
NTC_PutSkill(NTConfig_AttackSkill[4], NTC_HAND_RIGHT);
return NTC_CastSkill(NTConfig_AttackSkill[3], 2);
}
}
return false;
}
function NT_CheckHydraInt()
{
var _hydra1, _hydra2, _hydra3;
_hydra1 = NTC_FindUnit(NTC_UNIT_MONSTER, 351);
_hydra2 = NTC_FindUnit(NTC_UNIT_MONSTER, 352);
_hydra3 = NTC_FindUnit(NTC_UNIT_MONSTER, 353);
if((_hydra1 && _hydra1.GetStat(172) != 2 && _hydra1.GetState(105))
|| (_hydra2 && _hydra2.GetStat(172) != 2 && _hydra2.GetState(105))
|| (_hydra3 && _hydra3.GetStat(172) != 2 && _hydra3.GetState(105)))
{
NTM_MoveTo(me.areaid, 15118, 5002);
if(me.GetState(2))
NTC_PutSkill(109, NTC_HAND_RIGHT);
NTC_PingDelay(5000);
}
}
function NT_GameMsgEvents(msg, type)
{
if(type == 0 && msg.indexOf(NTConfig_Leader) != -1 && msg.indexOf(NTConfig_CoLeechTPMsg) != -1 && NTConfig_CoLeechTPMsg != "")
{
while(me.areaid == 109)
{
NTM_UsePortal("BluePortal", 131, NTConfig_Leader);
}
}
}
diabloleechfight.ntj
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
if(!NTTM_CheckAct())
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
return;
}
if(me.areaid != 103)
{
if(!NTTM_TownMove("waypoint"))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_TownMove()");
return;
}
if(!NTM_TakeWaypoint(103))
{
NTC_SendMsgToScript("MWBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
}
NTTMGR_TownManager();
NTTM_TownMove("portalspot");
for(i = 0; i <= 100; i++)
{
if(NTC_InMyParty(NTConfig_Leader))
break;
Delay(200);
}
while(me.areaid == 103 && NTC_InMyParty(NTConfig_Leader))
{
if(NT_GetLeader(NTConfig_Leader).areaid >= 129)
{
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
return;
}
NTM_UsePortal("BluePortal", 108, NTConfig_Leader); // 50
Delay(1000);
}
NTP_DoPrecast(true);
NTA_ClearPosition(10, true);
NTM_MoveTo(me.areaid, 7792, 5291);
NTA_ClearPosition(20, true);
NTM_MoveTo(me.areaid, 7792, 5291);
NTA_ClearPosition(30, true);
if(!NT_OpenSealsInt())
{
NTC_SendMsgToScript("MWBotGame.ntj", "NT_OpenSealsInt()");
return;
}
if(NTConfig_PublicMode)
Say(NTConfig_KillDiaMsg);
NTM_MoveTo(me.areaid, 7792, 5292);
NTP_DoPrecast(true);
NTC_FindUnit(NTC_UNIT_MONSTER, 243, 100);
NTA_KillMonster(243);
NTSI_PickItems();
Say(NTConfig_DiaNxtGame);
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
// Internal function
function NT_OpenSealsInt()
{
var i, _unit;
var _result;
_unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);
if(!_unit)
return false;
_result = false;
for(i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id == 396)
{
if(_unit[i].roomy*5 + _unit[i].y == 5275)
_result = NT_OpenVizierSealInt(1);
else
_result = NT_OpenVizierSealInt(2);
break;
}
}
if(!_result)
return false;
NTA_ClearPosition(30, true, 2);
NTP_DoPrecast(false);
_result = false;
for(i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id == 394)
{
if(_unit[i].roomx*5 + _unit[i].x == 7773)
_result = NT_OpenDeSeisSealInt(1);
else
_result = NT_OpenDeSeisSealInt(2);
break;
}
}
if(!_result)
return false;
NTA_ClearPosition(30, true, 2);
NTP_DoPrecast(true);
_result = false;
for(i = 0 ; i < _unit.length ; i++)
{
if(_unit[i].id == 392)
{
if(_unit[i].roomx*5 + _unit[i].x == 7893)
_result = NT_OpenVenomSealInt(1);
else
_result = NT_OpenVenomSealInt(2);
break;
}
}
return _result;
}
function NT_OpenVizierSealInt(type)
{
var _monstername = GetLocaleString(2851);
var i, n;
var i, n;
var _attackpos = [7740, 5300, 7792, 5291, 7740, 5280, 7720, 5280, 7720, 5300];
for(i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(25, true, 2);
}
NTM_MoveTo(me.areaid, 7735, 5291);
NTA_ClearPosition(40, true, 2);
for(i = 0 ; i < 3 ; i++)
{
if(type == 1)
{
NTM_MoveTo(me.areaid, 7695, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7664, 5314);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7673, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7662, 5276);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7676, 5294);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7678, 5292);
}
else
{
NTM_MoveTo(me.areaid, 7695, 5316);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7664, 5314);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7654, 5281);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7695, 5316);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7676, 5320);
}
for(n = 0 ; n < 10 ; n++)
{
NTC_Delay(200);
if(NTA_KillMonster(_monstername))
{
NTA_ClearPosition(40);
NTSI_PickItems();
return NTM_MoveTo(me.areaid, 7792, 5291);
}
}
}
return false;
}
function NT_OpenDeSeisSealInt(type)
{
var i, n;
var _monstername = GetLocaleString(2852);
var _attackpos = [7780, 5255, 7800, 5255, 7800, 5235, 7780, 5235, 7774, 5214];
var _monstername = GetLocaleString(2852);
for(i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(25, true, 2);
}
NTM_MoveTo(me.areaid, 7790, 5244);
NTA_ClearPosition(40, true, 2);
for(i = 0 ; i < 3 ; i++)
{
if(type == 1)
{
NTM_MoveTo(me.areaid, 7773, 5194);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7813, 5188);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7809, 5155);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7777, 5155);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7768, 5206);
else
NTM_MoveTo(me.areaid, 7774, 5220);
}
else
{
NTM_MoveTo(me.areaid, 7810, 5202);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7774, 5180);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7785, 5153);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7809, 5154);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7773, 5178);
else
NTM_MoveTo(me.areaid, 7788, 5192);
}
for(n = 0 ; n < 10 ; n++)
{
NTC_Delay(200);
if(NTA_KillMonster(_monstername))
{
NTA_ClearPosition(40);
NTSI_PickItems();
NTP_DoPrecast(false);
return NTM_MoveTo(me.areaid, 7792, 5291);
}
}
}
return false;
}
function NT_OpenVenomSealInt(type)
{
var i, n;
var _monstername = GetLocaleString(2853);
var _attackpos = [7835, 5280, 7835, 5300, 7855, 5300, 7855, 5280];
for(i = 0 ; i < _attackpos.length ; i += 2)
{
NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);
NTA_ClearPosition(25, true, 2);
}
NTM_MoveTo(me.areaid, 7843, 5292);
NTA_ClearPosition(40, true, 2);
for(i = 0 ; i < 3 ; i++)
{
if(type == 1)
{
NTM_MoveTo(me.areaid, 7871, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7893, 5307);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7912, 5280);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7931, 5293);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7908, 5293);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7892, 5298);
}
else
{
NTM_MoveTo(me.areaid, 7893, 5274);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7927, 5280);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7930, 5308);
NTA_ClearPosition(25, true, 2);
NTM_MoveTo(me.areaid, 7929, 5294);
NTA_ClearPosition(60, true, 2);
if(me.classid == NTC_CHAR_CLASS_PALADIN)
NTM_MoveTo(me.areaid, 7927, 5275);
}
for(n = 0 ; n < 10 ; n++)
{
NTC_Delay(200);
if(NTA_KillMonster(_monstername))
{
NTSI_PickItems();
NTA_ClearPosition(40, true, 2);
}
if(NTC_PutSkill(124, NTC_HAND_RIGHT))
NTC_PingDelay(1000);
}
return true;
}
return false;
}
function NT_GetLeader(_name)
{
_player = GetPlayerUnit();
if(_player)
{
while(_player.GetNext())
{
if(_player.name == _name)
{ return _player; }
}
}
}
}
und in deiner charconfig musst du dann noch
MWConfig_Script.push(["", 5]); NTConfig_KillBaal = true; NTConfig_precast = false;
NTConfig_Leader = "" // Name vom Leader-Char, Groß- und Kleinschreibung beachten!
NTConfig_CoLeechTPMsg = ""; // Bei dieser Message vom Leader geht der Bot ins TP. Wenn er jederzeit rein gehen soll, leer lassen.
einfügen
ich hoffe ich hab nix vergessen O_o
|
also das klappt so nicht, bekomme immer nen error, hat noch wer ne idee?
vor allem den part check ich nit MWConfig_Script.push(["", 5]); woher weiss der bot welches script er nutzen soll?
edit: ok scheint als wenn im ntbotleech.ntj script irgendwo nen syntax error is -.-
|
|
|
05/25/2011, 00:16
|
#2066
|
elite*gold: 0
Join Date: Mar 2009
Posts: 382
Received Thanks: 45
|
Quote:
Originally Posted by Rondo80
also das klappt so nicht, bekomme immer nen error, hat noch wer ne idee?
vor allem den part check ich nit MWConfig_Script.push(["", 5]); woher weiss der bot welches script er nutzen soll?
|
ja rofl -.- woher weiß ich wie du das script bei dir benannt hast ? O_o
wenn du die datei im bot ordner "baalleechfight.ntj" benannt hast, steht dort logischerweise dann MWConfig_Script.push(["baalleechfight.ntj", 5]);
das erste is der entrypoint ... sollte eigentlich klar sein
|
|
|
05/25/2011, 00:52
|
#2067
|
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
|
ok habs jetzt anders gemacht und nehme jetzt für den leecher ne andere d2nt version, die aus dem public bot für dummies. Kann den syntax error leider nicht finden somit is das die einfachere Wahl
|
|
|
05/25/2011, 09:33
|
#2068
|
elite*gold: 0
Join Date: Mar 2010
Posts: 539
Received Thanks: 418
|
Quote:
Originally Posted by Muddy_Waters
"Passt wohl nicht ganz" ist der falsche Ausdruck, die Eigenschaft hat ganz einfach den Wert undefined. Das wäre an sich nicht problematisch, nur wird eben über diese Eigenschaft noch die Split() Methode der String Klasse aufgerufen und die lässt sich natürlich nur über ein String Objekt aufrufen.
Es sollte an sich schon reichen, wenn man einfach vor der Ausgabe kontrolliert, ob die Eigenschaft name definiert ist. Demnach müsste die Zeile davor, also Zeile 1672 so aussehen:
Code:
if(_cubeItems[0].name && (MWConfig_ShowCubedGemsInCommonLog || _cubeItems[0].itemtype < 91))
LG
Muddy
|
Ach ja, hab vergessen zu erwähnen, dass ich die NTCubing.ntl nicht verändert hatte...
Habs jetzt eingebaut, überprüfen werde ich das nicht, mag keine extra else-Anweisung schreiben... xD
In Zeile 1762 kommt nochmals name.split() vor:
Code:
_NTCU_LogString += NTC_ItemQualityToD2Color[MWC_GetItemColorInt(_items[n])] + _items[n].name.split("\n")[0];
Habs durch folgendes ersetzt:
Code:
_NTCU_LogString += NTC_ItemQualityToD2Color[MWC_GetItemColorInt(_items[n])] + (_items[n].name) ? _items[n].name.split("\n")[0] : "_items[n].name not defined";
Dann steht einfach anstatt des Itemnamens "_items[n].name not defined".
(Ich weiß, ist dirty, aber so sieht man den Fehler, sollte er mal vorkommen...)
Da ich gerade dabei bin, was muss geändert werden, dass die gecrafteten Sachen verkauft werden und nicht gedroppt?
Habe da mal was von einem Bugfix gelesen, aber imho war das nur zur Fehlerbehebung, dass gar keine Items mehr verkauft werden?
|
|
|
05/25/2011, 09:59
|
#2069
|
elite*gold: 0
Join Date: Aug 2009
Posts: 435
Received Thanks: 159
|
Quote:
Originally Posted by GruenerApfel
war das nur bei den von mir geposteten scripten so, oder is das generell der fall ?
weil n fehler beim copy pasten habe ich eigentlich nicht gemacht und was vergessen habe ich, denke ich, auch net
|
Nein, das ist Allgemein so, wenn ich eine neue Datei im "bots"-Ordner anlege, egal mit welchem Namen, und auch egal mit welchem Inhalt
|
|
|
05/25/2011, 10:17
|
#2070
|
elite*gold: 0
Join Date: Aug 2004
Posts: 233
Received Thanks: 39
|
Quote:
In der SnagIt library war müsste noch ein Fehler sein, versuch es deshalb mal mit dieser hier, dann sollte das Problem nicht mehr auftreten:
Code:
/**
* This file was modified by
* Check the programming section for updates and further scripts
* Last Update: 12:56 09.05.2011
*/
var _NTSI_IgnoredList = new Array(
526, // Arrows quiver
528, // Bolts quiver
518, // Tome of Town Portal
519, // Tome of Identify
514, // Antidote potion
513, // Stamina potion
517, // Thawing potion
80, // Rancid Gas Pot
81, // Oil Potion
82, // Choking Gas Pot
83, // Exploding Pot
84, // Strangling Gas
85); // Fulminating Pot
function NTSI_LoadNIPFiles(filepath, checkNips)
{
if(arguments.length < 2)
checkNips = true;
for(var i = 0; i < NTConfig_NIPFilePath.length; i++)
NTIPOpenFile(filepath + "/" + NTConfig_NIPFilePath[i]);
if(MWConfig_RunNipCheck && checkNips)
MWIPCheckNips();
}
function NTSI_PickItems(pickValuables, flag)
{
var i, _mode;
if(pickValuables && !MWConfig_PickUpMoneymakers)
return;
for(i = 0 ; i < 25 ; i++)
{
_mode = me.mode;
if((_mode >= 1 && _mode <= 3) || _mode == 5 || _mode == 6)
break;
NTC_Delay(NTC_DELAY_FRAME);
}
if(i < parseInt(NTConfig_SnagDelay/NTC_DELAY_FRAME))
NTC_PingDelay(NTConfig_SnagDelay-(i*NTC_DELAY_FRAME));
NTSI_SnagIt(pickValuables, flag);
}
function NTSI_SnagIt(pickValuables)
{
var i, j;
var _item;
var _checkeditem, _checkeditems;
var _value;
var _minindex, _mindistance;
if(arguments.length < 1)
pickValuables = false;
_item = NTC_FindUnit(NTC_UNIT_ITEM);
if(!_item)
return;
_checkeditems = new Array();
do
{
if(_item.mode == 3 || _item.mode == 5)
{
if(NTSI_IsIgnoredItemInt(_item.classid))
continue;
if(GetDistance(me, _item) <= NTConfig_SnagRange)
{
_value = NTSI_CheckItem(_item, true);
if(_item.classid == 529 && MWConfig_MinimumTpScrollCount != 0 || _item.classid == 530 && MWConfig_MinimumIdScrollCount != 0 || _item.classid == 543 && MWConfig_CarryKeys)
_value = 1;
if(pickValuables && (_value == 0 || _value == 3) && MWSI_IsValuable(_item))
_value = 4;
if(_value != 0 && _value != 3)
{
_checkeditem = new NTSI_ItemInt(_item, _value);
if(_checkeditem)
_checkeditems.push(_checkeditem);
}
}
}
} while(_item.GetNext());
while(_checkeditems.length > 0)
{
_mindistance = 100000;
for(i = 0; i < _checkeditems.length; i++)
{
if(MWConfig_PickUpPriorityItemsFirst && !_checkeditems[i].HasPriority()) // If the item at index i is a low priority item
{
for(j = 0; j < _checkeditems.length; j++) // Loop through all items in pickup queue
{
if(j == i)
continue;
if(_checkeditems[j].HasPriority())
break;
}
// If the loop was aborted due to a high priority item in the pickup queue, skip the item at index i
if(j < _checkeditems.length)
continue;
}
_value = GetDistance(me.x, me.y, _checkeditems[i].x, _checkeditems[i].y);
if(_value < _mindistance)
{
_minindex = i;
_mindistance = _value;
}
}
_checkeditem = _checkeditems.splice(_minindex, 1)[0];
_item = NTC_FindUnit(NTC_UNIT_ITEM, _checkeditem.GID);
if(_item)
{
if(!NTSI_IsLimitedItemInt(_item))
{
if(MWConfig_ShowOverheadStatus)
MWC_PrintOverheadStatus("Picking up items...");
if(NTT_CheckSpace(_item.xsize, _item.ysize) || _checkeditem.ClassID == 523 || _item.itemtype == 4 || _item.classid == 543 || _item.itemtype == 22 || _item.itemtype >= 76 && _item.itemtype <= 78)
{
MWI_WriteLoc(_item);
if(NTSI_PickUpItemInt(_item))
{
if(_item && _item.name && _item.itemtype != 22 && _checkeditem.ClassID != 523 && _item.itemtype != 4 && _item.classid != 543)
{
if(_item.itemtype < 76 || _item.itemtype > 81)
{
Print("Picked up " + NTC_ItemQualityToD2Color[MWC_GetItemColorInt(_item)] + _item.name.split("\n")[0] + ((_checkeditem.Status == 4) ? " ÿc8[" + MWC_InsertDigitSeperator(_item.GetItemCost(1)) + "]" : ""));
NTC_SendMsgToScript("MWBotGame.ntj", "SET_PICKED_1");
if(!pickValuables)
{
if(MWSI_IsCommonLogItem(_item))
NTC_SendMsgToScript("MWBotGame.ntj", "SET_COMMONITEM_" + _item.classid);
if(_item.quality < 4 && _checkeditem.Status < 2)
{
if(MWConfig_UseXMLItemlog)
MWI_WriteLog(_item, 0);
if(_item.classid <= 609 || _item.classid >= ((MWConfig_LowestRuneToLog < 0 || MWConfig_LowestRuneToLog > 32) ? 0 : MWConfig_LowestRuneToLog) + 610)
MWI_WriteManagerLog(_item, 0);
}
}
}
else if(MWConfig_ShowPotionPickups)
Print("Picked up " + _item.name.split("\n")[0]);
}
}
}
else
{
if(!_checkeditem.Retry && !pickValuables)
{
_checkeditem.Retry = true;
if(MWConfig_IdentAfterPickup)
MWL_IDItemsAfterPickup(true);
if(!NTT_CheckSpace(_checkeditem.xSize, _checkeditem.ySize))
{
if(!NTTMGR_VisitTown())
return;
}
_checkeditems.push(_checkeditem);
}
}
}
}
}
if(MWConfig_IdentAfterPickup)
MWL_IDItemsAfterPickup();
}
function NTSI_CheckItem(item, checkQuantity)
{
var _result;
if(arguments.length < 2)
checkQuantity = false;
switch(item.quality)
{
case 5:
case 8:
_result = NTIPCheckItem(item, checkQuantity);
break;
default:
_result = NTIPCheckItem(item, checkQuantity);
if(NTCU_CheckItem(item, _result))
_result = 2;
break;
}
if(item.itemflag&0x4000000)
_result = 1;
return _result;
}
// Internal function
function NTSI_ItemInt(item, checkedstatus)
{
this.ClassID = item.classid;
this.GID = item.gid;
this.ItemType = item.itemtype;
this.x = item.x;
this.y = item.y;
this.xSize = item.xsize;
this.ySize = item.ysize;
this.Status = checkedstatus;
this.Retry = false;
this.HasPriority = function()
{
if(this.ItemType >= 91 && this.ItemType <= 102 // Gem
|| this.ItemType >= 76 && this.ItemType <= 81 // Potions
|| this.ClassID == 543 || this.ItemType == 4 // Gold
|| this.ClassID >= 610 && this.ClassID <= 629 // Runes <= FAL
|| this.ClassID == 529 || this.ClassID == 530 // Scrolls
|| this.ClassID == 543) // Keys
return false;
return true;
}
}
function NTSI_PickUpItemInt(snagitem)
{
var _classid;
var _tome, _scrollPreCount;
var _keys, _gold;
_classid = snagitem.classid;
// Save properties that will be invalidated at pickup
_gold = snagitem.GetStat(14);
_keys = snagitem.GetStat(70);
// The successful pickup of a scroll is determined by the change of quantity
if(_classid == 529 || _classid == 530)
{
_tome = NTT_GetTome(Math.abs(snagitem.classid - 530));
if(!_tome)
return false;
_scrollPreCount = _tome.GetStat(70); // Save the quantity before pickup
}
for(var i = 0; i < 40; i++)
{
if((i % 10) == 0 && (snagitem.mode == 3 || snagitem.mode == 5))
{
if(MWConfig_UseTelekinesis && i < 20 && (_classid == 523 || snagitem.itemtype == 4 || _classid == 543 || _classid == 529 || _classid == 530 || snagitem.itemtype >= 76 && snagitem.itemtype <= 81) && NTC_GetSkillLevel(MWS_TELEKINESIS) > 0)
MWC_CastTelekinesis(snagitem);
else
{
if(GetDistance(me, snagitem) > 3)
NTM_MoveTo(snagitem.areaid, snagitem.x, snagitem.y, 3, false, 0, false);
if(NTC_ClearCursor())
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, snagitem);
}
}
NTC_Delay(NTC_DELAY_FRAME);
if(_classid == 529 || _classid == 530) // Scrolls
{
_tome = NTT_GetTome(Math.abs(_classid - 530));
if(_tome && _tome.GetStat(70) != _scrollPreCount) // The scroll was picked up successfully if the quantity after pickup differs from the one before
return true;
}
else if(_classid == 543) // Keys
{
if(snagitem.GetStat(70) == -1) // The quantity property turns to -1 after the key was picked
{
if(_keys > 1)
Print("Picked up " + _keys + " Keys");
else
Print("Picked up Key");
return true;
}
}
else if(_classid == 523 || snagitem.itemtype == 4) // Gold
{
if(snagitem.GetStat(14) == -1) // The gold property turns to -1 after the gold was picked
{
if(MWConfig_ShowGoldPickupsPerScript)
NTC_SendMsgToScript("MWBotGame.ntj", "SET_SCRIPTGOLD_" + _gold);
if(MWConfig_ShowGoldPickups)
Print("Picked up " + MWC_InsertDigitSeperator(_gold) + " Gold");
return true;
}
if(i % 10 == 0 && NTC_CharGoldFull())
{
NTC_SendMsgToScript("MWBotGame.ntj", "STOP_STATUS_TEXT_UPDATE");
SetStatusText("ÿc8Visiting Town...");
NTTMGR_VisitTown();
SetStatusText("ÿc8Done!");
NTC_SendMsgToScript("MWBotGame.ntj", "SET_DEFAULT_STATUS");
}
return true;
}
else if(snagitem.mode != 3 && snagitem.mode != 5)
return true;
}
return false;
}
function NTSI_IsIgnoredItemInt(classid)
{
for(var i = 0 ; i < _NTSI_IgnoredList.length ; i++)
{
if(classid == _NTSI_IgnoredList[i])
return true;
}
return false;
}
function NTSI_IsLimitedItemInt(item)
{
var i;
var _items, _tome, _keys;
if(item.itemtype >= 76 && item.itemtype <= 78)
{
if(!MWT_IsPotionRequired(item.code))
return true;
}
else if(item.quality == 7 && item.classid >= 603 && item.classid <= 605)
{
_items = me.GetItems(item.classid);
if(_items.length > 0)
return true;
}
else if(item.classid == 529 || item.classid == 530) // Scrolls
{
_tome = NTT_GetTome(Math.abs(item.classid - 530));
if(!_tome || _tome.GetStat(70) == 20 || item.classid == 529 && _tome.GetStat(70) >= MWConfig_MinimumTpScrollCount || item.classid == 530 && _tome.GetStat(70) >= MWConfig_MinimumIdScrollCount)
return true;
}
else if(item.classid == 543) // Keys
{
_keys = MWTMGR_GetKeyQuantity();
if(_keys >= 12 || _keys + item.GetStat(70) > 12)
return true;
}
else if(item.classid == NTC_UNIT_CUBE)
{
_items = me.GetItems(NTC_UNIT_CUBE);
if(_items.length > 0)
return true;
}
else if(NTSI_CheckItem(item, true) == 3)
return true;
return false;
}
function MWSI_PickupItem(search)
{
var _item;
if(arguments.length < 1)
return false;
_item = NTC_FindUnit(NTC_UNIT_ITEM);
if(_item)
{
do
{
if(_item.classid == search || _item.gid == search || _item.name == search || _item.itemprefix == search || _item.itemsuffix == search)
{
if(NTT_CheckSpace(_item.xsize, _item.ysize) && NTSI_PickUpItemInt(_item))
{
MWI_WriteLoc(_item);
Print("Picked up " + NTC_ItemQualityToD2Color[MWC_GetItemColorInt(_item)] + _item.name.split("\n")[0]);
if(MWSI_IsCommonLogItem(_item))
NTC_SendMsgToScript("MWBotGame.ntj", "SET_COMMONITEM_" + _item.classid);
if(GetUIState(0x01) && me.itemoncursor)
{
NTCU_CheckCubeInventoryInt();
NTCU_MoveItemToInventoryInt(_item);
}
return true;
}
}
} while(_item.GetNext());
}
return false;
}
function MWSI_IsCommonLogItem(item)
{
if(item.classid >= 610 && item.classid <= 642) // Rune
return true;
if(item.classid >= 647 && item.classid <= 657) // Key/Organ/Essence
return true;
if(item.itemtype >= 91 && item.itemtype <= 102) // Gem
return true;
return false;
}
function MWSI_IsValuable(item)
{
if(item.quality >= 2)
{
if(item.itemtype == 12 || item.itemtype == 24 || item.itemtype == 25 && item.quality > 3 || item.itemtype == 74 && item.classid >= 622) // Amulets/Scepters/Wands/Runes >= SHAEL
return true;
if(item.itemclass >= 1)
{
switch(item.itemtype)
{
case 19: // Belts
case 32: // Knives
case 37: // Helms
case 42: // Throwing Knives
case 67: // Claws
if(item.quality < 4)
break;
case 3: // Armors
case 65: // Circlets
case 68: // Orbs
return true;
}
}
if(item.itemclass >= 2)
{
switch(item.itemtype)
{
case 2: // Shields
case 32: // Knives
case 37: // Helms
case 69: // Voodooheads
case 72: // Pelts
return true;
case 15: // Boots
case 16: // Gloves
case 42: // Throwing Knives
case 67: // Claws
if(item.quality > 3)
return true;
}
}
switch(item.classid)
{
case 196: // Tomahawk
case 210: // Truncheon
case 214: // Tyrant Club
case 215: // Reinforced Mace
case 216: // Devil Star
case 221: // Falcata
case 222: // Ataghan
case 223: // Elegant Blade
case 224: // Hydra Edge
case 226: // Conquest Sword
case 227: // Cryptic Sword
case 228: // Mythical Sword
case 240: // Flying Axe
case 259: // Walking Stick
case 324: // Gothic Plate
case 325: // Full Plate Mail
case 326: // Ancient Armor
case 498: // Sacred Target
case 499: // Sacred Rondache
case 502: // Vortex Shield
return true;
}
}
if(MWT_IsSellable(item) && item.GetItemCost(1) >= 25E3)
return true;
return false;
}
|
Ich habe die Snagit ersetzt und dann kam ein fehler:
Zeile 88 in der NTBotGame.ntl
|
|
|
 |
|
Similar Threads
|
[Release] D2NT 3.1 1.13c
07/17/2016 - Diablo 2 - 91 Replies
hi,
hab eben den d2nt3.1 gefunden. ein neues baba script is dabei.
release thread eon
D2NT3.1
|
[Realease] Muddy's Waypoint Catcher
08/21/2013 - Diablo 2 Programming - 46 Replies
Moin zusammen,
hier mal die erste Release Version eines kleinen Scripts genannt Waypoint Catcher. Das ganze ist jetzt nichtmal 24h alt, dementsprechend sind vermutlich noch einige Bugs vorhanden. Hinweise dazu nehme ich gerne entgegen. ;)
Features:
- Suchen sämtlicher Wegpunkte mit Ausnahme, wobei in Akt ein durch Probleme im Jail Bereich nach dem Wegpunkt Outer Cloister abgebrochen wird
- Wahlweise auch mit TP an jedem gefundenen Wp, sodass man damit auch anderen (nicht-Bots) die...
|
[D2NT] Long Dia Release
05/10/2011 - Diablo 2 Programming - 28 Replies
Ein kleines Script für diablo, es startet beim eingang macht ein tp cleart den weg zum star macht am star noch ein tp dann läufts wie das normale nur cleart es schöner :)
hoffe euch gefällts ich habs noch nicht wirklich getestet (2-3 runs) bugs können gerne hier gepostet werden verbesserungs vorschläge auch :D
installation:
1.)Script in den Bot ordner kopieren
2.)Script im editor oder vergleichbaren öffnen
3.) Msg´s anpassen (ist nicht schwer)
4.) in der char config die zeile...
|
D2NT 3.0 Pickit release
10/22/2010 - Diablo 2 - 77 Replies
edit
|
Muddy's D2NT Help
07/29/2010 - Diablo 2 - 3 Replies
hi i just started to use the bot it work's great.
how do i set up the skill's i use on my Sorc and pick up itme's?
.....
if you reply to this post please use english
|
All times are GMT +1. The time now is 05:47.
|
|