var NTConfig_Teleport;
function NT_LoadConfig()
{
//###################################################################
//#########################BotType festlegen#########################
//###################################################################
NTConfig_BotType = 2;
// 1 = Leader
// 2 = Co-Leecher
// 3 = Leecher
//####################################################################
//###########################Leader Scripts###########################
//####################################################################
if(NTConfig_BotType <= 1)
{
//##########################Eldritch+Shenk##########################
//NTConfig_Script.push("NTEldritch.ntj"); NTConfig_FarmRVPots = 4; // Wenn dem Char mehr als x rv pots fehlen, farmt er Eld+Shenk. Wenn er mehr hat, dann nicht. Wenn er immer farmen soll, dann auf 0 setzen.
//##############################Diablo##############################
//NTConfig_Script.push("NTDiablo.ntj"); NTConfig_DiabloLeechers = false; // DiabloLeechers auf true setzen, wenn ihr Leecher mit dem NTDiabloLeech Script dabei habt
NTConfig_StarTPMsg = "TP up - Please let me open the seals and stay one screen behind me, if you are leecher."; // welche Nachricht soll gesagt werden wenn das TP am Stern gemacht wird. nichts zwischen "" eintragen wenn nichts gesagt werden soll
NTConfig_KillDiaMsg = "Killing Diablo, Leechers go hide behind the corners.";// welche Nachricht soll gesagt werden wenn alle Siegel offen sind. nichts zwischen "" eintragen wenn nichts gesagt werden soll
NTConfig_DiaNxtGame = ""; // Wenn nach Dia schluss ist, dann hier Next Game Message eintragen
//###############################Baal###############################
//NTConfig_Script.push("NTBaal.ntj"); NTConfig_KillBaal = true;
NTConfig_UnsafeTP = true; // Soll ein unsafe tp geöffnet werden beim baalrun?
NTConfig_UNSAFETPSpoke = "Fighters may come now"; // welche Nachricht soll geschrieben werden wenn das unsafe tp geöffnet wird. nichts zwischen "" eintragen wenn nichts gesagt werden soll
NTConfig_SafeTP = "Leechers may come now"; // welche Nachricht soll gesagt werden wenn das safe tp gemacht wird. nichts zwischen "" eintragen wenn nichts gesagt werden soll
NTConfig_KILL = "Time to kill Baal"; // welche Nachricht soll ankündigen das baal gemacht werden soll. nichts zwischen "" eintragen wenn nichts gesagt werden soll
NTConfig_NxtGame = "Next Game. Join 'OP Mychannel' to follow my runs"; // welche Nachricht soll am ende des runs geschrieben werden. nichts zwischen "" eintragen wenn nichts gesagt werden soll
//###############################Rest###############################
NTConfig_NIPFilePath.push("leader.nip"); // Leader hat seine eigene Pickit
NTConfig_Eintritt = false; // Soll der Bot eine Nachricht schreiben, wenn jemand das Spiel betritt, dann auf true stellen
NTConfig_Willkommen = "Welcome to my runs."; // Angezeigte Nachricht, wenn NTConfig_Eintritt = true ist
}
//####################################################################
//#########################LeechFight Scripts#########################
//####################################################################
if(NTConfig_BotType == 2)
{
NTConfig_Leader = "ManiSorc" // Name vom Leader-Char, Groß- und Kleinschreibung beachten!
//##############################Diablo##############################
//NTConfig_Script.push("NTDiabloLeechFight.ntj");
//###############################Baal###############################
NTConfig_Script.push("NTBaalLeechFight.ntj"); NTConfig_KillBaal = true;
NTConfig_CoLeechTPMsg = "TP hot! Fighters may come now"; // Bei dieser Message vom Leader geht der Bot ins TP. Wenn er jederzeit rein gehen soll, leer lassen.
//###############################Rest###############################
NTConfig_NIPFilePath.push("leecher.nip"); // Leader hat seine eigene Pickit
NTConfig_Leech = true; // Wenn der LeechFighter keine Enigma hat, aber trotzdem mitkämpfen soll, dann auf true stellen.
NTConfig_JoinOnly = true; // Leecher joined nur Partys, macht aber selber keine auf
}
//####################################################################
//###########################Leecher Scripts##########################
//####################################################################
if(NTConfig_BotType >= 3)
{
NTConfig_Leader = "Leader Char Name" // Name vom Leader-Char, Groß- und Kleinschreibung beachten!
//##############################Diablo##############################
//NTConfig_Script.push("NTDiabloLeech.ntj"); // NTConfig_DiabloLeechers MUSS beim leader auf true sein
//###############################Baal###############################
//NTConfig_Script.push("NTBaalLeech.ntj");
//NTConfig_LeechTPMsg = "TP safe"; // Bei dieser Message vom Leader geht der Bot ins TP. Wenn er jederzeit rein gehen soll, leer lassen.
//###############################Rest###############################
//NTConfig_Leech = true; // Wenn der Leecher Enigma hat, dann auf false stellen
//NTConfig_JoinOnly = true; // Leecher joined nur Partys, macht aber selber keine auf
}
//####################################################################
//#########################Char Einstellungen#########################
//####################################################################
// Diese Zahlen Spiegeln euer Inventar wieder. 0 = Von euch belegter Platz, den der Bot nicht anrührt. 1 = Hiermit darf der Bot arbeiten.
NTConfig_Columns[0] = [0,0,0,0,0,0,0,1,1,1];
NTConfig_Columns[1] = [0,0,0,0,0,0,0,1,1,1];
NTConfig_Columns[2] = [0,0,0,0,0,0,1,1,1,1];
NTConfig_Columns[3] = [0,0,0,0,0,0,1,1,1,1];
NTConfig_LifeThresh = 67; // Bei weniger als XX Prozent Leben wird ein Heiltrank getrunken.
NTConfig_LifeRejuvThresh = 37; // Bei weniger als XX Prozent Leben wird ein Regenerationstrank getrunken.
NTConfig_ManaThresh = 30; // Bei weniger als XX Prozent Mana wird ein Manatrank getrunken.
NTConfig_ManaRejuvThresh = 0; // Bei weniger als XX Prozent Mana wird ein Regenerationstrank getrunken.
NTConfig_LifeChicken = 27; // Bei weniger als XX Prozent Leben verlässt der Bot das Spiel um nicht zu sterben.
NTConfig_ManaChicken = 0; // Bei weniger als XX Prozent Mana verlässt der Bot das Spiel.
NTConfig_MercLifeThresh = 80; // Hat der Merc weniger als XX Prozent Leben, bekommt er einen Heiltrank.
NTConfig_MercRejuvThresh = 30; // Hat der Merc weniger als XX Prozent Leben, bekommt er einen Regenerationstrank.
NTConfig_MercChicken = 0; // Hat der Merc weniger als XX Prozent Leben, verlässt der Bot das Spiel.
//----------------------------------------------------------------------------------------------
// Hier stellt ihr ein, welche Tränke in den Gürtel sollen.
// hp = Heiltrank, mp = Manatrank, rv = Regenerationstrank
// Gleiche Arten von Tränken müssen immer direkt nebeneinander liegen. Sollen HP-, MP-, und Reg-
// Tränke zusammen in den Gürtel, so MÜSSEN die Reg-Tränke immer an das Ende.
//----------------------------------------------------------------------------------------------
NTConfig_BeltColType[0] = "hp";
NTConfig_BeltColType[1] = "hp";
NTConfig_BeltColType[2] = "hp";
NTConfig_BeltColType[3] = "mp";
//------------------------------------------------------------------------------
// Angriffs - Einstellungen (Skill-ID's stehen im libs-Ordner in der Skills.txt)
//------------------------------------------------------------------------------
NTConfig_AttackSkill[0] = 0; // Dieser Skill wird nur einmal zu Beginn gecastet. 0 = Keiner
NTConfig_AttackSkill[1] = 151; // Primärer Angriff gegen Bosse
NTConfig_AttackSkill[2] = ; // Sekundärer Angriff gegen Bosse
NTConfig_AttackSkill[3] = 151; // Primärer Angriff gegen normale Monster
NTConfig_AttackSkill[4] = 0; // Sekundärer Angriff gegen normale Monster
NTConfig_AttackSkill[5] = 152; // Primärer Angriff gegen immune Monster
NTConfig_AttackSkill[6] = 0; // Sekundärer Angriff gegen immune Monster
NTConfig_ClearPosition = false; // true = Bot tötet auch Monster in der Umgebung eines Bosses
NTConfig_SkipHealLife = 90; // Habt ihr mehr als XX Prozent Leben, besucht der Bot keinen Arzt
NTConfig_SkipHealMana = 70; // Habt ihr mehr als XX Prozent Mana, besucht der Bot keinen Arzt
//####################################################################
//##############################Optionen##############################
//####################################################################
NTConfig_Boswap = true; // true = Barb wechselt für BO auf den 2. Waffenslot
if(NTConfig_BotType < 3)
NTConfig_UseMerc = true;
else
NTConfig_UseMerc = false;
NTConfig_PublicMode = true;
me.quitonhostile = true; // Es gibt zwar ein Anti Hostile Script, das sich gegen Bothunter wehrt, aber ich würde es nicht drauf anlegen, da es gegen die meissten Bothunter chancenlos ist
NTConfig_Teleport = false; // Wenn der Bot zum Telen die Waffe wechseln soll, das hier auf true setzen
me.maxgametime = 600; // Maximale Spielzeit in Sekunden (0 = Unendlich)
NTConfig_FastPick = true; // true = schnelleres item einsammeln // ihr müsst hier in der charconfig noch NTConfig_SnagDelay anpassen // achtung kann das spiel instabil machen
NTConfig_SnagDelay = 0; // Verzögerung beim Aufheben von Gegenständen in Millisekunden
NTConfig_SnagRange = 80; // Radius in dem nach gedroppten Items gescannt wird. Ein Wert von 40-50 ist hier in Ordnung.
NTConfig_LogSoldItems = [0]; // Verkaufte items im log anzeigen 4= magic, 5 = set, 6 = rare, 7 = unique, 8 = craft, 0 = nicht anzeigen
NTConfig_LogPickItems = [0]; // Aufgesammelte items im log anzeigen 4= magic, 5 = set, 6 = rare, 7 = unique, 8 = craft, 0 = nicht anzeigen
// Wenn ihr alle aufgehobenen/verkauften Items anzeigen wollt, muss das in der Klammer stehen: [4,5,6,7,8]
NTConfig_CheckCloneDiablo = false; // Wenn das auf true ist, bleibt der Bot bei Dia walk im Spiel, was wir beim public botten nicht wollen
NTConfig_OpenChest = false; // true = Superchests werden geöffnet
NTConfig_OpenAllNearbyChests = false; // sollen ALLE nicht spezial chest ebenfals geöffnet werden = true
NTConfig_Gamble = false; // Wenn dann würde ich das nur auf Leechern anmachen
NTConfig_GambleStartGold = 2000000; // Bei der Goldanzahl beginnt der Bot zu gambeln.
NTConfig_GambleStopGold = 300000; // Bei der Goldanzahl hört der Bot auf zu gambeln.
NTConfig_GambleItem.push(520); // Amulette
NTConfig_GambleItem.push(522); // Ringe
NTConfig_GambleItem.push(418); // Reife
NTConfig_GambleItem.push(419); // Krönchen
NTConfig_GambleItem.push(331); // Schild (jmod)
NTConfig_GambleItem.push(377); // Schild (jmod)
// 0x01 : Tränke, 0x02 : Gift, 0x04 : Verstärkter Schaden (Fluch), 0x08 : Schwächen (Fluch), 0x10 : Eiserne Jungfrau (Fluch), 0x20 : Altern (Fluch), 0x40 : Wiederstandsschwund (Fluch)
NTConfig_CheckSelfSafe = 0;
// 0x01 : Tod, 0x02 : Gift, 0x04 : Verstärkter Schaden (Fluch), 0x08 : Schwächen (Fluch), 0x10 : Eiserne Jungfrau (Fluch), 0x20 : Altern (Fluch), 0x40 : Wiederstandsschwund (Fluch)
NTConfig_CheckMercSafe = 0x01;
MyConfig_StoreItem = [0, 0]; // für das sortieren der stash zuständig
NTConfig_UseXMLItemlog = false; // XMLlog
MyConfig_MiniShopBot = true; // scant merchants automatisch nach items in der pickit
MyConfig_CatchExperienceShrine = false; // Bot nimmt XP Schrein aufm Weg mit. Nicht beim Leader anmachen, das hält ihn nur unnötig auf.
MyConfig_CatchGemShrine = false; // Bot holt Gem Schrein
MyConfig_CatchSkillShrine = false; // Bot holt Skill Schrein
MyConfig_CatchArmorShrine = false; // Bot holt Armor Schrein
MyConfig_CatchResistShrine = false; // Bot holt Resi Schreine
NTConfig_StartDelay = 0; // Verzögerung beim Start in Millisekunden
NTConfig_AreaDelay = 500; // Verzögerung bei Gebietswechsel in Millisekunden
NTConfig_Cubing = false; // Beim public botten wollen wir XP und nicht ewig rumcuben.
NTConfig_UseCainToID = false; // soviele Items nehmen wir nicht mit, die können wir auch per Hand identen
NTConfig_CheckSojSales = false; NTConfig_CheckSojSalesItem = false; // Wenn das auf true ist, idlet der Bot in der Stadt rum um weitere SoJ sales abzuwarten -> NoGo für public bot
NTConfig_WorldEventAccount = ""; // schreibt dem acc alle 10 min eine nachricht bei soj verkäufen oder worldevent ("" leer lassen fals nicht benötigt)
NTConfig_WorldEventWaitTime = 1; // Wie lange soll der char bei einem worldevent warten in sekunden (0 = Unendlich)
NTConfig_FreeSpace = 7; // Sind weniger als X Spalten frei, werden die Items gestasht.
NTConfig_MinGoldToStash = 120000; // Maximales Gold, was der Bot mit sich rumträgt, bevor er es in die Truhe zahlt.
NTConfig_ResetWeapon = false; // wird nicht mehr gebraucht
}
var _TotalExp = [0, 0, 500, 1500, 3750, 7875, 14175, 22680, 32886, 44396, 57715, 72144, 90180, 112725, 140906, 176132, 220165, 275207, 344008, 430010, 537513, 671891, 839864, 1049830, 1312287, 1640359, 2050449, 2563061, 3203826, 3902260, 4663553, 5493363, 6397855, 7383752, 8458379, 9629723, 10906488, 12298162, 13815086, 15468534, 17270791, 19235252, 21376515, 23710491, 26254525, 29027522, 32050088, 35344686, 38935798, 42850109, 47116709, 51767302, 56836449, 62361819, 68384473, 74949165, 82104680, 89904191, 98405658, 107672256, 117772849, 128782495, 140783010, 153863570, 168121381, 183662396, 200602101, 219066380, 239192444, 261129853, 285041630, 311105466, 339515048, 370481492, 404234916, 441026148, 481128591, 524840254, 572485967, 624419793, 681027665, 742730244, 809986056, 883294891, 963201521, 1050299747, 1145236814, 1248718217, 1361512946, 1484459201, 1618470619, 1764543065, 1923762030, 2097310703, 2286478756, 2492671933, 2717422497, 2962400612, 3229426756, 3520485254, 0];
var _ExpToNextLvl = [0, 500, 1000, 2250, 4125, 6300, 8505, 10206, 11510, 13319, 14429, 18036, 22545, 28181, 35226, 44033, 55042, 68801, 86002, 107503, 134378, 167973, 209966, 262457, 328072, 410090, 512612, 640765, 698434, 761293, 829810, 904492, 985897, 1074627, 1171344, 1276765, 1391674, 1516924, 1653448, 1802257, 1964461, 2141263, 2333976, 2544034, 2772997, 3022566, 3294598, 3591112, 3914311, 4266600, 4650593, 5069147, 5525370, 6022654, 6564692, 7155515, 7799511, 8501467, 9266598, 10100593, 11009646, 12000515, 13080560, 14257811, 15541015, 16939705, 18464279, 20126064, 21937409, 23911777, 26063836, 28409582, 30966444, 33753424, 36791232, 40102443, 43711663, 47645713, 51933826, 56607872, 61702579, 67255812, 73308835, 79906630, 87098226, 94937067, 103481403, 112794729, 122946255, 134011418, 146072446, 159218965, 173548673, 189168053, 206193177, 224750564, 244978115, 267026144, 291058498, 0];
var _startLvl;
var _startExp;
var _startTime;
var CurScriptIndex = 0;
var LastScript = false;
var CurScriptIndex = 0;
var LastScript = false;
// World Event/Soj Sale
var MessageCount = 0;
var SojSoldString = "";
var SojCount = 0;
var InitialSojCount = 0;
var InitialTime;
var RunScript = false;
var LoopRunning = false;
var LoopRuntime = 0;
var LoopMode = -1;
var CloneDiabloString = "";
var CloneDiabloNotify = false;
// Statistics... :)
var GameStartTick;
var GameStartExp;
var TotalGold = 0;
var Errors = 0;
var GameStartCharLevel;
var GoldPerScript = 0;
var PreGold;
var OutputString;
var RvUsed = 0;
var MpUsed = 0;
var HpUsed = 0;
var LootedMonstersCount = 0;
var PickedItemsCount = 0;
var myCounter = 0;
Include("libs/common/NTExp.ntl");
NTE_InitializeStats();
function NTMain()
{
GameStartTick = GetTickCount();
SetStatusText("ÿc8Initializing...");
Delay(1000);
//Print("ÿc4[+] NTBot 4.2 [+]");
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
if(NTConfig_StartDelay > 0);
NTC_Delay(NTConfig_StartDelay);
SetUIState(0x0A, true);
NTT_GetCorpses();
GameStartExp = me.GetStat(13);
GameStartCharLevel = NT_GetRequiredExp(me.GetStat(12));
PreGold = NTC_MyGold();
if(NTConfig_Script.length > 0)
{
NTCU_InitCubing();
NTT_ClearInventory();
NTT_ClearBelt();
if(NTConfig_JoinOnly){
Load("NTBot/tools/NTTInvite.ntj");
}
else
{
Load("NTBot/tools/NTToolsThread.ntj");
}
Load("NTBot/NTHostile.ntj");
if(NTConfig_CheckSojSales)
{
SojSoldString = GetLocaleString(11004).replace("%d ", "");
}
if(NTConfig_CheckCloneDiablo)
{
CloneDiabloString = GetLocaleString(11005);
RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
}
RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents);
RegisterEvent(EVENT_KEYDOWN, NT_KeyEvents);
RegisterEvent(EVENT_SCRIPTMSG, NT_ScriptMsgEvents);
if(NTConfig_Eintritt)
{
RegisterEvent(EVENT_GAMEMSG, talk);
}
Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
SetStatusText("Running " + NTConfig_Script[CurScriptIndex]);
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
NTC_LogLocation(NTConfig_Script[CurScriptIndex]);
while(!LastScript || CloneDiabloNotify)
{
NTC_Delay(500);
}
}
var _endLvl = me.GetStat(12);
var _lvlsGained = _endLvl - _startLvl;
var _endExp = (2147483648 + me.GetStat(13));
var _endLvlExp = _TotalExp[_endLvl];
var _expGained = _endExp - _startExp;
var _endTime = GetTickCount();
var _progressPercent = parseInt(1000 * (_endExp - _endLvlExp) / _ExpToNextLvl[_endLvl]) / 10;
var _runsToLevel = (100 -_progressPercent) * _ExpToNextLvl[_endLvl] / (100 * _expGained);
if(_runsToLevel > 10)
_runsToLevel = parseInt(_runsToLevel);
else
_runsToLevel = parseInt(100 * _runsToLevel) / 100;
SetStatusText("ÿc1Exiting game...");
OutputString = "ÿ48A209Game" + ((me.gamename.slice(me.gamename.lastIndexOf('-')+1))? " ("+ me.gamename.slice(me.gamename.lastIndexOf('-')+1) + ") " : " ") + "was finished successfully!;";
OutputString += (GameStartCharLevel != NT_GetRequiredExp(me.GetStat(12)) && NT_GetRequiredExp(me.GetStat(12)) != -1)? "ÿc2!!! Level up (" + me.GetStat(12) + ") !!!\n" : "";
OutputString += "ÿc0Game Duration:ÿc8 " + ((parseInt((GetTickCount()-GameStartTick)/36E5) >= 1) ? parseInt((GetTickCount()-GameStartTick)/36E5) + "h " : "") + (parseInt((GetTickCount()-GameStartTick)/6E4)) + "m " + (parseInt((GetTickCount()-GameStartTick)/1000)%60) + "s";
OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Absolute Experience Gain:ÿc8 " + (me.GetStat(13)-GameStartExp) : "");
OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Relative Experience Gain:ÿc8 " + ((NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)) != 0)?((me.GetStat(13)-GameStartExp)/(NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)))*100).toFixed(4) + "%" : "Invalid") : "");
OutputString += ((RvUsed || MpUsed || HpUsed)?"\nÿc0Potions Used:ÿc1 [" + HpUsed + "]ÿc3 [" + MpUsed + "]ÿ7E0064 [" + RvUsed + "]":"");
OutputString += ((NTC_MyGold()-PreGold > 0)?"\nÿc0Total Gold Gathered:ÿc8 " + ((NTC_MyGold()-PreGold <= 1E5)?((NTC_MyGold()-PreGold)/1E3).toFixed(1) + "k":((NTC_MyGold()-PreGold)/1E6).toFixed(2) + "mio") : "");
OutputString += (PickedItemsCount)?"\nÿc0Items Picked:ÿc8 " + PickedItemsCount : "";
OutputString += (LootedMonstersCount)?"\nÿc0Corpses Looted:ÿc8 " + LootedMonstersCount : "";
OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12))) ? "\nÿc0Est. Runs Until Next Level:ÿc8 " + _runsToLevel : "");
OutputString += "\nÿc0Current Level Progress:ÿc8 " + _progressPercent + "% ";
OutputString += (Errors)?"\nÿc1Error Occurrence: " + Errors : "";
NTC_SendLogToOOG(NTC_LOG_COMMON, OutputString);
NTC_Delay(500);
ExitGame();
}
function NT_GameMsgEvents(msg, type)
{
if(type == 4)
{
if(msg.indexOf(NTConfig_Leader) != -1 && msg.indexOf("left our world") != -1)
{
NTC_Delay(1000);
LastScript = true;
}
if(NTConfig_CheckSojSales)
{
if(SojSoldString.length > 1 && msg.indexOf(SojSoldString) != -1)
{
var _sojCountString = msg.split(" ")[0];
var preCount = SojCount;
if(!SojCount)
{
InitialSojCount = parseInt(_sojCountString);
preCount = InitialSojCount;
InitialTime = GetTickCount();
}
SojCount = parseInt(_sojCountString);
if(NTConfig_CheckSojSalesItem)
{
NTC_SendLogToOOG(NTC_LOG_ITEM, "ÿc4" + msg + ";ÿc0Game:ÿc8 " + me.gamename + "\nÿc0Password:ÿc8 " + me.gamepassword + "\nÿc0ServerIP:ÿc8 " + me.gameserverip.split(".")[3] + "\nÿc0Message Count:ÿc8 " + (MessageCount+1) + "\nÿc0Sojs sold:ÿc8 " + (SojCount-preCount) + "\nÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Time Passed Since First Message:ÿc8 " + (parseInt((GetTickCount()-InitialTime)/60000)) + "m" + (parseInt((GetTickCount()-InitialTime)/1000)%60) + "s" + "\nÿc0Waitingÿc8 " + (MessageCount+1)*5 + " ÿc0minutes");
}
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿc4" + msg + ";ÿc0Game:ÿc8 " + me.gamename + "\nÿc0Password:ÿc8 " + me.gamepassword + "\nÿc0ServerIP:ÿc8 " + me.gameserverip.split(".")[3] + "\nÿc0Message Count:ÿc8 " + (MessageCount+1) + "\nÿc0Sojs sold:ÿc8 " + (SojCount-preCount) + "\nÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Time Passed Since First Message:ÿc8 " + (parseInt((GetTickCount()-InitialTime)/60000)) + "m" + (parseInt((GetTickCount()-InitialTime)/1000)%60) + "s" + "\nÿc0Waitingÿc8 " + (MessageCount+1)*5 + " ÿc0minutes");
me.maxgametime = 0;
NTC_StopScript(NTConfig_Script[CurScriptIndex]);
NTC_Delay(1000);
RunScript = false;
if(!LoopRunning)
{
LoopRuntime = ++MessageCount*5*60E3;
LoopMode = 1;
NT_AntiIdle();
}
else
LoopRuntime = ++MessageCount*5*60E3;
if(!LoopRunning)
{
RunScript = true;
Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
}
}
}
if(CloneDiabloString.length > 1 && msg.indexOf(CloneDiabloString) != -1)
{
CloneDiabloNotify = true;
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿc4" + CloneDiabloString + ";ÿc0Game:ÿc8 " + me.gamename + "\nÿc0Password:ÿc8 " + me.gamepassword + "\nÿc0ServerIP:ÿc8 " + me.gameserverip.split(".")[3] + "\nÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Time Passed Since First Message:ÿc8 " + (parseInt((GetTickCount()-InitialTime)/60000)) + "m" + (parseInt((GetTickCount()-InitialTime)/1000)%60) + "s" + "\nÿc0Message Count:ÿc8 " + (MessageCount+1));
SetStatusText("ÿc8" + CloneDiabloString);
me.maxgametime = 0;
NTC_StopScript(NTConfig_Script[CurScriptIndex]);
NTC_Delay(1000);
RunScript = false;
LoopRuntime = 0;
LoopMode = 0;
NT_AntiIdle();
}
}
}
function NT_KeyEvents(keycode)
{
//Print("Keycode: " + keycode);
var _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
switch(keycode)
{
case 19: // pause (PAUSE)
if(_script)
{
if(_script.running)
{
_script.Stop();
pauseTimer = GetTickCount();
me.maxgametime = 0;
NTC_Delay(300);
ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null);
SetStatusText("ÿc1Stopped ÿc4" + NTConfig_Script[CurScriptIndex]);
NTC_Delay(2000);
SetStatusText("ÿc1Max game length set to infinite!");
NT_ScriptMsgEvents("SET_DEFAULT_STATUS");
}
else
{
if(!RunScript)
{
RunScript = true;
NTC_Delay(2000);
}
Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
}
}
break;
case 33: // skip (PGUP)
SetStatusText("ÿc1Skipping current script...");
RunScript = true;
if(!_script)
break;
if(_script.running)
_script.Stop();
NTTM_CheckAct();
NTC_PingDelay(500);
NT_ScriptMsgEvents("SCRIPT_END");
break;
case 34: // repeat (PAGEDOWN)
SetStatusText("ÿc1Repeating previous script...");
RunScript = true;
if(!_script)
break;
if(_script.running)
_script.Stop();
if(!NTC_InTown())
{
while(!NTM_MakeTP())
NTC_PingDelay(250);
NTM_UsePortal("BluePortal");
}
NTC_PingDelay(500);
NT_ScriptMsgEvents("SCRIPT_REPEAT");
break;
case 46: // exit (DEL)
RunScript = true;
SetStatusText("ÿc1Exiting game...");
OutputString = "ÿ258CDDGame" + ((me.gamename.slice(me.gamename.lastIndexOf('-')+1))? " ("+ me.gamename.slice(me.gamename.lastIndexOf('-')+1) + ") " : " ") + "was finished by User!;";
OutputString += (GameStartCharLevel != NT_GetRequiredExp(me.GetStat(12)))? "ÿc1Level Up!\n" : "";
OutputString += "ÿc0Game Duration:ÿc8 " + ((parseInt((GetTickCount()-GameStartTick)/36E5) >= 1) ? parseInt((GetTickCount()-GameStartTick)/36E5) + "h " : "") + (parseInt((GetTickCount()-GameStartTick)/6E4)) + "m " + (parseInt((GetTickCount()-GameStartTick)/1000)%60) + "s";
OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Absolute Experience Gain:ÿc8 " + (me.GetStat(13)-GameStartExp) : "");
OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Relative Experience Gain:ÿc8 " + ((NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)) != 0)?((me.GetStat(13)-GameStartExp)/(NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)))*100).toFixed(4) + "%" : "Invalid") : "");
OutputString += ((RvUsed || MpUsed || HpUsed)?"\nÿc0Potions Used:ÿc1 [" + HpUsed + "]ÿc3 [" + MpUsed + "]ÿ7E0064 [" + RvUsed + "]":"");
OutputString += ((NTC_MyGold()-PreGold > 0)?"\nÿc0Total Gold Gathered:ÿc8 " + ((NTC_MyGold()-PreGold <= 1E5)?((NTC_MyGold()-PreGold)/1E3).toFixed(1) + "k":((NTC_MyGold()-PreGold)/1E6).toFixed(2) + "mio") : "");
OutputString += (PickedItemsCount)?"\nÿc0Items Picked:ÿc8 " + PickedItemsCount : "";
OutputString += (LootedMonstersCount)?"\nÿc0Corpses Looted:ÿc8 " + LootedMonstersCount : "";
OutputString += (Errors)?"\nÿc1Error Occurrence: " + Errors : "";
NTC_SendLogToOOG(NTC_LOG_COMMON, OutputString);
if(NTConfig_PublicMode)
Say("Next game!");
NTC_PingDelay(2000);
ExitGame();
break;
case 35: // clear current XML logfile (END)
if(NTConfig_UseXMLItemlog)
{
SetStatusText("ÿc1Deleting current XML-Logfile...");
NTC_PingDelay(1000);
SetStatusText("ÿc8Creating new XML-Logfile...");
NTC_PingDelay(500);
var dateString = new Date().toLocaleFormat("%m-%d-%y");
var fhandle = FileOpen("logs/"+me.charname+"/"+dateString+"_itemlog.xml", 1);
if(fhandle)
{
fhandle.WriteLine("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
fhandle.WriteLine("<?xml-stylesheet href=\"itemlog.xsl\" type=\"text/xsl\"?>");
fhandle.WriteLine("<itemlog>");
fhandle.WriteLine("</itemlog>");
fhandle.Close();
SetStatusText("ÿc8Done!");
}
NT_ScriptMsgEvents("SET_DEFAULT_STATUS");
}
break;
case 45: // Log stashed items (INS)
SetStatusText("ÿc8Logging current stash to " + ((NTConfig_LogStashToTxt)?"TXT":"XML") + "...");
if(NTI_LogStashedItems())
SetStatusText("ÿc8Done!");
else
SetStatusText("ÿc1Logging failed!");
NT_ScriptMsgEvents("SET_DEFAULT_STATUS");
break;
//case 101: //5 (Num Lock)
//NTU_TLInventory();
//break;
case 103: //7 (Num Lock)
NTU_ShowMyStats();
break;
case 105: //9 (Num Lock)
NTU_CheckMyStats()
break;
case 106: //* (Num Lock)
_area = GetArea();
Print("Current Position: (ÿc2x: " + me.x + "ÿc0|ÿc1y: " + me.y + "ÿc0) [ÿc7Area: " + me.areaid + " - " + _area.name + "ÿc0]");
break;
break;
case 107: //+ (Num Lock)
NTU_TLNipCheck()
break;
}
}
function NT_ScriptMsgEvents(msg)
{
if(NTConfig_AutoMule){
var _area;
switch(msg)
{
case "SCRIPT_END":
if(NTConfig_AutoMule){
if(!CheckStashFull())
{
NTTM_CheckAct();
NTC_SendMsgToScript("NTBotLeech.ntj", "MULE_START");
NTC_SendMsgToScript("NTBot.ntj", "MULE_START");
NTC_SendLogToOOG(NTC_LOG_COMMON, "Stash full - Muling Items" );
NTC_Delay(2500);
LastScript = true;
break;
}
}
}
}
var _area, _isDataInput = false;
if(msg.split("_")[0] == "SET" && msg.indexOf("SET_DEFAULT_STATUS") == -1)
{
_isDataInput = true;
NT_EvaluateInputData(msg);
}
if(!_isDataInput)
{
switch(msg)
{
case "SCRIPT_END":
if(++CurScriptIndex < NTConfig_Script.length)
{
if(NTConfig_ShowGoldPickupsPerScript)
{
if(GoldPerScript > 0)
Print("ÿc8Picked " + (GoldPerScript/1E3).toFixed(1) + "k gold running " + NTConfig_Script[CurScriptIndex-1]);
GoldPerScript = 0;
}
NTTM_CheckAct();
Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
NTC_LogLocation(NTConfig_Script[CurScriptIndex]);
}
else
LastScript = true;
break;
case "SCRIPT_REPEAT":
if(CurScriptIndex-1 >= 0)
{
CurScriptIndex--;
NTTM_CheckAct();
Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
}
else
{
SetStatusText("ÿc1Cannot repeat - Invalid Index!");
NTC_PingDelay(2000);
NTTM_CheckAct();
Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
}
break;
case "SET_DEFAULT_STATUS":
var _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]);
if(_script)
{
NTC_Delay(2500);
if(_script.running)
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
else
SetStatusText("ÿc1Stopped ÿc4" + NTConfig_Script[CurScriptIndex]);
}
else
SetStatusText("ÿc1Cannot set default status!");
break;
default:
Print("ÿc1" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed");
_area = GetArea();
if(_area)
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (" + _area.name + ")");
else
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (unknown area)");
Errors++;
if(++CurScriptIndex < NTConfig_Script.length)
{
NTTM_CheckAct();
Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]);
SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]);
NTC_LogLocation(NTConfig_Script[CurScriptIndex]);
}
else
LastScript = true;
break;
}
}
}
function NT_AntiIdle()
{
var _endtime, _starttick, _loops;
_loops = 0;
LoopRunning = true;
_starttick = GetTickCount();
if(LoopMode == 0)
LoopRuntime = NTConfig_WorldEventWaitTime;
while((!LoopRuntime || LoopRuntime+_starttick > GetTickCount()) && !RunScript)
{
if(_loops%10 == 0)
{
if(NTConfig_WorldEventAccount)
{
if(LoopMode == 0)
Say("/w *" + NTConfig_WorldEventAccount + " World Event in " + me.gamename + "//" + me.gamepassword + "!");
else
Say("/w *" + NTConfig_WorldEventAccount + " Soj Count in " + me.gamename + "//" + me.gamepassword + " (" + SojCount +((SojCount-InitialSojCount)? " [+"+(SojCount-InitialSojCount)+"]":"") + " sold)!");
}
}
SetStatusText("ÿc8Switching to Act " + (1+_loops%5) + "...");
NTTM_CheckAct(1+_loops%5);
SetStatusText("ÿc8Moving to Portal Spot...");
NTTM_TownMove("portalspot");
_endtime = GetTickCount() + 60E3; // Wait 60 seconds in each act
while(_endtime > GetTickCount() && ((LoopRuntime) ? (LoopRuntime+_starttick > GetTickCount()) : true) && !RunScript)
{
if(LoopMode == 0)
SetStatusText("ÿc8Diablo Walks the Earth! (" + ((parseInt((GetTickCount()-_starttick)/36E5) >= 1) ? parseInt((GetTickCount()-_starttick)/36E5) + "h" : "") + (parseInt((GetTickCount()-_starttick)/6E4)%60) + "m"+ (parseInt((GetTickCount()-_starttick)/1000)%60) +"s)");
else
SetStatusText("ÿc8Awaiting Soj Sale... (" + ((parseInt((LoopRuntime+_starttick-GetTickCount())/36E5) >= 1) ? parseInt((LoopRuntime+_starttick-GetTickCount())/36E5) + "h" : "") + (parseInt((LoopRuntime+_starttick-GetTickCount())/6E4)%60) + "m"+ (parseInt((LoopRuntime+_starttick-GetTickCount())/1000)%60) +"s)");
NTC_Delay(1000);
}
_loops++;
}
LoopRunning = false;
if(LoopMode!=0)
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿc4Proceeding...;ÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Waitedÿc8 " + (parseInt((GetTickCount()-_starttick)/6E4)%60) + "m"+ (parseInt((GetTickCount()-_starttick)/1000)%60) +"s");
NTC_Delay(1000);
}
function NT_EvaluateInputData(msg)
{
switch(msg.split("_")[1])
{
case "LOOTED":
LootedMonstersCount++;
break;
case "PICKED":
PickedItemsCount++;
break;
case "SCRIPTGOLD":
GoldPerScript += parseInt(msg.split("_")[2]);
break;
case "HPDRANK":
HpUsed++;
break;
case "MPDRANK":
MpUsed++;
break;
case "RVDRANK":
RvUsed++;
break;
}
}
function NT_GetRequiredExp(level)
{
// Returns the experience necessary for the specified level
var _reqExp = -1;
if(!level || level < 2 || level > 99)
return _reqExp;
switch(level)
{
case 99:
_reqExp = 3520485254;
break;
case 98:
_reqExp = 3229426756;
break;
case 97:
_reqExp = 2962400612;
break;
case 96:
_reqExp = 2717422497;
break;
case 95:
_reqExp = 2492671933;
break;
case 94:
_reqExp = 2286478756;
break;
case 93:
_reqExp = 2097310703;
break;
case 92:
_reqExp = 1923762030;
break;
case 91:
_reqExp = 1764543065;
break;
case 90:
_reqExp = 1618470619;
break;
case 89:
_reqExp = 1484459201;
break;
case 88:
_reqExp = 1361512946;
break;
case 87:
_reqExp = 1248718217;
break;
case 86:
_reqExp = 1145236814;
break;
case 85:
_reqExp = 1050299747;
break;
case 84:
_reqExp = 963201521;
break;
case 83:
_reqExp = 883294891;
break;
case 82:
_reqExp = 809986056;
break;
case 81:
_reqExp = 742730244;
break;
case 80:
_reqExp = 681027665;
break;
case 79:
_reqExp = 624419793;
break;
case 78:
_reqExp = 572485967;
break;
case 77:
_reqExp = 524840254;
break;
case 76:
_reqExp = 481128591;
break;
case 75:
_reqExp = 441026148;
break;
case 74:
_reqExp = 404234916;
break;
case 73:
_reqExp = 370481492;
break;
case 72:
_reqExp = 339515048;
break;
case 71:
_reqExp = 311105466;
break;
case 70:
_reqExp = 285041630;
break;
case 69:
_reqExp = 261129853;
break;
case 68:
_reqExp = 239192444;
break;
case 67:
_reqExp = 219066380;
break;
case 66:
_reqExp = 200602101;
break;
case 65:
_reqExp = 183662396;
break;
case 64:
_reqExp = 168121381;
break;
case 63:
_reqExp = 153863570;
break;
case 62:
_reqExp = 140783010;
break;
case 61:
_reqExp = 128782495;
break;
case 60:
_reqExp = 117772849;
break;
case 59:
_reqExp = 107672256;
break;
case 58:
_reqExp = 98405658;
break;
case 57:
_reqExp = 89904191;
break;
case 56:
_reqExp = 82104680;
break;
case 55:
_reqExp = 74949165;
break;
case 54:
_reqExp = 68384473;
break;
case 53:
_reqExp = 62361819;
break;
case 52:
_reqExp = 56836449;
break;
case 51:
_reqExp = 51767302;
break;
case 50:
_reqExp = 47116709;
break;
case 49:
_reqExp = 42850109;
break;
case 48:
_reqExp = 38935798;
break;
case 47:
_reqExp = 35344686;
break;
case 46:
_reqExp = 32050088;
break;
case 45:
_reqExp = 29027522;
break;
case 44:
_reqExp = 26254525;
break;
case 43:
_reqExp = 23710491;
break;
case 42:
_reqExp = 21376515;
break;
case 41:
_reqExp = 19235252;
break;
case 40:
_reqExp = 17270791;
break;
case 39:
_reqExp = 15468534;
break;
case 38:
_reqExp = 13815086;
break;
case 37:
_reqExp = 12298162;
break;
case 36:
_reqExp = 10906488;
break;
case 35:
_reqExp = 9629723;
break;
case 34:
_reqExp = 8458379;
break;
case 33:
_reqExp = 7383752;
break;
case 32:
_reqExp = 6397855;
break;
case 31:
_reqExp = 5493363;
break;
case 30:
_reqExp = 4663553;
break;
case 29:
_reqExp = 3902260;
break;
case 28:
_reqExp = 3203826;
break;
case 27:
_reqExp = 2563061;
break;
case 26:
_reqExp = 2050449;
break;
case 25:
_reqExp = 1640359;
break;
case 24:
_reqExp = 1312287;
break;
case 23:
_reqExp = 1049830;
break;
case 22:
_reqExp = 839864;
break;
case 21:
_reqExp = 671891;
break;
case 20:
_reqExp = 537513;
break;
case 19:
_reqExp = 430010;
break;
case 18:
_reqExp = 344008;
break;
case 17:
_reqExp = 275207;
break;
case 16:
_reqExp = 220165;
break;
case 15:
_reqExp = 176132;
break;
case 14:
_reqExp = 140906;
break;
case 13:
_reqExp = 112725;
break;
case 12:
_reqExp = 90180;
break;
case 11:
_reqExp = 72144;
break;
case 10:
_reqExp = 57715;
break;
case 9:
_reqExp = 44396;
break;
case 8:
_reqExp = 32886;
break;
case 7:
_reqExp = 22680;
break;
case 6:
_reqExp = 14175;
break;
case 5:
_reqExp = 7875;
break;
case 4:
_reqExp = 3750;
break;
case 3:
_reqExp = 1500;
break;
case 2:
_reqExp = 500;
}
return _reqExp;
}
function talk(msg, type)
{
if(type == 4 && msg.indexOf("stronger") != -1)
{
Say(NTConfig_Willkommen);
}
}
function NTE_InitializeStats(){
_startLvl = me.GetStat(12);
_startExp = (2147483648 + me.GetStat(13));
_startTime = GetTickCount();
//Print(" ÿc;Exp = " + _startExp);
//Print(" ÿc;Level = " + _startLvl);
}
function NTE_GetStats(){
Print(_startLvl);
}
Quote:
Helft mir mal bitte...ich bekomms mit meinem Baba (Co-Leacher) ned hin...
[Only registered and activated users can see links. Click Here To Register...]
Charconfig müsst eigtl passen, aber vllt hab ich was übersehen (ist auch richtig benannt)
Code:var NTConfig_Teleport; function NT_LoadConfig() { //################################################################### //#########################BotType festlegen######################### //################################################################### NTConfig_BotType = 2; // 1 = Leader // 2 = Co-Leecher // 3 = Leecher //#################################################################### //###########################Leader Scripts########################### //#################################################################### if(NTConfig_BotType <= 1) { //##########################Eldritch+Shenk########################## //NTConfig_Script.push("NTEldritch.ntj"); NTConfig_FarmRVPots = 4; // Wenn dem Char mehr als x rv pots fehlen, farmt er Eld+Shenk. Wenn er mehr hat, dann nicht. Wenn er immer farmen soll, dann auf 0 setzen. //##############################Diablo############################## //NTConfig_Script.push("NTDiablo.ntj"); NTConfig_DiabloLeechers = false; // DiabloLeechers auf true setzen, wenn ihr Leecher mit dem NTDiabloLeech Script dabei habt NTConfig_StarTPMsg = "TP up - Please let me open the seals and stay one screen behind me, if you are leecher."; // welche Nachricht soll gesagt werden wenn das TP am Stern gemacht wird. nichts zwischen "" eintragen wenn nichts gesagt werden soll NTConfig_KillDiaMsg = "Killing Diablo, Leechers go hide behind the corners.";// welche Nachricht soll gesagt werden wenn alle Siegel offen sind. nichts zwischen "" eintragen wenn nichts gesagt werden soll NTConfig_DiaNxtGame = ""; // Wenn nach Dia schluss ist, dann hier Next Game Message eintragen //###############################Baal############################### //NTConfig_Script.push("NTBaal.ntj"); NTConfig_KillBaal = true; NTConfig_UnsafeTP = true; // Soll ein unsafe tp geöffnet werden beim baalrun? NTConfig_UNSAFETPSpoke = "Fighters may come now"; // welche Nachricht soll geschrieben werden wenn das unsafe tp geöffnet wird. nichts zwischen "" eintragen wenn nichts gesagt werden soll NTConfig_SafeTP = "Leechers may come now"; // welche Nachricht soll gesagt werden wenn das safe tp gemacht wird. nichts zwischen "" eintragen wenn nichts gesagt werden soll NTConfig_KILL = "Time to kill Baal"; // welche Nachricht soll ankündigen das baal gemacht werden soll. nichts zwischen "" eintragen wenn nichts gesagt werden soll NTConfig_NxtGame = "Next Game. Join 'OP Mychannel' to follow my runs"; // welche Nachricht soll am ende des runs geschrieben werden. nichts zwischen "" eintragen wenn nichts gesagt werden soll //###############################Rest############################### NTConfig_NIPFilePath.push("leader.nip"); // Leader hat seine eigene Pickit NTConfig_Eintritt = false; // Soll der Bot eine Nachricht schreiben, wenn jemand das Spiel betritt, dann auf true stellen NTConfig_Willkommen = "Welcome to my runs."; // Angezeigte Nachricht, wenn NTConfig_Eintritt = true ist } //#################################################################### //#########################LeechFight Scripts######################### //#################################################################### if(NTConfig_BotType == 2) { NTConfig_Leader = "ManiSorc" // Name vom Leader-Char, Groß- und Kleinschreibung beachten! //##############################Diablo############################## //NTConfig_Script.push("NTDiabloLeechFight.ntj"); //###############################Baal############################### NTConfig_Script.push("NTBaalLeechFight.ntj"); NTConfig_KillBaal = true; NTConfig_CoLeechTPMsg = "TP hot! Fighters may come now"; // Bei dieser Message vom Leader geht der Bot ins TP. Wenn er jederzeit rein gehen soll, leer lassen. //###############################Rest############################### NTConfig_NIPFilePath.push("leecher.nip"); // Leader hat seine eigene Pickit NTConfig_Leech = true; // Wenn der LeechFighter keine Enigma hat, aber trotzdem mitkämpfen soll, dann auf true stellen. NTConfig_JoinOnly = true; // Leecher joined nur Partys, macht aber selber keine auf } //#################################################################### //###########################Leecher Scripts########################## //#################################################################### if(NTConfig_BotType >= 3) { NTConfig_Leader = "Leader Char Name" // Name vom Leader-Char, Groß- und Kleinschreibung beachten! //##############################Diablo############################## //NTConfig_Script.push("NTDiabloLeech.ntj"); // NTConfig_DiabloLeechers MUSS beim leader auf true sein //###############################Baal############################### //NTConfig_Script.push("NTBaalLeech.ntj"); //NTConfig_LeechTPMsg = "TP safe"; // Bei dieser Message vom Leader geht der Bot ins TP. Wenn er jederzeit rein gehen soll, leer lassen. //###############################Rest############################### //NTConfig_Leech = true; // Wenn der Leecher Enigma hat, dann auf false stellen //NTConfig_JoinOnly = true; // Leecher joined nur Partys, macht aber selber keine auf } //#################################################################### //#########################Char Einstellungen######################### //#################################################################### // Diese Zahlen Spiegeln euer Inventar wieder. 0 = Von euch belegter Platz, den der Bot nicht anrührt. 1 = Hiermit darf der Bot arbeiten. NTConfig_Columns[0] = [0,0,0,0,0,0,0,1,1,1]; NTConfig_Columns[1] = [0,0,0,0,0,0,0,1,1,1]; NTConfig_Columns[2] = [0,0,0,0,0,0,1,1,1,1]; NTConfig_Columns[3] = [0,0,0,0,0,0,1,1,1,1]; NTConfig_LifeThresh = 67; // Bei weniger als XX Prozent Leben wird ein Heiltrank getrunken. NTConfig_LifeRejuvThresh = 37; // Bei weniger als XX Prozent Leben wird ein Regenerationstrank getrunken. NTConfig_ManaThresh = 30; // Bei weniger als XX Prozent Mana wird ein Manatrank getrunken. NTConfig_ManaRejuvThresh = 0; // Bei weniger als XX Prozent Mana wird ein Regenerationstrank getrunken. NTConfig_LifeChicken = 27; // Bei weniger als XX Prozent Leben verlässt der Bot das Spiel um nicht zu sterben. NTConfig_ManaChicken = 0; // Bei weniger als XX Prozent Mana verlässt der Bot das Spiel. NTConfig_MercLifeThresh = 80; // Hat der Merc weniger als XX Prozent Leben, bekommt er einen Heiltrank. NTConfig_MercRejuvThresh = 30; // Hat der Merc weniger als XX Prozent Leben, bekommt er einen Regenerationstrank. NTConfig_MercChicken = 0; // Hat der Merc weniger als XX Prozent Leben, verlässt der Bot das Spiel. //---------------------------------------------------------------------------------------------- // Hier stellt ihr ein, welche Tränke in den Gürtel sollen. // hp = Heiltrank, mp = Manatrank, rv = Regenerationstrank // Gleiche Arten von Tränken müssen immer direkt nebeneinander liegen. Sollen HP-, MP-, und Reg- // Tränke zusammen in den Gürtel, so MÜSSEN die Reg-Tränke immer an das Ende. //---------------------------------------------------------------------------------------------- NTConfig_BeltColType[0] = "hp"; NTConfig_BeltColType[1] = "hp"; NTConfig_BeltColType[2] = "hp"; NTConfig_BeltColType[3] = "mp"; //------------------------------------------------------------------------------ // Angriffs - Einstellungen (Skill-ID's stehen im libs-Ordner in der Skills.txt) //------------------------------------------------------------------------------ NTConfig_AttackSkill[0] = 0; // Dieser Skill wird nur einmal zu Beginn gecastet. 0 = Keiner NTConfig_AttackSkill[1] = 151; // Primärer Angriff gegen Bosse NTConfig_AttackSkill[2] = ; // Sekundärer Angriff gegen Bosse NTConfig_AttackSkill[3] = 151; // Primärer Angriff gegen normale Monster NTConfig_AttackSkill[4] = 0; // Sekundärer Angriff gegen normale Monster NTConfig_AttackSkill[5] = 152; // Primärer Angriff gegen immune Monster NTConfig_AttackSkill[6] = 0; // Sekundärer Angriff gegen immune Monster NTConfig_ClearPosition = false; // true = Bot tötet auch Monster in der Umgebung eines Bosses NTConfig_SkipHealLife = 90; // Habt ihr mehr als XX Prozent Leben, besucht der Bot keinen Arzt NTConfig_SkipHealMana = 70; // Habt ihr mehr als XX Prozent Mana, besucht der Bot keinen Arzt //#################################################################### //##############################Optionen############################## //#################################################################### NTConfig_Boswap = true; // true = Barb wechselt für BO auf den 2. Waffenslot if(NTConfig_BotType < 3) NTConfig_UseMerc = true; else NTConfig_UseMerc = false; NTConfig_PublicMode = true; me.quitonhostile = true; // Es gibt zwar ein Anti Hostile Script, das sich gegen Bothunter wehrt, aber ich würde es nicht drauf anlegen, da es gegen die meissten Bothunter chancenlos ist NTConfig_Teleport = false; // Wenn der Bot zum Telen die Waffe wechseln soll, das hier auf true setzen me.maxgametime = 600; // Maximale Spielzeit in Sekunden (0 = Unendlich) NTConfig_FastPick = true; // true = schnelleres item einsammeln // ihr müsst hier in der charconfig noch NTConfig_SnagDelay anpassen // achtung kann das spiel instabil machen NTConfig_SnagDelay = 0; // Verzögerung beim Aufheben von Gegenständen in Millisekunden NTConfig_SnagRange = 80; // Radius in dem nach gedroppten Items gescannt wird. Ein Wert von 40-50 ist hier in Ordnung. NTConfig_LogSoldItems = [0]; // Verkaufte items im log anzeigen 4= magic, 5 = set, 6 = rare, 7 = unique, 8 = craft, 0 = nicht anzeigen NTConfig_LogPickItems = [0]; // Aufgesammelte items im log anzeigen 4= magic, 5 = set, 6 = rare, 7 = unique, 8 = craft, 0 = nicht anzeigen // Wenn ihr alle aufgehobenen/verkauften Items anzeigen wollt, muss das in der Klammer stehen: [4,5,6,7,8] NTConfig_CheckCloneDiablo = false; // Wenn das auf true ist, bleibt der Bot bei Dia walk im Spiel, was wir beim public botten nicht wollen NTConfig_OpenChest = false; // true = Superchests werden geöffnet NTConfig_OpenAllNearbyChests = false; // sollen ALLE nicht spezial chest ebenfals geöffnet werden = true NTConfig_Gamble = false; // Wenn dann würde ich das nur auf Leechern anmachen NTConfig_GambleStartGold = 2000000; // Bei der Goldanzahl beginnt der Bot zu gambeln. NTConfig_GambleStopGold = 300000; // Bei der Goldanzahl hört der Bot auf zu gambeln. NTConfig_GambleItem.push(520); // Amulette NTConfig_GambleItem.push(522); // Ringe NTConfig_GambleItem.push(418); // Reife NTConfig_GambleItem.push(419); // Krönchen NTConfig_GambleItem.push(331); // Schild (jmod) NTConfig_GambleItem.push(377); // Schild (jmod) // 0x01 : Tränke, 0x02 : Gift, 0x04 : Verstärkter Schaden (Fluch), 0x08 : Schwächen (Fluch), 0x10 : Eiserne Jungfrau (Fluch), 0x20 : Altern (Fluch), 0x40 : Wiederstandsschwund (Fluch) NTConfig_CheckSelfSafe = 0; // 0x01 : Tod, 0x02 : Gift, 0x04 : Verstärkter Schaden (Fluch), 0x08 : Schwächen (Fluch), 0x10 : Eiserne Jungfrau (Fluch), 0x20 : Altern (Fluch), 0x40 : Wiederstandsschwund (Fluch) NTConfig_CheckMercSafe = 0x01; MyConfig_StoreItem = [0, 0]; // für das sortieren der stash zuständig NTConfig_UseXMLItemlog = false; // XMLlog MyConfig_MiniShopBot = true; // scant merchants automatisch nach items in der pickit MyConfig_CatchExperienceShrine = false; // Bot nimmt XP Schrein aufm Weg mit. Nicht beim Leader anmachen, das hält ihn nur unnötig auf. MyConfig_CatchGemShrine = false; // Bot holt Gem Schrein MyConfig_CatchSkillShrine = false; // Bot holt Skill Schrein MyConfig_CatchArmorShrine = false; // Bot holt Armor Schrein MyConfig_CatchResistShrine = false; // Bot holt Resi Schreine NTConfig_StartDelay = 0; // Verzögerung beim Start in Millisekunden NTConfig_AreaDelay = 500; // Verzögerung bei Gebietswechsel in Millisekunden NTConfig_Cubing = false; // Beim public botten wollen wir XP und nicht ewig rumcuben. NTConfig_UseCainToID = false; // soviele Items nehmen wir nicht mit, die können wir auch per Hand identen NTConfig_CheckSojSales = false; NTConfig_CheckSojSalesItem = false; // Wenn das auf true ist, idlet der Bot in der Stadt rum um weitere SoJ sales abzuwarten -> NoGo für public bot NTConfig_WorldEventAccount = ""; // schreibt dem acc alle 10 min eine nachricht bei soj verkäufen oder worldevent ("" leer lassen fals nicht benötigt) NTConfig_WorldEventWaitTime = 1; // Wie lange soll der char bei einem worldevent warten in sekunden (0 = Unendlich) NTConfig_FreeSpace = 7; // Sind weniger als X Spalten frei, werden die Items gestasht. NTConfig_MinGoldToStash = 120000; // Maximales Gold, was der Bot mit sich rumträgt, bevor er es in die Truhe zahlt. NTConfig_ResetWeapon = false; // wird nicht mehr gebraucht }
Edit:
Hier auch mal die NT_BotGame...vllt ist da iwas falsch...ich verstehs allerdings ned, weil mit der Assa hats super geklappt...
Code:var _TotalExp = [0, 0, 500, 1500, 3750, 7875, 14175, 22680, 32886, 44396, 57715, 72144, 90180, 112725, 140906, 176132, 220165, 275207, 344008, 430010, 537513, 671891, 839864, 1049830, 1312287, 1640359, 2050449, 2563061, 3203826, 3902260, 4663553, 5493363, 6397855, 7383752, 8458379, 9629723, 10906488, 12298162, 13815086, 15468534, 17270791, 19235252, 21376515, 23710491, 26254525, 29027522, 32050088, 35344686, 38935798, 42850109, 47116709, 51767302, 56836449, 62361819, 68384473, 74949165, 82104680, 89904191, 98405658, 107672256, 117772849, 128782495, 140783010, 153863570, 168121381, 183662396, 200602101, 219066380, 239192444, 261129853, 285041630, 311105466, 339515048, 370481492, 404234916, 441026148, 481128591, 524840254, 572485967, 624419793, 681027665, 742730244, 809986056, 883294891, 963201521, 1050299747, 1145236814, 1248718217, 1361512946, 1484459201, 1618470619, 1764543065, 1923762030, 2097310703, 2286478756, 2492671933, 2717422497, 2962400612, 3229426756, 3520485254, 0]; var _ExpToNextLvl = [0, 500, 1000, 2250, 4125, 6300, 8505, 10206, 11510, 13319, 14429, 18036, 22545, 28181, 35226, 44033, 55042, 68801, 86002, 107503, 134378, 167973, 209966, 262457, 328072, 410090, 512612, 640765, 698434, 761293, 829810, 904492, 985897, 1074627, 1171344, 1276765, 1391674, 1516924, 1653448, 1802257, 1964461, 2141263, 2333976, 2544034, 2772997, 3022566, 3294598, 3591112, 3914311, 4266600, 4650593, 5069147, 5525370, 6022654, 6564692, 7155515, 7799511, 8501467, 9266598, 10100593, 11009646, 12000515, 13080560, 14257811, 15541015, 16939705, 18464279, 20126064, 21937409, 23911777, 26063836, 28409582, 30966444, 33753424, 36791232, 40102443, 43711663, 47645713, 51933826, 56607872, 61702579, 67255812, 73308835, 79906630, 87098226, 94937067, 103481403, 112794729, 122946255, 134011418, 146072446, 159218965, 173548673, 189168053, 206193177, 224750564, 244978115, 267026144, 291058498, 0]; var _startLvl; var _startExp; var _startTime; var CurScriptIndex = 0; var LastScript = false; var CurScriptIndex = 0; var LastScript = false; // World Event/Soj Sale var MessageCount = 0; var SojSoldString = ""; var SojCount = 0; var InitialSojCount = 0; var InitialTime; var RunScript = false; var LoopRunning = false; var LoopRuntime = 0; var LoopMode = -1; var CloneDiabloString = ""; var CloneDiabloNotify = false; // Statistics... :) var GameStartTick; var GameStartExp; var TotalGold = 0; var Errors = 0; var GameStartCharLevel; var GoldPerScript = 0; var PreGold; var OutputString; var RvUsed = 0; var MpUsed = 0; var HpUsed = 0; var LootedMonstersCount = 0; var PickedItemsCount = 0; var myCounter = 0; Include("libs/common/NTExp.ntl"); NTE_InitializeStats(); function NTMain() { GameStartTick = GetTickCount(); SetStatusText("ÿc8Initializing..."); Delay(1000); //Print("ÿc4[+] NTBot 4.2 [+]"); Include("libs/common/NTCommon.ntl"); NTC_IncludeLibs(); NTC_IncludeConfig("NTBot/char_configs"); NT_LoadConfig(); NTSI_LoadNIPFiles("NTBot/item_configs"); if(NTConfig_StartDelay > 0); NTC_Delay(NTConfig_StartDelay); SetUIState(0x0A, true); NTT_GetCorpses(); GameStartExp = me.GetStat(13); GameStartCharLevel = NT_GetRequiredExp(me.GetStat(12)); PreGold = NTC_MyGold(); if(NTConfig_Script.length > 0) { NTCU_InitCubing(); NTT_ClearInventory(); NTT_ClearBelt(); if(NTConfig_JoinOnly){ Load("NTBot/tools/NTTInvite.ntj"); } else { Load("NTBot/tools/NTToolsThread.ntj"); } Load("NTBot/NTHostile.ntj"); if(NTConfig_CheckSojSales) { SojSoldString = GetLocaleString(11004).replace("%d ", ""); } if(NTConfig_CheckCloneDiablo) { CloneDiabloString = GetLocaleString(11005); RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents); } RegisterEvent(EVENT_GAMEMSG, NT_GameMsgEvents); RegisterEvent(EVENT_KEYDOWN, NT_KeyEvents); RegisterEvent(EVENT_SCRIPTMSG, NT_ScriptMsgEvents); if(NTConfig_Eintritt) { RegisterEvent(EVENT_GAMEMSG, talk); } Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]); SetStatusText("Running " + NTConfig_Script[CurScriptIndex]); SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); NTC_LogLocation(NTConfig_Script[CurScriptIndex]); while(!LastScript || CloneDiabloNotify) { NTC_Delay(500); } } var _endLvl = me.GetStat(12); var _lvlsGained = _endLvl - _startLvl; var _endExp = (2147483648 + me.GetStat(13)); var _endLvlExp = _TotalExp[_endLvl]; var _expGained = _endExp - _startExp; var _endTime = GetTickCount(); var _progressPercent = parseInt(1000 * (_endExp - _endLvlExp) / _ExpToNextLvl[_endLvl]) / 10; var _runsToLevel = (100 -_progressPercent) * _ExpToNextLvl[_endLvl] / (100 * _expGained); if(_runsToLevel > 10) _runsToLevel = parseInt(_runsToLevel); else _runsToLevel = parseInt(100 * _runsToLevel) / 100; SetStatusText("ÿc1Exiting game..."); OutputString = "ÿ48A209Game" + ((me.gamename.slice(me.gamename.lastIndexOf('-')+1))? " ("+ me.gamename.slice(me.gamename.lastIndexOf('-')+1) + ") " : " ") + "was finished successfully!;"; OutputString += (GameStartCharLevel != NT_GetRequiredExp(me.GetStat(12)) && NT_GetRequiredExp(me.GetStat(12)) != -1)? "ÿc2!!! Level up (" + me.GetStat(12) + ") !!!\n" : ""; OutputString += "ÿc0Game Duration:ÿc8 " + ((parseInt((GetTickCount()-GameStartTick)/36E5) >= 1) ? parseInt((GetTickCount()-GameStartTick)/36E5) + "h " : "") + (parseInt((GetTickCount()-GameStartTick)/6E4)) + "m " + (parseInt((GetTickCount()-GameStartTick)/1000)%60) + "s"; OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Absolute Experience Gain:ÿc8 " + (me.GetStat(13)-GameStartExp) : ""); OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Relative Experience Gain:ÿc8 " + ((NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)) != 0)?((me.GetStat(13)-GameStartExp)/(NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)))*100).toFixed(4) + "%" : "Invalid") : ""); OutputString += ((RvUsed || MpUsed || HpUsed)?"\nÿc0Potions Used:ÿc1 [" + HpUsed + "]ÿc3 [" + MpUsed + "]ÿ7E0064 [" + RvUsed + "]":""); OutputString += ((NTC_MyGold()-PreGold > 0)?"\nÿc0Total Gold Gathered:ÿc8 " + ((NTC_MyGold()-PreGold <= 1E5)?((NTC_MyGold()-PreGold)/1E3).toFixed(1) + "k":((NTC_MyGold()-PreGold)/1E6).toFixed(2) + "mio") : ""); OutputString += (PickedItemsCount)?"\nÿc0Items Picked:ÿc8 " + PickedItemsCount : ""; OutputString += (LootedMonstersCount)?"\nÿc0Corpses Looted:ÿc8 " + LootedMonstersCount : ""; OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12))) ? "\nÿc0Est. Runs Until Next Level:ÿc8 " + _runsToLevel : ""); OutputString += "\nÿc0Current Level Progress:ÿc8 " + _progressPercent + "% "; OutputString += (Errors)?"\nÿc1Error Occurrence: " + Errors : ""; NTC_SendLogToOOG(NTC_LOG_COMMON, OutputString); NTC_Delay(500); ExitGame(); } function NT_GameMsgEvents(msg, type) { if(type == 4) { if(msg.indexOf(NTConfig_Leader) != -1 && msg.indexOf("left our world") != -1) { NTC_Delay(1000); LastScript = true; } if(NTConfig_CheckSojSales) { if(SojSoldString.length > 1 && msg.indexOf(SojSoldString) != -1) { var _sojCountString = msg.split(" ")[0]; var preCount = SojCount; if(!SojCount) { InitialSojCount = parseInt(_sojCountString); preCount = InitialSojCount; InitialTime = GetTickCount(); } SojCount = parseInt(_sojCountString); if(NTConfig_CheckSojSalesItem) { NTC_SendLogToOOG(NTC_LOG_ITEM, "ÿc4" + msg + ";ÿc0Game:ÿc8 " + me.gamename + "\nÿc0Password:ÿc8 " + me.gamepassword + "\nÿc0ServerIP:ÿc8 " + me.gameserverip.split(".")[3] + "\nÿc0Message Count:ÿc8 " + (MessageCount+1) + "\nÿc0Sojs sold:ÿc8 " + (SojCount-preCount) + "\nÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Time Passed Since First Message:ÿc8 " + (parseInt((GetTickCount()-InitialTime)/60000)) + "m" + (parseInt((GetTickCount()-InitialTime)/1000)%60) + "s" + "\nÿc0Waitingÿc8 " + (MessageCount+1)*5 + " ÿc0minutes"); } NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿc4" + msg + ";ÿc0Game:ÿc8 " + me.gamename + "\nÿc0Password:ÿc8 " + me.gamepassword + "\nÿc0ServerIP:ÿc8 " + me.gameserverip.split(".")[3] + "\nÿc0Message Count:ÿc8 " + (MessageCount+1) + "\nÿc0Sojs sold:ÿc8 " + (SojCount-preCount) + "\nÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Time Passed Since First Message:ÿc8 " + (parseInt((GetTickCount()-InitialTime)/60000)) + "m" + (parseInt((GetTickCount()-InitialTime)/1000)%60) + "s" + "\nÿc0Waitingÿc8 " + (MessageCount+1)*5 + " ÿc0minutes"); me.maxgametime = 0; NTC_StopScript(NTConfig_Script[CurScriptIndex]); NTC_Delay(1000); RunScript = false; if(!LoopRunning) { LoopRuntime = ++MessageCount*5*60E3; LoopMode = 1; NT_AntiIdle(); } else LoopRuntime = ++MessageCount*5*60E3; if(!LoopRunning) { RunScript = true; Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]); SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); } } } if(CloneDiabloString.length > 1 && msg.indexOf(CloneDiabloString) != -1) { CloneDiabloNotify = true; NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿc4" + CloneDiabloString + ";ÿc0Game:ÿc8 " + me.gamename + "\nÿc0Password:ÿc8 " + me.gamepassword + "\nÿc0ServerIP:ÿc8 " + me.gameserverip.split(".")[3] + "\nÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Time Passed Since First Message:ÿc8 " + (parseInt((GetTickCount()-InitialTime)/60000)) + "m" + (parseInt((GetTickCount()-InitialTime)/1000)%60) + "s" + "\nÿc0Message Count:ÿc8 " + (MessageCount+1)); SetStatusText("ÿc8" + CloneDiabloString); me.maxgametime = 0; NTC_StopScript(NTConfig_Script[CurScriptIndex]); NTC_Delay(1000); RunScript = false; LoopRuntime = 0; LoopMode = 0; NT_AntiIdle(); } } } function NT_KeyEvents(keycode) { //Print("Keycode: " + keycode); var _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]); switch(keycode) { case 19: // pause (PAUSE) if(_script) { if(_script.running) { _script.Stop(); pauseTimer = GetTickCount(); me.maxgametime = 0; NTC_Delay(300); ClickMap(NTC_CLICK_LUP, NTC_SHIFT_NONE, null); SetStatusText("ÿc1Stopped ÿc4" + NTConfig_Script[CurScriptIndex]); NTC_Delay(2000); SetStatusText("ÿc1Max game length set to infinite!"); NT_ScriptMsgEvents("SET_DEFAULT_STATUS"); } else { if(!RunScript) { RunScript = true; NTC_Delay(2000); } Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]); SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); } } break; case 33: // skip (PGUP) SetStatusText("ÿc1Skipping current script..."); RunScript = true; if(!_script) break; if(_script.running) _script.Stop(); NTTM_CheckAct(); NTC_PingDelay(500); NT_ScriptMsgEvents("SCRIPT_END"); break; case 34: // repeat (PAGEDOWN) SetStatusText("ÿc1Repeating previous script..."); RunScript = true; if(!_script) break; if(_script.running) _script.Stop(); if(!NTC_InTown()) { while(!NTM_MakeTP()) NTC_PingDelay(250); NTM_UsePortal("BluePortal"); } NTC_PingDelay(500); NT_ScriptMsgEvents("SCRIPT_REPEAT"); break; case 46: // exit (DEL) RunScript = true; SetStatusText("ÿc1Exiting game..."); OutputString = "ÿ258CDDGame" + ((me.gamename.slice(me.gamename.lastIndexOf('-')+1))? " ("+ me.gamename.slice(me.gamename.lastIndexOf('-')+1) + ") " : " ") + "was finished by User!;"; OutputString += (GameStartCharLevel != NT_GetRequiredExp(me.GetStat(12)))? "ÿc1Level Up!\n" : ""; OutputString += "ÿc0Game Duration:ÿc8 " + ((parseInt((GetTickCount()-GameStartTick)/36E5) >= 1) ? parseInt((GetTickCount()-GameStartTick)/36E5) + "h " : "") + (parseInt((GetTickCount()-GameStartTick)/6E4)) + "m " + (parseInt((GetTickCount()-GameStartTick)/1000)%60) + "s"; OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Absolute Experience Gain:ÿc8 " + (me.GetStat(13)-GameStartExp) : ""); OutputString += ((me.GetStat(13)-GameStartExp) && (GameStartCharLevel == NT_GetRequiredExp(me.GetStat(12)))?"\nÿc0Relative Experience Gain:ÿc8 " + ((NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)) != 0)?((me.GetStat(13)-GameStartExp)/(NT_GetRequiredExp(me.GetStat(12)+1)-NT_GetRequiredExp(me.GetStat(12)))*100).toFixed(4) + "%" : "Invalid") : ""); OutputString += ((RvUsed || MpUsed || HpUsed)?"\nÿc0Potions Used:ÿc1 [" + HpUsed + "]ÿc3 [" + MpUsed + "]ÿ7E0064 [" + RvUsed + "]":""); OutputString += ((NTC_MyGold()-PreGold > 0)?"\nÿc0Total Gold Gathered:ÿc8 " + ((NTC_MyGold()-PreGold <= 1E5)?((NTC_MyGold()-PreGold)/1E3).toFixed(1) + "k":((NTC_MyGold()-PreGold)/1E6).toFixed(2) + "mio") : ""); OutputString += (PickedItemsCount)?"\nÿc0Items Picked:ÿc8 " + PickedItemsCount : ""; OutputString += (LootedMonstersCount)?"\nÿc0Corpses Looted:ÿc8 " + LootedMonstersCount : ""; OutputString += (Errors)?"\nÿc1Error Occurrence: " + Errors : ""; NTC_SendLogToOOG(NTC_LOG_COMMON, OutputString); if(NTConfig_PublicMode) Say("Next game!"); NTC_PingDelay(2000); ExitGame(); break; case 35: // clear current XML logfile (END) if(NTConfig_UseXMLItemlog) { SetStatusText("ÿc1Deleting current XML-Logfile..."); NTC_PingDelay(1000); SetStatusText("ÿc8Creating new XML-Logfile..."); NTC_PingDelay(500); var dateString = new Date().toLocaleFormat("%m-%d-%y"); var fhandle = FileOpen("logs/"+me.charname+"/"+dateString+"_itemlog.xml", 1); if(fhandle) { fhandle.WriteLine("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"); fhandle.WriteLine("<?xml-stylesheet href=\"itemlog.xsl\" type=\"text/xsl\"?>"); fhandle.WriteLine("<itemlog>"); fhandle.WriteLine("</itemlog>"); fhandle.Close(); SetStatusText("ÿc8Done!"); } NT_ScriptMsgEvents("SET_DEFAULT_STATUS"); } break; case 45: // Log stashed items (INS) SetStatusText("ÿc8Logging current stash to " + ((NTConfig_LogStashToTxt)?"TXT":"XML") + "..."); if(NTI_LogStashedItems()) SetStatusText("ÿc8Done!"); else SetStatusText("ÿc1Logging failed!"); NT_ScriptMsgEvents("SET_DEFAULT_STATUS"); break; //case 101: //5 (Num Lock) //NTU_TLInventory(); //break; case 103: //7 (Num Lock) NTU_ShowMyStats(); break; case 105: //9 (Num Lock) NTU_CheckMyStats() break; case 106: //* (Num Lock) _area = GetArea(); Print("Current Position: (ÿc2x: " + me.x + "ÿc0|ÿc1y: " + me.y + "ÿc0) [ÿc7Area: " + me.areaid + " - " + _area.name + "ÿc0]"); break; break; case 107: //+ (Num Lock) NTU_TLNipCheck() break; } } function NT_ScriptMsgEvents(msg) { if(NTConfig_AutoMule){ var _area; switch(msg) { case "SCRIPT_END": if(NTConfig_AutoMule){ if(!CheckStashFull()) { NTTM_CheckAct(); NTC_SendMsgToScript("NTBotLeech.ntj", "MULE_START"); NTC_SendMsgToScript("NTBot.ntj", "MULE_START"); NTC_SendLogToOOG(NTC_LOG_COMMON, "Stash full - Muling Items" ); NTC_Delay(2500); LastScript = true; break; } } } } var _area, _isDataInput = false; if(msg.split("_")[0] == "SET" && msg.indexOf("SET_DEFAULT_STATUS") == -1) { _isDataInput = true; NT_EvaluateInputData(msg); } if(!_isDataInput) { switch(msg) { case "SCRIPT_END": if(++CurScriptIndex < NTConfig_Script.length) { if(NTConfig_ShowGoldPickupsPerScript) { if(GoldPerScript > 0) Print("ÿc8Picked " + (GoldPerScript/1E3).toFixed(1) + "k gold running " + NTConfig_Script[CurScriptIndex-1]); GoldPerScript = 0; } NTTM_CheckAct(); Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]); SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); NTC_LogLocation(NTConfig_Script[CurScriptIndex]); } else LastScript = true; break; case "SCRIPT_REPEAT": if(CurScriptIndex-1 >= 0) { CurScriptIndex--; NTTM_CheckAct(); Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]); SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); } else { SetStatusText("ÿc1Cannot repeat - Invalid Index!"); NTC_PingDelay(2000); NTTM_CheckAct(); Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]); SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); } break; case "SET_DEFAULT_STATUS": var _script = NTC_FindScript(NTConfig_Script[CurScriptIndex]); if(_script) { NTC_Delay(2500); if(_script.running) SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); else SetStatusText("ÿc1Stopped ÿc4" + NTConfig_Script[CurScriptIndex]); } else SetStatusText("ÿc1Cannot set default status!"); break; default: Print("ÿc1" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed"); _area = GetArea(); if(_area) NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (" + _area.name + ")"); else NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000" + NTConfig_Script[CurScriptIndex] + " : " + msg + " failed (unknown area)"); Errors++; if(++CurScriptIndex < NTConfig_Script.length) { NTTM_CheckAct(); Load("NTBot/bots/" + NTConfig_Script[CurScriptIndex]); SetStatusText("ÿc2Running ÿc4" + NTConfig_Script[CurScriptIndex]); NTC_LogLocation(NTConfig_Script[CurScriptIndex]); } else LastScript = true; break; } } } function NT_AntiIdle() { var _endtime, _starttick, _loops; _loops = 0; LoopRunning = true; _starttick = GetTickCount(); if(LoopMode == 0) LoopRuntime = NTConfig_WorldEventWaitTime; while((!LoopRuntime || LoopRuntime+_starttick > GetTickCount()) && !RunScript) { if(_loops%10 == 0) { if(NTConfig_WorldEventAccount) { if(LoopMode == 0) Say("/w *" + NTConfig_WorldEventAccount + " World Event in " + me.gamename + "//" + me.gamepassword + "!"); else Say("/w *" + NTConfig_WorldEventAccount + " Soj Count in " + me.gamename + "//" + me.gamepassword + " (" + SojCount +((SojCount-InitialSojCount)? " [+"+(SojCount-InitialSojCount)+"]":"") + " sold)!"); } } SetStatusText("ÿc8Switching to Act " + (1+_loops%5) + "..."); NTTM_CheckAct(1+_loops%5); SetStatusText("ÿc8Moving to Portal Spot..."); NTTM_TownMove("portalspot"); _endtime = GetTickCount() + 60E3; // Wait 60 seconds in each act while(_endtime > GetTickCount() && ((LoopRuntime) ? (LoopRuntime+_starttick > GetTickCount()) : true) && !RunScript) { if(LoopMode == 0) SetStatusText("ÿc8Diablo Walks the Earth! (" + ((parseInt((GetTickCount()-_starttick)/36E5) >= 1) ? parseInt((GetTickCount()-_starttick)/36E5) + "h" : "") + (parseInt((GetTickCount()-_starttick)/6E4)%60) + "m"+ (parseInt((GetTickCount()-_starttick)/1000)%60) +"s)"); else SetStatusText("ÿc8Awaiting Soj Sale... (" + ((parseInt((LoopRuntime+_starttick-GetTickCount())/36E5) >= 1) ? parseInt((LoopRuntime+_starttick-GetTickCount())/36E5) + "h" : "") + (parseInt((LoopRuntime+_starttick-GetTickCount())/6E4)%60) + "m"+ (parseInt((LoopRuntime+_starttick-GetTickCount())/1000)%60) +"s)"); NTC_Delay(1000); } _loops++; } LoopRunning = false; if(LoopMode!=0) NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿc4Proceeding...;ÿc0Total Sojs sold:ÿc8 " + (SojCount-InitialSojCount) + "\nÿc0Waitedÿc8 " + (parseInt((GetTickCount()-_starttick)/6E4)%60) + "m"+ (parseInt((GetTickCount()-_starttick)/1000)%60) +"s"); NTC_Delay(1000); } function NT_EvaluateInputData(msg) { switch(msg.split("_")[1]) { case "LOOTED": LootedMonstersCount++; break; case "PICKED": PickedItemsCount++; break; case "SCRIPTGOLD": GoldPerScript += parseInt(msg.split("_")[2]); break; case "HPDRANK": HpUsed++; break; case "MPDRANK": MpUsed++; break; case "RVDRANK": RvUsed++; break; } } function NT_GetRequiredExp(level) { // Returns the experience necessary for the specified level var _reqExp = -1; if(!level || level < 2 || level > 99) return _reqExp; switch(level) { case 99: _reqExp = 3520485254; break; case 98: _reqExp = 3229426756; break; case 97: _reqExp = 2962400612; break; case 96: _reqExp = 2717422497; break; case 95: _reqExp = 2492671933; break; case 94: _reqExp = 2286478756; break; case 93: _reqExp = 2097310703; break; case 92: _reqExp = 1923762030; break; case 91: _reqExp = 1764543065; break; case 90: _reqExp = 1618470619; break; case 89: _reqExp = 1484459201; break; case 88: _reqExp = 1361512946; break; case 87: _reqExp = 1248718217; break; case 86: _reqExp = 1145236814; break; case 85: _reqExp = 1050299747; break; case 84: _reqExp = 963201521; break; case 83: _reqExp = 883294891; break; case 82: _reqExp = 809986056; break; case 81: _reqExp = 742730244; break; case 80: _reqExp = 681027665; break; case 79: _reqExp = 624419793; break; case 78: _reqExp = 572485967; break; case 77: _reqExp = 524840254; break; case 76: _reqExp = 481128591; break; case 75: _reqExp = 441026148; break; case 74: _reqExp = 404234916; break; case 73: _reqExp = 370481492; break; case 72: _reqExp = 339515048; break; case 71: _reqExp = 311105466; break; case 70: _reqExp = 285041630; break; case 69: _reqExp = 261129853; break; case 68: _reqExp = 239192444; break; case 67: _reqExp = 219066380; break; case 66: _reqExp = 200602101; break; case 65: _reqExp = 183662396; break; case 64: _reqExp = 168121381; break; case 63: _reqExp = 153863570; break; case 62: _reqExp = 140783010; break; case 61: _reqExp = 128782495; break; case 60: _reqExp = 117772849; break; case 59: _reqExp = 107672256; break; case 58: _reqExp = 98405658; break; case 57: _reqExp = 89904191; break; case 56: _reqExp = 82104680; break; case 55: _reqExp = 74949165; break; case 54: _reqExp = 68384473; break; case 53: _reqExp = 62361819; break; case 52: _reqExp = 56836449; break; case 51: _reqExp = 51767302; break; case 50: _reqExp = 47116709; break; case 49: _reqExp = 42850109; break; case 48: _reqExp = 38935798; break; case 47: _reqExp = 35344686; break; case 46: _reqExp = 32050088; break; case 45: _reqExp = 29027522; break; case 44: _reqExp = 26254525; break; case 43: _reqExp = 23710491; break; case 42: _reqExp = 21376515; break; case 41: _reqExp = 19235252; break; case 40: _reqExp = 17270791; break; case 39: _reqExp = 15468534; break; case 38: _reqExp = 13815086; break; case 37: _reqExp = 12298162; break; case 36: _reqExp = 10906488; break; case 35: _reqExp = 9629723; break; case 34: _reqExp = 8458379; break; case 33: _reqExp = 7383752; break; case 32: _reqExp = 6397855; break; case 31: _reqExp = 5493363; break; case 30: _reqExp = 4663553; break; case 29: _reqExp = 3902260; break; case 28: _reqExp = 3203826; break; case 27: _reqExp = 2563061; break; case 26: _reqExp = 2050449; break; case 25: _reqExp = 1640359; break; case 24: _reqExp = 1312287; break; case 23: _reqExp = 1049830; break; case 22: _reqExp = 839864; break; case 21: _reqExp = 671891; break; case 20: _reqExp = 537513; break; case 19: _reqExp = 430010; break; case 18: _reqExp = 344008; break; case 17: _reqExp = 275207; break; case 16: _reqExp = 220165; break; case 15: _reqExp = 176132; break; case 14: _reqExp = 140906; break; case 13: _reqExp = 112725; break; case 12: _reqExp = 90180; break; case 11: _reqExp = 72144; break; case 10: _reqExp = 57715; break; case 9: _reqExp = 44396; break; case 8: _reqExp = 32886; break; case 7: _reqExp = 22680; break; case 6: _reqExp = 14175; break; case 5: _reqExp = 7875; break; case 4: _reqExp = 3750; break; case 3: _reqExp = 1500; break; case 2: _reqExp = 500; } return _reqExp; } function talk(msg, type) { if(type == 4 && msg.indexOf("stronger") != -1) { Say(NTConfig_Willkommen); } } function NTE_InitializeStats(){ _startLvl = me.GetStat(12); _startExp = (2147483648 + me.GetStat(13)); _startTime = GetTickCount(); //Print(" ÿc;Exp = " + _startExp); //Print(" ÿc;Level = " + _startLvl); } function NTE_GetStats(){ Print(_startLvl); }
NTConfig_AttackSkill[2] = ; // Sekundärer Angriff gegen Bosse