|
You last visited: Today at 07:37
Advertisement
[Release] Muddy's D2NT
Discussion on [Release] Muddy's D2NT within the Diablo 2 Programming forum part of the Diablo 2 category.
01/16/2012, 22:13
|
#5296
|
elite*gold: 0
Join Date: Dec 2011
Posts: 2
Received Thanks: 0
|
bei mir kommt manchmal der fehler longsword not defined in der NTItemParser
jemand ne ahnung wie ich das beheben kann?
noch ne frage zur pickit wenn ich äxte auch mit 0-1 sox aufheben will reich es dann einfach
[Sockets] >= 2 &&
hier anstatt "2" "0" einzugeben
|
|
|
01/16/2012, 22:55
|
#5297
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Das mit dem "LongSword" musst du schon etwas genauer beschreiben, z.B: die betroffene Zeile des NIPs posten.
Zu den Sockets, du kannst es ganz weglassen, wenn dir die Anzahl Sockel egal ist. Aber ja [Sockets] >= 0 kommt aufs selbe an
|
|
|
01/17/2012, 01:19
|
#5298
|
elite*gold: 0
Join Date: Jul 2010
Posts: 213
Received Thanks: 36
|
hi,
ich bekommen desöfteren diesen fehler mit meiner amazone:
dieser tritt dann einige male hintereinander auf und dann geht es ohne probleme weiter. jemand ne idee?
ich habe beobachtet dass die ama normal startet und beim ersten teleport tritt dieser fehler auf.
edit
nein der fehler tritt manchmal auch schon auf wenn sie in der stadt vor dem wp steht und versucht in den turm zu kommen...
|
|
|
01/17/2012, 06:32
|
#5299
|
elite*gold: 0
Join Date: Jul 2010
Posts: 197
Received Thanks: 127
|
Quote:
Originally Posted by prrovoss
edit
nein der fehler tritt manchmal auch schon auf wenn sie in der stadt vor dem wp steht und versucht in den turm zu kommen...
|
Der Fehler tritt immer dann auf wenn er entweder WP benutzen will oder im Worldstone Keep in die nächste Etage wechseln will und das während der dafür im Programm vorgesehenen Zeitspanne nicht klappt. Ursache sind Lags, ob nun direkt durch laggende/ausgelastete Internetverbindung oder ausgelasteten Rechner verursacht, ist von hier aus nicht zu sagen.
|
|
|
01/17/2012, 08:28
|
#5300
|
elite*gold: 0
Join Date: Jul 2010
Posts: 213
Received Thanks: 36
|
Quote:
Originally Posted by fghtrt
Der Fehler tritt immer dann auf wenn er entweder WP benutzen will oder im Worldstone Keep in die nächste Etage wechseln will und das während der dafür im Programm vorgesehenen Zeitspanne nicht klappt. Ursache sind Lags, ob nun direkt durch laggende/ausgelastete Internetverbindung oder ausgelasteten Rechner verursacht, ist von hier aus nicht zu sagen.
|
also am rechner liegts mit sicherheit nicht 
aber wie kann es sein dass er es nicht in vorgegebener zeit schafft wenn der fehler schon fast in der bewegung zum wp auftritt. da is doch noch garkeine zeit vergangen.
e
was ich vllt nich erwähnt habe, der fehler kommt nur bei der ama vor.
mit der sorc und dem pala gab es diesen fehler nie.
|
|
|
01/17/2012, 17:10
|
#5301
|
elite*gold: 0
Join Date: Jan 2012
Posts: 8
Received Thanks: 0
|
Quote:
Originally Posted by ldevil
Du hast evtl. am falschen Ort geschaut? Den inoffiziellen "Fix" findest du  .
|
Das habe ich, wie gesagt, geändert. Ohne Erfolg.
Quote:
Originally Posted by ldevil
Allerdings ist das nur ein Workaround und kein wirklicher Fix. Es kann theoretisch immer noch zu Fehlern kommen damit. Besser wäre (muss ich kurz Mal eben suchen), das hier:
|
Ich habe die komplette Funktion ersetzt. Funktioniert trotzdem nicht. Muss ich noch woanders was einstellen? Sonst belasse ich es bei meinem Workaround.
Danke schonmal.
|
|
|
01/17/2012, 17:56
|
#5302
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Eigentlich nicht, wär jetzt natürlich interessant zu wissen, woran das liegt.
Hast du selber noch mehr verändert als nur die eine Funktion zu ersetzten?
Weil wenn nicht verstehe ich echt nicht wieso das mit dem BO nicht klapp, könntest du daher kurz posten:
Was für einen Char du spielst ?
Was für Eq dein Char hat?
Und die Char so wie die Global Config ?
|
|
|
01/17/2012, 20:24
|
#5303
|
elite*gold: 0
Join Date: Jan 2012
Posts: 8
Received Thanks: 0
|
Als ich es probiert habe, hatte ich nur die Funktion ersetzt und den oben genannten Fix in NTCommon (Zeile 1224) eingetragen. Die Variablen in der NTPrecast waren testweise beide auf 0, also Standard.
Ich spiele Hammerdin. Equip ist das übliche: Shaco, Enigma, Zaka, Maras, Hoto, Wt und 2 Ringe halt
Char-Config:
Code:
/**
* This file was modified by
* Check the programming section for updates and further scripts
* Last Update: 23:10 29.08.2011
*
* Hotkey Description
*
* Pause/Break Pauses the current bot script.
* Page up (PgUp) Skips the current bot script.
* Page down (PgDn) Repeats the previous bot script
* Home (Pos1) Shows your current coordinates and areaid.
* End Shows current ping in status text bar.
* Insert (Ins) Logs all items on your char to either XML or TXT.
* Delete (Del) Exits the game. NOTE: Always use this key to leave a game!
* Backspace Force trigger auto mule. NOTE: Won't work unless auto mule is actually activated for the current char.
*/
Include("NTBot/char_configs/MWConfig_GlobalSettings.ntl");
var NTConfig_UseRedemptionHP;
var NTConfig_UseRedemptionMP;
function NT_LoadConfig()
{
MW_LoadGlobalSettings();
//------------------------------------------------------------------------------
//
// Run Configuration
//
//------------------------------------------------------------------------------
// Use the following syntax for activating botscripts: MWConfig_Script.push([<ScriptName>, <Script runtime in minutes (0 is infinite)>]);
// ***************** Current schedule ******************
MWConfig_Script.push(["NTMephisto.ntj", 5]); MWConfig_OpenMephistoChest = true; MWConfig_MephistoClearArea = false;
MWConfig_Script.push(["NTDuriel.ntj", 10]); MWConfig_ClearPathSpectypes.Duriel = 0;
MWConfig_Script.push(["NTAndariel.ntj", 5]);
MWConfig_Script.push(["NTCountess.ntj", 5]); MWConfig_ClearPathSpectypes.Countess = 0; MWConfig_ClearAreaSpectypes.Countess = 0;
MWConfig_Script.push(["NTEldritch.ntj", 5]); NTConfig_ShenkExtension = true;
MWConfig_Script.push(["NTSummoner.ntj", 5]); NTConfig_KillFireEye = false; MWConfig_ClearPathSpectypes.Summoner = 0;
MWConfig_Script.push(["NTTravincal.ntj", 5]);
MWConfig_Script.push(["MWKurastSewers.ntj", 5]); MWConfig_ClearPathSpectypes.KurastSewers = 0;
MWConfig_Script.push(["MWRiverOfFlame.ntj", 10]); MWConfig_ClearAreaSpectypes.RiverOfFlame = 0x01;
MWConfig_Script.push(["MWSuperChests.ntj", 20]); MWConfig_SuperChestClearAreaRadius = 5; MWConfig_SuperChestAreas = ["Arachnid Lair", "Swampy Pit Level 3", "Flayer Dungeon", "Abbadon", "Pit of Acheron", "Drifter Cavern", "Infernal Pit", "Icy Cellar"];
MWConfig_Script.push(["NTPindleskin.ntj", 5]); NTConfig_NihlathakExtension = true; MWConfig_SkipOnTombVipers = true;
//MWConfig_Script.push(["NTCows.ntj", 10]);
//MWConfig_Script.push(["NTMausoleum.ntj", 10]); MWConfig_ClearPathSpectypes.Mausoleum = 0; MWConfig_ClearAreaSpectypes.Mausoleum = 0x01; NTConfig_KillBloodRaven = true;
//MWConfig_Script.push(["NTAncientTunnels.ntj", 10]); MWConfig_ClearPathSpectypes.AncientTunnels = 0; MWConfig_ClearAreaSpectypes.AncientTunnels = 0x01;
//MWConfig_Script.push(["NTPit.ntj", 10]); MWConfig_ClearPathSpectypes.Pit = 0; MWConfig_ClearAreaSpectypes.Pit = 0x01; NTConfig_ClearPitLevel1 = 2; // 0 : don't clear, 1 : clear path only, 2 : clear all
//MWConfig_Script.push(["NTAncientTunnels.ntj", 10]); MWConfig_ClearPathSpectypes.AncientTunnels = 0x01; MWConfig_ClearAreaSpectypes.AncientTunnels = 0x01;
//MWConfig_Script.push(["MWKurastSewers.ntj", 5]); MWConfig_ClearPathSpectypes.KurastSewers = 0;
//MWConfig_Script.push(["NTTravincal.ntj", 5]);
//MWConfig_Script.push(["NTNihlathak.ntj", 5]); MWConfig_ClearPathSpectypes.Nihlathak = 0; NTConfig_PindleskinExtension = false; MWConfig_SkipOnTombVipers = true;
//MWConfig_Script.push(["NTBaal.ntj", 10]); NTConfig_KillBaal = true; MWConfig_SkipBaalOnDolls = true; MWConfig_SkipBaalOnSouls = false; MWConfig_DoBaalPreAttack = true;
//MWConfig_Script.push(["NTDiablo.ntj", 10]); MWConfig_KillFullInfectorMob = true; MWConfig_StartAtStar = false; MWConfig_IgnoreSealOpeningErrors = false; MWConfig_FastDia = true;
// *****************************************************
//------------------------------------------------------------------------------
// Available Scripts
//------------------------------------------------------------------------------
/* NOTE:
// The scripts below are actually commented out; to add a script, copy one of the lines below and add it to the current schedule above. ;)
// You should also get yourself a decent editor that supports syntax highlighting for JavaScript, I'd recommend Notepad++. (http://notepad-plus-plus.org/download/)
// *********************** Act I ***********************
MWConfig_Script.push(["NTMausoleum.ntj", 10]); MWConfig_ClearPathSpectypes.Mausoleum = 0; MWConfig_ClearAreaSpectypes.Mausoleum = 0x01; NTConfig_KillBloodRaven = true;
MWConfig_Script.push(["NTTristram.ntj", 10]); NTConfig_KillRakanishu = true;
MWConfig_Script.push(["NTHole.ntj", 10]); MWConfig_ClearPathSpectypes.Hole = 0; MWConfig_ClearAreaSpectypes.Hole = 0x01; NTConfig_ClearHoleLevel1 = 1; // 0 : don't clear, 1 : clear path only, 2 : clear all
MWConfig_Script.push(["NTTreehead.ntj", 10]);
MWConfig_Script.push(["MWColdcrow.ntj", 10]); MWConfig_ClearCaveMode = 0; // 0: Only kill coldcrow; 1: Clear Cave Level 1; 2: Clear both Cave Level 1 & 2
MWConfig_Script.push(["NTCountess.ntj", 5]); MWConfig_ClearPathSpectypes.Countess = 0; MWConfig_ClearAreaSpectypes.Countess = 0;
MWConfig_Script.push(["NTPit.ntj", 10]); MWConfig_ClearPathSpectypes.Pit = 0; MWConfig_ClearAreaSpectypes.Pit = 0x01; NTConfig_ClearPitLevel1 = 2; // 0 : don't clear, 1 : clear path only, 2 : clear all
MWConfig_Script.push(["NTAndariel.ntj", 10]);
// *********************** Act II **********************
MWConfig_Script.push(["NTRadament.ntj", 10]); MWConfig_ClearPathSpectypes.Radament = 0;
MWConfig_Script.push(["MWMaggotsLair.ntj", 10]); MWConfig_ClearPathSpectypes.MaggotsLair = 0; MWConfig_ClearAreaSpectypes.MaggotsLair = 0x01;
MWConfig_Script.push(["NTAncientTunnels.ntj", 10]); MWConfig_ClearPathSpectypes.AncientTunnels = 0; MWConfig_ClearAreaSpectypes.AncientTunnels = 0x01;
MWConfig_Script.push(["NTSummoner.ntj", 5]); NTConfig_KillFireEye = false; MWConfig_ClearPathSpectypes.Summoner = 0;
MWConfig_Script.push(["NTDuriel.ntj", 10]); MWConfig_ClearPathSpectypes.Duriel = 0;
// ********************** Act III **********************
MWConfig_Script.push(["MWFlayerJungle.ntj", 10]); MWConfig_ClearAreaSpectypes.FlayerJungle = 0x01;
MWConfig_Script.push(["MWKurastSewers.ntj", 5]); MWConfig_ClearPathSpectypes.KurastSewers = 0;
MWConfig_Script.push(["MWKurastTemples.ntj", 5]); MWConfig_ClearPathSpectypes.KurastTemples = 0; MWConfig_ClearAreaSpectypes.KurastTemples = 0x01;
MWConfig_Script.push(["NTTravincal.ntj", 5]);
MWConfig_Script.push(["NTMephisto.ntj", 5]); MWConfig_OpenMephistoChest = true; MWConfig_MephistoClearArea = true;
// *********************** Act IV **********************
MWConfig_Script.push(["NTIzual.ntj", 5]); MWConfig_ClearPathSpectypes.Izual = 0;
MWConfig_Script.push(["MWRiverOfFlame.ntj", 10]); MWConfig_ClearAreaSpectypes.RiverOfFlame = 0x01;
MWConfig_Script.push(["NTHephasto.ntj", 10]); MWConfig_ClearPathSpectypes.Hephasto = 0;
MWConfig_Script.push(["NTDiablo.ntj", 10]); MWConfig_KillFullInfectorMob = true; MWConfig_StartAtStar = false; MWConfig_IgnoreSealOpeningErrors = false; MWConfig_FastDia = true;
// *********************** Act V ***********************
MWConfig_Script.push(["MWAbbadon.ntj", 10]); MWConfig_ClearPathSpectypes.Abbadon = 0; MWConfig_ClearAreaSpectypes.Abbadon = 0x01;
MWConfig_Script.push(["MWPitOfAcheron.ntj", 10]); MWConfig_ClearPathSpectypes.PitOfAcheron = 0; MWConfig_ClearAreaSpectypes.PitOfAcheron = 0x01;
MWConfig_Script.push(["MWInfernalPit.ntj", 10]); MWConfig_ClearPathSpectypes.InfernalPit = 0; MWConfig_ClearAreaSpectypes.InfernalPit = 0x01;
MWConfig_Script.push(["MWHallsOfPain.ntj", 15]); MWConfig_ClearAreaSpectypes.HallsOfPain = 0x01; MWConfig_ClearHallsOfAnguish = true;
MWConfig_Script.push(["NTPindleskin.ntj", 5]); NTConfig_NihlathakExtension = false; MWConfig_SkipOnTombVipers = true;
MWConfig_Script.push(["NTEldritch.ntj", 5]); NTConfig_ShenkExtension = true;
MWConfig_Script.push(["NTThreshSocket.ntj", 5]); MWConfig_ClearPathSpectypes.ThreshSocket = 0;
MWConfig_Script.push(["NTFrozenRiver.ntj", 10]); MWConfig_ClearPathSpectypes.FrozenRiver = 0; MWConfig_ClearAreaSpectypes.FrozenRiver = 0x01;
MWConfig_Script.push(["NTGlacialTrail.ntj", 10]); MWConfig_ClearPathSpectypes.GlacialTrail = 0; MWConfig_ClearAreaSpectypes.GlacialTrail = 0x01;
MWConfig_Script.push(["NTIcyCellar.ntj", 5]); MWConfig_ClearPathSpectypes.IcyCellar = 0; MWConfig_ClearAreaSpectypes.IcyCellar = 0x01;
MWConfig_Script.push(["NTNihlathak.ntj", 5]); MWConfig_ClearPathSpectypes.Nihlathak = 0; NTConfig_PindleskinExtension = false; MWConfig_SkipOnTombVipers = true;
MWConfig_Script.push(["MWWorldstoneKeep.ntj", 10]); MWConfig_ClearAreaSpectypes.WorldstoneKeep = 0x01; MWConfig_SkipLevelOnWitches = true; MWConfig_SkipLevelOnSouls = false; MWConfig_SkipLevelOnDeathLords = true;
MWConfig_Script.push(["NTBaal.ntj", 10]); NTConfig_KillBaal = true; MWConfig_SkipBaalOnDolls = true; MWConfig_SkipBaalOnSouls = false; MWConfig_DoBaalPreAttack = true; MWConfig_ClearPathSpectypes.Baal = 0;
// *********************** Misc ************************
MWConfig_Script.push(["MWAuraStack.ntj", 10]); MWConfig_StackRepetitions = 100; MWConfig_ResetMercWeaponAfterStacking = false;
MWConfig_Script.push(["MWSuperChests.ntj", 20]); MWConfig_SuperChestClearAreaRadius = 10; MWConfig_SuperChestAreas = ["Cave Level 2", "Mausoleum", "Hole Level 2", "Pit Level 2", "Sewers Level 3", "Halls of the Dead Level 2", "Stony Tomb Level 2", "Maggot's Lair Level 3", "Ancient Tunnels", "Tal Rasha's Tomb", "Arachnid Lair", "Swampy Pit Level 3", "Flayer Dungeon", "Sewers Level 2", "Abbadon", "Pit of Acheron", "Drifter Cavern", "Infernal Pit", "Icy Cellar", "Halls of Pain"];
MWConfig_Script.push(["MWRush.ntj", 0]); MWConfig_IsRusher = true;
MWConfig_Script.push(["MWWaypointCatcher.ntj", 0]); MWConfig_WaypointCatcherActs = [1, 2, 3, 4, 5]; MWConfig_TPWaypoints = true; MWConfig_SkipHallsOfPain = true; MWConfig_ClearWaypointPaths = false;
MWConfig_Script.push(["MWIdleMode.ntj", 0]); MWConfig_IdleModeRuntime = 5; // Runtime in Minutes
MWConfig_Script.push(["NTCows.ntj", 10]);
MWConfig_Script.push(["MWBloodyRejuvs.ntj", 10]);
MWConfig_Script.push(["MWOrganHarvest.ntj", 10]); MWConfig_EnterInvalidUberPortals = true; MWConfig_PauseOnLackOfKeys = false; MWConfig_IntendedUberPortal = 0; // Matron's Den: 133; Forgotten Sands: 134; Furnace Of Pain: 135;
MWConfig_Script.push(["MWUberTristram.ntj", 10]); MWConfig_PauseOnLackOfOrgans = false; MWConfig_PauseOnKeptTorch = false;
MWConfig_Script.push(["MWAnyasBargain.ntj", 10]); MWConfig_ShoppingMinGold = 500000; MWConfig_ShoppingAttempts = 200;
// ************ Leech and friends by lanara ************
MWConfig_Script.push(["NTDiabloLeechFight.ntj", 10]); MWConfig_StartAtStar = true; MWConfig_EnterUnsafeTP = true; NTConfig_PreBuff = true; MWConfig_IgnoreSealOpeningErrors = true; NTConfig_Leader = "LeaderNameGoesHere";
MWConfig_Script.push(["NTBaalLeech.ntj", 10]); NTConfig_KillBaal = true; MWConfig_EnterUnsafeTP = false; NTConfig_Leader = "LeaderNameGoesHere";
MWConfig_Script.push(["NTBaalLeechFight.ntj", 10]); NTConfig_KillBaal = true; MWConfig_DoBaalPreAttack = true; MWConfig_EnterUnsafeTP = true; NTConfig_Leader = "LeaderNameGoesHere";
*/
//------------------------------------------------------------------------------
// Misc Configuration
//------------------------------------------------------------------------------
NTConfig_SkipHealLife = 90; // If you have more than this percent of life, you won't go to a healer.
NTConfig_SkipHealMana = 70; // If you have more than this percent of mana, you won't go to a healer
NTConfig_UseMerc = true; // Set to true if you use a mercenary, will revive merc at a reviver npc.
// Exit game or to reset your Enigma if Teleport skill is missing (due to identifying an item having +x to Teleport [Sorceress only]). WARNING: Activating this feature may - though not likely will - result in the loss of your enigma. Use at your own risk and make sure your char has sufficient strength!
// 0: Don't do anything; 1: Reset armor; 2: Exit game
MWConfig_ResetArmorMode = 0;
//------------------------------------------------------------------------------
// Potion Configuration
//------------------------------------------------------------------------------
NTConfig_LifeThresh = 80; // Drink a normal potion if under this percent of life.
NTConfig_LifeRejuvThresh = 40; // Drink a rejuvenation potion if under this percent of life.
NTConfig_ManaThresh = 30; // Drink a normal potion if under this percent of mana.
NTConfig_ManaRejuvThresh = 0; // Drink a rejuvenation potion if under this percent of mana.
NTConfig_MercLifeThresh = 80; // This is the threshold to use a life potion on your merc in percent.
NTConfig_MercRejuvThresh = 30; // This is the threshold to use a rejuv potion on your merc in percent.
//------------------------------------------------------------------------------
// Chicken Configuration
//------------------------------------------------------------------------------
// This is your chicken life. If you go below this threshhold, your char will exit the game. You can either enter a percentage (1-100), an absolute threshold (>100) or 0 to deactivate life chicken.
NTConfig_LifeChicken = 30;
// This is your chicken mana. If you go below this threshhold, your char will exit the game. You can either enter a percentage (1-100), an absolute threshold (>100) or 0 to deactivate mana chicken.
NTConfig_ManaChicken = 0;
// This is your merc's chicken life in percent. If your merc goes below this threshhold, your char will exit the game.
NTConfig_MercChicken = 0;
// Whether or not to disable chicken when you pause the bot.
MWConfig_DisableChickenOnPause = true;
//------------------------------------------------------------------------------
// Inventory Configuration
//------------------------------------------------------------------------------
// Each number represents a slot in your inventory.
// Set to 0 if the slot and its content must not be touched.
// Set to 1 to allow access to this slot.
// Set to 2 to select the slot that is used for storing keys. (if keys are kept at another slot, your char will try to move them)
NTConfig_Columns[0] = [1,1,1,1,1,1,1,1,0,0];
NTConfig_Columns[1] = [1,1,1,1,1,1,1,1,0,0];
NTConfig_Columns[2] = [1,1,1,1,1,1,1,1,0,0];
NTConfig_Columns[3] = [1,1,1,1,1,1,1,2,0,0];
// Number of free columns. If less full columns are free stashing is set. Call SetFreeColumns(NTConfig_Columns) to always stash right away (recommended).
NTConfig_FreeSpace = SetFreeColumns(NTConfig_Columns);
// Maximum gold amount carried before going to stash.
NTConfig_MinGoldToStash = 100000;
// Set to true if your char is supposed to carry, buy and pick up keys. You do not need to add keys to your .nip files, they will be picked up anyway if this is set to true.
MWConfig_CarryKeys = true;
//------------------------------------------------------------------------------
// Belt Configuration
//------------------------------------------------------------------------------
// Available types : "hp" = health, "mp" = mana, "rv" = rejuvenation.
// Define how many columns are used for each potion type.
MWConfig_BeltColType["hp"].Columns = 2;
MWConfig_BeltColType["mp"].Columns = 1;
MWConfig_BeltColType["rv"].Columns = 1;
// Define minimum number of potions per column. If the actual number of potions in a column is below this value, your char will visit a merchant when in town in order to buy potions.
MWConfig_BeltColType["hp"].MinPots = 4;
MWConfig_BeltColType["mp"].MinPots = 4;
// Visit Town and buy potions if your char lacks mana when trying to loot a corpse or teleport.
MWConfig_BuyPotionsOnLackOfMana = true;
// Set to true to replace low quality potions with higher quality potions that just dropped.
MWConfig_ReplaceLowQualityPotions = true;
//-----------------------------------------------------------------------------------
// NipFile Configuration
//-----------------------------------------------------------------------------------
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");
//------------------------------------------------------------------------------
// Pickit Configuration
//------------------------------------------------------------------------------
// Radius to check for dropped items. NOTE: The maximum is at about ~75, entering higher values will not have any effect.
NTConfig_SnagRange = 70;
// Set to true to check for dropped items whenever you kill a monster. (Recommended value to avoid crashes: false)
MWConfig_PickItemsInstantly = false;
//------------------------------------------------------------------------------
// Chest Configuration
//------------------------------------------------------------------------------
// Select which containers shall be looted. 0: None; 1: Super Chests, 2: All
MWConfig_OpenContainerMode = 2;
// Set to true to check for dropped items right after opening a chest. NOTE: This will slow down your runs and therefore should definately be set to false when doing private games.
MWConfig_PickChestLootsInstantly = false;
// This is the range being checked for chests after clearing an area or room. NOTE: You should not set this too high, 30 is a good value.
MWConfig_OpenChestsRange = 30;
// If you do not like to open chests in a certain area, you can its areaid as an exception below. NOTE: All areaids can be found in "sdk\areas.txt".
// MWConfig_ChestExceptions.push(<areaid1>, <areaid2>, <areaidn>);
//------------------------------------------------------------------------------
// Cubing Configuration
//------------------------------------------------------------------------------
// Set to true to enable cubing and crafting. NOTE: The recipes are added in the global config by default. If you like to craft certain recipe only using this very char, add those recipes below.
NTConfig_Cubing = false;
//------------------------------------------------------------------------------
// General Configuration
//------------------------------------------------------------------------------
// Set to true to activate public mode. By activating public mode, your char will form a party, open TPs and do some chat outputs when running certain bot scripts.
NTConfig_PublicMode = false;
// Set to true to exit the game instantly if the game is public. This may happen sometimes due to an error pasting the password correctly.
MWConfig_ExitGameOnMissingPassword = false;
// Set to true to exit the game when another player expresses hostility towards you.
me.quitonhostile = false;
// This is the maximum time in seconds your char will remain in a single game. Set to 0 to stay in game infinitely.
me.maxgametime = 3000;
// This is the minimum time in seconds for your char to remain in a single game. Your char will not exit the game before this time elapsed.
me.mingametime = 0;
//------------------------------------------------------------------------------
// Automule Configuration
//------------------------------------------------------------------------------
// Set to true to enable auto mule.
MWConfig_Automule.Activated = false;
// The maximum stash load in percent before auto mule is triggered.
MWConfig_Automule.MaxLoad = 95;
// Set to true to show your stash's current load whenever managing stash.
MWConfig_Automule.ShowCurrentLoad = true;
// Set to true to finish your current game before muling, otherwise the game is left right away in case your stash is full.
MWConfig_Automule.FinishGame = true;
// Define which items are not to be touched when muling.
MWConfig_Automule.DontMule.push("mule/dont_mule.nip");
MWConfig_Automule.DontMule.push("mule/gems.nip");
//------------------------------------------------------------------------------
// Shrine Configuration
//------------------------------------------------------------------------------
// Set to true to activate nearby shrines. Shrines will only be activated if it is actually useful.
MWConfig_ActivateNearbyShrines = true;
// If you would like to skip shrines in a certain area, you can its areaid as an exception below. NOTE: All areaids can be found in "sdk\areas.txt".
// MWConfig_ShrineExceptions.push(<areaid1>, <areaid2>, <areaidn>);
//------------------------------------------------------------------------------
// Precast Configuration
//------------------------------------------------------------------------------
// Your precast skills can be defined in the array below. NOTE: Battle Command, Battle Orders and Shout will be cast automatically. Constants for all skill ids can be found in "scripts\libs\common\MWSkills.ntl".
MWConfig_PrecastSkills = [MWS_HOLY_SHIELD];
// Set this to true if you would like to switch slots right after casting BC, BO and Shout. If set to false, your char will remain with the BO Slot until the whole precast procedure is done.
MWConfig_SwitchSlotsAfterBoPrecast = true;
//------------------------------------------------------------------------------
// Attack Configuration
//------------------------------------------------------------------------------
// Specify your attack skills below. NOTE: Constants for all skill ids can be found in "scripts\libs\common\MWSkills.ntl".
NTConfig_AttackSkill[0] = -1; // This skill is used once whenever attacking a new target. Set to -1 to deactivate.
NTConfig_AttackSkill[1] = MWS_BLESSED_HAMMER; // Primary skill to bosses.
NTConfig_AttackSkill[2] = MWS_CONCENTRATION; // Primary aura to bosses. Set to -1 to deactivate.
NTConfig_AttackSkill[3] = MWS_BLESSED_HAMMER; // Primary skill to others.
NTConfig_AttackSkill[4] = MWS_CONCENTRATION; // Primary aura to others. Set to -1 to deactivate.
NTConfig_AttackSkill[5] = MWS_HOLY_BOLT; // Secondary skill in case monster is immune to primary skill. Set to 0 if you won't
NTConfig_AttackSkill[6] = MWS_CONCENTRATION; // Secondary aura. Set to 0 not to activate any aura.
NTConfig_AttackSkill[7] = MWS_SALVATION; // Aura to be used against Uber Mephisto. Set to -1 to deactivate.
// Set to true if you want to clear area after killing boss. NOTE: This only affects a few botscripts.
NTConfig_ClearPosition = false;
// Set to true to clear area when killing a boss and the position is crowded by monsters. NOTE: Setting this to true may cause NTA_KillMonster() to fail way more often.
MWConfig_ClearBossPosition = true;
// This is the number of attacks to be performed before the the character tries to move to another position. Set to 0 not to reposition.
MWConfig_AttacksBeforeRepositioning = 25;
// Define a time limit for your attacks for each type of monster.
MWConfig_AttackTimeLimit[0] = 20; // Maximum time in seconds to attack a normal monster
MWConfig_AttackTimeLimit[1] = 120; // Maximum time in seconds to attack a super unique monster
MWConfig_AttackTimeLimit[2] = 30; // Maximum time in seconds to attack a champion
MWConfig_AttackTimeLimit[3] = 120; // Maximum time in seconds to attack a bosse
MWConfig_AttackTimeLimit[4] = 30; // Maximum time in seconds to attack a minion
// Define when a monster is considered immune by entering the index of one or more of your attack skills. As an example: [1, 3] means that a monster is considered immune if it is immune to both NTConfig_AttackSkill[1] and NTConfig_AttackSkill[3], whatever those may be.
MWConfig_CheckImmunitySkills = [1];
// Select the behaviour of your character when encountering a monsters that is considered immune referring to the definition above.
// 0: Don't do anything. (D2NT default)
// 1: Get close to the monster.
// 2: Skip the monster.
// 3: Attack the monster using NTConfig_AttackSkill[8] and NTConfig_AttackSkill[9]
NTConfig_BehaviourOnImmuneMonster = 3;
NTConfig_AttackSkill[8] = MWS_HOLY_BOLT; // Skill to be used against user defined immunes.
NTConfig_AttackSkill[9] = MWS_HOLY_BOLT; // Untimed Skill to be used against user defined immunes.
// Activate Redemption if your health is lower than this percentage. Set to 0 not to use Redemption.
NTConfig_UseRedemptionHP = 80;
// Activate Redemption if your health is lower than this percentage. Set to 0 not to use Redemption.
NTConfig_UseRedemptionMP = 0;
// Select whether or not you'd like to swap slots right before killing a boss in order to benefit from some extra MF in your second slot.
// The first element can either be the classid of the target or its name (case insensitive), second element is the life threshold in percent.
//MWConfig_SlotSwapMonsters.push([156, 50]); // Andariel, 50%
//MWConfig_SlotSwapMonsters.push([211, 20]); // Duriel, 20%
//MWConfig_SlotSwapMonsters.push([242, 20]); // Mephisto, 20%
//MWConfig_SlotSwapMonsters.push([243, 20]); // Diablo, 20%
//MWConfig_SlotSwapMonsters.push([544, 15]); // Baal, 15%
// Check self safe in field (NOT in town). Set to 0 if you won't.
// 0x01 : Potion
// 0x02 : Poison
// 0x04 : Amplify Damage
// 0x08 : Weaken
// 0x10 : Iron Maiden
// 0x20 : Decrepify
// 0x40 : Lower Resist
NTConfig_CheckSelfSafe = 0;
// Check merc's safe in field (NOT in town). Set to 0 if you won't.
// 0x01 : Death
// 0x02 : Poison
// 0x04 : Amplify Damage
// 0x08 : Weaken
// 0x10 : Iron Maiden
// 0x20 : Decrepify
// 0x40 : Lower Resist
NTConfig_CheckMercSafe = 0x01;
}
An der Global-Config habe ich soweit nichts geändert. Lediglich ein paar Cubing-Items auskommentiert.
|
|
|
01/17/2012, 21:10
|
#5304
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Eigentlich sollst du nur die Funktion nehmen, die ich gepostet habe und den "Fix" gar nicht anschauen, nicht einmal daran denken  Kann sein, dass du dadurch nen Fehler eingebaut hast.
Aber hey wenn es für dich mit deinem Workaround funktioniert, dann ist ja gut.
Ansonsten hier die gefixte NTCommon.ntl falls du doch noch Mal testen willst. Einfach die so übernehmen, die ist die Original von Muddy + Bo Fix:
Code:
/**
* This file was modified by
* Check the programming section for updates and further scripts
* Last Update: 18:00 04.09.2011
*/
Include("libs/common/MWSkills.ntl");
var DEBUG_MASKS = new Array();
DEBUG_MASKS.Common = 0x000100;
DEBUG_MASKS.Itemlogger = 0x000200;
DEBUG_MASKS.Loot = 0x000400;
DEBUG_MASKS.UserCommands = 0x000800;
DEBUG_MASKS.Cubing = 0x001000;
DEBUG_MASKS.ItemParser = 0x002000;
DEBUG_MASKS.Move = 0x004000;
DEBUG_MASKS.Precast = 0x008000;
DEBUG_MASKS.SnagIt = 0x010000;
DEBUG_MASKS.Town = 0x020000;
DEBUG_MASKS.TownManager = 0x040000;
DEBUG_MASKS.TownMove = 0x080000;
DEBUG_MASKS.Attack = 0x100000;
/*
Bit - Function
0x01: File output
0x02: Console output
0x08: Tons of details
0x04: Some details
*/
const MWC_DEBUG_MODE = 0;
var MWC_BuyManaTriggered = false; // Status var to avoid infinite recursion
// Public D2BS constants
// Character Class
const NTC_CHAR_CLASS_AMAZON = 0;
const NTC_CHAR_CLASS_SORCERESS = 1;
const NTC_CHAR_CLASS_NECROMANCER = 2;
const NTC_CHAR_CLASS_PALADIN = 3;
const NTC_CHAR_CLASS_BARBARIAN = 4;
const NTC_CHAR_CLASS_DRUID = 5;
const NTC_CHAR_CLASS_ASSASSIN = 6;
// Act 1 NPCs
const NTC_NPC_ID_AKARA = 148;
const NTC_NPC_ID_WARRIV_ACT_1 = 155;
const NTC_NPC_ID_CHARSI = 154;
const NTC_NPC_ID_GHEED = 147;
const NTC_NPC_ID_KASHYA = 150;
const NTC_NPC_ID_CAIN_TRISTRAM = 146;
const NTC_NPC_ID_CAIN_ACT_1 = 265;
// Act 2 NPCs
const NTC_NPC_ID_FARA = 178;
const NTC_NPC_ID_LYSANDER = 202;
const NTC_NPC_ID_GREIZ = 198;
const NTC_NPC_ID_ELZIX = 199;
const NTC_NPC_ID_MESHIF_ACT_2 = 210;
const NTC_NPC_ID_DROGNAN = 177;
const NTC_NPC_ID_ATMA = 176;
const NTC_NPC_ID_WARRIV_ACT_2 = 175;
const NTC_NPC_ID_CAIN_ACT_2 = 244;
const NTC_NPC_ID_JERHYN = 201;
const NTC_NPC_ID_TYRAEL_ACT_2 = 251;
// Act 3 NPCs
const NTC_NPC_ID_MESHIF_ACT_3 = 264;
const NTC_NPC_ID_CAIN_ACT_3 = 245;
const NTC_NPC_ID_ALKOR = 254;
const NTC_NPC_ID_ASHEARA = 252;
const NTC_NPC_ID_ORMUS = 255;
const NTC_NPC_ID_HRATLI = 253;
// Act 4 NPCs
const NTC_NPC_ID_CAIN_ACT_4 = 246;
const NTC_NPC_ID_HALBU = 257;
const NTC_NPC_ID_TYRAEL_ACT_4 = 367;
const NTC_NPC_ID_JAMELLA = 405;
// Act 5 NPCs
const NTC_NPC_ID_CAIN_ACT_5 = 520;
const NTC_NPC_ID_TYRAEL_ACT_5 = 521;
const NTC_NPC_ID_LARZUK = 511;
const NTC_NPC_ID_ANYA_FROZEN_RIVER = 527;
const NTC_NPC_ID_ANYA_TOWN = 512;
const NTC_NPC_ID_MALAH = 513;
const NTC_NPC_ID_QUALKEHK = 515;
const NTC_NPC_ID_NIHLATHAK_TOWN = 514;
const NTC_NPC_ID_NIHLATHAK_HALLS_OF_VAUGHT = 526;
// UNIT types
const NTC_UNIT_PLAYER = 0;
const NTC_UNIT_NPC = 1;
const NTC_UNIT_MERC = NTC_UNIT_NPC;
const NTC_UNIT_MONSTER = NTC_UNIT_NPC;
const NTC_UNIT_OBJECT = 2;
const NTC_UNIT_MISSILE = 3;
const NTC_UNIT_ITEM = 4;
const NTC_UNIT_TILE = 5;
const NTC_UNIT_STASH = 267;
const NTC_UNIT_CUBE = 549;
const NTC_AREA_ID_ACT_1 = 1;
const NTC_AREA_ID_ACT_2 = 40;
const NTC_AREA_ID_ACT_3 = 75;
const NTC_AREA_ID_ACT_4 = 103;
const NTC_AREA_ID_ACT_5 = 109;
// COLOR types
const NTC_COLOR_BASE_WHITE = 0;
const NTC_COLOR_BASE_RED = 1;
const NTC_COLOR_BASE_GREEN = 2;
const NTC_COLOR_BASE_BLUE = 3;
const NTC_COLOR_BASE_GOLD = 4;
const NTC_COLOR_BASE_GRAY = 5;
const NTC_COLOR_BASE_BLACK = 6;
const NTC_COLOR_BASE_GOLD2 = 7;
const NTC_COLOR_BASE_ORANGE = 8;
const NTC_COLOR_BASE_YELLOW = 9;
const NTC_HAND_RIGHT = 0;
const NTC_HAND_LEFT = 1;
const NTC_CLICK_LDOWN = 0;
const NTC_CLICK_LHOLD = 1;
const NTC_CLICK_LUP = 2;
const NTC_CLICK_RDOWN = 3;
const NTC_CLICK_RHOLD = 4;
const NTC_CLICK_RUP = 5;
const NTC_SHIFT_NONE = 0;
const NTC_SHIFT_HOLD = 1;
const NTC_LOG_COMMON = 0;
const NTC_LOG_ITEM = 1;
const NTC_DELAY_FRAME = 40;
const MWC_PARTY_ID_NONE = 65535;
// The party flags represent the status of the button in party screen
const MWC_PARTY_FLAG_INVITE = 0;
const MWC_PARTY_FLAG_NONE = 1;
const MWC_PARTY_FLAG_ACCEPT = 2;
const MWC_PARTY_FLAG_CANCEL = 4;
const MWC_LOC_INVENTORY = 0;
const MWC_LOC_TRADE_WINDOW = 2;
const MWC_LOC_CUBE = 3;
const MWC_LOC_STASH = 4;
const MWC_LOC_BELT = 5;
// Item locations (item.mode == 1)
const MWC_ITEMLOC_HELM = 1;
const MWC_ITEMLOC_AMULET = 2;
const MWC_ITEMLOC_BODY_ARMOR = 3;
const MWC_ITEMLOC_RIGHT_WEAPON_I = 4;
const MWC_ITEMLOC_LEFT_WEAPON_I = 5;
const MWC_ITEMLOC_RIGHT_RING = 6;
const MWC_ITEMLOC_LEFT_RING = 7;
const MWC_ITEMLOC_BELT = 8;
const MWC_ITEMLOC_BOOTS = 9;
const MWC_ITEMLOC_GLOVES = 10;
const MWC_ITEMLOC_RIGHT_WEAPON_II = 11;
const MWC_ITEMLOC_LEFT_WEAPON_II = 12;
var NTC_ItemQualityToName = new Array(9);
NTC_ItemQualityToName[0] = "None";
NTC_ItemQualityToName[1] = "Low Quality";
NTC_ItemQualityToName[2] = "Normal";
NTC_ItemQualityToName[3] = "Superior";
NTC_ItemQualityToName[4] = "Magic";
NTC_ItemQualityToName[5] = "Set";
NTC_ItemQualityToName[6] = "Rare";
NTC_ItemQualityToName[7] = "Unique";
NTC_ItemQualityToName[8] = "Crafted";
var NTC_ItemQualityToD2Color = new Array(10);
NTC_ItemQualityToD2Color[0] = "˙c0";
NTC_ItemQualityToD2Color[1] = "˙c0";
NTC_ItemQualityToD2Color[2] = "˙c0";
NTC_ItemQualityToD2Color[3] = "˙c0";
NTC_ItemQualityToD2Color[4] = "˙c3";
NTC_ItemQualityToD2Color[5] = "˙c2";
NTC_ItemQualityToD2Color[6] = "˙c9";
NTC_ItemQualityToD2Color[7] = "˙c4";
NTC_ItemQualityToD2Color[8] = "˙c8";
NTC_ItemQualityToD2Color[9] = "˙c5";
var NTC_ItemQualityToMGRColor = new Array(10);
NTC_ItemQualityToMGRColor[0] = "˙c6";
NTC_ItemQualityToMGRColor[1] = "˙c6";
NTC_ItemQualityToMGRColor[2] = "˙c6";
NTC_ItemQualityToMGRColor[3] = "˙c6";
NTC_ItemQualityToMGRColor[4] = "˙c3";
NTC_ItemQualityToMGRColor[5] = "˙c2";
NTC_ItemQualityToMGRColor[6] = "˙c9";
NTC_ItemQualityToMGRColor[7] = "˙c4";
NTC_ItemQualityToMGRColor[8] = "˙c8";
NTC_ItemQualityToMGRColor[9] = "˙c5";
// Minion classids
const MWC_MINION_SKELETON = 363;
const MWC_MINION_SKELETAL_MAGE = 364;
const MWC_MINION_CLAY_GOLEM = 289;
const MWC_MINION_BLOOD_GOLEM = 290;
const MWC_MINION_IRON_GOLEM = 291;
const MWC_MINION_FIRE_GOLEM = 292;
const MWC_MINION_WAKE_OF_FIRE = 410;
const MWC_MINION_CHARGED_BOLT_SENTRY = 411;
const MWC_MINION_LIGHTNING_SENTRY = 412;
const MWC_MINION_WAKE_OF_INFERNO = 415;
const MWC_MINION_DEATH_SENTRY = 416;
const MWC_MINION_SHADOW_WARRIOR = 417;
const MWC_MINION_SHADOW_MASTER = 418;
const MWC_MINION_RAVEN = 419;
const MWC_MINION_SPIRIT_WOLF = 420;
const MWC_MINION_DIRE_WOLF = 421;
const MWC_MINION_SPIRIT_OF_BARBS = 422;
const MWC_MINION_HEART_OF_THE_WOLVERINE = 423;
const MWC_MINION_OAK_SAGE = 424;
const MWC_MINION_POISON_CREEPER = 425;
const MWC_MINION_CARRION_VINE = 426;
const MWC_MINION_SOLAR_CREEPER = 427;
const MWC_MINION_GRIZZLY = 428;
const MWC_MINION_ROGUE_SCOUT = 271;
const MWC_MINION_DESERT_MERCENARY = 338;
const MWC_MINION_IRON_WOLF = 359;
const MWC_MINION_BARBARIAN = 561;
function NTC_IncludeConfig(filepath, loadDefault)
{
var _configname, _configfile, _retVal;
if(arguments.length < 2)
loadDefault = true;
_retVal = false;
switch(me.classid)
{
case NTC_CHAR_CLASS_AMAZON:
_configname = "NTConfig_Amazon_" + me.charname + ".ntl";
break;
case NTC_CHAR_CLASS_SORCERESS:
_configname = "NTConfig_Sorceress_" + me.charname + ".ntl";
break;
case NTC_CHAR_CLASS_NECROMANCER:
_configname = "NTConfig_Necromancer_" + me.charname + ".ntl";
break;
case NTC_CHAR_CLASS_PALADIN:
_configname = "NTConfig_Paladin_" + me.charname + ".ntl";
break;
case NTC_CHAR_CLASS_BARBARIAN:
_configname = "NTConfig_Barbarian_" + me.charname + ".ntl";
break;
case NTC_CHAR_CLASS_DRUID:
_configname = "NTConfig_Druid_" + me.charname + ".ntl";
break;
case NTC_CHAR_CLASS_ASSASSIN:
_configname = "NTConfig_Assassin_" + me.charname + ".ntl";
break;
}
_configfile = FileOpen(filepath + "/" + _configname, 0);
if(_configfile)
{
_configfile.Close();
_retVal = true;
}
else if(loadDefault)
{
Print("˙c3Loaded default config!");
switch(me.classid)
{
case NTC_CHAR_CLASS_AMAZON:
_configname = "NTConfig_Amazon.ntl";
break;
case NTC_CHAR_CLASS_SORCERESS:
_configname = "NTConfig_Sorceress.ntl";
break;
case NTC_CHAR_CLASS_NECROMANCER:
_configname = "NTConfig_Necromancer.ntl";
break;
case NTC_CHAR_CLASS_PALADIN:
_configname = "NTConfig_Paladin.ntl";
break;
case NTC_CHAR_CLASS_BARBARIAN:
_configname = "NTConfig_Barbarian.ntl";
break;
case NTC_CHAR_CLASS_DRUID:
_configname = "NTConfig_Druid.ntl";
break;
case NTC_CHAR_CLASS_ASSASSIN:
_configname = "NTConfig_Assassin.ntl";
break;
}
}
else
return false;
Include(filepath + "/NTConfig.ntl");
Include(filepath + "/" + _configname);
return true;
}
function NTC_IncludeLibs()
{
// Class libraries
Include("libs/Classes/Vector.ntl");
Include("libs/Classes/Point.ntl");
Include("libs/Classes/Belt.ntl");
Include("libs/Classes/Storage.ntl");
// Common libraries
Include("libs/Common/NTAttack.ntl");
Include("libs/Common/NTCubing.ntl");
Include("libs/Common/NTItemParser.ntl");
Include("libs/Common/NTMove.ntl");
Include("libs/Common/NTPrecast.ntl");
Include("libs/Common/NTSnagIt.ntl");
Include("libs/Common/NTTown.ntl");
Include("libs/Common/NTTownManager.ntl");
Include("libs/Common/NTTownMove.ntl");
Include("libs/Common/MWItemlogger.ntl");
Include("libs/Common/MWLoot.ntl");
Include("libs/Common/MWUserCommands.ntl");
}
function NTC_CastSkill(skillid, usehand, x, y)
{
var _hand;
var _shift;
if(arguments.length < 1)
return false;
if(arguments.length == 1)
{
_hand = NTC_CLICK_RDOWN;
_shift = NTC_SHIFT_NONE;
usehand = NTC_HAND_RIGHT;
}
else
{
if(usehand == NTC_HAND_RIGHT)
{
_hand = NTC_CLICK_RDOWN;
_shift = NTC_SHIFT_NONE;
}
else if(usehand == NTC_HAND_LEFT)
{
_hand = NTC_CLICK_LDOWN;
_shift = NTC_SHIFT_NONE;
}
else
{
_hand = NTC_CLICK_LDOWN;
_shift = NTC_SHIFT_HOLD;
usehand = NTC_HAND_LEFT;
}
}
if(NTC_PutSkill(skillid, usehand))
{
var i, n;
var _mode;
if(!NTC_ClearCursor())
return false;
for(i = 0; i < 5; i++)
{
switch(arguments.length)
{
case 1:
case 2:
ClickMap(_hand, _shift, me.x, me.y);
break;
case 3:
if(!ClickMap(_hand, _shift, x))
{
NTC_Delay(NTC_DELAY_FRAME);
return false;
}
break;
default:
ClickMap(_hand, _shift, x, y);
break;
}
for(n = 0; n < 4; n++)
{
NTC_Delay(NTC_DELAY_FRAME);
_mode = me.mode;
if(_mode == 7 || _mode == 8 || (_mode >= 10 && _mode <= 16) || _mode == 18)
{
NTC_Delay(NTC_DELAY_FRAME);
break;
}
}
ClickMap(_hand + 2, NTC_SHIFT_NONE, null);
if(n < 4)
{
for(i = 0; i < 100; i++)
{
NTC_Delay(20);
if(me.mode != _mode)
break;
}
return true;
}
NTC_Delay(NTC_DELAY_FRAME);
}
}
return false;
}
function NTC_PutSkill(skillid, hand)
{
if(me.GetSkill(hand) == skillid)
return true;
if(GetBaseStat("skills.txt", skillid, 182))
return false;
if(NTC_GetSkillLevel(skillid) < 1)
return false;
return me.SetSkill(skillid, hand);
}
function NTC_GetSkillLevel(skillid)
{
var _level = me.GetSkill(skillid, true);
if(_level != null)
return _level;
return 0;
}
function NTC_GetCastDelay(skillid)
{
var _delay = GetBaseStat("skills.txt", skillid, 165);
if(_delay)
return (_delay * NTC_DELAY_FRAME);
return 0;
}
function NTC_SwapWeapons(switchto)
{
if(arguments.length > 0 && me.weaponstab == switchto || me.gametype == 0)
return true;
NTC_Delay(200);
if(!NTC_WaitIdleMode())
return false;
return me.SwapWeapons();
}
function NTC_DoClick(button, shift, x, y)
{
if(arguments.length < 2)
return false;
if(button != NTC_CLICK_LDOWN)
button = NTC_CLICK_RDOWN;
switch(arguments.length)
{
case 2:
ClickMap(button, shift, me.x, me.y);
break;
case 3:
if(!ClickMap(button, shift, x))
return false;
break;
default:
ClickMap(button, shift, x, y);
break;
}
NTC_Delay(200);
ClickMap(button+2, NTC_SHIFT_NONE, null);
return true;
}
function NTC_MyGold()
{
return me.GetStat(14) + me.GetStat(15);
}
function NTC_MyGoldCarry()
{
return me.GetStat(14);
}
function NTC_StashGoldFull()
{
return 2500000 <= me.GetStat(15);
}
function NTC_CharGoldFull()
{
return (me.GetStat(14) >= (me.GetStat(12)*10000));
}
function NTC_CheckOwner(object, ownername)
{
var _owner;
if(!object)
return false;
_owner = object.GetParent();
if(!_owner)
return false;
if(arguments.length < 2)
{
if(_owner == me.name || _owner.name == me.name)
return true;
}
else
{
if(typeof _owner == "string" && _owner.toLowerCase() == ownername.toLowerCase() || typeof _owner.name == "string" && _owner.name.toLowerCase() == ownername.toLowerCase())
return true;
}
return false;
}
function NTC_ItemToCursor(item, isMercItem)
{
if(me.itemoncursor)
return true;
if(arguments.length < 2)
isMercItem = false;
for(var i = 0; i <= 80; i++)
{
NTC_Delay(100);
if((i % 40) == 0)
{
if(!isMercItem)
{
if(typeof item == "number")
me.ClickItem(item);
else
me.ClickItem(0, item);
}
else if(typeof item == "number")
me.ClickMercItem(item);
}
if(me.itemoncursor)
{
NTC_PingDelay(200);
return true;
}
}
return false;
}
function NTC_ClearCursor()
{
if(!me.itemoncursor)
return true;
for(var i = 0; i < 40; i++)
{
if(i % 20 == 0)
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE);
NTC_Delay(100);
if(!me.itemoncursor)
{
if(MWConfig_ResetArmorMode)
MWSI_PickupItem(0x503B);
return true;
}
}
return false;
}
function NTC_GetMerc()
{
var _merc;
_merc = me.GetMerc();
if(_merc)
{
if(_merc.hp > 0 && _merc.mode != 0 && _merc.mode != 12)
return _merc;
}
return null;
}
function NTC_GetSpecialChest()
{
var _chest;
_chest = NTC_FindUnit(NTC_UNIT_OBJECT, GetLocaleString(3260));
if(_chest)
{
do
{
switch(_chest.classid)
{
case 354:
case 355:
case 356:
case 397:
case 405:
case 406:
case 407:
return _chest;
}
} while(_chest.GetNext());
}
return null;
}
function NTC_OpenChest(chest)
{
if(!chest)
return false;
if(chest.mode > 0)
return false;
for(var i = 1; i <= 10; i++)
{
if(chest.mode > 0)
{
NTC_SendMsgToScript("MWBotGame.ntj", "SET_CHESTOPENEND_1");
return true;
}
if(NTC_WaitIdleMode())
{
if(MWConfig_UseTelekinesisMode >= 2 && i < 5 && NTC_GetSkillLevel(43) > 0)
MWC_CastTelekinesis(chest);
else
{
if(GetDistance(me, chest) >= 2 || i % 5 == 0)
{
if(NTM_MoveTo(chest.areaid, chest.x + Random(-1, 1), chest.y + Random(-1, 1), 2))
NTC_WaitIdleMode();
else
return false;
}
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, chest);
}
}
}
return false;
}
function NTC_Delay(amount, random)
{
if(arguments.length < 2)
Delay(amount);
else
Delay(amount + Random(0, random));
}
function NTC_PingDelay(amount)
{
var _currentping = me.ping;
if(_currentping > 100)
_currentping -= 100;
else
_currentping = 0;
NTC_Delay(amount+_currentping);
}
function NTC_InTown(who)
{
var _areaid;
if(arguments.length < 1)
who = me;
while(who.areaid == 0)
NTC_Delay(NTC_DELAY_FRAME);
_areaid = who.areaid;
return (_areaid == NTC_AREA_ID_ACT_1 || _areaid == NTC_AREA_ID_ACT_2 || _areaid == NTC_AREA_ID_ACT_3 || _areaid == NTC_AREA_ID_ACT_4 || _areaid == NTC_AREA_ID_ACT_5);
}
function NTC_InMyParty(playerName)
{
var _player, _myPartyId;
_player = GetPlayerUnit();
if(arguments.length < 1 || !playerName)
return false;
if(_player)
{
_myPartyId = _player.partyid;
if(_myPartyId != 65535)
{
do
{
if(_myPartyId == _player.partyid && _player.name.toLowerCase() == playerName.toLowerCase())
return true;
} while(_player.GetNext());
}
}
return false;
}
function NTC_FindUnit(unittype, search, retry)
{
var _unit;
switch(arguments.length)
{
case 0:
return null;
case 1:
search = null;
case 2:
retry = 0;
break;
}
for(var i = 0 ; i <= retry ; i++)
{
_unit = GetUnit(unittype, search);
if(_unit)
return _unit;
if(i < retry)
NTC_Delay(200);
}
return null;
}
function NTC_GetBeltSize()
{
var _items = me.GetItems();
if(!_items)
return 1;
for(var i = 0 ; i < _items.length ; i++)
{
if(_items[i].mode == 1 && _items[i].itemloc == 8)
{
if(_items[i].classid == 344 || _items[i].classid == 345)
return 2;
else if(_items[i].classid == 346 || _items[i].classid == 347)
return 3;
return 4;
}
}
return 1;
}
function NTC_FindScript(scriptname)
{
var _script, _scriptpath;
_script = GetScript();
if(_script && scriptname)
{
do
{
_scriptpath = _script.name.toLowerCase();
if(_scriptpath.indexOf(scriptname.toLowerCase()) != -1)
return _script;
} while(_script.GetNext());
}
return null;
}
function MWC_FindCurrentBotScript()
{
var _script;
_script = GetScript();
if(_script)
{
do
{
if(_script.running && _script.name.indexOf("Tools") == -1 && _script.name.indexOf("Bot") == -1)
return _script;
} while(_script.GetNext());
}
return null;
}
function NTC_SendMsgToScript(scriptname, msg)
{
var _script, _errorArgStartIndex, _msg;
// Determine which is the first argument that belongs to the error description
if(typeof msg == "string")
{
_errorArgStartIndex = 2;
_msg = msg;
}
else // If msg is a pointer to a function object
{
_errorArgStartIndex = 1;
_msg = msg.name + "()";
}
MWC_WriteErrorDescription(_errorArgStartIndex, arguments);
_script = NTC_FindScript(scriptname);
if(_script)
return _script.Send(_msg);
return false;
}
function NTC_StopScript(scriptname)
{
var _script = NTC_FindScript(scriptname);
if(_script)
{
if(_script.running)
return _script.Stop();
else
return true;
}
return false;
}
function NTC_WaitIdleMode()
{
var _mode;
for(var i = 0; i < 25; i++)
{
_mode = me.mode;
if((_mode >= 1 && _mode <= 3) || _mode == 5 || _mode == 6)
return true;
NTC_Delay(NTC_DELAY_FRAME);
}
return false;
}
function NTC_SendLogToOOG(type, logString)
{
return SendCopyData("D2NT Manager", null, 9<<16|type, logString);
}
function MWC_GetItemColorInt(itemunit)
{
if(!itemunit)
return 0;
if(NTC_UNIT_CUBE == itemunit.classid || (itemunit.itemflag&0x4000000) || 544 <= itemunit.classid && 555 >= itemunit.classid || 524 == itemunit.classid || 525 == itemunit.classid)
return 7;
else if(itemunit.itemtype == 74 || (itemunit.classid >= 644 && itemunit.classid <= 657))
return 8;
else if(itemunit.quality <= 3 && ((itemunit.itemflag & 0x400000) || itemunit.GetStat(194)))
return 9;
else
return itemunit.quality;
}
function MWC_GetGameNumber(gamename)
{
var myCount, countString;
if(gamename)
return -1;
else
{
countString = lastGameString.slice(lastGameString.lastIndexOf('-')+1);
switch(countString)
{
case "08":
myCount = 9;
break;
case "09":
myCount = 10;
break;
default:
myCount = parseInt(countString) + 1;
break;
}
return myCount;
}
}
function MWC_GetPotionCountInt(type)
{
var _items, _count;
_items = me.GetItems();
if(_items)
{
_count = 0;
for(i = 0 ; i < _items.length ; i++)
{
if(_items[i].mode == 2 && _items[i].code.indexOf(type) != -1)
_count++;
}
return _count;
}
}
function MWC_GetRandomColor()
{
var _colors = ['0', '1', '2', '3', '4', '5', '7', '8', '9', '<', ';', ':'];
var _rndIndex = Random(0, _colors.length - 1);
NTC_Delay(1);
return "˙c" + _colors[_rndIndex];
}
function MWC_WriteToTextfile(text, filepath, mode, timestamp)
{
var _fhandle, _lines, _time;
if(arguments.length < 4)
timestamp = false;
_fhandle = FileOpen(filepath, mode);
if(_fhandle)
{
if(timestamp)
{
_time = new Date().toLocaleFormat("%H:%M:%S");
_lines = text.split("\n");
for(var i = 0; i < _lines.length; i++)
_fhandle.WriteLine("["+ _time + "] " + text);
}
else
_fhandle.WriteLine(text);
_fhandle.Close();
return true;
}
return false;
}
function MWC_CharClassIdToString(id)
{
switch(id)
{
case NTC_CHAR_CLASS_AMAZON:
return GetLocaleString(4011);
case NTC_CHAR_CLASS_SORCERESS:
return GetLocaleString(4010);
case NTC_CHAR_CLASS_NECROMANCER:
return GetLocaleString(4009);
case NTC_CHAR_CLASS_PALADIN:
return GetLocaleString(4008);
case NTC_CHAR_CLASS_BARBARIAN:
return GetLocaleString(4007);
case NTC_CHAR_CLASS_DRUID:
return GetLocaleString(4012);
case NTC_CHAR_CLASS_ASSASSIN:
return GetLocaleString(4013);
default:
return "Unknown";
}
}
function MWC_PrintDesc(string, color)
{
var _lines, _color;
if(arguments.length > 1)
_color = "˙c" + color;
else
_color = MWC_GetRandomColor();
_lines = string.split("\n");
for(var i = 0; i < _lines.length; i++)
Print(_color + _lines[i]);
return true;
}
function MWC_CheckForExpShrineUsers()
{
var _player;
_player = NTC_FindUnit(NTC_UNIT_PLAYER);
if(_player)
{
do
{
if(_player.GetState(137) && NTC_InMyParty(_player.name) && _player.areaid == me.areaid)
return true;
} while(_player.GetNext());
}
return false;
}
function MWC_GetMinionName(type)
{
switch(type)
{
case 70:
return "Skeleton";
case 80:
return "Skeletal Mage";
case 95:
return "Revive";
}
return "Minion";
}
function MWC_GetMinionCount(type)
{
var _monsters, _count, _classIds, _quickReturn;
var i;
_quickReturn = false;
_classIds = new Array();
_count = 0;
switch(type)
{
case MWS_RAISE_SKELETON:
_classIds.push(MWC_MINION_SKELETON);
break;
case MWS_RAISE_SKELETAL_MAGE:
_classIds.push(MWC_MINION_SKELETAL_MAGE);
break;
case MWS_SUMMON_GRIZZLY:
_classIds.push(MWC_MINION_GRIZZLY);
_quickReturn = true;
break;
case MWS_VALKYRIE:
return false; // TODO: Check classid
case MWS_RAVEN:
_classIds.push(MWC_MINION_RAVEN);
break;
case MWS_CLAY_GOLEM:
_classIds.push(MWC_MINION_CLAY_GOLEM);
_classIds.push(MWC_MINION_IRON_GOLEM);
_quickReturn = true;
break;
case MWS_BLOOD_GOLEM:
_classIds.push(MWC_MINION_BLOOD_GOLEM);
_classIds.push(MWC_MINION_IRON_GOLEM);
_quickReturn = true;
break;
case MWS_FIRE_GOLEM:
_classIds.push(MWC_MINION_FIRE_GOLEM);
_classIds.push(MWC_MINION_IRON_GOLEM);
_quickReturn = true;
break;
case MWS_SHADOW_WARRIOR:
_classIds.push(MWC_MINION_SHADOW_WARRIOR);
_quickReturn = true;
break;
case MWS_SHADOW_MASTER:
_classIds.push(MWC_MINION_SHADOW_MASTER);
_quickReturn = true;
break;
case MWS_SUMMON_SPIRIT_WOLF:
_classIds.push(MWC_MINION_SPIRIT_WOLF);
break;
case MWS_SUMMON_DIRE_WOLF:
_classIds.push(MWC_MINION_DIRE_WOLF);
break;
case MWS_POISON_CREEPER:
_classIds.push(MWC_MINION_POISON_CREEPER);
_quickReturn = true;
break;
case MWS_CARRION_VINE:
_classIds.push(MWC_MINION_CARRION_VINE);
_quickReturn = true;
break;
case MWS_SOLAR_CREEPER:
_classIds.push(MWC_MINION_SOLAR_CREEPER);
_quickReturn = true;
break;
}
if(_classIds.length == 0 && type != MWS_REVIVE)
return _count;
_monsters = NTC_FindUnit(NTC_UNIT_MONSTER);
if(_monsters)
{
do
{
if(_monsters.hp > 0 && _monsters.mode != 12)
{
if(_classIds.indexOf(_monsters.classid) == -1 && !(type == MWS_REVIVE && _monsters.GetState(96)))
continue;
if(NTC_CheckOwner(_monsters))
{
if(_quickReturn)
return 1;
else
_count++;
}
}
} while(_monsters.GetNext());
}
return _count;
}
function MWC_GetMaxMinionCount(skillId)
{
var _skillLevel;
_skillLevel = NTC_GetSkillLevel(skillId);
switch(skillId)
{
case MWS_REVIVE:
return _skillLevel;
case MWS_RAISE_SKELETON:
case MWS_RAISE_SKELETAL_MAGE:
if(_skillLevel <= 3)
return _skillLevel;
else
return 2 + parseInt(_skillLevel / 3.0);
case MWS_RAVEN:
case MWS_SUMMON_SPIRIT_WOLF:
if(_skillLevel <= 5)
return _skillLevel;
else
return 5;
case MWS_SUMMON_DIRE_WOLF:
if(_skillLevel <= 3)
return _skillLevel;
else
return 3;
}
return 1;
}
function MWC_GetSlotID(type)
{
var _items, _slotVal, _slotIndex;
if(arguments.length < 1 || me.gametype == 0)
return me.weaponstab;
// Array format: index 0: Value; index 1: Non-Class BO; index 2: CTA Slot
_slotVal = new Array();
_slotVal[0] = new Array();
_slotVal[0].IsCTASlot = false;
_slotVal[0].BoLevel = 0;
_slotVal[0].Primary = 0;
_slotVal[1] = new Array();
_slotVal[1].IsCTASlot = false;
_slotVal[1].BoLevel = 0;
_slotVal[1].Primary = 0;
_items = me.GetItems();
if(_items)
{
for(var i = 0; i < _items.length; i++)
{
if(_items[i].mode == 1)
{
if(_items[i].itemloc == 4 || _items[i].itemloc == 5)
{
_slotIndex = 0;
}
else if(_items[i].itemloc == 11 || _items[i].itemloc == 12)
{
_slotIndex = 1;
}
else
continue;
switch(type)
{
case "precast":
if((_items[i].itemflag & 0x4000000) && _items[i].itemprefix == 0x5027) // Check if the item is a CTA
_slotVal[_slotIndex].IsCTASlot = true;
_slotVal[_slotIndex].BoLevel += _items[i].GetStat(97,149); // Non Class Battle Orders
_slotVal[_slotIndex].Primary += _items[i].GetStat(127); // All Skills
if(me.classid == NTC_CHAR_CLASS_BARBARIAN)
{
_slotVal[_slotIndex].Primary += _items[i].GetStat(107,149); // Class Specific Battle Order
_slotVal[_slotIndex].Primary += _items[i].GetStat(83,4); // Barbarian Skills
_slotVal[_slotIndex].Primary += _items[i].GetStat(188,34); // Warcries Skilltab
}
break;
case "teleport":
_slotVal[_slotIndex].Primary += _items[i].GetStat(105); // Faster Cast Rate
_slotVal[_slotIndex].Primary += _items[i].GetStat(127) * 5; // All Skills
break;
case "finditem":
_slotVal[_slotIndex].Primary += _items[i].GetStat(79) * 0.75; // Extra Gold
_slotVal[_slotIndex].Primary += _items[i].GetStat(80); // Magic Find
_slotVal[_slotIndex].Primary += _items[i].GetStat(240); // Magic Find per Level
_slotVal[_slotIndex].Primary += _items[i].GetStat(105); // Faster Cast Rate
_slotVal[_slotIndex].Primary += _items[i].GetStat(127) * 10; // All Skills
_slotVal[_slotIndex].Primary += _items[i].GetStat(83,4) * 10; // Barbarian Skills
_slotVal[_slotIndex].Primary += _items[i].GetStat(188,34) * 10; // Warcries Skills
break;
case "attack":
_slotVal[_slotIndex].Primary += _items[i].GetStat(21) + (_items[i].GetStat(22) - _items[i].GetStat(21)) / 2; // Base Damage 1H
if(_items[i].GetStat(21) <= 0)
_slotVal[_slotIndex].Primary += _items[i].GetStat(23) + (_items[i].GetStat(24) - _items[i].GetStat(23)) / 2; // Base Damage 2H
_slotVal[_slotIndex].Primary += (_items[i].GetStat(48) + (_items[i].GetStat(49) - _items[i].GetStat(48)) / 2) / 2; // Fire Damage
_slotVal[_slotIndex].Primary += (_items[i].GetStat(50) + (_items[i].GetStat(51) - _items[i].GetStat(50)) / 2) / 2; // Light Damage
_slotVal[_slotIndex].Primary += (_items[i].GetStat(52) + (_items[i].GetStat(53) - _items[i].GetStat(52)) / 2) / 2; // Magic Damage
_slotVal[_slotIndex].Primary += (_items[i].GetStat(54) + (_items[i].GetStat(55) - _items[i].GetStat(54)) / 2) / 5; // Cold Damage
_slotVal[_slotIndex].Primary += _items[i].GetStat(58) * _items[i].GetStat(59) / 256; // Poison Damage
_slotVal[_slotIndex].Primary += _items[i].GetStat(111); // + Damage
break;
}
}
}
}
for(var i = 0; i < _slotVal.length; i++)
{
if(me.classid == NTC_CHAR_CLASS_BARBARIAN && _slotVal[i].BoLevel > 3)
_slotVal[i].Primary += 3;
else
_slotVal[i].Primary += _slotVal[i].BoLevel;
}
if(type != "precast" || me.classid == NTC_CHAR_CLASS_BARBARIAN || (_slotVal[0].IsCTASlot && _slotVal[1].IsCTASlot))
{
if(_slotVal[0].Primary > _slotVal[1].Primary)
return 0;
else if(_slotVal[0].Primary < _slotVal[1].Primary)
return 1;
}else if(_slotVal[0].IsCTASlot){
return 0;
}else if(_slotVal[1].IsCTASlot){
return 1;
}
return -1;
}
function MWC_WriteErrorDescription(startIndex, args)
{
var _output, _fhandle, _formalArguments, _arguments, _function, _errorLineIndex;
_function = args[startIndex];
_errorLineIndex = args[startIndex + 1];
if(!_function || !_errorLineIndex)
return false;
// Extract the formal argument list
_formalArguments = _function.toString().split(")")[0];
_formalArguments = _formalArguments.split("(")[1];
_formalArguments = _formalArguments.split(", ");
_arguments = "";
for(var i = 0; i < _formalArguments.length; i++)
{
if(i < args.length - 2 - startIndex)
_arguments += "˙c0" + _formalArguments[i];
else
_arguments += "˙615C5C" + _formalArguments[i];
if(i + 1 < _formalArguments.length)
_arguments += "˙c0, ";
}
_output = "˙BE0000An Error occured executing ˙c8" + _function.name + "()˙BE0000 in ˙c8%script ˙BE0000[˙329B52" + _errorLineIndex + "˙BE0000]";
_output += "\n˙BE0000Function Prototype: ˙c8" + _function.name + "(" + _arguments + "˙c8)";
_output += "\n˙BE0000Function Call: ˙c8" + _function.name + "(";
_arguments = "";
for(var i = startIndex + 2; i < args.length; i++)
{
if(typeof args[i] == "string")
_arguments += "˙767676\"" + args[i] + "\"";
else
{
switch(typeof args[i])
{
case "boolean":
_arguments += "˙294AF0" + args[i];
break;
case "number":
_arguments += "˙BE0000" + args[i];
break;
case "object":
_arguments += "˙c8[";
switch(args[i].type)
{
case NTC_UNIT_PLAYER:
_arguments += "Player";
break;
case NTC_UNIT_NPC:
_arguments += "NPC";
break;
case NTC_UNIT_OBJECT:
_arguments += "Object";
break;
case NTC_UNIT_MISSILE:
_arguments += "Missile";
break;
case NTC_UNIT_ITEM:
_arguments += "Item";
break;
case NTC_UNIT_TILE:
_arguments += "Tile";
break;
default:
if(args[i].id)
_arguments += "Area";
else
_arguments += "undefined";
break;
}
if(!isNaN(args[i].classid))
_arguments += " Unit " + args[i].classid + "]";
else if(arguments[i].id)
_arguments += " Unit " + args[i].id + "]";
else
_arguments += " Unit]";
break;
}
}
if(i + 1 < args.length)
_arguments += "˙c0, ";
else
_arguments += "˙c8)";
}
if(_arguments[_arguments.length -1] != ")")
_arguments += ")";
_output += _arguments;
_fhandle = FileOpen("Data/"+ me.charname + ".errdata", 1);
if(_fhandle)
{
_output = _output.split("\n");
for(var i = 0; i < _output.length; i++)
_fhandle.WriteLine(_output[i]);
_fhandle.Close();
return true;
}
return false;
}
function MWC_InsertDigitSeperator(number, delimeter, blocksize)
{
var _tempString, _outputString, _decFrac, _isNegative;
if(arguments.length < 1)
return "NaN";
if(arguments.length < 2)
delimeter = ",";
if(arguments.length < 3)
blocksize = 3;
// Check the input argument
if(typeof number == "string")
{
if(isNaN(number))
return "NaN";
_tempString = number;
}
else if(typeof number == "number")
_tempString = number.toString();
else
return number;
_decFrac = "";
// If the number is float, seperate the decimal fraction which must not be altered
if(_tempString.indexOf(".") > -1)
{
_decFrac = _tempString.split(".")[1];
_tempString = _tempString.split(".")[0];
}
if(_tempString.indexOf("-") > -1)
{
_isNegative = true;
_tempString = _tempString.replace("-", "");
}
else
_isNegative = false;
_outputString = "";
// Loop while there are blocks left to seperate
// The input string is processed from its end to its beginning
while(_tempString.length > blocksize)
{
_outputString = delimeter + _tempString.substr(_tempString.length - blocksize) + _outputString;
_tempString = _tempString.substring(0, _tempString.length - blocksize);
}
if(_isNegative)
_tempString = "-" + _tempString;
if(_decFrac != "")
_outputString += "." + _decFrac;
return _tempString + _outputString;
}
// This is just a workaround because GetArea() raises an exception when called with invalid arguments
function MWC_FindArea(areaid)
{
if(arguments.length < 1)
areaid = me.areaid;
if(areaid < 1 || areaid > 136)
return null;
return GetArea(areaid);
}
function MWC_SetStatusText(start, end)
{
var _output;
if(arguments.length < 2 || typeof end != "string")
end = "";
if(arguments.length < 1 && typeof start != "string")
start = "˙c1INVALID STATUSTEXT!";
_output = start + end;
if(_output.length > 39) // Trim the script name in case the output text exceeds the maximum length of 39 characters
_output = _output.replace(start, start.substring(0, start.length - _output.length + 36) + "...");
SetStatusText(_output);
}
// Format: %h, %m, %s will be replaced by the number of hours, minutes and seconds
// If an asterisk is added, the time will not be included in the output string, if its value is 00
// Example: if ticks was 65000 and formatString "%h*:%m:%s" the function would return "01:05"
function MWC_ConvertTicksToTimeString(ticks, formatString)
{
var _timeString, _time, _hours, _minutes, _seconds;
_hours = "";
_minutes = "";
_seconds = "";
if(arguments.length < 2)
formatString = "%h*:%m:%s";
_timeString = formatString;
// Handle hours
_time = parseInt(ticks / 36E5);
if(_time < 10)
_hours += "0";
_hours += _time;
// Handle minutes
_time = parseInt(ticks / 6E4) % 60;
if(_time < 10)
_minutes += "0";
_minutes += _time;
// Handle seconds
_time = parseInt(ticks / 1E3) % 60;
if(_time < 10)
_seconds += "0";
_seconds += _time;
if(_timeString.indexOf("%h") > -1)
{
if(_timeString.indexOf("%h*") == -1 || _hours != "00")
_timeString = _timeString.replace(/%h\*?/gi, _hours);
else
_timeString = _timeString.replace(/%h\*[^%]/gi, "");
}
if(_timeString.indexOf("%m") > -1)
{
if(_timeString.indexOf("%m*") == -1 || _minutes != "00")
_timeString = _timeString.replace(/%m\*?/gi, _minutes);
else
_timeString = _timeString.replace(/%m\*[^%]/gi, "");
}
if(_timeString.indexOf("%s") > -1)
{
if(_timeString.indexOf("%s*") == -1 || _seconds != "00")
_timeString = _timeString.replace(/%s\*?/gi, _seconds);
else
_timeString = _timeString.replace(/%s\*[^%]/gi, "");
}
return _timeString;
}
function MWC_GetItems(location, mode, search)
{
var _locItems, _items;
if(arguments.length < 2)
mode = 0;
_locItems = new Array();
_items = me.GetItems();
if(_items)
{
for(var i = 0; i < _items.length; i++)
{
if(arguments.length < 3 || _items[i].gid == search || _items[i].classid == search || _items[i].code == search)
{
if((location == -1 || _items[i].itemloc == location) && _items[i].mode == mode)
{
if(mode == 1 && location > -1)
return _items[i];
else
_locItems.push(_items[i]);
}
}
}
}
return _locItems;
}
function MWC_CastTelekinesis(target)
{
if(NTC_GetSkillLevel(MWS_TELEKINESIS) < 1)
return false;
if(GetDistance(me, target) > 20 || !CheckCollision(me, target, 4) || !CheckCollision(me, target, 2))
{
if(NTC_InTown())
NTTM_TownMoveXY(target.x, target.y + 2);
else
NTM_MoveTo(target.areaid, target.x + Random(-1, 1), target.y + Random(-1, 1));
}
if(GetDistance(me, target) < 2.5)
return NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, target);
return NTC_CastSkill(MWS_TELEKINESIS, NTC_HAND_RIGHT, target);
}
function MWC_Initialize()
{
NTCU_InitCubing();
NTA_Initialize();
}
function MWC_PrintOverheadStatus(text)
{
if(GetUIState(0x05) || GetUIState(0x09) || GetUIState(0x0C) || GetUIState(0x18) || GetUIState(0x19))
return false;
return Say("! " + text);
}
function MWC_SortArrayDescending(a, b)
{
if(a < b)
return 1;
if(a > b)
return -1;
if(a == b)
return 0;
}
function MWC_ManageParty()
{
var _player, _myPartyId, _existingPartyId;
_player = GetPlayerUnit();
if(_player)
{
_myPartyId = _player.partyid;
while(_player.GetNext())
{
_existingPartyId = MWC_GetExistingParty();
if(_player.partyflag == MWC_PARTY_FLAG_ACCEPT && (_existingPartyId == _player.partyid || _existingPartyId == MWC_PARTY_ID_NONE) || _player.partyflag == MWC_PARTY_FLAG_INVITE && (_existingPartyId == MWC_PARTY_ID_NONE || _existingPartyId == _myPartyId))
{
me.ClickParty(_player, 2);
NTC_Delay(NTC_DELAY_FRAME);
}
}
return true;
}
return false;
}
function MWC_GetExistingParty()
{
var _player;
_player = GetPlayerUnit();
if(_player)
{
while(_player.GetNext())
{
if(_player.partyid != MWC_PARTY_ID_NONE)
return _player.partyid;
}
}
return MWC_PARTY_ID_NONE;
}
function MWC_Debug(string, mode)
{
var _date;
if(arguments.length == 1)
mode = 0x03;
if((mode&0x01) && (MWC_DEBUG_MODE&0x01))
{
_date = new Date();
if(!_date)
return;
MWC_WriteToTextfile("[" + (_date.toLocaleFormat("%a %m/%d/%y %H:%M:%S")) + " - " + me.charname + "]: " + string , me.charname + "_DEBUG.txt", 2)
}
if((mode&0x02) && (MWC_DEBUG_MODE&0x02))
Print("˙c8[DEBUG]: ˙c0" + string);
}
function MWC_GetColorGemName(name)
{
var _retString;
_retString = name.replace(/Ruby/gi, "˙c1Ruby");
_retString = _retString.replace(/Emerald/gi, "˙c2Emerald");
_retString = _retString.replace(/Sapphire/gi, "˙c3Sapphire");
_retString = _retString.replace(/Amethyst/gi, "˙c;Amethyst");
_retString = _retString.replace(/Skull/gi, "˙c5Skull");
_retString = _retString.replace(/Topaz/gi, "˙c9Topaz");
return _retString;
}
|
|
|
01/17/2012, 21:18
|
#5305
|
elite*gold: 0
Join Date: Jan 2012
Posts: 13
Received Thanks: 0
|
Hi,
I think i have followed the guide correctly but my bot doesn't precast Bo & Bc, (which should be automatic).
I'm using a paladin with these settings.
Quote:
//------------------------------------------------------------------------------
// Precast Configuration
//------------------------------------------------------------------------------
// Your precast skills can be defined in the array below. NOTE: Battle Command, Battle Orders and Shout will be cast automatically. Constants for all skill ids can be found in "scripts\libs\common\MWSkills.ntl".
MWConfig_PrecastSkills = [MWS_HOLY_SHIELD];
// Set this to true if you would like to switch slots right after casting BC, BO and Shout. If set to false, your char will remain with the BO Slot until the whole precast procedure is done.
MWConfig_SwitchSlotsAfterBoPrecast = true;
|
& yes i have CTA
Also, Automule is setup, bot went to mule, did a great job.
But the stash was full & he only tossed 2runes? next game pick-up items toss 2items, why doesnt it toss full inventory? has it something to do with the starting load?
|
|
|
01/17/2012, 21:53
|
#5306
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Quote:
Originally Posted by jefke1988
Hi,
I think i have followed the guide correctly but my bot doesn't precast Bo & Bc, (which should be automatic).
I'm using a paladin with these settings.
& yes i have CTA
Also, Automule is setup, bot went to mule, did a great job.
But the stash was full & he only tossed 2runes? next game pick-up items toss 2items, why doesnt it toss full inventory? has it something to do with the starting load?
|
Check out the post just above you and replace the content of "scripts/libs/common/NTCommon.ntl" with what I posted there. That should fix the CTA bug. That bug is know and will be fixed in the next revision that might come someday
For the automule thing, there are 2 points:
1. The bot only mules what you have in your nip files to ensure it won't mule stuff that was just picked up for cubing. If you have put stuff into the stash that is not in ur pickits you have to drop it urself and ensure that the last mule hast "mules/all.nip" so it will be picked up.
2. There is this part, that defines what should never be muled:
Code:
// Define which items are not to be touched when muling.
MWConfig_Automule.DontMule.push("mule/dont_mule.nip");
//MWConfig_Automule.DontMule.push("mule/gems.nip");
This is used to keep stuff you picked up but want the bot to upgrade / bug as eth armors without sockets
|
|
|
01/17/2012, 22:16
|
#5307
|
elite*gold: 0
Join Date: Jan 2012
Posts: 13
Received Thanks: 0
|
Quote:
Originally Posted by ldevil
1. The bot only mules what you have in your nip files to ensure it won't mule stuff that was just picked up for cubing. If you have put stuff into the stash that is not in ur pickits you have to drop it urself and ensure that the last mule hast "mules/all.nip" so it will be picked up.
|
Oh lol thats funny; well my german isn't that strong.
by nip file u mean the files for my pickit. Not the ones that are in the mule folder right?
& ty for help.
|
|
|
01/17/2012, 22:48
|
#5308
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Yes exactly, the ones you defined in the char config file.
|
|
|
01/18/2012, 00:25
|
#5309
|
elite*gold: 0
Join Date: Jan 2009
Posts: 7,310
Received Thanks: 2,205
|
ich hab meinen runen logger kaputt gemacht, also das was im manager log angezeigt wird wenn er eine "kept"
Quote:
// This is the number of the lowest rune to be logged in the manager's item log when picked up. Mostly useful to keep your item log clean when collecting low runes. The default value 19 means that only runes equal or greater than LEM will be shown in the manager's item log.
MWConfig_LowestRuneToLog = 0;
|
darf man die " 0" nicht verändern?
default ist ja 19, ich habs mal auf 15 gestellt. und ab da wurde nix mehr angezeigt. auch auf 0 stellen brachte nix mehr...
|
|
|
01/18/2012, 01:17
|
#5310
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Hm, komisch. Ich hab's von 0 auf 19 gestellt, weil ich am Anfang noch praktisch alle Runes aufgesammelt habe und das log dann voller runen war. Und das hat perfekt geklappt.
Die Variable wird nur in einer Zeile verwendet und da wird sogar überprüft, ob ein ungültiger Wert wie -1 oder 33 eingegeben wurde und ggf. korrigiert. Ich wüsste also nicht, wieso es nicht mehr gehen sollte...
Was ich mir vorstellen kann ist, dass die Umstellung erst nach nem Restart/ beim nächsten Start effektiv wird?
Wollt's testen, aber es droppt natürlich keine Rune die ich aufnehm und < 19 is
edit: Ne die Änderung klappt auch ohne Restarts
|
|
|
 |
|
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 07:40.
|
|