[Release] Muddy's D2NT

05/27/2011 11:22 Petrinius#2101
Code:
for(i = 0 ; i < _NTIP_CheckList.length ; i++)
	{
		if(_NTIP_CheckList[i][0].length > 0)
		{
			if(_NTIP_CheckList[i][0].indexOf("maxquantity") == -1)
			{	
				if(eval(_NTIP_CheckList[i][0]))
				{
					if(_NTIP_CheckList[i][1].length > 0)
					{
						if(eval(_NTIP_CheckList[i][1]))
						{
							if(nipDebug)
								return new Array(1, _NTIP_CheckList[i][2], _NTIP_CheckList[i][3], _NTIP_CheckList[i][4], _NTIP_CheckList[i][0] + " && " + _NTIP_CheckList[i][1]);

							return 1;
						}
						else if(!_identified && _result == 0)
							_result = -1;
Its line 7 from above where the problem is.
05/27/2011 16:26 SchnorrerKing#2102
Hallo,

Ich benutz den bot mit 2 accs.
Ab Heute komme ich aber nachen einem Game nimmer ins b net rein. Your connection has been tempor... bla bla.
Wenn ich Router neu starte geht es für ein Run wieder.
Weiss wer was man da amchen kann ?

Gruß Schnoorer
05/27/2011 16:49 TheCrazy11#2103
Am besten mal 24h deine (Bot-)Accs ruhen lassen, dann sollte wieder alles normal gehen.
05/27/2011 17:44 letsid#2104
Quote:
Originally Posted by TheCrazy11 View Post
Am besten mal 24h deine (Bot-)Accs ruhen lassen, dann sollte wieder alles normal gehen.
this.
wobei 24 h schon arg lang ist.
4-5 reichen meist schon aus.
05/27/2011 19:22 SchnorrerKing#2105
jo danke euch erstmal für die Antworten ich warte jetzt nooch 2-3 stunden dann gehts weider ;D


gruß
05/27/2011 20:23 Muddy Waters#2106
Quote:
Originally Posted by letsid View Post
ausserdem gibts ein Video das alle einstellungen erklärt im startpost. es ist wirklich nicht so schwer.
Interessant. Welches Video?

Quote:
Originally Posted by Petrinius View Post
Anything wrong with this?
This is error is most likely related to a faulty line in your .nip files.
To solve this issue, you could download the .nip check addon and run a check on your .nip files.
If I assume correctly and there are indeed some faulty lines in your .nips, the .nip check log will let you know where. ;)

Quote:
Originally Posted by TheCrazy11 View Post
Please post code in [CODE][/CODE].
Looks like before this statement a semicolon is missing.

Please post a few lines before and after this statement.


Und noch was in eigener Sache, ich quote mich mal selber:
Die aus meiner Sicht einfachste Lösung für dein Vorhaben, wäre es einfach eine Rekursion in die NTTMGR_TownManager() Funktion einzufügen.
Denn was dort passieren soll, ist dem was vorher schon passiert, ja recht ähnlich. Die Anzahl der Rekursionen könntest du einfach über einen weiteren Parameter auf 1 begrenzen.

Das könnte dann in etwa so aussehen:
Code:
function NTTMGR_TownManager(simple, recursion)
{
	var _cubing, _trash;

	if(arguments.length < 1)
		simple = false;
	if(arguments.length < 2)
		recursion = true;

	NTC_ClearCursor();
	NTT_CleanPotions();

	_NTTMGR_BuyPots = NTT_CheckBelt();
	_NTTMGR_BuyTP = (NTTMGR_CheckScrolls(1) < 5);
	_NTTMGR_BuyKey = (MWConfig_CarryKeys && MWTMGR_GetKeyQuantity() <= 10);
	_NTTMGR_DoHeal = NTT_CheckHeal();
	_NTTMGR_DoID = NTT_CheckUnids();
	_NTTMGR_DoRepair = (NTT_CheckRepair(40) && MWT_CheckRepairCost());
	_NTTMGR_DoRevive = NTT_CheckMerc();
	_trash = MWT_GetTrashItems();
	_MWTMGR_SellTrash = (_trash && _trash.length > 0);
	_MWTMGR_VisitMerchantForSelling = (MWConfig_AlwaysSellTrashItems && _MWTMGR_SellTrash && !(_NTTMGR_BuyPots || _NTTMGR_BuyTP || _NTTMGR_DoID || _NTTMGR_DoRepair || _NTTMGR_DoRevive && me.act == 3 || _NTTMGR_RemoveCurse || _NTTMGR_DoHeal));
	_NTTMGR_RemoveCurse = NTTMGR_CheckCurse(MWConfig_CheckSelfSafeTown, MWConfig_CheckMercSafeTown);
	_MWTMGR_VisitCain = (MWConfig_IdentAtCain && !MWT_CarryForcedUnids() && _NTTMGR_DoID);

	if(me.classid == NTC_CHAR_CLASS_PALADIN)
		NTC_PutSkill(MWS_VIGOR, NTC_HAND_RIGHT);
	else if(me.classid == NTC_CHAR_CLASS_ASSASSIN && !me.GetState(157))
		NTC_CastSkill(MWS_BURST_OF_SPEED, NTC_HAND_RIGHT);
	
	if(_MWTMGR_VisitCain && (_NTTMGR_DoID > 1 || me.act == 2))
		MWTMGR_VisitCain();
	
	switch(me.act)
	{
		case 1:
			if(_NTTMGR_DoHeal || _NTTMGR_RemoveCurse || _NTTMGR_BuyPots || _NTTMGR_BuyTP || _NTTMGR_DoID || _MWTMGR_VisitMerchantForSelling)
				NTTMGR_VisitAkara();
			if(_NTTMGR_DoRevive)
				NTTMGR_VisitKashya();
			if(_NTTMGR_DoRepair)
				NTTMGR_VisitCharsi();

			break;

		case 2:
			if(_NTTMGR_DoHeal || _NTTMGR_RemoveCurse || _NTTMGR_DoRepair || _MWTMGR_VisitMerchantForSelling)
				NTTMGR_VisitFara();
			if(_NTTMGR_BuyPots || _NTTMGR_BuyTP || _NTTMGR_DoID)
				NTTMGR_VisitDrognan();
			if(_NTTMGR_DoRevive)
				NTTMGR_VisitGreiz();

			break;

		case 3:
			if(_NTTMGR_DoHeal || _NTTMGR_RemoveCurse || _NTTMGR_BuyPots || _NTTMGR_BuyTP || _NTTMGR_DoID || _MWTMGR_VisitMerchantForSelling)
				NTTMGR_VisitOrmus();
			if(_NTTMGR_DoRevive)
				NTTMGR_VisitAsheara();
			if(_NTTMGR_DoRepair)
				NTTMGR_VisitHratli();

			break;

		case 4:
			if(_NTTMGR_DoHeal || _NTTMGR_RemoveCurse || _NTTMGR_BuyPots || _NTTMGR_BuyTP  || _NTTMGR_DoID || _MWTMGR_VisitMerchantForSelling)
				NTTMGR_VisitJamella(false);
			if(_NTTMGR_DoRevive)
				NTTMGR_VisitTyrael();
			if(_NTTMGR_DoRepair)
				NTTMGR_VisitHalbu();
			
			break;

		case 5:
			if(_NTTMGR_DoHeal || _NTTMGR_RemoveCurse || _NTTMGR_BuyPots || _NTTMGR_BuyTP || _NTTMGR_DoID)
				NTTMGR_VisitMalah();
			if(_NTTMGR_DoRevive)
				NTTMGR_VisitQualKehk();			
			if(_NTTMGR_DoRepair || _MWTMGR_VisitMerchantForSelling)
				NTTMGR_VisitLarzuk();
			
			break;
	}
	
	_cubing = (!simple && NTCU_CheckCubing());
	
	if(_cubing || NTT_CheckInventory() && NTT_CheckStash() || NTC_MyGoldCarry() > NTConfig_MinGoldToStash)
		NTTMGR_VisitStash(_cubing);

	if(!simple && NTConfig_Gamble && NTC_MyGold() > NTConfig_GambleStartGold)
	{
		switch(me.act)
		{
			case 1:
				NTTMGR_VisitGheed();
				break;
			case 2:
				NTTMGR_VisitElzix();
				break;
			case 3:
				NTTMGR_VisitAlkor();
				break;
			case 4:
				NTTMGR_VisitJamella(true);
				break;
			case 5:
				NTTMGR_VisitAnya();
				break;
		}				

		_cubing = (!simple && NTCU_CheckCubing());

		if(_cubing || NTT_CheckInventory() && NTT_CheckStash())
			NTTMGR_VisitStash(_cubing);
	}
	
	_trash = MWT_GetTrashItems(false);
	
	if(_trash && _trash.length > 0)
	{
		if(recursion)
			return NTTMGR_TownManager(simple, false);
		
		NTT_ClearInventory();
	}
}
LG
Muddy
05/28/2011 08:35 letsid#2107
Quote:
Originally Posted by Muddy_Waters View Post
Interessant. Welches Video?
Aufgrund dieses verlaufes:

meine ich dieses video
05/29/2011 01:46 JustAnotherKeyshop#2108
Kann es sein das das Diablo Script irgendwie verbuggt ist ?
Von 10 Games nur 8 erfolgreich,,, der macht immer nen Fehler bei den Linken 2 Siegeln, öfnet sie und dann will er Mobs attacken die nicht da sind oder nicht dran kommt ka...
ab und zu gibts auch ne 2 fehlermeldung:
1. [01:36:17 D1] NTDiablo.ntj : NTM_MoveTo() failed (The Chaos Sanctuary)
2. [01:41:25 D1] NTDiablo.ntj : NT_OpenSealsInt() failed (The Chaos Sanctuary)

diese kommen aber nicht immer nur ab und zu,,, wie gesagt er versucht zu attacken steht aber auf der stelle und spammt Hämmer obwohl nix da ist.

Vielleicht hat ja jemand nen Rat.
05/29/2011 12:38 Aceridos#2109
Das ist Pech... und 8/10 erfolgreich ist keine soo schlechte Rate wenn man sich mal hier im Thread umguggt

Es ist nunmal ein Bot der ausführt, was man ihm sagt. Dass er nicht perfekt sein _kann_, sollte klar sein
05/30/2011 00:46 JustAnotherKeyshop#2110
das war gestern wohl schon spät meinte 8 von 10 fehlversuche ^^
05/30/2011 01:46 fred9x9#2111
Quote:
Originally Posted by Insaneety View Post
Kann es sein das das Diablo Script irgendwie verbuggt ist ?
Von 10 Games nur 8 erfolgreich,,, der macht immer nen Fehler bei den Linken 2 Siegeln, öfnet sie und dann will er Mobs attacken die nicht da sind oder nicht dran kommt ka...
ab und zu gibts auch ne 2 fehlermeldung:
1. [01:36:17 D1] NTDiablo.ntj : NTM_MoveTo() failed (The Chaos Sanctuary)
2. [01:41:25 D1] NTDiablo.ntj : NT_OpenSealsInt() failed (The Chaos Sanctuary)

diese kommen aber nicht immer nur ab und zu,,, wie gesagt er versucht zu attacken steht aber auf der stelle und spammt Hämmer obwohl nix da ist.

Vielleicht hat ja jemand nen Rat.
Der 2. Fehler kann m. E. immer auftreten, wenn ein anderer Spieler die Seals aufmacht und oder den "Boss" killt.
Auch noch, wenn der "Boss" sich aus der aspected area entfernt oder entfernt wird. Z. B. er rennt einem Anderen nach, oder dein Char vertreibt ihn.
Aber bei Vizier ist mir das noch nie passiert, nur bei deSeis und Venom.
Im Singleplayergame sage ich mal, funzt das Diascript zu 98 %
Hast du vlt. ne laggy Verbindung?
05/30/2011 13:02 David Dean#2112
Hey Muddy thanks for the help before. It has been invaluable. I have a quick question about using a Sorc. Is there a way to enable "melee" attacks? My new sorc continues to try and melee at "casting" range.
05/30/2011 13:40 Muddy Waters#2113
Quote:
Originally Posted by Insaneety View Post
Kann es sein das das Diablo Script irgendwie verbuggt ist ?
Von 10 Games nur 8 erfolgreich,,, der macht immer nen Fehler bei den Linken 2 Siegeln, öfnet sie und dann will er Mobs attacken die nicht da sind oder nicht dran kommt ka...
ab und zu gibts auch ne 2 fehlermeldung:
1. [01:36:17 D1] NTDiablo.ntj : NTM_MoveTo() failed (The Chaos Sanctuary)
2. [01:41:25 D1] NTDiablo.ntj : NT_OpenSealsInt() failed (The Chaos Sanctuary)

diese kommen aber nicht immer nur ab und zu,,, wie gesagt er versucht zu attacken steht aber auf der stelle und spammt Hämmer obwohl nix da ist.

Vielleicht hat ja jemand nen Rat.
Irgendjemand hatte dzau schonmal was moniert, ich konnte die Sache damals aber nicht bei mir reproduzieren.
Insofern kann ich dir dabei so pauschal auch nicht helfen, tut mir Leid. :(

Quote:
Originally Posted by David Dean View Post
Hey Muddy thanks for the help before. It has been invaluable. I have a quick question about using a Sorc. Is there a way to enable "melee" attacks? My new sorc continues to try and melee at "casting" range.
You're welcome. :)
Let me get this straight: You want your sorc to actually use "Attack"?
Sounds a little odd, unless she's a melee bear build.

Anyway, you will have to perform some slight changes in the NTA_Initialize() function (line 31 ff., NTAttack library) which is where the ranges for your attacks are set.
Have a closer look at the switch statement.
All you need to do, is adding a case for the skill that you would like to use and then specify the desired range (2-3 for melee skills). For melee skills, it is also a good idea to set the skill hand in order to prevent the skill from being used with the shift key held. The latter might prevent your char from actually hitting its target in some situations.

The case to be added should look like this:
Code:
case MWS_ATTACK:
	_NTA_SkillHand[i] = NTC_HAND_LEFT;
	_NTA_SkillRange[i] = 3;
	break;
Another problem is the skill id itself - basically because MWS_ATTACK equals 0 which of course is also the value indicating that an attack skill is not set.
So in order to make this work properly, you might also have to do some tweaking in the attack algorithm. ;)

Kind Regards
Muddy
05/30/2011 13:59 David Dean#2114
Yes. It is odd if you don't have the gear for it! :D I'm using Dual Dream runewords with enchant skill. About 40k+ Damage to anything that isn't flat immune to Lightning. Really good damage!
05/30/2011 20:33 TheCrazy11#2115
Quote:
Originally Posted by Muddy_Waters View Post
Die aus meiner Sicht einfachste Lösung für dein Vorhaben, wäre es einfach eine Rekursion in die NTTMGR_TownManager() Funktion einzufügen.
Denn was dort passieren soll, ist dem was vorher schon passiert, ja recht ähnlich. Die Anzahl der Rekursionen könntest du einfach über einen weiteren Parameter auf 1 begrenzen.

Das könnte dann in etwa so aussehen:
Hab die Rekursion jetzt eingebaut, hatte am Anfang nen Copy&Paste-Fehler...
Man muss jedoch noch was ändern und zwar den Aufruf der NTT_ClearInventory() in der NTTMGR_VisitStash() innerhalb der If-Anweisung zum cuben:
Code:
function NTTMGR_VisitStash(cubing)
{
	var _stash;
	
	if(MWConfig_ShowOverheadStatus)
		MWC_PrintOverheadStatus("Visiting Stash...");
	
	if(!cubing && !NTT_CheckStash() && NTC_StashGoldFull())
		return;

	_stash = NTC_FindUnit(NTC_UNIT_OBJECT, NTC_UNIT_STASH);
	
	if(!_stash || GetDistance(me, _stash) > 3)
		NTTM_TownMove("stash");
		
	if(!_stash)
		_stash = NTC_FindUnit(NTC_UNIT_OBJECT, NTC_UNIT_STASH);

	if(_stash)
	{
		if(NTT_DoInteract(_stash))
		{
			if(!cubing)
				NTT_ManageStash();
			
			if(cubing)
			{
				NTCU_DoCubing();

				if(NTT_DoInteract(_stash))
					NTT_ManageStash();

				me.Cancel(1);
				[COLOR="Red"]//NTT_ClearInventory();[/COLOR]
			}
			else
				me.Cancel(1);
		}
	}
}
oder schöner :D:
Code:
		if(NTT_DoInteract(_stash))
		{
			[COLOR="Red"]if(cubing)
			{
				NTCU_DoCubing();

				if(NTT_DoInteract(_stash))
					NTT_ManageStash();
			}
			else
				NTT_ManageStash();

			me.Cancel(1);[/COLOR]
		}