|
The Edge of Nowhere Guests, register! See signatures, avatars, and more forums!
|
|
|
| Author |
Message |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Mon Aug 10, 2009 5:07 am Post subject: Mephisto Moattrick+Weaponswitch for D2NT 1.8.5 and NTBot 3.7 |
|
|
D2NT 1.8.5 was detected by warden and a lot of ppl are banned for it. plz be sure!
WORKS ONLY WITH D2NT 1.8.5 and NTBot 3.7.4
working for sorc or pala. possible to use on every other char!
donate me fg if u like it "h4n4"@jsp
plz let me know if it works for u
if you are looking for a d2bs-script see the old one http://www.edgeofnowhere.cc/viewtopic.php?t=409710 (no support for this)
Here is my modified Moattrick+Weaponswitch-script for D2NT+NTbot
| Quote: |
Changelock:
25.8.09 MAJOR UPDATE
1. shirted the code, now it look sfriendly
2. weaponswitch available for palas
3. weaponswitch available for every boss or singel bosses. have it your way
4. percent of boss-hp (when switch weapon) is no variable
23.8.09 static will be usable (again) but wont work on mephisto
10.8.09 updated for D2NT+NTbot. Weaponswitch and Moattrick are now optional (see NTConfig_Sorceress.ntl). dont swap weapon on other bosses then Mephisto, dont block moveClose on other bosses then Mephisto
12.11.08 added a check-function. befor doing precast the bot now checks every run if weaponslot 1 is active. if not it switches the slot. this guarantees, that you are allways using the 1.slot when teleporting to meph
3.10.08 added slot-check (the old one doesnt work well at all). the bot now checks the weponswitch befor doing precast. if u are on the second switch (the "false" switch) it will switch to slot one and go ahead with precast. it also uses the same code afetr bosskill, so it will never go ahead with the wrong slot. Also changed the HP-% to switch. it switches now if the monster is under 50% because my new blizzard-sorc killed meph to fast to switch^^ |
Ok here is my modification of the moattrock-script by Enkidu. he released this abaout 1 year ago and i have found it, mod it an realesed it for d2bs+ntbot.Now it runs in D2NT it runs fine, but i added a function to switch the weapon-slot when Meph is nearly death. so now the bot can use an alibaba and and 4ist-shield in the second slot for last hit.
also i modified the position of the bot when fighting, because the councils are really nerving. see the quote for more informations.
| Enkidu wrote: |
Recently came back to DII (been gone since 1.09d) and wow things have changed... Anyways I'm rebuilding chars and started with a sorc for obvious reasons. Couldn't find a good Mephbot with the moat trick to help out my poor -30 cold/lightning resist PoSorc, so I edited this one up a bit.
Should probably have some fire res and personally I use a dwarf star and inferno strides (yes, I know I'm poor) to keep the council from messing it up too much. I seem to get the council about 10% of the time or so. Carefully changing the coordinates could maybe fix this, but I'm fine with how they are.
Quick question though: I edited the "max range" to some horribly high number like 10,000 just to stop the bot from moving me in closer, will the bot ever attempt to cast outside of possible range and flag my character as cheating (I have absolutely no idea how the anti-cheat aspect of the game is working)?
Before posting the code let it be known that I hack'n'slashed the NTbot code to make this work for me. I took out some sections of code like the static field and some of the moveto_ boss code because my sorc kept attempting to move closer to meph messing things up. A better coder could surely keep that stuff intact, however I'm not a better coder so take it or leave it! With that said, I would only trust this bot for doing Mephisto runs until a better coder can mod the script.
Coordinates were taken and modified from YAM_Mephbot. Remember to backup any files you change. Only modified for my Blizz sorc, will likely work for any skill that can do moat trick, but don't count on it. |
D2NT+NTbot: http://www.edgeofnowhere.cc/viewtopic.php?t=433151
Download(RS): http://rapidshare.com/files/271111719/D2NT_Moat_WS_8.25.09.rar
(just overwrite your D2NT-folder with the one in the .rar)
YOU WILL HAVE TO CONFIGURE YOUR CHARS AGAIN WITH THE NEW NTConfig_Sorceress.ntl
If u dont want to use the download Copy+Past the following Code in the correct files (overwright the old code)
CODE
NTConfig_Paladin.ntl
| Code: |
Include("config/NTConfig.ntl");
var NTConfig_PutAura;
var NTConfig_UseRedemptionHP;
var NTConfig_UseRedemptionMP;
function NT_LoadConfig()
{
//------------------------------------------------------------------------------
// Boss configuration
//------------------------------------------------------------------------------
NTConfig_Script.push("NTPindleskin.ntj"); NTConfig_NihlathakExtension = false;
//NTConfig_Script.push("NTNihlathak.ntj"); NTConfig_PindleskinExtension = false;
NTConfig_Script.push("NTEldritch.ntj"); NTConfig_ShenkExtension = false;
NTConfig_Script.push("NTThreshSocket.ntj");
//NTConfig_Script.push("NTFrozenRiver.ntj"); NTConfig_ClearFrozenRiver = false;
//NTConfig_Script.push("NTGlacialTrail.ntj"); NTConfig_ClearGlacialTrail = false;
//NTConfig_Script.push("NTIcyCellar.ntj"); NTConfig_ClearIcyCellar = false;
//NTConfig_Script.push("NTBaal.ntj"); NTConfig_KillBaal = true;
//NTConfig_Script.push("NTDiablo.ntj");
NTConfig_Script.push("NTMephisto.ntj");
//NTConfig_Script.push("NTTravincal.ntj");
NTConfig_Script.push("NTSummoner.ntj");
NTConfig_Script.push("NTDuriel.ntj");
//NTConfig_Script.push("NTAncientTunnels.ntj");
NTConfig_Script.push("NTAndariel.ntj");
NTConfig_Script.push("NTCountess.ntj");
NTConfig_Script.push("NTPit.ntj"); NTConfig_ClearPitLevel1 = 1; // 0 : don't clear, 1 : clear path only, 2 : clear all
//NTConfig_Script.push("NTMausoleum.ntj");
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
me.maxgametime = 600; // time in seconds, maximum game length (0 is infinite)
NTConfig_StartDelay = 0; // Delay time in milliseconds to start;
NTConfig_AreaDelay = 500; // Delay time in milliseconds to change area;
NTConfig_SnagDelay = 500; // Delay time in milliseconds to wait before starting picking items
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
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_SkipHealCurses = false;// If you want to skip curses, set to true
NTConfig_UseMerc = true; // Set to true if you use a mercenary, will revive merc at a reviver npc.
NTConfig_ResetWeapon = false; // Set to true to reset weapon when reviving merc
NTConfig_LifeThresh = 60; // 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 = 10; // Drink a rejuvenation potion if under this percent of mana.
NTConfig_LifeChicken = 30; // This is your chicken life percent. If you go below this life total, exit game.
NTConfig_ManaChicken = 0; // This is your chicken mana percent. If you go below this mana total, exit game.
NTConfig_MercLifeThresh = 60; // This is the threshold to use a life potion on your merc in percent.
NTConfig_MercRejuvThresh = 40; // This is the threshold to use a rejuv potion on your merc in percent.
NTConfig_MercChicken = 20; // This is your mercs chicken life percent. If he goes below this, exit game.
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
NTConfig_FreeSpace = 4; // Number of free columns. If less full columns are free stashing is set.
// The numbers correspond to your inventory. Set 0 to keep whatever is there, 1 to stash it.
NTConfig_Columns[0] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_Columns[1] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_Columns[2] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_Columns[3] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_MinGoldToStash = 100000; // Maximum gold amount carried before going to stash
//----------------------------------------------------------------------------------------------
// Type of potion used in each belt column
// Available types : "hp" = health | "mp" = mana | "rv" = rejuv. Can use other potion types too.
// Keep equal types at adjacent columns. First HP then MP and then HP again is a bad choice.
// Keep HP and MP at the beginning of the belt (in case you want to use rejuv and other types).
// Rejuvenations MUST, I REPEAT MUST be at the end of the belt (last x columns).
// To use rejuvenations only, put "rv" in all columns.
//----------------------------------------------------------------------------------------------
NTConfig_BeltColType[0] = "hp";
NTConfig_BeltColType[1] = "mp";
NTConfig_BeltColType[2] = "rv";
NTConfig_BeltColType[3] = "rv";
//----------------------------------------------------------------------------
// Minimum amount of potions in each column before needing refilling
// If there's less potions then this number in the column we go and shop.
// Set to 4 to go shopping as soon as there's a potion missing.
// Recommend leaving columns set to "rv" at 0. Since shops won't carry rejuvs.
//----------------------------------------------------------------------------
NTConfig_BeltColMin[0] = 4;
NTConfig_BeltColMin[1] = 4;
NTConfig_BeltColMin[2] = 0;
NTConfig_BeltColMin[3] = 0;
//-----------------------------------------------------------------------------------
// SnagIt configuration
// Here is a list of preset nip files assuming you use nip package.
// If you want to add your own .nip files, just copy any line and enter the
// To disable a .nip file, just add "//" at the start of the line or delete the line.
//-----------------------------------------------------------------------------------
NTConfig_NIPFilePath.push("uniques.nip");
NTConfig_NIPFilePath.push("sets.nip");
NTConfig_NIPFilePath.push("whites.nip");
NTConfig_NIPFilePath.push("runes.nip");
NTConfig_NIPFilePath.push("rares.nip");
NTConfig_NIPFilePath.push("magics.nip");
NTConfig_NIPFilePath.push("gems.nip");
NTConfig_NIPFilePath.push("charmsjewels.nip");
NTConfig_NIPFilePath.push("ringsamulets.nip");
NTConfig_NIPFilePath.push("potions.nip");
//NTConfig_NIPFilePath.push("moneymaker.nip");
NTConfig_NIPFilePath.push("keys.nip");
NTConfig_SnagRange = 40; // Radius to check for dropped items. 40 is a good number here
//------------------------------------------------------------------------------
// Cubing configuration
// Supported gems and runes recipe only
//------------------------------------------------------------------------------
NTConfig_Cubing = false; // Enable cubing
//NTConfig_CubingItem.push(["gcw",0,3]); //Chipped Diamond gcw
//NTConfig_CubingItem.push(["gcv",0,3]); //Chipped Amethyst gcv
//NTConfig_CubingItem.push(["gcb",0,3]); //Chipped Saphire gcb
//NTConfig_CubingItem.push(["gcy",0,3]); //Chipped Topaz gcy
//NTConfig_CubingItem.push(["gcr",0,3]); //Chipped Ruby gcr
//NTConfig_CubingItem.push(["gcg",0,3]); //Chipped Emerald gcg
//NTConfig_CubingItem.push(["skc",0,3]); //Chipped Skull skc
//NTConfig_CubingItem.push(["gfw",0,3]); //Flawed Diamond gfw
//NTConfig_CubingItem.push(["gfv",0,3]); //Flawed Amethyst gfv
//NTConfig_CubingItem.push(["gfb",0,3]); //Flawed Saphire gfb
//NTConfig_CubingItem.push(["gfy",0,3]); //Flawed Topaz gfy
//NTConfig_CubingItem.push(["gfr",0,3]); //Flawed Ruby gfr
//NTConfig_CubingItem.push(["gfg",0,3]); //Flawed Emerald gfg
//NTConfig_CubingItem.push(["skf",0,3]); //Flawed Skull skf
//NTConfig_CubingItem.push(["gsw",0,3]); //Normal Diamond gsw
//NTConfig_CubingItem.push(["gsv",0,3]); //Normal Amethyst gsv
//NTConfig_CubingItem.push(["gsb",0,3]); //Normal Saphire gsb
//NTConfig_CubingItem.push(["gsy",0,3]); //Normal Topaz gsy
//NTConfig_CubingItem.push(["gsr",0,3]); //Normal Ruby gsr
//NTConfig_CubingItem.push(["gsg",0,3]); //Normal Emerald gsg
//NTConfig_CubingItem.push(["sku",0,3]); //Normal Skull sku
//NTConfig_CubingItem.push(["glw",0,3]); //Flawless Diamond glw
//NTConfig_CubingItem.push(["gzv",0,3]); //Flawless Amethyst gzv
//NTConfig_CubingItem.push(["glb",0,3]); //Flawless Saphire glb
//NTConfig_CubingItem.push(["gly",0,3]); //Flawless Topaz gly
//NTConfig_CubingItem.push(["glr",0,3]); //Flawless Ruby glr
//NTConfig_CubingItem.push(["glg",0,3]); //Flawless Emerald glg
//NTConfig_CubingItem.push(["skl",0,3]); //Flawless Skull skl
//NTConfig_CubingItem.push(["r01",0,3]); //El Rune r01
//NTConfig_CubingItem.push(["r02",0,3]); //Eld Rune r02
//NTConfig_CubingItem.push(["r03",0,3]); //Tir Rune r03
//NTConfig_CubingItem.push(["r04",0,3]); //Nef Rune r04
//NTConfig_CubingItem.push(["r05",0,3]); //Eth Rune r05
//NTConfig_CubingItem.push(["r06",0,3]); //Ith Rune r06
//NTConfig_CubingItem.push(["r07",0,3]); //Tal Rune r07
//NTConfig_CubingItem.push(["r08",0,3]); //Ral Rune r08
//NTConfig_CubingItem.push(["r09",0,3]); //Ort Rune r09
//NTConfig_CubingItem.push(["r10",0,3,"gcy",0,1]); //Thul Rune + chipped Topaz r10 + gcy
//NTConfig_CubingItem.push(["r11",0,3,"gcv",0,1]); //Amn Rune + chipped Amethyst r11 + gcv
//NTConfig_CubingItem.push(["r12",0,3,"gcb",0,1]); //Sol Rune + chipped Saphire r12 + gcb
//NTConfig_CubingItem.push(["r13",0,3,"gcr",0,1]); //Shael Rune + chipped Ruby r13 + gcr
//NTConfig_CubingItem.push(["r14",0,3,"gcg",0,1]); //Dol Rune + chipped Emerald r14 + gcg
//NTConfig_CubingItem.push(["r15",0,3,"gcw",0,1]); //Hel Rune + chipped Diamond r15 + gcw
NTConfig_CubingItem.push(["r16",0,3,"gfy",0,1]); //Io Rune + flawed Topaz r16 + gfy
NTConfig_CubingItem.push(["r17",0,3,"gfv",0,1]); //Lum Rune + flawed Amethyst r17 + gfv
NTConfig_CubingItem.push(["r18",0,3,"gfb",0,1]); //Ko Rune + flawed Saphire r18 + gfb
NTConfig_CubingItem.push(["r19",0,3,"gfr",0,1]); //Fal Rune + flawed Ruby r19 + gfr
NTConfig_CubingItem.push(["r20",0,3,"gfg",0,1]); //Lem Rune + flawed Emerald r20 + gfg
NTConfig_CubingItem.push(["r21",0,2,"gfw",0,1]); //Pul Rune + flawed Diamond r21 + gfw
NTConfig_CubingItem.push(["r22",0,2,"gsy",0,1]); //Um Rune + Topaz r22 + gsy
NTConfig_CubingItem.push(["r23",0,2,"gsv",0,1]); //Mal Rune + Amethyst r23 + gsv
//NTConfig_CubingItem.push(["r24",0,2,"gsb",0,1]); //Ist Rune + Saphire r24 + gsb
//NTConfig_CubingItem.push(["r25",0,2,"gsr",0,1]); //Gul Rune + Ruby r25 + gsr
//NTConfig_CubingItem.push(["r26",0,2,"gsg",0,1]); //Vex Rune + Emerald r26 + gsg
//NTConfig_CubingItem.push(["r27",0,2,"gsw",0,1]); //Ohm Rune + Diamond r27 + gsw
//NTConfig_CubingItem.push(["r28",0,2,"gly",0,1]); //Lo Rune + flawless Topaz r28 + gly
//NTConfig_CubingItem.push(["r29",0,2,"gzv",0,1]); //Sur Rune + flawless Amethyst r29 + gzv
//NTConfig_CubingItem.push(["r30",0,2,"glb",0,1]); //Ber Rune + flawless Saphire r30 + glb
//NTConfig_CubingItem.push(["r31",0,2,"glr",0,1]); //Jah Rune + flawless Ruby r31 + gll
//NTConfig_CubingItem.push(["r32",0,2,"glg",0,1]); //Cham Rune + flawless Emerald r32 + glg
//------------------------------------------------------------------------------
// Gamble configuration
// To specify what items to gamble, adjust the array with the desired item codes
//------------------------------------------------------------------------------
NTConfig_Gamble = true; // Enable gambling
NTConfig_GambleStopGold = 300000; // Gold amount to stop the gambling
NTConfig_GambleItem.push("rin"); // Rings
NTConfig_GambleItem.push("amu"); // Amulets
NTConfig_GambleItem.push("ci0"); // Circlets
NTConfig_GambleItem.push("ci1"); // Coronets
//NTConfig_GambleItem.push("lgl"); // Leather Gloves
//NTConfig_GambleItem.push("vgl"); // Heavy Gloves
//NTConfig_GambleItem.push("mgl"); // Chain Gloves
//NTConfig_GambleItem.push("tgl"); // Light Gauntlets
//NTConfig_GambleItem.push("hgl"); // Gauntlets
//------------------------------------------------------------------------------
// General configuration
//------------------------------------------------------------------------------
NTConfig_PublicMode = false;
NTConfig_CheckCloneDiablo = false; // Set to true if you want to wait in game after notifying "Diablo Walks the Earth" msg.
NTConfig_OpenChest = true; // Set to true to open chest
me.quitonhostile = false;
//------------------------------------------------------------------------------
// Attack configuration
//------------------------------------------------------------------------------
NTConfig_PutAura = 0; // What aura do you want to use on attack. Set to 0 if you won't
NTConfig_AttackSkill[0] = 0; // Cast your first spell once. Set to 0 if you won't
NTConfig_AttackSkill[1] = 0; // Cast your primary spell to boss.
NTConfig_AttackSkill[2] = 0; // Cast your primary spell to others.
NTConfig_AttackSkill[4] = 0; // Cast your secondary spell if monster is immune to your primary spell. Set to 0 if you won't
NTConfig_ClearPosition = true; // Set to true if you want to clear area after killing boss.
NTConfig_CheckSafe = true; // Set to true to check for curses, merc and potion (go to town if needed)
NTConfig_UseRedemptionHP = 80; // Use Redemption if under this percent of life. Set to 100 if you won't
NTConfig_UseRedemptionMP = 60; // Use Redemption if under this percent of mana. Set to 100 if you won't
//------------------------------------------------------------------------------
//Moattrick+Weaponswitch (Mephisto only)
//------------------------------------------------------------------------------
NTConfig_Weaponswitch = 1; //using Weaponswitch? 1=yes ; 0=no
NTConfig_HpForSwitch = 50; //boss-hp percent at wich the bot will do weaponswitch. stronger chars should set this to 100
NTConfig_Moattrick = 0; //using Moattrick? 1=yes ; 0=no
}
|
NTConfig_Sorceress.ntl:
| Code: |
Include("config/NTConfig.ntl");
var NTConfig_CastStatic;
function NT_LoadConfig()
{
//------------------------------------------------------------------------------
// Boss configuration
//------------------------------------------------------------------------------
NTConfig_Script.push("NTPindleskin.ntj"); NTConfig_NihlathakExtension = false;
//NTConfig_Script.push("NTNihlathak.ntj"); NTConfig_PindleskinExtension = false;
NTConfig_Script.push("NTEldritch.ntj"); NTConfig_ShenkExtension = false;
NTConfig_Script.push("NTThreshSocket.ntj");
//NTConfig_Script.push("NTFrozenRiver.ntj"); NTConfig_ClearFrozenRiver = false;
//NTConfig_Script.push("NTGlacialTrail.ntj"); NTConfig_ClearGlacialTrail = false;
//NTConfig_Script.push("NTIcyCellar.ntj"); NTConfig_ClearIcyCellar = false;
//NTConfig_Script.push("NTBaal.ntj"); NTConfig_KillBaal = true;
//NTConfig_Script.push("NTDiablo.ntj");
NTConfig_Script.push("NTMephisto.ntj");
//NTConfig_Script.push("NTTravincal.ntj");
NTConfig_Script.push("NTSummoner.ntj");
NTConfig_Script.push("NTDuriel.ntj");
//NTConfig_Script.push("NTAncientTunnels.ntj");
NTConfig_Script.push("NTAndariel.ntj");
NTConfig_Script.push("NTCountess.ntj");
NTConfig_Script.push("NTPit.ntj"); NTConfig_ClearPitLevel1 = 1; // 0 : don't clear, 1 : clear path only, 2 : clear all
//NTConfig_Script.push("NTMausoleum.ntj");
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
me.maxgametime = 600; // time in seconds, maximum game length (0 is infinite)
NTConfig_StartDelay = 0; // Delay time in milliseconds to start;
NTConfig_AreaDelay = 500; // Delay time in milliseconds to change area;
NTConfig_SnagDelay = 500; // Delay time in milliseconds to wait before starting picking items
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
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_SkipHealCurses = false;// If you want to skip curses, set to true
NTConfig_UseMerc = true; // Set to true if you use a mercenary, will revive merc at a reviver npc.
NTConfig_ResetWeapon = false; // Set to true to reset weapon when reviving merc
NTConfig_LifeThresh = 60; // 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 = 10; // Drink a rejuvenation potion if under this percent of mana.
NTConfig_LifeChicken = 30; // This is your chicken life percent. If you go below this life total, exit game.
NTConfig_ManaChicken = 0; // This is your chicken mana percent. If you go below this mana total, exit game.
NTConfig_MercLifeThresh = 60; // This is the threshold to use a life potion on your merc in percent.
NTConfig_MercRejuvThresh = 40; // This is the threshold to use a rejuv potion on your merc in percent.
NTConfig_MercChicken = 20; // This is your mercs chicken life percent. If he goes below this, exit game.
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
NTConfig_FreeSpace = 4; // Number of free columns. If less full columns are free stashing is set.
// The numbers correspond to your inventory. Set 0 to keep whatever is there, 1 to stash it.
NTConfig_Columns[0] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_Columns[1] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_Columns[2] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_Columns[3] = [1,1,1,1,0,0,0,0,0,0];
NTConfig_MinGoldToStash = 100000; // Maximum gold amount carried before going to stash
//----------------------------------------------------------------------------------------------
// Type of potion used in each belt column
// Available types : "hp" = health | "mp" = mana | "rv" = rejuv. Can use other potion types too.
// Keep equal types at adjacent columns. First HP then MP and then HP again is a bad choice.
// Keep HP and MP at the beginning of the belt (in case you want to use rejuv and other types).
// Rejuvenations MUST, I REPEAT MUST be at the end of the belt (last x columns).
// To use rejuvenations only, put "rv" in all columns.
//----------------------------------------------------------------------------------------------
NTConfig_BeltColType[0] = "hp";
NTConfig_BeltColType[1] = "mp";
NTConfig_BeltColType[2] = "rv";
NTConfig_BeltColType[3] = "rv";
//----------------------------------------------------------------------------
// Minimum amount of potions in each column before needing refilling
// If there's less potions then this number in the column we go and shop.
// Set to 4 to go shopping as soon as there's a potion missing.
// Recommend leaving columns set to "rv" at 0. Since shops won't carry rejuvs.
//----------------------------------------------------------------------------
NTConfig_BeltColMin[0] = 4;
NTConfig_BeltColMin[1] = 4;
NTConfig_BeltColMin[2] = 0;
NTConfig_BeltColMin[3] = 0;
//-----------------------------------------------------------------------------------
// SnagIt configuration
// Here is a list of preset nip files assuming you use nip package.
// If you want to add your own .nip files, just copy any line and enter the
// To disable a .nip file, just add "//" at the start of the line or delete the line.
//-----------------------------------------------------------------------------------
NTConfig_NIPFilePath.push("uniques.nip");
NTConfig_NIPFilePath.push("sets.nip");
NTConfig_NIPFilePath.push("whites.nip");
NTConfig_NIPFilePath.push("runes.nip");
NTConfig_NIPFilePath.push("rares.nip");
NTConfig_NIPFilePath.push("magics.nip");
NTConfig_NIPFilePath.push("gems.nip");
NTConfig_NIPFilePath.push("charmsjewels.nip");
NTConfig_NIPFilePath.push("ringsamulets.nip");
NTConfig_NIPFilePath.push("potions.nip");
//NTConfig_NIPFilePath.push("moneymaker.nip");
NTConfig_NIPFilePath.push("keys.nip");
NTConfig_SnagRange = 40; // Radius to check for dropped items. 40 is a good number here
//------------------------------------------------------------------------------
// Cubing configuration
// Supported gems and runes recipe only
//------------------------------------------------------------------------------
NTConfig_Cubing = false; // Enable cubing
//NTConfig_CubingItem.push(["gcw",0,3]); //Chipped Diamond gcw
//NTConfig_CubingItem.push(["gcv",0,3]); //Chipped Amethyst gcv
//NTConfig_CubingItem.push(["gcb",0,3]); //Chipped Saphire gcb
//NTConfig_CubingItem.push(["gcy",0,3]); //Chipped Topaz gcy
//NTConfig_CubingItem.push(["gcr",0,3]); //Chipped Ruby gcr
//NTConfig_CubingItem.push(["gcg",0,3]); //Chipped Emerald gcg
//NTConfig_CubingItem.push(["skc",0,3]); //Chipped Skull skc
//NTConfig_CubingItem.push(["gfw",0,3]); //Flawed Diamond gfw
//NTConfig_CubingItem.push(["gfv",0,3]); //Flawed Amethyst gfv
//NTConfig_CubingItem.push(["gfb",0,3]); //Flawed Saphire gfb
//NTConfig_CubingItem.push(["gfy",0,3]); //Flawed Topaz gfy
//NTConfig_CubingItem.push(["gfr",0,3]); //Flawed Ruby gfr
//NTConfig_CubingItem.push(["gfg",0,3]); //Flawed Emerald gfg
//NTConfig_CubingItem.push(["skf",0,3]); //Flawed Skull skf
//NTConfig_CubingItem.push(["gsw",0,3]); //Normal Diamond gsw
//NTConfig_CubingItem.push(["gsv",0,3]); //Normal Amethyst gsv
//NTConfig_CubingItem.push(["gsb",0,3]); //Normal Saphire gsb
//NTConfig_CubingItem.push(["gsy",0,3]); //Normal Topaz gsy
//NTConfig_CubingItem.push(["gsr",0,3]); //Normal Ruby gsr
//NTConfig_CubingItem.push(["gsg",0,3]); //Normal Emerald gsg
//NTConfig_CubingItem.push(["sku",0,3]); //Normal Skull sku
//NTConfig_CubingItem.push(["glw",0,3]); //Flawless Diamond glw
//NTConfig_CubingItem.push(["gzv",0,3]); //Flawless Amethyst gzv
//NTConfig_CubingItem.push(["glb",0,3]); //Flawless Saphire glb
//NTConfig_CubingItem.push(["gly",0,3]); //Flawless Topaz gly
//NTConfig_CubingItem.push(["glr",0,3]); //Flawless Ruby glr
//NTConfig_CubingItem.push(["glg",0,3]); //Flawless Emerald glg
//NTConfig_CubingItem.push(["skl",0,3]); //Flawless Skull skl
//NTConfig_CubingItem.push(["r01",0,3]); //El Rune r01
//NTConfig_CubingItem.push(["r02",0,3]); //Eld Rune r02
//NTConfig_CubingItem.push(["r03",0,3]); //Tir Rune r03
//NTConfig_CubingItem.push(["r04",0,3]); //Nef Rune r04
//NTConfig_CubingItem.push(["r05",0,3]); //Eth Rune r05
//NTConfig_CubingItem.push(["r06",0,3]); //Ith Rune r06
//NTConfig_CubingItem.push(["r07",0,3]); //Tal Rune r07
//NTConfig_CubingItem.push(["r08",0,3]); //Ral Rune r08
//NTConfig_CubingItem.push(["r09",0,3]); //Ort Rune r09
//NTConfig_CubingItem.push(["r10",0,3,"gcy",0,1]); //Thul Rune + chipped Topaz r10 + gcy
//NTConfig_CubingItem.push(["r11",0,3,"gcv",0,1]); //Amn Rune + chipped Amethyst r11 + gcv
//NTConfig_CubingItem.push(["r12",0,3,"gcb",0,1]); //Sol Rune + chipped Saphire r12 + gcb
//NTConfig_CubingItem.push(["r13",0,3,"gcr",0,1]); //Shael Rune + chipped Ruby r13 + gcr
//NTConfig_CubingItem.push(["r14",0,3,"gcg",0,1]); //Dol Rune + chipped Emerald r14 + gcg
//NTConfig_CubingItem.push(["r15",0,3,"gcw",0,1]); //Hel Rune + chipped Diamond r15 + gcw
NTConfig_CubingItem.push(["r16",0,3,"gfy",0,1]); //Io Rune + flawed Topaz r16 + gfy
NTConfig_CubingItem.push(["r17",0,3,"gfv",0,1]); //Lum Rune + flawed Amethyst r17 + gfv
NTConfig_CubingItem.push(["r18",0,3,"gfb",0,1]); //Ko Rune + flawed Saphire r18 + gfb
NTConfig_CubingItem.push(["r19",0,3,"gfr",0,1]); //Fal Rune + flawed Ruby r19 + gfr
NTConfig_CubingItem.push(["r20",0,3,"gfg",0,1]); //Lem Rune + flawed Emerald r20 + gfg
NTConfig_CubingItem.push(["r21",0,2,"gfw",0,1]); //Pul Rune + flawed Diamond r21 + gfw
NTConfig_CubingItem.push(["r22",0,2,"gsy",0,1]); //Um Rune + Topaz r22 + gsy
NTConfig_CubingItem.push(["r23",0,2,"gsv",0,1]); //Mal Rune + Amethyst r23 + gsv
//NTConfig_CubingItem.push(["r24",0,2,"gsb",0,1]); //Ist Rune + Saphire r24 + gsb
//NTConfig_CubingItem.push(["r25",0,2,"gsr",0,1]); //Gul Rune + Ruby r25 + gsr
//NTConfig_CubingItem.push(["r26",0,2,"gsg",0,1]); //Vex Rune + Emerald r26 + gsg
//NTConfig_CubingItem.push(["r27",0,2,"gsw",0,1]); //Ohm Rune + Diamond r27 + gsw
//NTConfig_CubingItem.push(["r28",0,2,"gly",0,1]); //Lo Rune + flawless Topaz r28 + gly
//NTConfig_CubingItem.push(["r29",0,2,"gzv",0,1]); //Sur Rune + flawless Amethyst r29 + gzv
//NTConfig_CubingItem.push(["r30",0,2,"glb",0,1]); //Ber Rune + flawless Saphire r30 + glb
//NTConfig_CubingItem.push(["r31",0,2,"glr",0,1]); //Jah Rune + flawless Ruby r31 + gll
//NTConfig_CubingItem.push(["r32",0,2,"glg",0,1]); //Cham Rune + flawless Emerald r32 + glg
//------------------------------------------------------------------------------
// Gamble configuration
// To specify what items to gamble, adjust the array with the desired item codes
//------------------------------------------------------------------------------
NTConfig_Gamble = true; // Enable gambling
NTConfig_GambleStopGold = 300000; // Gold amount to stop the gambling
NTConfig_GambleItem.push("rin"); // Rings
NTConfig_GambleItem.push("amu"); // Amulets
NTConfig_GambleItem.push("ci0"); // Circlets
NTConfig_GambleItem.push("ci1"); // Coronets
//NTConfig_GambleItem.push("lgl"); // Leather Gloves
//NTConfig_GambleItem.push("vgl"); // Heavy Gloves
//NTConfig_GambleItem.push("mgl"); // Chain Gloves
//NTConfig_GambleItem.push("tgl"); // Light Gauntlets
//NTConfig_GambleItem.push("hgl"); // Gauntlets
//------------------------------------------------------------------------------
// General configuration
//------------------------------------------------------------------------------
NTConfig_PublicMode = false;
NTConfig_CheckCloneDiablo = false; // Set to true if you want to wait in game after notifying "Diablo Walks the Earth" msg.
NTConfig_OpenChest = true; // Set to true to open chest
me.quitonhostile = false;
//------------------------------------------------------------------------------
// Attack configuration
//------------------------------------------------------------------------------
NTConfig_AttackSkill[0] = 0; // Cast your first spell once. Set to 0 if you won't
NTConfig_AttackSkill[1] = 0; // Cast your primary spell to boss.
NTConfig_AttackSkill[2] = 0; // Cast your primary spell to others.
NTConfig_AttackSkill[3] = 0; // Cast your primary untimed spell if primary spell is timed spell. Set to 0 if you won't
NTConfig_AttackSkill[4] = 0; // Cast your secondary spell if monster is immune to your primary spell. Set to 0 if you won't
NTConfig_AttackSkill[5] = 0; // Cast your secondary untimed spell if secondary spell is timed spell. Set to 0 if you won't
NTConfig_ClearPosition = true; // Set to true if you want to clear area after killing boss.
NTConfig_CheckSafe = true; // Set to true to check for curses, merc and potion (go to town if needed)
NTConfig_CastStatic = 60; // Cast Static Field until monster's HP lower less than this percent. Set to 100 if you won't
//------------------------------------------------------------------------------
//Moattrick+Weaponswitch (Mephisto only)
//------------------------------------------------------------------------------
NTConfig_Weaponswitch = 1; //using Weaponswitch? 1=yes ; 0=no
NTConfig_HpForSwitch = 50; //boss-hp percent at wich the bot will do weaponswitch. stronger chars should set this to 100
NTConfig_Moattrick = 1; //using Moattrick? 1=yes ; 0=no
}
|
NTAttack.ntl
| Code: |
const NTA_DAMAGE_NONE = 0;
const NTA_DAMAGE_PHYSICAL = 1;
const NTA_DAMAGE_MAGIC = 2;
const NTA_DAMAGE_FIRE = 3;
const NTA_DAMAGE_LIGHTNING = 4;
const NTA_DAMAGE_COLD = 5;
const NTA_DAMAGE_POISON = 6;
var _NTA_SkillHand = new Array(6);
var _NTA_SkillDamage = new Array(6);
var _NTA_SkillDelay = new Array(6);
function NTA_Initialize()
{
for(var i = 0 ; i < 6 ; i++)
{
if(NTConfig_AttackSkill[i] > 0)
{
_NTA_SkillHand[i] = GetBaseStat("skills.txt", NTConfig_AttackSkill[i], 166) ? 2 : NTC_HAND_RIGHT;
_NTA_SkillDamage[i] = NTA_GetDamageType(NTConfig_AttackSkill[i]);
_NTA_SkillDelay[i] = NTC_GetCastDelay(NTConfig_AttackSkill[i]);
}
}
}
function NTA_KillBoss(classid)
{
var _target;
if(NTConfig_AttackSkill[1] < 1)
return false;
_target = NTC_FindMonster(classid);
if(_target)
{
if(NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(_target, _NTA_SkillDamage[0]) < 100)
NTC_DoCast(NTConfig_AttackSkill[0], _NTA_SkillHand[0], _target);
return NTA_Attack(_target, true, 200);
}
return false;
}
function NTA_ClearPosition(range, spectype)
{
var _orgx, _orgy;
var _target;
var _killnum = 0;
if(NTConfig_AttackSkill[2] < 1)
return false;
if(arguments.length < 1)
range = 20;
if(arguments.length < 2)
spectype = 0;
_orgx = me.x;
_orgy = me.y;
for(var i = 0 ; i < 2 ; i++)
{
_target = NTC_GetUnit(NTC_UNIT_MONSTER);
if(_target)
{
do
{
if(NTA_IsValidTarget(_target) && (spectype == 0 || (_target.spectype & spectype)) && GetDistance(_orgx, _orgy, _target.x, _target.y) < range)
{
if(_killnum == 0)
{
if(NTConfig_AttackSkill[0] > 0 && NTA_GetResistance(_target, _NTA_SkillDamage[0]) < 100 && CheckCollision(me, _target, 3))
NTC_DoCast(NTConfig_AttackSkill[0], _NTA_SkillHand[0], _target);
}
if(NTA_Attack(_target, false, 50))
_killnum++;
}
} while(_target.GetNext());
}
}
if(me.classid == NTC_CHAR_CLASS_PALADIN)
{
if(_killnum > 1 && (parseInt(me.hp*100/me.hpmax) < NTConfig_UseRedemptionHP || parseInt(me.mp*100/me.mpmax) < NTConfig_UseRedemptionMP))
{
if(NTC_PutSkill(124, NTC_HAND_RIGHT))
NTC_PingDelay(1000);
}
}
if(NTConfig_CheckSafe && _killnum > 0)
NTTMGR_CheckSafe(1);
return (_killnum > 0);
}
function NTA_ClearRooms()
{
var _room;
var _rooms;
_room = GetRoom();
if(!_room)
return false;
_rooms = new Array();
do
{
_rooms.push([parseInt(_room.x*5 + _room.xsize*5/2), parseInt(_room.y*5 + _room.ysize*5/2)]);
} while(_room.GetNext());
while(_rooms.length > 0)
{
_rooms.sort(NTA_SortRoomInt);
_room = _rooms.shift();
if(NTM_MoveTo(me.areaid, _room[0], _room[1], 1))
{
NTA_ClearPosition(25, 0x04);
NTA_ClearPosition(25);
NTSI_PickItems();
NTT_CleanPotions();
NTP_DoPrecastCTA(false);
}
}
return true;
}
function NTA_IsValidTarget(monster, simple)
{
if(!monster || monster.type != NTC_UNIT_MONSTER)
return false;
if(monster.hp <= 0 || monster.mode == 0 || monster.mode == 12)
return false;
if(((monster.classid >= 110 && monster.classid <= 113) || monster.classid == 608) && monster.mode == 8) // ignore flying scavengers
return false;
if(monster.classid == 68 && monster.mode == 14) // ignore burrowing maggots
return false;
if((monster.classid == 258 || monster.classid == 261) && monster.mode == 14) // ignore submerged WaterWatchers
return false;
if(monster.GetState(53) || monster.GetState(96)) // Conversion, Revive
return false;
if(arguments.length < 2)
simple = false;
if(!simple)
return monster.IsAttackable();
return true;
}
function NTA_GetDamageType(skillid)
{
var _etype;
if(skillid == 74) // Corpse Explosion
return NTA_DAMAGE_PHYSICAL;
if(skillid == 112) // Blessed Hammer
return NTA_DAMAGE_NONE;
_etype = GetBaseStat("skills.txt", skillid, 233);
switch(_etype)
{
case "cold": return NTA_DAMAGE_COLD;
case "fire": return NTA_DAMAGE_FIRE;
case "ltng": return NTA_DAMAGE_LIGHTNING;
case "mag": return NTA_DAMAGE_MAGIC;
case "pois": return NTA_DAMAGE_POISON;
case "stun": return NTA_DAMAGE_NONE;
default:
if(GetBaseStat("skills.txt", skillid, 178) || GetBaseStat("skills.txt", skillid, 182)) // aura or passive
return NTA_DAMAGE_NONE;
}
return NTA_DAMAGE_PHYSICAL;
}
function NTA_GetResistance(enemy, type)
{
if(!enemy)
return false;
if(arguments.length == 2)
{
switch(type)
{
case NTA_DAMAGE_PHYSICAL:
return enemy.GetStat(36);
case NTA_DAMAGE_MAGIC:
return enemy.GetStat(37);
case NTA_DAMAGE_FIRE:
return enemy.GetStat(39);
case NTA_DAMAGE_LIGHTNING:
return enemy.GetStat(41);
case NTA_DAMAGE_COLD:
return enemy.GetStat(43);
case NTA_DAMAGE_POISON:
return enemy.GetStat(45);
}
}
return 0;
}
function NTA_Attack(target, boss, maxattacks)
{
switch(me.classid)
{
case NTC_CHAR_CLASS_AMAZON:
return NTA_AmazonAttackInt(target, boss, maxattacks);
case NTC_CHAR_CLASS_SORCERESS:
return NTA_SorceressAttackInt(target, boss, maxattacks);
case NTC_CHAR_CLASS_NECROMANCER:
return NTA_NecromancerAttackInt(target, boss, maxattacks);
case NTC_CHAR_CLASS_PALADIN:
return NTA_PaladinAttackInt(target, boss, maxattacks);
case NTC_CHAR_CLASS_BARBARIAN:
return NTA_BarbarianAttackInt(target, boss, maxattacks);
case NTC_CHAR_CLASS_DRUID:
return NTA_DruidAttackInt(target, boss, maxattacks);
case NTC_CHAR_CLASS_ASSASSIN:
return NTA_AssassinAttackInt(target, boss, maxattacks);
}
return false;
}
// Internal function
function NTA_AmazonAttackInt(target, boss, maxattacks)
{
return false;
}
function NTA_SorceressAttackInt(target, boss, maxattacks)
{
var _primaryindex;
var _maxattacks = 0;
var _range1, _range2;
var _prehp;
var _switch = 0;
_primaryindex = boss ? 1 : 2;
switch(NTConfig_AttackSkill[_primaryindex])
{
case 48: // Nova
_range1 = 10;
break;
default:
_range1 = 20;
break;
}
switch(NTConfig_AttackSkill[4])
{
case 48: // Nova
_range2 = 10;
break;
default:
_range2 = 20;
break;
}
if(NTConfig_CastStatic < 100)
{
if(me.areaid != 102)
{
var _staticlevel = NTC_CheckSkill(42);
if(_staticlevel > 0 && NTA_GetResistance(target, NTA_DAMAGE_LIGHTNING) < 100)
{
var _cast = 0;
var _staticrange = Math.floor((5+_staticlevel-1)*2/3);
while(_cast++ < 10 && NTA_IsValidTarget(target, true) && parseInt(target.hp*100/target.hpmax) > NTConfig_CastStatic && (boss || CheckCollision(me, target, 2)))
{
NTA_MoveCloseInt(target, _staticrange);
if(!NTC_DoCast(42, NTC_HAND_RIGHT, target))
{
if(!boss)
break;
}
}
}
}
}
_prehp = target.hp;
NTA_MFswitch(boss, target);
while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
{
NTA_MFswitch(boss, target);
if(!CheckCollision(me, target, 3))
{
if(boss)
NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
else if(me.areaid != 131)
return false;
}
if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
{
if((_maxattacks % 2) == 1)
{
if(!NTA_MoveCloseInt(target, _range1) && !boss)
return false;
}
NTA_DoCastInt(_primaryindex, target);
NTA_MFswitch(boss, target);
}
else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
{
if((_maxattacks % 2) == 1)
{
if(!NTA_MoveCloseInt(target, _range2) && !boss)
return false;
}
NTA_DoCastInt(4, target);
}
else
{
if(boss)
{
if((_maxattacks % 2) == 1)
NTA_MoveCloseInt(target, _range1);
NTA_DoCastInt(_primaryindex, target);
}
else
return false;
}
if(boss)
{
if((_maxattacks % 4) == 0 && target.hp >= _prehp)
{
if(target.classid == 526)
return false;
}
if((_maxattacks % 8) == 0)
{
if(target.hp < _prehp)
_prehp = target.hp;
else
return false;
}
}
else
{
if((_maxattacks % 4) == 0)
{
if(target.hp < _prehp)
_prehp = target.hp;
else
return false;
}
}
}
NTC_SwapWeapons(1)
return true;
}
function NTA_NecromancerAttackInt(target, boss, maxattacks)
{
return false;
}
function NTA_PaladinAttackInt(target, boss, maxattacks)
{
var _primaryindex;
var _maxattacks = 0;
var _range1, _range2;
var _prehp1, _prehp2;
var _nohit = true;
var _switch = 0;
_primaryindex = boss ? 1 : 2;
switch(NTConfig_AttackSkill[_primaryindex])
{
case 101: // Holy Bolt
case 121: // Fist of the Heavens
_range1 = 20;
break;
default:
_range1 = 2;
break;
}
switch(NTConfig_AttackSkill[4])
{
case 101: // Holy Bolt
case 121: // Fist of the Heavens
_range2 = 20;
break;
default:
_range2 = 2;
break;
}
_prehp1 = target.hp;
NTA_MFswitch(boss, target);
while(_maxattacks++ < maxattacks && NTA_IsValidTarget(target, true))
{
NTA_MFswitch(boss, target);
Print(target.uniqueid)
if(!CheckCollision(me, target, 3))
{
if(boss)
{
if(NTConfig_AttackSkill[_primaryindex] == 101 || NTConfig_AttackSkill[_primaryindex] == 121)
NTA_MoveCloseInt(target, Math.round(GetDistance(me, target)/2));
}
else if(me.areaid != 131)
return false;
}
_prehp2 = target.hp;
if(NTA_GetResistance(target, _NTA_SkillDamage[_primaryindex]) < 100)
{
if((_maxattacks % 2) == 1 && _nohit)
{
if(NTConfig_AttackSkill[_primaryindex] == 112)
{
if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
return false;
}
else
{
if(!NTA_MoveCloseInt(target, _range1) && !boss)
return false;
}
if(NTConfig_PutAura > 0)
NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
}
NTA_DoCastInt(_primaryindex, target);
NTA_MFswitch(boss, target);
}
else if(NTConfig_AttackSkill[4] > 0 && NTA_GetResistance(target, _NTA_SkillDamage[4]) < 100)
{
if((_maxattacks % 2) == 1 && _nohit)
{
if(NTConfig_AttackSkill[4] == 112)
{
if(!NTM_MoveTo(target.areaid, target.x+1, target.y, 0) && !boss)
return false;
}
else
{
if(!NTA_MoveCloseInt(target, _range2) && !boss)
return false;
}
if(NTConfig_PutAura > 0)
NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
}
NTA_DoCastInt(4, target);
}
else
{
if(boss)
{
if((_maxattacks % 2) == 1 && _nohit)
{
if(NTConfig_AttackSkill[_primaryindex] == 112)
NTM_MoveTo(target.areaid, target.x+1, target.y, 0);
else
NTA_MoveCloseInt(target, _range1);
if(NTConfig_PutAura > 0)
NTC_PutSkill(NTConfig_PutAura, NTC_HAND_RIGHT);
}
NTA_DoCastInt(_primaryindex, target);
}
else
return false;
}
if(boss)
{
if((_maxattacks % 8) == 0)
{
if(target.hp < _prehp1)
_prehp1 = target.hp;
else
return false;
}
}
else
{
if((_maxattacks % 4) == 0)
{
if(target.hp < _prehp1)
_prehp1 = target.hp;
else
return false;
}
}
_nohit = (target.hp >= _prehp2);
}
NTC_SwapWeapons(1)
return true;
}
function NTA_BarbarianAttackInt(target, boss, maxattacks)
{
return false;
}
function NTA_DruidAttackInt(target, boss, maxattacks)
{
return false;
}
function NTA_AssassinAttackInt(target, boss, maxattacks)
{
return false;
}
function NTA_DoCastInt(index, target)
{
var _untimedindex = index < 4 ? 3 : 5;
if(!NTC_DoCast(NTConfig_AttackSkill[index], _NTA_SkillHand[index], target))
return false;
if(_NTA_SkillDelay[index] > 0)
{
if(NTConfig_AttackSkill[_untimedindex] > 0)
{
var _starttick = GetTickCount();
while(NTA_IsValidTarget(target, true))
{
NTC_DoCast(NTConfig_AttackSkill[_untimedindex], _NTA_SkillHand[_untimedindex], target);
if(GetTickCount()-_starttick >= _NTA_SkillDelay[index])
break;
}
}
else
NTC_Delay(_NTA_SkillDelay[index]);
}
return true;
}
function NTA_MoveCloseInt(target, maxrange)
{
var _dist = GetDistance(me, target);
if(NTConfig_Moattrick == 1)
{
if(me.areaid == 102)
{
var _dist = 1
}
}
if(_dist > maxrange)
{
var _destx, _desty;
_destx = me.x + Math.round((_dist-maxrange)*(target.x-me.x) / _dist);
_desty = me.y + Math.round((_dist-maxrange)*(target.y-me.y) / _dist);
return NTM_MoveTo(me.areaid, _destx, _desty, 0);
}
return true;
}
function NTA_SortRoomInt(a, b)
{
if(GetDistance(me.x, me.y, a[0], a[1]) < GetDistance(me.x, me.y, b[0], b[1]))
return -1;
return 1;
}
function NTA_MFswitch(boss, target)
{
if(NTConfig_Weaponswitch == 1 && boss && target.hp <= NTConfig_HpForSwitch)
{
if(target.classid == (156 || 211 || 242 || 243 || 544))
{
NTC_SwapWeapons(0)
}
}
}
|
NTMephisto.ntj
| Code: |
function NTMain()
{
Include("common/NTCommon.ntl");
NTC_IncludeConfig();
NTC_IncludeLibs();
NT_LoadConfig();
NTSI_LoadNIPFiles();
NTA_Initialize();
Print(" ");
Print("ÿc; Starting Mephisto")
if(NTConfig_Moattrick == 1)
{
Print("ÿc; using Moattrick")
}
if(NTConfig_Weaponswitch == 1)
{
Print("ÿc; using Weaponswitch")
}
if(!NTTM_CheckAct())
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_CheckAct()");
return;
}
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTM_TownMove()");
return;
}
if(!NTM_TakeWaypoint(101))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
NTC_SwapWeapons(1) //switch to weaponslot 1
NTP_DoPrecast();
if(!NTM_MoveToObject(me.areaid, NTC_UNIT_TILE, 67, 68))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToObject()");
return;
}
if(!NTM_TakeStairs(67, 68))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStairs()");
return;
}
if(NTConfig_CheckSafe)
{
if(!NTTMGR_CheckSafe(2))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
}
if(!NTM_MoveTo(me.areaid, 17564, 8069))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
NTC_Delay(200);
NTM_MoveTo(me.areaid, 17564, 8069);
if(NTConfig_Moattrick == 1)
{
Print("ÿc; Start Moattrick");
NTC_Delay(200);
NTM_WalkTo(17560, 8067)
NTC_Delay(1000);
NTM_MoveTo(17563, 8072)
NTC_Delay(1000);
NTM_WalkTo(17584, 8091)
NTC_Delay(2000);
NTM_MoveTo(me.areaid, 17600, 8095)
NTC_Delay(1000);
NTM_MoveTo(me.areaid, 17610, 8095);
}
if(!NTA_KillBoss(242))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillBoss()");
return;
}
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
if(NTConfig_OpenChest)
{
var _chest;
if(NTM_MoveTo(me.areaid, 17520, 8063))
{
if(NTA_ClearPosition(30))
NTSI_PickItems();
}
_chest = NTC_GetUnit(NTC_UNIT_OBJECT, GetLocaleString(3260));
if(_chest)
{
do
{
if(_chest.x == 17513 && _chest.y == 8063)
{
if(NTM_MoveTo(_chest.areaid, _chest.x+1, _chest.y))
{
if(NTC_OpenChest(_chest))
NTSI_PickItems();
}
break;
}
} while(_chest.GetNext());
}
}
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
|
Usage:
make sure you have hoto/ocu/wizzard... in the first slot! the bot will teleport and fight with this slot.
make sure you have your alibaba/gull/mf-items... in the second slot! the bot will switch to the second slot when the boss is around the HP% set in the config.
make sure u have enablet weaponswitch/moattrick in ur NTConfig_Sorceress.ntl (using the new one)...
How to use weaponswitch on every boss:
open up the \scripts\libs\common\NTAttack.ntl
scroll down to the bottom an search for
| Code: |
if(target.classid = (156 || 211 || 242 || 243 || 544))
|
change it to:
| Code: |
//if(target.classid = (156 || 211 || 242 || 243 || 544))
|
How to use weaponswitch on some bosses?
the standart-setup does weaponswitch only on andy duriel meph dia and baal
if u want not to do weaponswitch on any of them open up \scripts\libs\common\NTAttack.ntl , scroll down to the bottom and search for
| Code: |
if(target.classid = (156 || 211 || 242 || 243 || 544))
|
delet the id of the boss u dont want to do with weaponswitch
156=andy, 211=duriel, 242=mephisto, 243=diablo, 544=baal
just use your brain till i wright a "manual"
lets have a look ;>
[/b]
Last edited by h4n4 on Sun Sep 13, 2009 8:22 pm; edited 18 times in total |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Mon Aug 10, 2009 5:10 am Post subject: |
|
|
if u need support help your self. im away for 1 week
btw dont use static till i update the script. next week...
feel free to wish some features or to suggest improvements |
|
| Back to top |
|
 |
Biornus User

Joined: 19 Oct 2008 My Posts
|
Posted: Mon Aug 17, 2009 5:35 am Post subject: |
|
|
It works great except one thing, my blizz sorc is standing the correct spot, but only using Glacial Spike, not the blizzard.
My spell config:
| Code: | //------------------------------------------------------------------------------
// Attack configuration
//------------------------------------------------------------------------------
NTConfig_AttackSkill[0] = 0; // Cast your first spell once. Set to 0 if you won't
NTConfig_AttackSkill[1] = 59; // Cast your primary spell to boss.
NTConfig_AttackSkill[2] = 59; // Cast your primary spell to others.
NTConfig_AttackSkill[3] = 55; // Cast your primary untimed spell if primary spell is timed spell. Set to 0 if you won't
NTConfig_AttackSkill[4] = 0; // Cast your secondary spell if monster is immune to your primary spell. Set to 0 if you won't
NTConfig_AttackSkill[5] = 0; // Cast your secondary untimed spell if secondary spell is timed spell. Set to 0 if you won't
NTConfig_ClearPosition = true; // Set to true if you want to clear area after killing boss.
NTConfig_CheckSafe = true; // Set to true to check for curses, merc and potion (go to town if needed)
NTConfig_CastStatic = 100; // Cast Static Field until monster's HP lower less than this percent. Set to 100 if you won't
//------------------------------------------------------------------------------
//Moattrick+Weaponswitch (Mephisto only)
//------------------------------------------------------------------------------
NTConfig_Weaponswitch = 0; //using Weaponswitch? 1=yes ; 0=no
NTConfig_Moattrick = 1; //using Moattrick? 1=yes ; 0=no
} |
|
|
| Back to top |
|
 |
Biornus User

Joined: 19 Oct 2008 My Posts
|
Posted: Mon Aug 17, 2009 6:10 am Post subject: |
|
|
| Nvm I solved it. |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Wed Aug 19, 2009 1:47 am Post subject: |
|
|
sorry. the internetprovider crasht our connection 3days ago -.-
ill continue work now |
|
| Back to top |
|
 |
bebolotti Nearly Banned

Joined: 21 Jul 2009 My Posts
|
Posted: Fri Aug 21, 2009 4:41 am Post subject: |
|
|
| this switches slots right after boss dies, as well as does NOT return to the other slot... ;/ i've tried to fix it to work for me, but no go. |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Fri Aug 21, 2009 8:40 am Post subject: |
|
|
| hm semms u have your mf-weapon in the wrong slot. try to exchange your weapons. |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Sat Aug 22, 2009 10:13 am Post subject: |
|
|
plz dont spam in my topic!
this doesn't work with palas. and i wont write weaponswitch for palas (for free)
if u cant understand/see how he script works and where are the switches/modified parts are. ask for it in a friendly way... |
|
| Back to top |
|
 |
whtsup02 User

Joined: 06 Jun 2005 My Posts
Location: Columbia, MO
|
Posted: Sat Aug 22, 2009 3:13 pm Post subject: |
|
|
| I would kill to see weaponswitch for other bosses. |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Sat Aug 22, 2009 4:40 pm Post subject: |
|
|
hm want to kill? oO
cant help u but if u want to donate... ^^
ill write something tomorow evening/night for you. its just a little pice
Last edited by h4n4 on Sat Aug 22, 2009 5:57 pm; edited 3 times in total |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Sat Aug 22, 2009 5:45 pm Post subject: |
|
|
Changelock:
23.8.09 static will be usable (again) but wont work on mephisto |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Sun Aug 23, 2009 2:37 pm Post subject: |
|
|
| whtsup02 wrote: | | I would kill to see weaponswitch for other bosses. |
show me! |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Mon Aug 24, 2009 7:28 pm Post subject: |
|
|
zomg major update!!!
weaponswitch on any boss
weaponswitch for palas
weaponswitch when u want it
...
see changelock |
|
| Back to top |
|
 |
miken User

Joined: 29 Jan 2004 My Posts
Location: Sweden
|
Posted: Tue Aug 25, 2009 2:27 am Post subject: |
|
|
| this would be nice for new ladder,, if they don't change offsets to much on 1.13 XD |
|
| Back to top |
|
 |
h4n4 User

Joined: 26 Jan 2008 My Posts
|
Posted: Tue Aug 25, 2009 6:38 am Post subject: |
|
|
| thats the reason why i continued working on it :> |
|
| Back to top |
|
 |
|
Donations this month: $120 Server cost this month: $120 Surplus Donations: $243 (2 months)
Donators this month: BenOwns, m3flow, crazyguy2005, TriiT, mbundy, pcgamer4life, parajumper, HEMULI, Alister, fallore, ZepherX, iLikeDixLOL, dsa, fobic, wootie, fbu, KaRdOoShI, youngstar2, ByTeMe, jj!, zonic, cruciform, Ninjai, Dr.Duck
|