[Release] Muddy's D2NT

07/01/2011 16:47 tyrael_pl#2401
any chance of getting an answer to [Only registered and activated users can see links. Click Here To Register...]?
i am sure it wont take much time...
07/01/2011 17:05 Muddy Waters#2402
Sorry, I just read the the most recent posts. :(
I would merge this color by ping selection thingy into a function. This also fixes the slight error in your snippet. ;)

Code:
function MW_SetStatusText()
{
	var _seconds, _minutes, _script, _timeString, _textString, _color;
	
	if(!_MWBG_ShowStatusText)
		return;
	
	_script = NTC_FindScript(MWConfig_Script[_MWBG_CurScriptIndex][0]);
	_seconds = MW_GetScriptRuntimeSeconds();
	_minutes = MW_GetScriptRuntimeMinutes();
	_timeString = "";
		
	if(_script && _script.running)
	{
		_textString = "ÿc2Running ÿc4" + MWConfig_Script[_MWBG_CurScriptIndex][0];
		
		if(_minutes == 0 && _seconds <= 5)	
		{
			if(_seconds % 2 == 1)
				_color = "ÿc8";
			else
				_color = "ÿc4";

			if(isNaN(MWConfig_Script[_MWBG_CurScriptIndex][1]) || MWConfig_Script[_MWBG_CurScriptIndex][1] <= 0)
				_timeString = _color + " [+Inf]";
			else
			{
				_timeString = _color + " [";
				
				if(MWConfig_Script[_MWBG_CurScriptIndex][1] < 10)
					_timeString += "0";
				
				_timeString += MWConfig_Script[_MWBG_CurScriptIndex][1] + ":00]";
			}
		}
		else
		{
			if(MWConfig_Script[_MWBG_CurScriptIndex][1] != 0)
			{
				if(_minutes >= MWConfig_Script[_MWBG_CurScriptIndex][1] || _minutes >= MWConfig_Script[_MWBG_CurScriptIndex][1] - 1 && _seconds >= 50)
					_timeString = "ÿc1";
				else if(_minutes >= MWConfig_Script[_MWBG_CurScriptIndex][1] - 1)
					_timeString = "ÿc8";
			}
			
			_timeString += " [" + MWC_ConvertTicksToTimeString(GetTickCount() - _MWBG_CurScriptStartTick) + "]"
				
			if(_MWBG_ShowCurrentPing)
				_timeString = MW_PingToD2ColorString(me.ping) + " (" +  me.ping + ")" + " ÿc9[ip:" + me.gameserverip.split(".")[3] + "]ÿc4" + _timeString;
		}
	}
	else
	{
		_textString = "ÿc1Stopped ÿc4" + MWConfig_Script[_MWBG_CurScriptIndex][0];
		
		if(_MWBG_ShowCurrentPing)
			_timeString = MW_PingToD2ColorString(me.ping) + " (" +  me.ping + ")";
	}
		
	MWC_SetStatusText(_textString, _timeString);
}

function MW_PingToD2ColorString(ping)
{
	if(!ping)
		return "";
		
	if(me.ping <= 99)
		return "ÿc4";
	else if(me.ping >= 100 && me.ping <= 149)
		return "ÿc9 ";
	else if(me.ping >= 150 && me.ping <= 199)
		return "ÿc8";

	return "ÿc1";
}
Your assumption about the wait time on soj sales is correct though, that's exactly where you would want to change that.

Kind Regards
Muddy
07/01/2011 17:12 RealAkitos#2403
Quote:
Originally Posted by Muddy_Waters View Post
Hat er die Zutaten denn selber gesammelt? Ich frage nur, denn wenn du die Basis Items dort einfach platziert hast, könnte es durchaus sein, dass die Itemlevels zu niedrig sind und deshalb nicht gecraftet wird. ;)

Ansonsten sieht das rein von der Config her passig aus. :)
Schau mal bitte, ob die Variable MWConfig_RestrictKeptItemsFromCubing den Wert false hat, denn wenn diese den Wert true hat und deine Nips entsprechend aufgestellt sind, könnte es auch daran liegen.

LG
Muddy
Funkt ;) War wie du gesagt hattest.

Ty 4 fast feedback!
07/01/2011 19:23 tyrael_pl#2404
Quote:
Originally Posted by Muddy_Waters View Post
Sorry, I just read the the most recent posts. :(
I would merge this color by ping selection thingy into a function. This also fixes the slight error in your snippet. ;)

Code:
function MW_SetStatusText()
{
	var _seconds, _minutes, _script, _timeString, _textString, _color;
	
	if(!_MWBG_ShowStatusText)
		return;
	
	_script = NTC_FindScript(MWConfig_Script[_MWBG_CurScriptIndex][0]);
	_seconds = MW_GetScriptRuntimeSeconds();
	_minutes = MW_GetScriptRuntimeMinutes();
	_timeString = "";
		
	if(_script && _script.running)
	{
		_textString = "ÿc2Running ÿc4" + MWConfig_Script[_MWBG_CurScriptIndex][0];
		
		if(_minutes == 0 && _seconds <= 5)	
		{
			if(_seconds % 2 == 1)
				_color = "ÿc8";
			else
				_color = "ÿc4";

			if(isNaN(MWConfig_Script[_MWBG_CurScriptIndex][1]) || MWConfig_Script[_MWBG_CurScriptIndex][1] <= 0)
				_timeString = _color + " [+Inf]";
			else
			{
				_timeString = _color + " [";
				
				if(MWConfig_Script[_MWBG_CurScriptIndex][1] < 10)
					_timeString += "0";
				
				_timeString += MWConfig_Script[_MWBG_CurScriptIndex][1] + ":00]";
			}
		}
		else
		{
			if(MWConfig_Script[_MWBG_CurScriptIndex][1] != 0)
			{
				if(_minutes >= MWConfig_Script[_MWBG_CurScriptIndex][1] || _minutes >= MWConfig_Script[_MWBG_CurScriptIndex][1] - 1 && _seconds >= 50)
					_timeString = "ÿc1";
				else if(_minutes >= MWConfig_Script[_MWBG_CurScriptIndex][1] - 1)
					_timeString = "ÿc8";
			}
			
			_timeString += " [" + MWC_ConvertTicksToTimeString(GetTickCount() - _MWBG_CurScriptStartTick) + "]"
				
			if(_MWBG_ShowCurrentPing)
				_timeString = MW_PingToD2ColorString(me.ping) + " (" +  me.ping + ")" + " ÿc9[ip:" + me.gameserverip.split(".")[3] + "]ÿc4" + _timeString;
		}
	}
	else
	{
		_textString = "ÿc1Stopped ÿc4" + MWConfig_Script[_MWBG_CurScriptIndex][0];
		
		if(_MWBG_ShowCurrentPing)
			_timeString = MW_PingToD2ColorString(me.ping) + " (" +  me.ping + ")";
	}
		
	MWC_SetStatusText(_textString, _timeString);
}

function MW_PingToD2ColorString(ping)
{
	if(!ping)
		return "";
		
	if(me.ping <= 99)
		return "ÿc4";
	else if(me.ping >= 100 && me.ping <= 149)
		return "ÿc9 ";
	else if(me.ping >= 150 && me.ping <= 199)
		return "ÿc8";

	return "ÿc1";
}
Your assumption about the wait time on soj sales is correct though, that's exactly where you would want to change that.

Kind Regards
Muddy
thanks very much, i thought so that you just didnt see it and i knew this can be optimized! if you have some free time you might check out some pages earlier. however not to waste time i wrote things like...
1. i suggested implementing this ip as something permanent thing as well as ping color. or maybe assign 'ip show' a next key? so ping and ip display would be optional :)
2. the second suggestion was to make soj wait time a parameter adjustable like any other delays and char configs, if we can turn it off why not make wait time longer just as easy?
as you can see i have basic understanding of all this and i got a little familiar with syntax while trying to implement what i needed ;p so i will try doing it on my own but i'd rather have some backup, this parameter is not easy to check 'live' hehe :D

i write all this since you posted in the very first post that such comments are welcome thus i present my ideas of making a sweet thing even sweeter :handsdown:
thank you again
ps
how are exams coming? all good?
07/01/2011 20:18 mirkoregge#2405
Hallo Muddy,

das einbinden des BoneAsh Scripts hatte auf Anhieb nicht funktioniert. Es kam dre Fehler, dass "var NTConfig_Teleport;" nicht definiert ist. Also hab ich in der
Sorc-Config:
Code:
var NTConfig_Teleport;
hinzugefügt, seitdem funktioniert es einwandfrei. Aber war es absicht, dass var NTConfig_Teleport; nicht in der Sorc-Config drin ist? Des weiteren ist mir aufgefallen, dass in der
Assassinen-Config:
Code:
var NTConfig_UseRedemptionHP;
var NTConfig_UseRedemptionMP;
mit drin steht. Ist sicherlich noch vom kopieren der Pala-Config übrig geblieben. Habe dies dort gelöscht, da alle Nicht-Pala-Chars es auch nicht in der Config haben.

Ich bräuchte nur noch das Script für Kaltkrähe, habe aber keine Ahnung vom Scripten. Könnte jemand dieses für mich schreiben?
07/01/2011 20:56 TheCrazy11#2406
Quote:
Originally Posted by mirkoregge View Post
Hallo Muddy,

das einbinden des BoneAsh Scripts hatte auf Anhieb nicht funktioniert. Es kam dre Fehler, dass "var NTConfig_Teleport;" nicht definiert ist. Also hab ich in der
Sorc-Config:
Code:
var NTConfig_Teleport;
hinzugefügt, seitdem funktioniert es einwandfrei. Aber war es absicht, dass var NTConfig_Teleport; nicht in der Sorc-Config drin ist? Des weiteren ist mir aufgefallen, dass in der
Assassinen-Config:
Code:
var NTConfig_UseRedemptionHP;
var NTConfig_UseRedemptionMP;
mit drin steht. Ist sicherlich noch vom kopieren der Pala-Config übrig geblieben. Habe dies dort gelöscht, da alle Nicht-Pala-Chars es auch nicht in der Config haben.

Ich bräuchte nur noch das Script für Kaltkrähe, habe aber keine Ahnung vom Scripten. Könnte jemand dieses für mich schreiben?
Das letztere ist sicherlich von der Palaconfig übrig geblieben.

Beim vorderen jedoch sagt NTConfig_Teleport jedoch folgendes aus (kopiert aus der Sorcconfig von Sternenlooper):
Code:
NTConfig_Teleport = false;	//// true = waffenwechsel beim teleport//// false = kein waffenwechsel beim teleport
Des weiteren ist der Code des Scripts ziemlich ein Müllhaufen, ich habe ihn mal etwas aufgeräumt:
Code:
function NTMain()
{
	Include("libs/common/NTCommon.ntl");
	NTC_IncludeLibs();
	NTC_IncludeConfig("NTBot/char_configs");

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

	MWC_Initialize();

	if(!NTTM_CheckAct())
	{
		NTC_SendMsgToScript("MWBotGame.ntj", "NTTM_CheckAct()");
		return;
	}

	NTTMGR_TownManager();

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

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

	NTP_DoPrecast(true);
	
	if(!NTM_MoveToPresetUnit(33, NTC_UNIT_MONSTER, 743))
	{
		NTC_SendMsgToScript("MWBotGame.ntj", "NTM_MoveToPresetUnit()");
		return;
	}
	
	if(!NTA_KillMonster(743))
		NTC_PingDelay(50);
	
	NTA_ClearPosition(20, true);
	
	NTC_SendMsgToScript("MWBotGame.ntj", "SCRIPT_END");
}
Wo geht Coldcrow um?
Habe leider keine Zeit mehr das WE... :(
07/01/2011 21:05 mirkoregge#2407
Code:
var NTConfig_Teleport;
habe ich einfach nur oben unter
Code:
Include("NTBot/char_configs/MWConfig_GlobalSettings.ntl");

var NTConfig_CastStatic;
[COLOR="Red"]var NTConfig_Teleport;[/COLOR]

function NT_LoadConfig()
hinzugefügt, mehr net. In allen D2NTs war bis jetzt immer in der Config oben vor den Bossen var NTConfig_CastStatic; angegeben, deswegen habe ich es hinzugefügt. Alle Scripts funktionieren auch einwandfrei.

Die Zeile:
Code:
NTConfig_Teleport = false;	//// true = waffenwechsel beim teleport//// false = kein waffenwechsel beim teleport
habe ich bei mir nicht.

zu Kaltkrähe:
Code:
Kaltkrähe ist ein Superunique Monster (Bossmonster), welches in 
der Grotte auf der Kalten Ebene zu finden ist. Sie gehört zu keinem
 Quest, doch ist sie relativ beliebt bei MF Charakteren, da sie gute
 Dropchancen auf Möwe hat. Möwe gehört zur Dolch-Klasse und 
der Träger erhält durch sie eine um +100% erhöhte Chance einen
 magischen Gegenstand zu finden.
Der Bossmob ich mir für Classic wichtig. Danke für deine Bemühungen.
07/02/2011 12:41 tyrael_pl#2408
some other things came up... it seems that diablo script is just a 'bag of bugs', about every 2nd is skipped due to some reason, here they are:
  • NT_OpenSealsInt() in NTDiablo.ntj[133]; function call NT_OpenSealsInt() <9 in 30 games>
  • NTM_MoveTo() in NTDiablo.ntj[42]; function call NTM_MoveTo(108, 7797, 5560) <4 in 30>
so it is impossible to do public runs with error rate of 50%
also what is very annoying, the bot frequently goes back like 2 teles only to move forward so waste like few seconds and continue, 2 steps back 3 ahead. did i miss some setting?
other things is that it cleans around the star in a very wide radius and thx to this it take much more time, especially when monsters come from the back. bot just runs 'circles'. it should be more like 'clean around star once in short radius -> go left kill all(seal) -> go straight kill all(seal) -> go right kill all(seal) --> kill dia. ofc with all this the precasts and tps
ofc im talking pala here :)
07/02/2011 13:46 Morphsepp#2409
kann mir evtl. jemand behilflich sein und mir den code für den folgenden Item zu kommen zu lassen.

Small Charm: 100 poisen dmg!

Danke
07/02/2011 15:44 fred9x9#2410
Quote:
Originally Posted by fabdevil View Post
Hi,

ja, dass es letztlich eine "Clearpath"-Änderung war ist mir klar. Hatte es aber so verstanden, dass dein Barb nach dem Precast einfach drauflos läuft, egal ob Gegner da sind oder nicht, was ich auf o.g. Problem zurückgeführt hatte.

Wenn das speziell bei den Siegeln passiert, wäre es ggf. interessant zu sehen, was in deiner NTDiablo.ntl an den entsprechenden Stellen im Code steht. Passiert das an allen Siegeln, nur an bestimmten oder ganz unterschiedlich?
Habe die Zeilen 114 und 115 der NTAttack mal gefunden.
Denke daran lag es.
Code:
if(MWConfig_ClearBossPosition && me.diff > 0 &&  MWA_FindNearbyMonsters(10, _target))
			NTA_ClearPosition(15, true, 0, false, false);
Stand standardmäßig alles auf false. Deshalb wollte der nur hinlaufen,
statt zu wirbeln.
Grrrr, war wohl nix.
Ich dachte, ich dachte. :-((
07/02/2011 17:57 Muddy Waters#2411
Quote:
Originally Posted by tyrael_pl View Post
thanks very much, i thought so that you just didnt see it and i knew this can be optimized! if you have some free time you might check out some pages earlier. however not to waste time i wrote things like...
1. i suggested implementing this ip as something permanent thing as well as ping color. or maybe assign 'ip show' a next key? so ping and ip display would be optional :)
2. the second suggestion was to make soj wait time a parameter adjustable like any other delays and char configs, if we can turn it off why not make wait time longer just as easy?
as you can see i have basic understanding of all this and i got a little familiar with syntax while trying to implement what i needed ;p so i will try doing it on my own but i'd rather have some backup, this parameter is not easy to check 'live' hehe :D

i write all this since you posted in the very first post that such comments are welcome thus i present my ideas of making a sweet thing even sweeter :handsdown:
thank you again
ps
how are exams coming? all good?
Comments and suggestions are always welcome! ;)

1. I'm basically in favor of that, though I'm still thinking of adapting my Version to D2BS which would lead to the suspension of this project. I have not yet made a final decision on that matter, but I probably will by next weekend.

2. Yeah, why not, this is just two minutes of work anyway. :)

Quote:
Originally Posted by mirkoregge View Post
Code:
var NTConfig_Teleport;
habe ich einfach nur oben unter
Code:
Include("NTBot/char_configs/MWConfig_GlobalSettings.ntl");

var NTConfig_CastStatic;
[COLOR="Red"]var NTConfig_Teleport;[/COLOR]

function NT_LoadConfig()
hinzugefügt, mehr net. In allen D2NTs war bis jetzt immer in der Config oben vor den Bossen var NTConfig_CastStatic; angegeben, deswegen habe ich es hinzugefügt. Alle Scripts funktionieren auch einwandfrei.

Die Zeile:
Code:
NTConfig_Teleport = false;	//// true = waffenwechsel beim teleport//// false = kein waffenwechsel beim teleport
habe ich bei mir nicht.

zu Kaltkrähe:
Code:
Kaltkrähe ist ein Superunique Monster (Bossmonster), welches in 
der Grotte auf der Kalten Ebene zu finden ist. Sie gehört zu keinem
 Quest, doch ist sie relativ beliebt bei MF Charakteren, da sie gute
 Dropchancen auf Möwe hat. Möwe gehört zur Dolch-Klasse und 
der Träger erhält durch sie eine um +100% erhöhte Chance einen
 magischen Gegenstand zu finden.
Der Bossmob ich mir für Classic wichtig. Danke für deine Bemühungen.
Solche Zeilen habe ich bei mir grundsätzlich nicht, wenn es überhaupt mal einen Slotwechsel zum Teleport gibt (beim Barb gibt es das), dann läuft das über die entsprechenden Funktionen der common library und wird nicht in jedes Bot Script kopiert. Letzteres ist absolut unsauber und produziert unnötige Code Wiederholungen.

Achja: [Only registered and activated users can see links. Click Here To Register...] ;)

Quote:
Originally Posted by tyrael_pl View Post
some other things came up... it seems that diablo script is just a 'bag of bugs', about every 2nd is skipped due to some reason, here they are:
  • NT_OpenSealsInt() in NTDiablo.ntj[133]; function call NT_OpenSealsInt() <9 in 30 games>
  • NTM_MoveTo() in NTDiablo.ntj[42]; function call NTM_MoveTo(108, 7797, 5560) <4 in 30>
so it is impossible to do public runs with error rate of 50%
also what is very annoying, the bot frequently goes back like 2 teles only to move forward so waste like few seconds and continue, 2 steps back 3 ahead. did i miss some setting?
other things is that it cleans around the star in a very wide radius and thx to this it take much more time, especially when monsters come from the back. bot just runs 'circles'. it should be more like 'clean around star once in short radius -> go left kill all(seal) -> go straight kill all(seal) -> go right kill all(seal) --> kill dia. ofc with all this the precasts and tps
ofc im talking pala here :)
That script is defininitely miles away from perfection! :D
But alot of the points that you mentioned can be changed relatively easily and thus you should consider giving it a try. For instance changing the attack ranges is quite simple.

The high number of errors was mentioned before, however I didn't find the time and incentive to get into this so far. :(

Quote:
Originally Posted by Morphsepp View Post
kann mir evtl. jemand behilflich sein und mir den code für den folgenden Item zu kommen zu lassen.

Small Charm: 100 poisen dmg!

Danke
Code:
[Name] == SmallCharm && [Quality] == magic # [PoisonLength] * [PoisonMaxDam] / 256 >= 100 // Poison damage
Wobei man darauf auch leicht hätte selber kommen können, indem man einfach mal die vorhanden Nips nachvollzieht! :p

LG
Muddy
07/03/2011 11:07 Eichenlaub#2412
Ich habe mal eine Frage zu dem OrganHarvest und UberTristram script:

Mein Hammerdin schafft die OrganHarvester nicht, da kein CB. Und UberTristram wage ich zu betweifeln. Gibt es hier einen Guide, wie denn der Bot auszurüsten ist bzw. eine Config dafür?

Habe es jetzt so gemacht, dass ich mit einem Smiter die Übel manuell kille und UberTristram klassich händisch mache (gestern erste Fackel geholt^^).

Ich werde wohl noch ein paar Änderungen einbauen, so dass bei den Bossen ein TP gemacht wird, über dies dann mein Smiter zusteigt. Aber generell wäre es schöner, wenn dies mit einem einzigen Hammerdin gehen würde...
07/03/2011 11:13 mirkoregge#2413
Zieh dem Hdin ein Giref an und wechsel auf Gores/Goblins + Draculs, das sollt schon reichen.
07/03/2011 11:36 Eichenlaub#2414
Quote:
Originally Posted by mirkoregge View Post
Zieh dem Hdin ein Giref an und wechsel auf Gores/Goblins + Draculs, das sollt schon reichen.
hm, ok ich werde das einmal ausprobieren - für die Organe.
UberTristram hat mir gestern einmal richtig spaß gemacht! Schade, dass solche Events nicht noch mehr Einzug ins Spiel gehalten haben. Ist ein wenig abwechslung und auch Herausforderung (naja geht so...)
07/03/2011 18:53 Ix-Chel#2415
Hi, ich habe eine Frage. Ich hab jetzt alle Chars als Bot ausprobiert und was soll ich sagen, funzen alle sehr gut :) Nur ein Ama-Script ist nicht enthalten. Gibt es mittlerweile eins und ich bin nur zu blöde es zu finden oder ist ne Ama derzeit als Bot nicht möglich ?

LG

Michel