[Release] Muddy's D2NT

01/22/2013 23:04 chefok#6766
hey guys what do i need to edit in NTbaal.ntj so my bot will make a tp and say safe message or just say the safe message after each wave... coz some times my leecher is late ( it does some mf ) and it doesnt enter the tp if he misses the safe message and i dont want to make it enter unsafe tps coz if its on time it can die in throne ( died alrdy with one leecher )

EDIT: I figured out the code ;) so if some one else needs this use htat code for ntbaal.ntj
Code:
/**
*	This file was modified by [Only registered and activated users can see links. Click Here To Register...]
*	Check the programming section for updates and further scripts
*	Last Update: 21:04 14.08.2011
*/

var _MWB_LastWave = 0;

function NTMain()
{
	Include("libs/common/NTCommon.ntl");
	
	NTC_IncludeLibs();
	NTC_IncludeConfig("NTBot/char_configs");

	NT_LoadConfig();
	NTSI_LoadNIPFiles("NTBot/item_configs");

	MWC_Initialize();
	
	var i;
	var _wave, _monsterCount, _starttick, _loops, _placedTraps;
	
	if(!NTTM_CheckAct(me.act, true))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTTM_CheckAct, 24, me.act, true);
		return;
	}

	NTTMGR_TownManager();

	if(!NTTM_TownMove("waypoint"))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTTM_TownMove, 32, "waypoint");
		return;
	}

	if(!NTM_TakeWaypoint(129))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTM_TakeWaypoint, 38, 129);
		return;
	}

	NTP_DoPrecast(true);

	for(i = 0; i < 2; i++)
	{
		if(!NTM_MoveToStair(me.areaid, 130 + i))
		{
			NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveToStair, 48, me.areaid, 130 + i);
			return;
		}

		if(!NTM_TakeStair(130 + i))
		{
			NTC_SendMsgToScript("MWBotGame.ntj", NTM_TakeStair, 54, 130 + i);
			return;
		}
	}

	if(MW_MoveToThrone())
	{			
		if(!NTM_MoveTo(me.areaid, 15112, 5068))
		{
			NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 63, me.areaid, 15112, 5068);
			return;
		}

		_monsterCount = MW_CountMonstersInThrone(100, true);
			
		if(NTConfig_PublicMode)
		{
			if(_monsterCount > 1 && MWConfig_Announcements.BaalThrone)
				Say(MWConfig_Announcements.BaalThrone.replace(/%d/gi, _monsterCount));
			
			NTM_MoveTo(me.areaid, 15116, 5068);
			
			_monsterCount = MW_CountMonstersInThrone(20);
			
			if(_monsterCount > 1)
			{
				if(_monsterCount < 3 && MWConfig_Announcements.BaalTpCold)
					Say(MWConfig_Announcements.BaalTpCold.replace(/%d/gi, _monsterCount));
				else if(_monsterCount < 6 && MWConfig_Announcements.BaalTpWarm)
					Say(MWConfig_Announcements.BaalTpWarm.replace(/%d/gi, _monsterCount));
				else if(MWConfig_Announcements.BaalTpHot)
					Say(MWConfig_Announcements.BaalTpHot.replace(/%d/gi, _monsterCount));
			}
			else if(MWConfig_Announcements.BaalTpNone)
				Say(MWConfig_Announcements.BaalTpNone);
			
			NTM_MakeTP();
			
			NTA_ClearPosition(25, true, 2);
		}

		NT_ClearThroneInt();

		if(NTConfig_PublicMode)
		{
			NTM_MoveTo(me.areaid, 15112, 5004, 1, true);

			NTM_MakeTP();
			
			if(MWConfig_Announcements.BaalTpSafe)
				Say(MWConfig_Announcements.BaalTpSafe);
		}
		
		while(true)
		{
			if(me.classid == NTC_CHAR_CLASS_PALADIN || me.classid == NTC_CHAR_CLASS_BARBARIAN)
				NTM_MoveTo(me.areaid, 15092, 5028);
			else
				NTM_MoveTo(me.areaid, 15092, 5044);
				
			if(_wave == 1)
				NTP_DoPrecast(true);	
			
			if(MWConfig_Announcements.BaalTpSafe)
				Say(MWConfig_Announcements.BaalTpSafe);

			if(me.classid == NTC_CHAR_CLASS_PALADIN && !MWC_CheckForExpShrineUsers())
				NTC_PutSkill(109, NTC_HAND_RIGHT);

			for(i = 0; i < 6; i++)
			{
				_wave = NT_ThroneCheckInt();
				
				if(_wave > 0 || me.classid == NTC_CHAR_CLASS_ASSASSIN)
					break;

				NTC_Delay(500);
			}
			
			if(_wave == 2)
				NTP_DoPrecast(true);	
			
			if(MWConfig_Announcements.BaalTpSafe)
				Say(MWConfig_Announcements.BaalTpSafe);

			_starttick = GetTickCount();

			_placedTraps = false;
			
			while(_wave == 0)
			{
				_wave = NT_ThroneCheckInt();
				
				if(_placedTraps || !NT_ThronePreAttackInt())
					NTC_Delay(200);
				else if(me.classid == NTC_CHAR_CLASS_ASSASSIN)
					_placedTraps = true;

				if(GetTickCount() - _starttick > 15000)
				{
					NT_ClearThroneInt();

					_starttick = GetTickCount();
				}
			}
			
			_MWB_LastWave = _wave;
			
			switch(_wave)
			{
				case 1:
					NTA_ClearPosition(40, true, 1);
					break;
				case 3:
					NTA_ClearPosition(40, true, 2);
					NT_CheckHydraInt();
					break;
				case 4:
					NTA_ClearPosition(40, true, 2);
					break;
				case 5:
					NTA_ClearPosition(40, true);
					break;
				default:
					NTA_ClearPosition(40, true, 1);
					break;
			}

			if(_wave == 5)
				break;
				
			NTP_DoPrecast(false);
		}

		if(NTConfig_KillBaal)
		{
			var _portal;

			if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
			{
				NTC_SendMsgToScript("MWBotGame.ntj", NTTMGR_CheckSafe, 185, NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
				return;
			}
				
			if(NTConfig_PublicMode && MWConfig_Announcements.BaalPreChamber)
				Say(MWConfig_Announcements.BaalPreChamber);
			
			NTM_MoveTo(me.areaid, 15092, 5010);

			NTP_DoPrecast(true);

			for(i = 1; i <= 120; i++)
			{
				if(!NTC_FindUnit(NTC_UNIT_MONSTER, 543))
					break;
			
				NTC_Delay(500);
				
				if(i % 30 == 0)
				{
					NT_ClearThroneInt();

					NTM_MoveTo(me.areaid, 15092, 5010);
				}
			}
			
			if(i > 120)
			{
				NTC_SendMsgToScript("MWBotGame.ntj", NTC_FindUnit, 200, NTC_UNIT_OBJECT, 543);
				return;
			}
			
			_portal = NTC_FindUnit(NTC_UNIT_OBJECT, 563, 1);

			if(!_portal)
			{
				NTC_SendMsgToScript("MWBotGame.ntj", NTC_FindUnit, 219, NTC_UNIT_OBJECT, 563, 1);
				return;
			}

			if(!NTM_UsePortal("Portal", 132, null, _portal))
			{
				NTC_SendMsgToScript("MWBotGame.ntj", NTM_UsePortal, 227, "Portal", 132, null, _portal);
				return;
			}

			NTM_MoveTo(me.areaid, 15138, 5916);

			if(!NTA_KillMonster(544))
			{
				NTC_SendMsgToScript("MWBotGame.ntj", NTA_KillMonster, 235, 544);
				return;
			}

			NTSI_PickItems();
		}
	}

	NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
}

// Internal function
function NT_ClearThroneInt()
{
	var _attackpos = [15112, 5068, 15075, 5065, 15114, 5045, 15114, 5012, 15095, 5024, 15078, 5013, 15092, 5040];

	for(var i = 0; i < _attackpos.length; i += 2)
	{
		NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);

		NTA_ClearPosition(30, true, 2);
	}
}

function MW_MoveToThrone()
{
	var _positions = [new Point(15113, 5205), new Point(15115, 5107)];
	
	for(var i = 0; i < _positions.length; i++)
	{
		NTM_MoveTo(me.areaid, _positions[i].x, _positions[i].y);
	
		if(MWConfig_SkipBaalOnSouls && NTC_FindUnit(NTC_UNIT_MONSTER, 641))
		{
			if(NTConfig_PublicMode)
				Say("Skipping Baal due to Black Souls...");
			else
				Print("ÿc1Skipping Baal due to Black Souls...");
		}
		else if(MWConfig_SkipBaalOnDolls && NTC_FindUnit(NTC_UNIT_MONSTER, 691))
		{
			if(NTConfig_PublicMode)
				Say("Skipping Baal due to Dolls...");
			else
				Print("ÿc1Skipping Baal due to Dolls...");
		}
		else
			continue;
			
		if(NTM_MoveToStair(me.areaid, 130))
			NTM_TakeStair(130);
			
		return false;
	}
	
	return true;
}

function NT_ThroneCheckInt()
{
	var _monster;

	if(!NTC_FindUnit(NTC_UNIT_MONSTER, 543))
		return 5;

	_monster = NTC_FindUnit(NTC_UNIT_MONSTER);

	if(_monster)
	{
		do
		{
			if(NTA_IsValidMonster(_monster))
			{
				if(_monster.classid == 23 || _monster.classid == 62)
					return 1;

				if(_monster.classid == 105 || _monster.classid == 381)
					return 2;

				if(_monster.classid == 557)
					return 3;

				if(_monster.classid == 558)
					return 4;

				if(_monster.classid == 571)
					return 5;
			}
		} while(_monster.GetNext());
	}

	return 0;
}

function NT_ThronePreAttackInt()
{
	var _index, _trapPos;
	
	if(!MWConfig_DoBaalPreAttack || me.mp / me.mpmax < 0.5)
		return false;
	
	if(me.classid == NTC_CHAR_CLASS_SORCERESS)
	{
		_index = NTConfig_AttackSkill.indexOf(38); // Check attack skills for Charged Bolt
		
		if(_index > -1)
			return NTC_CastSkill(NTConfig_AttackSkill[_index], NTC_HAND_RIGHT, 15092, 5028);
		
		_index = NTConfig_AttackSkill.indexOf(56); // Check attack skills for Meteor
		
		if(_index > -1 && _MWB_LastWave + 1 != 5)
			return NTC_CastSkill(NTConfig_AttackSkill[_index], NTC_HAND_RIGHT, 15092, 5028);
		
		_index = NTConfig_AttackSkill.indexOf(59); // Check attack skills for Blizzard
		
		if(_index > -1)
			return NTC_CastSkill(NTConfig_AttackSkill[_index], NTC_HAND_RIGHT, 15092, 5028);
			
		if(NTC_GetSkillLevel(55) > 0)
			return NTC_CastSkill(55, NTC_HAND_RIGHT, 15092, 5028);
	}
	else if(me.classid == NTC_CHAR_CLASS_PALADIN)
	{
		_index = NTConfig_AttackSkill.indexOf(112); // Check attack skills for Blessed Hammer
		
		if(_index > -1)
		{
			if(NTConfig_AttackSkill[_index + 1] > 0)
				NTC_PutSkill(NTConfig_AttackSkill[_index + 1], NTC_HAND_RIGHT);

			return NTC_CastSkill(NTConfig_AttackSkill[_index], 2);
		}
	}
	else if(me.classid == NTC_CHAR_CLASS_NECROMANCER)
	{
		_index = NTConfig_AttackSkill.indexOf(66); // Check attack skills for Amplify Damage
		
		if(_index > -1)
			return !NTC_CastSkill(NTConfig_AttackSkill[_index], NTC_HAND_RIGHT, 15092, 5028);
		
		_index = NTConfig_AttackSkill.indexOf(87); // Check attack skills for Decepify
		
		if(_index > -1)
			return !NTC_CastSkill(NTConfig_AttackSkill[_index], NTC_HAND_RIGHT, 15092, 5028);
	}
	else if(me.classid == NTC_CHAR_CLASS_ASSASSIN)
	{
		_trapPos = new Array(2);
		_trapPos[0] = [15094, 5038, 15090, 5034, 15098, 5034];
		_trapPos[1] = [15092, 5036, 15096, 5036];
		
		_index = NTConfig_AttackSkill.indexOf(MWS_LIGHTNING_SENTRY); // Check attack skills for Lightning Sentry
		
		if(_index > -1)
		{
			for(var i = 0; i < _trapPos[0].length; i += 2)
				NTC_CastSkill(NTConfig_AttackSkill[_index], NTC_HAND_RIGHT, _trapPos[0][i], _trapPos[0][i + 1]);
		}
			
		_index = NTConfig_AttackSkill.indexOf(MWS_DEATH_SENTRY); // Check attack skills for Death Sentry
		
		if(_index > -1)
		{
			for(var i = 0; i < _trapPos[1].length; i += 2)
				NTC_CastSkill(NTConfig_AttackSkill[_index], NTC_HAND_RIGHT, _trapPos[1][i], _trapPos[1][i + 1]);
		}
		
		return true;
	}

	return false;
}

function NT_CheckHydraInt()
{
	var _hydra1, _hydra2, _hydra3;

	_hydra1 = NTC_FindUnit(NTC_UNIT_MONSTER, 351);
	_hydra2 = NTC_FindUnit(NTC_UNIT_MONSTER, 352);
	_hydra3 = NTC_FindUnit(NTC_UNIT_MONSTER, 353);

	if((_hydra1 && _hydra1.GetStat(172) != 2 && _hydra1.GetState(105))
		|| (_hydra2 && _hydra2.GetStat(172) != 2 && _hydra2.GetState(105))
		|| (_hydra3 && _hydra3.GetStat(172) != 2 && _hydra3.GetState(105)))
	{
		NTM_MoveTo(me.areaid, 15112, 5004);

		if(me.GetState(2))
			NTC_PutSkill(109, NTC_HAND_RIGHT);

		NTC_PingDelay(3000);
	}
}

function MW_CountMonstersInThrone(range, showMonsters)
{
	var _monster, _count, _monsterData, _output, _chatOutput;
	var i;
	
	if(arguments.length < 1)	
		range = 100;
	if(arguments.length < 2)	
		showMonsters = false;

	_count = 0;
	_monsterData = new Array();
	
	_monster = NTC_FindUnit(NTC_UNIT_MONSTER);
	
	if(_monster)
	{
		do
		{
			if(NTA_IsValidMonster(_monster) && _monster.IsAttackable() && _monster.y <= 5090 && GetDistance(me, _monster) < range)
			{
				for(i = 0; i < _monsterData.length; i++)
				{
					if(_monsterData[i][0] == _monster.classid)
					{
						if(_monsterData[i][1] == "" && !(_monster.spectype&0x0E))
							_monsterData[i][1] = _monster.name;

						_monsterData[i][2]++;
						
						break;
					}
				}
				if(i >= _monsterData.length)
				{
					_monsterData.push([_monster.classid, "", 1]);
				
					if(!(_monster.spectype&0x0E))
						_monsterData[_monsterData.length - 1][1] = _monster.name;
				}
				
				_count++;
			}
		}
		while(_monster.GetNext());
	}
	
	if(showMonsters)
	{
		Print("ÿc1" + _count + " ÿc8monster(s) in Throne:");
		_chatOutput = "Monster type(s): ";
		for(i = 0; i < _monsterData.length; i++)
		{
			_output = "ÿc8" + _monsterData[i][1];
			
			if(_chatOutput.indexOf('[') > -1)
				_chatOutput += ", ";
				
			_chatOutput += _monsterData[i][1] + " [" + _monsterData[i][2] + "]";
			
			if(_monsterData[i][1].indexOf("Fury") > -1)
				_output = _output.replace("Fury", "Furies");
			else if(_monsterData[i][1].indexOf("Witch") > -1 || _monsterData[i][1].indexOf("Magus") > -1)
				_output += "es";
			else
				_output += 's';
				
			_output += ": ÿc1" + _monsterData[i][2];

			Print(_output);
		}
		
		Say(_chatOutput);
	}
	
	return _count;
}
01/23/2013 23:33 chefok#6767
question again.. :D is it possible to make the bot logs whatever he sells in the d2nt manager? not showing only what he keeps , thanks
01/24/2013 05:27 mirkoregge#6768
Quote:
Originally Posted by chefok View Post
question again.. :D is it possible to make the bot logs whatever he sells in the d2nt manager? not showing only what he keeps , thanks
GlobalSettings:
Code:
	// Set to true to log items in manager's log that were not required and therefore sold. NOTE: You should definately set this to false when running multiple bots. Use the XML log instead in order to keep track of sold items. ;)
	MWConfig_LogSoldItems = true;
01/24/2013 13:46 chefok#6769
also iv noticed when my hdin runs when he kills meph he position hem self like that so he is not really killing it with the hammers but my merc kills meph and its annoying because i didn`t have any decent drop from hem like 400 runs or so :D any way that could be fixed?
01/27/2013 19:58 Timo1986#6770
Hat man schon geschafft die assa bei d2 muddys zu verbessern in sachen NTAttack

Lg
01/27/2013 20:28 mirkoregge#6771
Da hat sich leider keiner weiter darum gekümmert. Du könntest ggf. auf den d2bs von kolton umsteigen.
01/27/2013 20:42 Timo1986#6772
Vielen dank

Ich bleibe Muddy Treu =)

wäre echt super wenn wir das irgendwie irgendwann nochmal gefixt bekommen

allen noch ein schönen abend
02/02/2013 15:19 caspert_ghost#6773
Hello again, it has been a while since I logged in here- mostly because the program is working great and I have had no problems-

With the new bannings taking place I want to make it more difficult for Warden to determine if I am a bot or not.,

Currently Blizzard is logging into random games that are numbered and starting a conversation, if no response is made the user is kicked and flagged, if the user immediately logs back into a game and still makes no response while playing the user will receive a temp ban.

What I want to do is go through a list of game names to choose from at random, each game creation rather than a jumble of letters and numbers which make it more obvious.

Is this possible?
02/03/2013 11:34 LoseYourSelrf#6774
Hallo an alle!
Ich hätte da ein Problem das mich ziemlich nervt..
Mein Bot restartet jedes mal wenn er den Run zu Ende ist.. ( dasselbe ist auch bei meinem Leechbot.. :(

Version : Muddy's D2NT 3.1

PS: Ich hab schon alles mögliche versucht aber nix hat funkt..
02/03/2013 14:04 Havanaclub1992#6775
LoseYourSelrf du brauchst eine englische version von diablo 2

Hab auch mal eine frage hab ebenfalls die englische version bei blizzard runtergeladen installiert die configs eingestellt und der manager is auch 5 mal überarbeitet worden, aber ich bekomme trotz allem beim spiel start den fehler Unhandled Exeption .. hab ich schon über all nach gelesen das ich dann einen patch brauche aber woher und welcher ist der richtige ?!? Bitte helft mir :D
02/03/2013 14:23 LoseYourSelrf#6776
Quote:
LoseYourSelrf du brauchst eine englische version von diablo 2
Daran kann es nicht liegen..

Grund : Ich hab Diablo 2 auf English schon umgestellt
02/03/2013 16:36 mirkoregge#6777
Hast du eine Zahl eingetragen für Keywechsel in den Profilen?
02/03/2013 16:44 LoseYourSelrf#6778
Nein habe ich nicht
Mein Bot und mein Leechbot sind absolut perfekt (sie tuhen das alles was ich will) nur wenn sie mit dem Run fertig sind sagt der D2NT Manager "finished succefully" und sie machen nen Restart.


Das Problem wurde behoben! Ich weiß nicht aber nicht wie :P

Danke an alle die mir helfen wollten!
02/10/2013 00:02 fred9x9#6779
Quote:
Originally Posted by caspert_ghost View Post
Hello again, it has been a while since I logged in here- mostly because the program is working great and I have had no problems-

With the new bannings taking place I want to make it more difficult for Warden to determine if I am a bot or not.,

Currently Blizzard is logging into random games that are numbered and starting a conversation, if no response is made the user is kicked and flagged, if the user immediately logs back into a game and still makes no response while playing the user will receive a temp ban.

What I want to do is go through a list of game names to choose from at random, each game creation rather than a jumble of letters and numbers which make it more obvious.

Is this possible?
Id like to suppurt this idea, but....
as far as I know, the gamename is created by the d2nt manager and no one cracked this proggy until now :-(
Oder??? :-)
02/19/2013 01:29 Evil Knievel#6780
Ich habe folgendes Problem:
Mein Bot hat einen magischen Reif aufgenommen, hat sich ein Identy Scroll gekauft und den Reif identifiziert. Diablo ist daraufhin abgestürzt und den Fehlercode kann ich nicht sehen, da dieser gleich geschlossen wird.
Starte ich den Bot anschließend wieder werden keine Fehler angezeigt, er geht zum Händler und sobald die Maus über das Item geht, stürzt D2 wieder ab.
Wie gehe ich jetzt am besten zur Fehlersuche vor? Oder hat jmd eine Idee??

€: Der Reif ist nicht das einzige Item, bei dem D2 abschmiert. Habe das Problem jetzt auch bei anderen Items.

Hat sich alles geklärt.
*sich schäm* ich hab ein bisschen geschlampert beim Umstellen von deutsch auf englisch :(