Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Diablo 2 > Diablo 2 Programming
You last visited: Today at 00:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



SkipDiablo in Muddy´s D2NT

Discussion on SkipDiablo in Muddy´s D2NT within the Diablo 2 Programming forum part of the Diablo 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2009
Posts: 49
Received Thanks: 9
SkipDiablo in Muddy´s D2NT

Hi

Mich hats schon ein wenig gestört, dass mein Runner und der Cofighter zusammen Diablo killen und eine "SkipDiablo" Funktion leider noch nicht vorhanden ist.

Nützlich ist das bei mir weil nur mein Cofighter Exp braucht und mein Leader nicht mehr.
Ich mache priv Runs mit 4 Bots in einem Game. Da lohnt sich das für meine Begriffe schon wenn nur ein Highlevel die Diablo Erfahrung bekommt.

Das Diascript sieht so aus:
Code:
/**
*	This file was modified by 
*	Check the programming section for updates and further scripts
*	Last Update: 22:01 14.08.2011
*/

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

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

	MWC_Initialize();
	
	var _monsterCount, _attackpos;

	if(!NTTM_CheckAct(me.act, true))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTTM_CheckAct, 20, me.act, true);
		return;
	}
	
	NTTMGR_TownManager();

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

	if(!NTM_TakeWaypoint(107))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTM_TakeWaypoint, 34, 107);
		return;
	}

	NTP_DoPrecast(true);

	if(!NTM_MoveTo(108, 7797, 5560, 10))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 42, 108, 7797, 5560);
		return;
	}

	if(!MWConfig_StartAtStar && !MWConfig_FastDia)
	{
		_attackpos = [7792, 5525, 7793, 5501, 7773, 5495, 7768, 5480, 7767, 5458, 7770, 5438, 7774, 5417, 7767, 5391, 7768, 5369, 7769, 5345, 7770, 5320, 7780, 5308];

		if(!NTM_MoveTo(108, 7790, 5544, 10))
		{
			NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 52, 108, 7790, 5544);
			return;
		}
		
		if(NTConfig_PublicMode)
		{
			_monsterCount = MWA_FindNearbyMonsters(20);
			
			if(_monsterCount > 1)
			{
				if(_monsterCount < 3 && MWConfig_Announcements.DiabloTpCold)
					Say(MWConfig_Announcements.DiabloTpCold.replace(/%d/gi, _monsterCount));
				else if(_monsterCount < 6 && MWConfig_Announcements.DiabloTpWarm)
					Say(MWConfig_Announcements.DiabloTpWarm.replace(/%d/gi, _monsterCount));
				else if(MWConfig_Announcements.DiabloTpHot)
					Say(MWConfig_Announcements.DiabloTpHot.replace(/%d/gi, _monsterCount));
			}
			else if(MWConfig_Announcements.DiabloTpNone)
				Say(MWConfig_Announcements.DiabloTpNone);
				
			NTM_MakeTP();
		}
		
		NTA_ClearPosition(25, false, 2);

		NTM_MoveTo(108, 7790, 5544);

		NTC_PingDelay(1000);

		NTA_ClearPosition(25, true, 2);

		NTM_MoveTo(108, 7790, 5544);
		
		if(NTConfig_PublicMode && MWConfig_Announcements.DiabloTpSafe)
			Say(MWConfig_Announcements.DiabloTpSafe);		for(var i = 0; i < _attackpos.length; i += 2)
		{
			NTM_MoveTo(108, _attackpos[i], _attackpos[i + 1], 3, true);

			NTA_ClearPosition(45, true, 2);
		}
	}
		
	if(!MWConfig_FastDia)
	{
		NTM_MoveTo(108, 7792, 5292);
		
		if(NTConfig_PublicMode) 
		{
			if(MWConfig_StartAtStar)
			{
				_monsterCount = MWA_FindNearbyMonsters(25);
				
				if(_monsterCount > 1)
				{
					if(_monsterCount < 3 && MWConfig_Announcements.DiabloTpCold)
						Say(MWConfig_Announcements.DiabloTpCold.replace(/%d/gi, _monsterCount));
					else if(_monsterCount < 6 && MWConfig_Announcements.DiabloTpWarm)
						Say(MWConfig_Announcements.DiabloTpWarm.replace(/%d/gi, _monsterCount));
					else if(MWConfig_Announcements.DiabloTpHot)
						Say(MWConfig_Announcements.DiabloTpHot.replace(/%d/gi, _monsterCount));
				}
				else if(MWConfig_Announcements.DiabloTpNone)
					Say(MWConfig_Announcements.DiabloTpNone);
			}
			
			NTM_MakeTP();
		}
	
		NTP_DoPrecast(true);
		
		NTA_ClearPosition(25);
	}
	
	NTM_MoveTo(108, 7792, 5292, 3, !MWConfig_FastDia);

	if(!NT_OpenSealsInt())
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NT_OpenSealsInt, 128);
		return;
	}
	
	if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTTMGR_CheckSafe, 134, NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
		return;
	}
	
	if(NTConfig_PublicMode && MWConfig_Announcements.DiabloPre) 
		Say(MWConfig_Announcements.DiabloPre);
	
	NTC_Delay(2000);

	if(NTConfig_skipDiablo)
	
	NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");

	if(!NTM_MoveTo(me.areaid, 7794, 5285, 25))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 143, me.areaid, 7792, 5292);
		return;
	}
	
	NTP_DoPrecast(true);
	
	if(me.classid == NTC_CHAR_CLASS_PALADIN && !MWC_CheckForExpShrineUsers())
		NTC_PutSkill(109, NTC_HAND_RIGHT);

	NTC_FindUnit(NTC_UNIT_MONSTER, 243, 150);

	if(!NTA_KillMonster(243))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTA_KillMonster, 156, 243);
		return;
	}

	NTSI_PickItems();

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

// Internal function
function NT_OpenSealsInt()
{
	var i, _unit;
	var _result;

	_unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);

	if(!_unit)
		return false;

	_result = false;

	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == 396)
		{
			if(_unit[i].roomy*5 + _unit[i].y == 5275)
				_result = NT_OpenVizierSealInt(1);
			else
				_result = NT_OpenVizierSealInt(2);

			break;
		}
	}

	if(!_result && !MWConfig_IgnoreSealOpeningErrors)
		return false;

	
	NTM_MoveTo(me.areaid, 7792, 5292, 3, !MWConfig_FastDia);
	if(!MWConfig_FastDia)
		NTA_ClearPosition(30);
	NTP_DoPrecast();

	_result = false;

	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == 394)
		{
			if(_unit[i].roomx*5 + _unit[i].x == 7773)
				_result = NT_OpenDeSeisSealInt(1);
			else
				_result = NT_OpenDeSeisSealInt(2);

			break;
		}
	}

	if(!_result && !MWConfig_IgnoreSealOpeningErrors)
		return false;

	NTM_MoveTo(me.areaid, 7792, 5292, 3, !MWConfig_FastDia);
	if(!MWConfig_FastDia)
		NTA_ClearPosition(30);
	NTP_DoPrecast(!MWConfig_FastDia);

	_result = false;

	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == 392)
		{
			if(_unit[i].roomx*5 + _unit[i].x == 7893)
				_result = NT_OpenVenomSealInt(1);
			else
				_result = NT_OpenVenomSealInt(2);

			break;
		}
	}

	return (_result || MWConfig_IgnoreSealOpeningErrors);
}

function NT_OpenVizierSealInt(type)
{
	var i, n;
	var _attackpos = [7740, 5300, 7740, 5280, 7720, 5280, 7720, 5300];
	var _monstername = GetLocaleString(2851);

	if(!MWConfig_FastDia)
	{
		for(i = 0 ; i < _attackpos.length ; i += 2)
		{
			NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1], 3, true);

			NTA_ClearPosition(30, true, 2);
		}
	}

	for(i = 0; i < 4; i++)
	{
		if(!MW_OpenSeal(395) || !MW_OpenSeal(396))
		{
			NTC_Delay(2500);
			continue;
		}
		
		if(type == 1)
			NTM_MoveTo(me.areaid, 7665, 5277);
		
		for(n = 0; n < 10; n++)
		{
			NTC_Delay(200);

			if(NTA_KillMonster(_monstername))
			{
				NTA_ClearPosition((MWConfig_FastDia) ? 10 : 20);
				NTSI_PickItems();

				return NTM_MoveTo(me.areaid, 7750, 5280);
			}
		}
	}

	return false;
}

function NT_OpenDeSeisSealInt(type)
{
	var i, n;
	var _attackpos = [7780, 5255, 7800, 5255, 7800, 5235, 7780, 5235];
	var _monstername = GetLocaleString(2852);
	var _deSeis, _dist;

	if(type == 1)
		_attackpos.push(7773, 5215, 7773, 5197, 7794, 5196, 7813, 5189, 7814, 5171, 7804, 5156, 7787, 5154);
	else
		_attackpos.push(7811, 5216, 7810, 5197, 7787, 5192, 7772, 5183, 7773, 5166, 7784, 5154, 7800, 5154);
		
	switch(me.classid)
	{
		case NTC_CHAR_CLASS_BARBARIAN:
		case NTC_CHAR_CLASS_PALADIN:
			_dist = 8;
			break;
		case NTC_CHAR_CLASS_DRUID:
			_dist = 10;
			break;
		default:
			_dist = 12;
	}
	
	if(!MWConfig_FastDia)
	{
		for(i = 0; i < _attackpos.length; i += 2)
		{
			NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);

			NTA_ClearPosition(30, true, 2);
		}
	}

	for(i = 0; i < 4; i++)
	{
		if(type == 1)
		{
			MW_OpenSeal(394);
			
			NTM_MoveTo(me.areaid, 7791, 5198);
			
			_deSeis = NTC_FindUnit(NTC_UNIT_MONSTER, _monstername, 3);
			
			if(_deSeis)
			{
				if(_deSeis.y >= 5185)
					NTM_MoveTo(me.areaid, 7776, _deSeis.y - _dist);
				else
					NTM_MoveTo(me.areaid, 7776, _deSeis.y + _dist);
			}
			else
				NTA_ClearPosition(20);
		}
		else
		{
			MW_OpenSeal(394);

			NTM_MoveTo(me.areaid, 7789, 5154);
			
			_deSeis = NTC_FindUnit(NTC_UNIT_MONSTER, _monstername, 3);
			
			if(_deSeis && _deSeis.y + _dist <= 5201)
			{
				if(!NTM_MoveTo(me.areaid, 7776, _deSeis.y + _dist))
					NTM_MoveTo(me.areaid, 7776, _deSeis.y - _dist);
			}
			else
				NTM_MoveTo(me.areaid, 7791, 5192);
		}

		for(n = 0; n < 10; n++)
		{
			NTC_Delay(200);

			if(NTA_KillMonster(_monstername))
			{
				NTA_ClearPosition((MWConfig_FastDia) ? 10 : 30);
				NTSI_PickItems();

				return NTM_MoveTo(me.areaid, 7800, 5255, 3, !MWConfig_FastDia);
			}
		}
	}

	return false;
}

function NT_OpenVenomSealInt(type)
{
	var i, n;
	var _attackpos = [7835, 5280, 7835, 5300, 7855, 5300, 7855, 5280];
	var _monstername = GetLocaleString(2853);
	var _sealOrder;
	
	if(MWConfig_KillFullInfectorMob && !MWConfig_FastDia)
		_sealOrder = [392, 393];
	else
		_sealOrder = [393, 392];

	if(!MWConfig_FastDia)
	{
		for(i = 0 ; i < _attackpos.length ; i += 2)
		{
			NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1], 3, true);

			NTA_ClearPosition(30, true, 2);
		}
	}

	for(i = 0; i < 4; i++)
	{
		if(!MW_OpenSeal(_sealOrder[0]))
		{
			NTM_MoveTo(me.areaid, _attackpos[_attackpos.length - 2], _attackpos[_attackpos.length - 1], 3, true);
			
			NTC_Delay(2500);
			continue;
		}

		if(_sealOrder[1] == 392 && !MW_OpenSeal(_sealOrder[1]))
		{
			NTM_MoveTo(me.areaid, _attackpos[_attackpos.length - 2], _attackpos[_attackpos.length - 1], 3, true);
			
			NTC_Delay(2500);
			continue;
		}

		if(type == 1)
			NTM_MoveTo(me.areaid, 7892, 5298);
		else
			NTM_MoveTo(me.areaid, 7937, 5305);
		
		for(n = 0 ; n < 10 ; n++)
		{
			NTC_Delay(200);

			if(NTA_KillMonster(_monstername))
			{
				NTSI_PickItems();

				NTA_ClearPosition((MWConfig_FastDia) ? 10 : 40);
				
				if(NTC_PutSkill(124, NTC_HAND_RIGHT))
					NTC_PingDelay(1000);
				
				if(_sealOrder[1] == 393)
				{
					for(i = 0; i < 4; i++)
					{
						if(MW_OpenSeal(393))
							break;
							
						NTC_Delay(2500);
					}
				}
				
				return true;
			}
		}
	}

	return false;
}

function MW_OpenSeal(classid)
{
	var _seal, _x, _y, _unit;

	_unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);

	if(!_unit)
		return false;
	
	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == classid)
		{
			_x = _unit[i].roomx * 5 + _unit[i].x;
			_y = _unit[i].roomy * 5 + _unit[i].y;
	
			break;
		}
	}

	NTM_MoveTo(me.areaid, _x + 1, _y + 1);

	if(!MWConfig_FastDia)
		NTA_ClearPosition(25, true, 2, false, false);
	
	_seal = NTC_FindUnit(NTC_UNIT_OBJECT, classid, 5);

	if(!_seal)
		return false;

	if(_seal.mode > 0)
		return true;

	for(var i = 0; i < 8; i++)
	{
		if((i % 2) == 0)
		{
			if(GetDistance(me, _seal) > 2)
				NTM_MoveTo(_seal.areaid, _seal.x + 1, _seal.y +1 );

			NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _seal);
		}

		NTC_Delay(500);

		if(_seal.mode > 0)
			return true;
		
		if(i > 4)
			NTA_ClearPosition(20, true, 2, false, false);
	}

	return false;
}
Die NTConfig.ntj hiermit erweiterm:
Code:
var NTConfig_SkipDiablo;
Ich habe das vor var MWConfig_SkipBaalOnDolls; gesezt aber sollte kein muss sein.

Die Charconfig dann so erweitern:
Code:
MWConfig_Script.push(["NTDiablo.ntj", 10]); MWConfig_KillFullInfectorMob = true; MWConfig_StartAtStar = true; MWConfig_IgnoreSealOpeningErrors = false; MWConfig_FastDia = false; NTConfig_skipDiablo= true;
Code:
NTConfig_skipDiablo= true;
Diese Funktion gibt an, ob Diablo übersprungen oder nicht übersprungen wird.
true= Diablo wird nicht gekillt
false= Diablo wird gekillt

Thanks natürlich auch hier an Muddy weil ich ich auch nur eine kleine Zusatzfunktion im Standardscript eingebaut habe.

Regards
papachef is offline  
Thanks
2 Users
Old 04/18/2012, 16:35   #2
 
kal_el's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 7,310
Received Thanks: 2,205
kannst es auch nur so machen....
Quote:
//NTC_FindUnit(NTC_UNIT_MONSTER, 243, 150);

//if(!NTA_KillMonster(243))
//{
// NTC_SendMsgToScript("MWBotGame.ntj", NTA_KillMonster, 156, 243);
// return;
//}
kal_el is offline  
Old 04/18/2012, 16:44   #3
 
elite*gold: 0
Join Date: Apr 2009
Posts: 49
Received Thanks: 9
Ne wenn ich Diablo komplett rausnehme dann killt mein Cofighter Diablo auch nicht.
Ich will ja, dass nur einer Diablo killt.
Desshalb die Unterscheidung skip oder no skip.
papachef is offline  
Old 04/18/2012, 17:49   #4
 
kal_el's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 7,310
Received Thanks: 2,205
dann kopierst eben das script...haste 2 ^^.
und der leader wartet derweil paar sec. auf den co-fighter
kal_el is offline  
Old 04/18/2012, 20:21   #5
Administrator
 
Muddy Waters's Avatar
 
elite*gold: 41624
Join Date: Jan 2010
Posts: 22,728
Received Thanks: 12,654
kal_el hat da eben seine ganz eigenen Mittel - nicht immer ganz elegant, dafür funktioniert es trotzdem.

Solltest der if-Anweisung noch einen Anweisungsblock und ein return spendieren, das ist etwas zarter als das Script einfach vom übergeordneten Thread zwangsbeenden zu lassen. Bietet sich außerdem an, den Bezeichner so zu wählen, dass dieser mit der sonstigen Nomenklatur konform ist (also NTConfig_SkipDiablo).

Achja, du hast deine Config Variable nirgendwo deklariert; JavaScript ordnet solche Variablen zwar implizit dem globalen Kontext zu, dennoch ist eine richtige Deklarierung sauberer und vor allem auch eindeutiger. Die Deklarierung von Config Variablen geschieht üblicherweise in der NTConfig.ntl.
Muddy Waters is offline  
Thanks
2 Users
Old 04/18/2012, 20:49   #6
 
kal_el's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 7,310
Received Thanks: 2,205
so, und jetzt machst das ganze nochmal auf deutsch
kal_el is offline  
Thanks
1 User
Old 04/18/2012, 20:56   #7
Administrator
 
Muddy Waters's Avatar
 
elite*gold: 41624
Join Date: Jan 2010
Posts: 22,728
Received Thanks: 12,654
Der Papa versteht das bestimmt auch so, ansonsten kann er gerne nachfragen. Die geschilderten Zusammenhänge sind jedenfalls eher simpel.
Muddy Waters is offline  
Old 04/18/2012, 21:03   #8
 
kal_el's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 7,310
Received Thanks: 2,205
ich versteh was du meinst ich wollt nur mal diesen satz schreiben

oki, erledigt. kannst mich hier entfernen büdde

topic clean halten und so
kal_el is offline  
Old 04/18/2012, 22:36   #9
 
elite*gold: 0
Join Date: Apr 2009
Posts: 49
Received Thanks: 9
Ja ich hab das schon soweit verstanden.
Nur dauert das noch ein bischen bis ich wirklich firm bin mit dem scripten.
Mir war erstmal wichtig das hinzubekommen was ich mir in den Kopf gesetzt habe.

Die Erweiterung in der NTConfig hab ich glatt vergessen zu posten..

Danke euch
papachef is offline  
Old 05/15/2012, 16:21   #10
 
NerDxx™'s Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 559
Received Thanks: 71
ist das dia script das normale oder hast du da was verändert?
also

NTDiablo.ntl
Code:
/**
*	This file was modified by 
*	Check the programming section for updates and further scripts
*	Last Update: 22:01 14.08.2011
*/

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

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

	MWC_Initialize();
	
	var _monsterCount, _attackpos;

	if(!NTTM_CheckAct(me.act, true))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTTM_CheckAct, 20, me.act, true);
		return;
	}
	
	NTTMGR_TownManager();

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

	if(!NTM_TakeWaypoint(107))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTM_TakeWaypoint, 34, 107);
		return;
	}

	NTP_DoPrecast(true);

	if(!NTM_MoveTo(108, 7797, 5560, 10))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 42, 108, 7797, 5560);
		return;
	}

	if(!MWConfig_StartAtStar && !MWConfig_FastDia)
	{
		_attackpos = [7792, 5525, 7793, 5501, 7773, 5495, 7768, 5480, 7767, 5458, 7770, 5438, 7774, 5417, 7767, 5391, 7768, 5369, 7769, 5345, 7770, 5320, 7780, 5308];

		if(!NTM_MoveTo(108, 7790, 5544, 10))
		{
			NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 52, 108, 7790, 5544);
			return;
		}
		
		if(NTConfig_PublicMode)
		{
			_monsterCount = MWA_FindNearbyMonsters(20);
			
			if(_monsterCount > 1)
			{
				if(_monsterCount < 3 && MWConfig_Announcements.DiabloTpCold)
					Say(MWConfig_Announcements.DiabloTpCold.replace(/%d/gi, _monsterCount));
				else if(_monsterCount < 6 && MWConfig_Announcements.DiabloTpWarm)
					Say(MWConfig_Announcements.DiabloTpWarm.replace(/%d/gi, _monsterCount));
				else if(MWConfig_Announcements.DiabloTpHot)
					Say(MWConfig_Announcements.DiabloTpHot.replace(/%d/gi, _monsterCount));
			}
			else if(MWConfig_Announcements.DiabloTpNone)
				Say(MWConfig_Announcements.DiabloTpNone);
				
			NTM_MakeTP();
		}
		
		NTA_ClearPosition(25, false, 2);

		NTM_MoveTo(108, 7790, 5544);

		NTC_PingDelay(1000);

		NTA_ClearPosition(25, true, 2);

		NTM_MoveTo(108, 7790, 5544);
		
		if(NTConfig_PublicMode && MWConfig_Announcements.DiabloTpSafe)
			Say(MWConfig_Announcements.DiabloTpSafe);		for(var i = 0; i < _attackpos.length; i += 2)
		{
			NTM_MoveTo(108, _attackpos[i], _attackpos[i + 1], 3, true);

			NTA_ClearPosition(45, true, 2);
		}
	}
		
	if(!MWConfig_FastDia)
	{
		NTM_MoveTo(108, 7792, 5292);
		
		if(NTConfig_PublicMode) 
		{
			if(MWConfig_StartAtStar)
			{
				_monsterCount = MWA_FindNearbyMonsters(25);
				
				if(_monsterCount > 1)
				{
					if(_monsterCount < 3 && MWConfig_Announcements.DiabloTpCold)
						Say(MWConfig_Announcements.DiabloTpCold.replace(/%d/gi, _monsterCount));
					else if(_monsterCount < 6 && MWConfig_Announcements.DiabloTpWarm)
						Say(MWConfig_Announcements.DiabloTpWarm.replace(/%d/gi, _monsterCount));
					else if(MWConfig_Announcements.DiabloTpHot)
						Say(MWConfig_Announcements.DiabloTpHot.replace(/%d/gi, _monsterCount));
				}
				else if(MWConfig_Announcements.DiabloTpNone)
					Say(MWConfig_Announcements.DiabloTpNone);
			}
			
			NTM_MakeTP();
		}
	
		NTP_DoPrecast(true);
		
		NTA_ClearPosition(25);
	}
	
	NTM_MoveTo(108, 7792, 5292, 3, !MWConfig_FastDia);

	if(!NT_OpenSealsInt())
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NT_OpenSealsInt, 128);
		return;
	}
	
	if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTTMGR_CheckSafe, 134, NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe);
		return;
	}
	
	if(NTConfig_PublicMode && MWConfig_Announcements.DiabloPre) 
		Say(MWConfig_Announcements.DiabloPre);
	
	NTC_Delay(2000);

	if(NTConfig_skipDiablo)
	
	NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");

	if(!NTM_MoveTo(me.areaid, 7794, 5285, 25))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTM_MoveTo, 143, me.areaid, 7792, 5292);
		return;
	}
	
	NTP_DoPrecast(true);
	
	if(me.classid == NTC_CHAR_CLASS_PALADIN && !MWC_CheckForExpShrineUsers())
		NTC_PutSkill(109, NTC_HAND_RIGHT);

	NTC_FindUnit(NTC_UNIT_MONSTER, 243, 150);

	if(!NTA_KillMonster(243))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", NTA_KillMonster, 156, 243);
		return;
	}

	NTSI_PickItems();

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

// Internal function
function NT_OpenSealsInt()
{
	var i, _unit;
	var _result;

	_unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);

	if(!_unit)
		return false;

	_result = false;

	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == 396)
		{
			if(_unit[i].roomy*5 + _unit[i].y == 5275)
				_result = NT_OpenVizierSealInt(1);
			else
				_result = NT_OpenVizierSealInt(2);

			break;
		}
	}

	if(!_result && !MWConfig_IgnoreSealOpeningErrors)
		return false;

	
	NTM_MoveTo(me.areaid, 7792, 5292, 3, !MWConfig_FastDia);
	if(!MWConfig_FastDia)
		NTA_ClearPosition(30);
	NTP_DoPrecast();

	_result = false;

	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == 394)
		{
			if(_unit[i].roomx*5 + _unit[i].x == 7773)
				_result = NT_OpenDeSeisSealInt(1);
			else
				_result = NT_OpenDeSeisSealInt(2);

			break;
		}
	}

	if(!_result && !MWConfig_IgnoreSealOpeningErrors)
		return false;

	NTM_MoveTo(me.areaid, 7792, 5292, 3, !MWConfig_FastDia);
	if(!MWConfig_FastDia)
		NTA_ClearPosition(30);
	NTP_DoPrecast(!MWConfig_FastDia);

	_result = false;

	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == 392)
		{
			if(_unit[i].roomx*5 + _unit[i].x == 7893)
				_result = NT_OpenVenomSealInt(1);
			else
				_result = NT_OpenVenomSealInt(2);

			break;
		}
	}

	return (_result || MWConfig_IgnoreSealOpeningErrors);
}

function NT_OpenVizierSealInt(type)
{
	var i, n;
	var _attackpos = [7740, 5300, 7740, 5280, 7720, 5280, 7720, 5300];
	var _monstername = GetLocaleString(2851);

	if(!MWConfig_FastDia)
	{
		for(i = 0 ; i < _attackpos.length ; i += 2)
		{
			NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1], 3, true);

			NTA_ClearPosition(30, true, 2);
		}
	}

	for(i = 0; i < 4; i++)
	{
		if(!MW_OpenSeal(395) || !MW_OpenSeal(396))
		{
			NTC_Delay(2500);
			continue;
		}
		
		if(type == 1)
			NTM_MoveTo(me.areaid, 7665, 5277);
		
		for(n = 0; n < 10; n++)
		{
			NTC_Delay(200);

			if(NTA_KillMonster(_monstername))
			{
				NTA_ClearPosition((MWConfig_FastDia) ? 10 : 20);
				NTSI_PickItems();

				return NTM_MoveTo(me.areaid, 7750, 5280);
			}
		}
	}

	return false;
}

function NT_OpenDeSeisSealInt(type)
{
	var i, n;
	var _attackpos = [7780, 5255, 7800, 5255, 7800, 5235, 7780, 5235];
	var _monstername = GetLocaleString(2852);
	var _deSeis, _dist;

	if(type == 1)
		_attackpos.push(7773, 5215, 7773, 5197, 7794, 5196, 7813, 5189, 7814, 5171, 7804, 5156, 7787, 5154);
	else
		_attackpos.push(7811, 5216, 7810, 5197, 7787, 5192, 7772, 5183, 7773, 5166, 7784, 5154, 7800, 5154);
		
	switch(me.classid)
	{
		case NTC_CHAR_CLASS_BARBARIAN:
		case NTC_CHAR_CLASS_PALADIN:
			_dist = 8;
			break;
		case NTC_CHAR_CLASS_DRUID:
			_dist = 10;
			break;
		default:
			_dist = 12;
	}
	
	if(!MWConfig_FastDia)
	{
		for(i = 0; i < _attackpos.length; i += 2)
		{
			NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1]);

			NTA_ClearPosition(30, true, 2);
		}
	}

	for(i = 0; i < 4; i++)
	{
		if(type == 1)
		{
			MW_OpenSeal(394);
			
			NTM_MoveTo(me.areaid, 7791, 5198);
			
			_deSeis = NTC_FindUnit(NTC_UNIT_MONSTER, _monstername, 3);
			
			if(_deSeis)
			{
				if(_deSeis.y >= 5185)
					NTM_MoveTo(me.areaid, 7776, _deSeis.y - _dist);
				else
					NTM_MoveTo(me.areaid, 7776, _deSeis.y + _dist);
			}
			else
				NTA_ClearPosition(20);
		}
		else
		{
			MW_OpenSeal(394);

			NTM_MoveTo(me.areaid, 7789, 5154);
			
			_deSeis = NTC_FindUnit(NTC_UNIT_MONSTER, _monstername, 3);
			
			if(_deSeis && _deSeis.y + _dist <= 5201)
			{
				if(!NTM_MoveTo(me.areaid, 7776, _deSeis.y + _dist))
					NTM_MoveTo(me.areaid, 7776, _deSeis.y - _dist);
			}
			else
				NTM_MoveTo(me.areaid, 7791, 5192);
		}

		for(n = 0; n < 10; n++)
		{
			NTC_Delay(200);

			if(NTA_KillMonster(_monstername))
			{
				NTA_ClearPosition((MWConfig_FastDia) ? 10 : 30);
				NTSI_PickItems();

				return NTM_MoveTo(me.areaid, 7800, 5255, 3, !MWConfig_FastDia);
			}
		}
	}

	return false;
}

function NT_OpenVenomSealInt(type)
{
	var i, n;
	var _attackpos = [7835, 5280, 7835, 5300, 7855, 5300, 7855, 5280];
	var _monstername = GetLocaleString(2853);
	var _sealOrder;
	
	if(MWConfig_KillFullInfectorMob && !MWConfig_FastDia)
		_sealOrder = [392, 393];
	else
		_sealOrder = [393, 392];

	if(!MWConfig_FastDia)
	{
		for(i = 0 ; i < _attackpos.length ; i += 2)
		{
			NTM_MoveTo(me.areaid, _attackpos[i], _attackpos[i+1], 3, true);

			NTA_ClearPosition(30, true, 2);
		}
	}

	for(i = 0; i < 4; i++)
	{
		if(!MW_OpenSeal(_sealOrder[0]))
		{
			NTM_MoveTo(me.areaid, _attackpos[_attackpos.length - 2], _attackpos[_attackpos.length - 1], 3, true);
			
			NTC_Delay(2500);
			continue;
		}

		if(_sealOrder[1] == 392 && !MW_OpenSeal(_sealOrder[1]))
		{
			NTM_MoveTo(me.areaid, _attackpos[_attackpos.length - 2], _attackpos[_attackpos.length - 1], 3, true);
			
			NTC_Delay(2500);
			continue;
		}

		if(type == 1)
			NTM_MoveTo(me.areaid, 7892, 5298);
		else
			NTM_MoveTo(me.areaid, 7937, 5305);
		
		for(n = 0 ; n < 10 ; n++)
		{
			NTC_Delay(200);

			if(NTA_KillMonster(_monstername))
			{
				NTSI_PickItems();

				NTA_ClearPosition((MWConfig_FastDia) ? 10 : 40);
				
				if(NTC_PutSkill(124, NTC_HAND_RIGHT))
					NTC_PingDelay(1000);
				
				if(_sealOrder[1] == 393)
				{
					for(i = 0; i < 4; i++)
					{
						if(MW_OpenSeal(393))
							break;
							
						NTC_Delay(2500);
					}
				}
				
				return true;
			}
		}
	}

	return false;
}

function MW_OpenSeal(classid)
{
	var _seal, _x, _y, _unit;

	_unit = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);

	if(!_unit)
		return false;
	
	for(i = 0 ; i < _unit.length ; i++)
	{
		if(_unit[i].id == classid)
		{
			_x = _unit[i].roomx * 5 + _unit[i].x;
			_y = _unit[i].roomy * 5 + _unit[i].y;
	
			break;
		}
	}

	NTM_MoveTo(me.areaid, _x + 1, _y + 1);

	if(!MWConfig_FastDia)
		NTA_ClearPosition(25, true, 2, false, false);
	
	_seal = NTC_FindUnit(NTC_UNIT_OBJECT, classid, 5);

	if(!_seal)
		return false;

	if(_seal.mode > 0)
		return true;

	for(var i = 0; i < 8; i++)
	{
		if((i % 2) == 0)
		{
			if(GetDistance(me, _seal) > 2)
				NTM_MoveTo(_seal.areaid, _seal.x + 1, _seal.y +1 );

			NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _seal);
		}

		NTC_Delay(500);

		if(_seal.mode > 0)
			return true;
		
		if(i > 4)
			NTA_ClearPosition(20, true, 2, false, false);
	}

	return false;
}
NerDxx™ is offline  
Old 05/19/2012, 11:16   #11
 
elite*gold: 0
Join Date: Apr 2009
Posts: 49
Received Thanks: 9
Code:
if(NTConfig_skipDiablo)
	
NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
Das habe ich ins orginale Script eingefügt.
papachef is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Glücksspiel bei Muddy`s D2NT?
11/27/2011 - Diablo 2 - 4 Replies
Ich such mir seit 2 Tagen einen Wolf nach dem Eintrag zum Glücksspiel. Der Kerl verzockt immer die ganze Kohle und kann dann erstmal nicht den Merc wiederbeleben :( Wenn ich es mitbekomm unterbrech ich ihn, aber wie kann ich das dauerhaft unterbinden? Wo find ich den Eintrag und wie sieht der aus? Danke schonmal im voraus
hab ne frage zu d2nt muddy bot
11/23/2011 - Diablo 2 - 2 Replies
hey leute vl bin ich falsch hier kenn mich nicht aus :S ich habe so gut wie alles config .. es ist ein druid .. er macht kein boo er precastet alles bis auf dass er boo macht was hab ich falsch gemacht ich hatte früher andere bots aber da hatt er es automatisch gemacht :S bzw er swicht die waffe nicht von selber !
D2NT muddy BOT DONT USE CTA
11/22/2011 - Diablo 2 Programming - 3 Replies
Hello, My problem is my Sorc dont use His CTA , frost armor and enchant she is doing. i had do all what i find but noting use?
Muddy D2NT Probleme
11/14/2011 - Diablo 2 - 3 Replies
Hi an alle, wie man sieht bin ich noch neu im Geschäft und hätte da mal 2 Fragen, die ich hier hoffentlich an der richtigen stelle poste. 1)Leider Freezt sich nach einer ungewissen Anzahl von Runs immer mein D2 ein nach dem er mit dem Run fertig ist und oben exiting steht. Und ich arbeite die ganze Zeit an dem Rechner und merke es einfach nicht immoment schau ich immer einfach zwischen durch rein aer wenn ich mal weg bin nervt das ganzschön ;P. 2)Bei den Baalruns schreibt er immer wenn...



All times are GMT +1. The time now is 00:05.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.