|
You last visited: Today at 04:52
Advertisement
Nilathak Script
Discussion on Nilathak Script within the Diablo 2 Programming forum part of the Diablo 2 category.
04/06/2011, 16:17
|
#1
|
elite*gold: 20
Join Date: May 2009
Posts: 3,882
Received Thanks: 438
|
Nilathak Script
moin,
ich würde gerne in hcl meine hammerdine auch nilathak abgrasen lassen wegen den dest keys ... ich hatte mal soein script wo der hdin dann sogut wie immer bei den snakes "gechickened" ist mit der begründung dort wären snakes^^ da ich aber nicht weiß ob ich das script noch so drin habe wollt ich mal fragen ob jemand das script mal kurz durchschauen kann wegen dem "chicken"
Code:
var _NTNihlathak_Locations = new Array(8, 4);
_NTNihlathak_Locations[0] = [12519, 5203, 12522, 5227]; // Top Left
_NTNihlathak_Locations[1] = [12704, 5019, 12692, 5022]; // Top Right
_NTNihlathak_Locations[2] = [12705, 5391, 12723, 5413]; // Bottom Right
_NTNihlathak_Locations[3] = [12889, 5206, 12898, 5228]; // Bottom Left
_NTNihlathak_Locations[4] = [12519, 5203, 12522, 5196]; // Top Left
_NTNihlathak_Locations[5] = [12704, 5019, 12692, 5413]; // Top Right
_NTNihlathak_Locations[6] = [12705, 5391, 12727, 5022]; // Bottom Right
_NTNihlathak_Locations[7] = [12889, 5206, 12898, 5192]; // Bottom Left
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
var _location;
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
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(123))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
NTP_DoPrecast(true);
if(!NTM_MoveToStair(me.areaid, 124))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(124))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
_location = NT_FindNihlathakInt();
var _vipers;
_vipers = NTC_FindUnit(NTC_UNIT_MONSTER, GetLocaleString(2956));
if(_vipers)
{
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000Tomb Vipers found. Exiting...");
}
if(_location == -1)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NT_FindNihlathakInt()");
return;
}
if(!NTM_MoveTo(me.areaid, _NTNihlathak_Locations[_location][2], _NTNihlathak_Locations[_location][3]))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
if(NTA_KillMonster(526))
{
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
}
else if(!NTConfig_PindleskinExtension)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
return;
}
if(NTConfig_PindleskinExtension)
{
for(var i = 0 ; i < 2 ; i++)
{
if(!NTM_MoveToStair(me.areaid, 123-i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(123-i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
}
if(!NTM_MoveToStair(me.areaid, 121))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
NTP_DoPrecast(false);
if(!NTM_TakeStair(121))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
if(!NTM_MoveTo(me.areaid, 10061, 13234))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
if(!NTA_KillMonster(GetLocaleString(22497)))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
return;
}
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
}
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
// Internal function
function NT_FindNihlathakInt()
{
var i, x, y;
var _nihlathak;
var _mindist = 999999;
var _currdist;
var _location = -1;
_nihlathak = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT, 462);
if(!_nihlathak || _nihlathak.length < 1)
return _location;
x = _nihlathak[0].roomx*5 + _nihlathak[0].x;
y = _nihlathak[0].roomy*5 + _nihlathak[0].y;
for(i = 0 ; i < 8 ; i++)
{
_currdist = GetDistance(_NTNihlathak_Locations[i][0], _NTNihlathak_Locations[i][1], x, y);
if(_currdist < _mindist)
{
_mindist = _currdist;
_location = i;
}
}
return _location;
}
|
|
|
04/06/2011, 16:57
|
#2
|
Administrator
elite*gold: 41364
Join Date: Jan 2010
Posts: 22,729
Received Thanks: 12,624
|
Die Frage ist tatsächlich nur, ob bei dem aktuellen Aufbau bei Vipern abgebrochen wird?
Sofern die LocaleString ID passt, sollte das funktionieren.
Das ist aber nicht absolut sicher, da ja hierbei einfach nur nach den entsprechenden monster Units gesucht wird. Dabei gibt es eine Maximalreichweite von etwa 75.
Sind nun Vipern da, aber befinden sich nicht innerhalb dieser Reichweite, würde der Char auch nicht auf diese reagieren.
Ich würde dir deshalb vorschlagen, das sicherheitshalber zwei mal zu kontrollieren, einmal direkt nach betreten der Ebene, einmal nach dem Teleportieren hin zu Nihla.
Desweiteren würde ich dann noch vorschlagen, dich sofern Vipern vorhanden sind, zunächst wieder eine Ebene hinauf zu begeben, damit verhindert wird, dass der Char versucht unter dem Einfluss des verbuggten Giftschadens durchs TP zu gehen.
Klingt jetzt vielleicht nach mehr Aufwand, ist aber eigentlich lächerlich einfach.
Habe das mal schnell entsprechend angepasst:
Code:
var _NTNihlathak_Locations = new Array(8, 4);
_NTNihlathak_Locations[0] = [12519, 5203, 12522, 5227]; // Top Left
_NTNihlathak_Locations[1] = [12704, 5019, 12692, 5022]; // Top Right
_NTNihlathak_Locations[2] = [12705, 5391, 12723, 5413]; // Bottom Right
_NTNihlathak_Locations[3] = [12889, 5206, 12898, 5228]; // Bottom Left
_NTNihlathak_Locations[4] = [12519, 5203, 12522, 5196]; // Top Left
_NTNihlathak_Locations[5] = [12704, 5019, 12692, 5413]; // Top Right
_NTNihlathak_Locations[6] = [12705, 5391, 12727, 5022]; // Bottom Right
_NTNihlathak_Locations[7] = [12889, 5206, 12898, 5192]; // Bottom Left
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
var _location;
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
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(123))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
NTP_DoPrecast(true);
if(!NTM_MoveToStair(me.areaid, 124))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(124))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
if(NTC_FindUnit(NTC_UNIT_MONSTER, 597)) // Check for nearby tomb vipers
{
if(NTM_MoveToStair(me.areaid, 123))
NTM_TakeStair(123);
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000Tomb Vipers detected. Skipping script...");
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
return;
}
_location = NT_FindNihlathakInt();
if(_location == -1)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NT_FindNihlathakInt()");
return;
}
if(!NTM_MoveTo(me.areaid, _NTNihlathak_Locations[_location][2], _NTNihlathak_Locations[_location][3]))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
if(NTC_FindUnit(NTC_UNIT_MONSTER, 597)) // Check for nearby tomb vipers
{
if(NTM_MoveToStair(me.areaid, 123))
NTM_TakeStair(123);
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000Tomb Vipers detected. Skipping script...");
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
return;
}
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
if(NTA_KillMonster(526))
{
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
}
else if(!NTConfig_PindleskinExtension)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
return;
}
if(NTConfig_PindleskinExtension)
{
for(var i = 0 ; i < 2 ; i++)
{
if(!NTM_MoveToStair(me.areaid, 123-i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(123-i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
}
if(!NTM_MoveToStair(me.areaid, 121))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
NTP_DoPrecast(false);
if(!NTM_TakeStair(121))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
if(!NTM_MoveTo(me.areaid, 10061, 13234))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
if(!NTA_KillMonster(GetLocaleString(22497)))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
return;
}
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
}
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
// Internal function
function NT_FindNihlathakInt()
{
var i, x, y;
var _nihlathak;
var _mindist = 999999;
var _currdist;
var _location = -1;
_nihlathak = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT, 462);
if(!_nihlathak || _nihlathak.length < 1)
return _location;
x = _nihlathak[0].roomx*5 + _nihlathak[0].x;
y = _nihlathak[0].roomy*5 + _nihlathak[0].y;
for(i = 0 ; i < 8 ; i++)
{
_currdist = GetDistance(_NTNihlathak_Locations[i][0], _NTNihlathak_Locations[i][1], x, y);
if(_currdist < _mindist)
{
_mindist = _currdist;
_location = i;
}
}
return _location;
}
Kannst es ja im Zweifelsfall erstmal kurz in normal testen.
Lg
Muddy
|
|
|
04/06/2011, 17:04
|
#3
|
elite*gold: 20
Join Date: May 2009
Posts: 3,882
Received Thanks: 438
|
Quote:
Originally Posted by Muddy_Waters
Die Frage ist tatsächlich nur, ob bei dem aktuellen Aufbau bei Vipern abgebrochen wird?
Sofern die LocaleString ID passt, sollte das funktionieren.
Das ist aber nicht absolut sicher, da ja hierbei einfach nur nach den entsprechenden monster Units gesucht wird. Dabei gibt es eine Maximalreichweite von etwa 75.
Sind nun Vipern da, aber befinden sich nicht innerhalb dieser Reichweite, würde der Char auch nicht auf diese reagieren.
Ich würde dir deshalb vorschlagen, das sicherheitshalber zwei mal zu kontrollieren, einmal direkt nach betreten der Ebene, einmal nach dem Teleportieren hin zu Nihla.
Desweiteren würde ich dann noch vorschlagen, dich sofern Vipern vorhanden sind, zunächst wieder eine Ebene hinauf zu begeben, damit verhindert wird, dass der Char versucht unter dem Einfluss des verbuggten Giftschadens durchs TP zu gehen.
Klingt jetzt vielleicht nach mehr Aufwand, ist aber eigentlich lächerlich einfach.
Habe das mal schnell entsprechend angepasst:
Code:
var _NTNihlathak_Locations = new Array(8, 4);
_NTNihlathak_Locations[0] = [12519, 5203, 12522, 5227]; // Top Left
_NTNihlathak_Locations[1] = [12704, 5019, 12692, 5022]; // Top Right
_NTNihlathak_Locations[2] = [12705, 5391, 12723, 5413]; // Bottom Right
_NTNihlathak_Locations[3] = [12889, 5206, 12898, 5228]; // Bottom Left
_NTNihlathak_Locations[4] = [12519, 5203, 12522, 5196]; // Top Left
_NTNihlathak_Locations[5] = [12704, 5019, 12692, 5413]; // Top Right
_NTNihlathak_Locations[6] = [12705, 5391, 12727, 5022]; // Bottom Right
_NTNihlathak_Locations[7] = [12889, 5206, 12898, 5192]; // Bottom Left
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
NTC_IncludeConfig("NTBot/char_configs");
var _location;
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
NTA_Initialize();
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(123))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeWaypoint()");
return;
}
NTP_DoPrecast(true);
if(!NTM_MoveToStair(me.areaid, 124))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(124))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
if(NTC_FindUnit(NTC_UNIT_MONSTER, 597)) // Check for nearby tomb vipers
{
if(NTM_MoveToStair(me.areaid, 123))
NTM_TakeStair(123);
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000Tomb Vipers detected. Skipping script...");
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
return;
}
_location = NT_FindNihlathakInt();
if(_location == -1)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NT_FindNihlathakInt()");
return;
}
if(!NTM_MoveTo(me.areaid, _NTNihlathak_Locations[_location][2], _NTNihlathak_Locations[_location][3]))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
if(NTC_FindUnit(NTC_UNIT_MONSTER, 597)) // Check for nearby tomb vipers
{
if(NTM_MoveToStair(me.areaid, 123))
NTM_TakeStair(123);
NTC_SendLogToOOG(NTC_LOG_COMMON, "ÿE00000Tomb Vipers detected. Skipping script...");
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
return;
}
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
if(NTA_KillMonster(526))
{
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
}
else if(!NTConfig_PindleskinExtension)
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
return;
}
if(NTConfig_PindleskinExtension)
{
for(var i = 0 ; i < 2 ; i++)
{
if(!NTM_MoveToStair(me.areaid, 123-i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTM_TakeStair(123-i))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
}
if(!NTM_MoveToStair(me.areaid, 121))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveToStair()");
return;
}
if(!NTTMGR_CheckSafe(NTConfig_CheckSelfSafe, NTConfig_CheckMercSafe))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTTMGR_CheckSafe()");
return;
}
NTP_DoPrecast(false);
if(!NTM_TakeStair(121))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_TakeStair()");
return;
}
if(!NTM_MoveTo(me.areaid, 10061, 13234))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTM_MoveTo()");
return;
}
if(!NTA_KillMonster(GetLocaleString(22497)))
{
NTC_SendMsgToScript("NTBotGame.ntj", "NTA_KillMonster()");
return;
}
if(NTConfig_ClearPosition)
NTA_ClearPosition();
NTSI_PickItems();
}
NTC_SendMsgToScript("NTBotGame.ntj", "SCRIPT_END");
}
// Internal function
function NT_FindNihlathakInt()
{
var i, x, y;
var _nihlathak;
var _mindist = 999999;
var _currdist;
var _location = -1;
_nihlathak = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT, 462);
if(!_nihlathak || _nihlathak.length < 1)
return _location;
x = _nihlathak[0].roomx*5 + _nihlathak[0].x;
y = _nihlathak[0].roomy*5 + _nihlathak[0].y;
for(i = 0 ; i < 8 ; i++)
{
_currdist = GetDistance(_NTNihlathak_Locations[i][0], _NTNihlathak_Locations[i][1], x, y);
if(_currdist < _mindist)
{
_mindist = _currdist;
_location = i;
}
}
return _location;
}
Kannst es ja im Zweifelsfall erstmal kurz in normal testen.
Lg
Muddy
|
hört sihc aufjedenfall besser an! werd das mein rein haun
danke schonmal vorab!
€:hdin is rein und wieder raus wegen den vipern...funktioniert super danke!
€²:bisher knapp 2hdins 10runs gemacht und sehr viele snakes "chickens" funktioniert also perfekt...danke nochmal bist der beste
|
|
|
04/06/2011, 23:34
|
#4
|
elite*gold: 0
Join Date: Mar 2009
Posts: 437
Received Thanks: 62
|
:O mein hdin zerreist die schlangen :O in 8 player games :O
|
|
|
04/06/2011, 23:49
|
#5
|
Administrator
elite*gold: 41364
Join Date: Jan 2010
Posts: 22,729
Received Thanks: 12,624
|
Quote:
Originally Posted by hannelorestar
:O mein hdin zwerreist die schlangen :O in 8 player games :O
|
Hat allerdings nichts mit der Fragestellung zu tun.
@Mecco-Pekko
Ich mache hier jetzt mal dicht, sollten noch Rückfragen zu dem Thema bestehen, reicht eine kurze PM, dann mache ich wieder auf.
Lg
Muddy
|
|
|
|
Similar Threads
|
pindle only script, wenn man Nilathak noch nicht hat
06/29/2010 - Diablo 2 - 3 Replies
hallo :)
ich suche ein nihlatak only script, weil ich iwie zu beschränkt bin es selbst richtig zu ändern:(
danke für alle hilfe!
|
[Request] D2NT 3.x Countess / Nilathak Botscripte
04/15/2010 - Diablo 2 - 2 Replies
die defaultscripte sind stark bugged und vielleicht hat der eine oder andere gerade lust sich mit dem problem auseinanderzusetzen.
bei der countess passiert es meinen hammerdin oft, das ein meleeimmuner geist im torbogen stehenbleibt und der hammerdrin - der ihn dort nicht trifft - wie bekloppt bis oom oder gametimeout dort stehenbleibt und hammer castet.
ähnliches passiert auch bei nilathak. der hammerdin portet sich an einen gegner nahe der wand und der hammer verfehlt auch dort - gleiches...
|
D2NT Bot Nilathak help
04/27/2009 - Diablo 2 - 1 Replies
hi zusammen,
ich bin ein hammerdin und benutze den D2NT bot. ich würde gern den Nilathak töten ohne dass er pindle mit macht .. habe einfach die extension weg gemacht und probiert, funtzt aber nicht. Kann mir jmd helfen dass er es ohne macht?
mein versuch war so: NTConfig_Script.push("NTNihlathak.ntj"); = true;
danke im vorraus
|
All times are GMT +2. The time now is 04:52.
|
|