|
You last visited: Today at 17:25
Advertisement
[Release] Muddy's D2NT
Discussion on [Release] Muddy's D2NT within the Diablo 2 Programming forum part of the Diablo 2 category.
03/18/2011, 22:46
|
#916
|
elite*gold: 0
Join Date: Oct 2010
Posts: 211
Received Thanks: 44
|
Jo, Danke Muddy, habs schonma kapiert
Kann ich auch verschieden spectypes kombinieren? Oder nur entweder all oder ein speziellen Typ?
|
|
|
03/18/2011, 23:02
|
#917
|
elite*gold: 0
Join Date: Sep 2010
Posts: 38
Received Thanks: 16
|
Rush Script
Verblüffend wie schnell Du bist Muddy.
Vielen Dank, habe es jetzt gecheckt :-)
Kannst Du mir bitte noch sage wo ich das reinkopieren soll:
Also die Datei bitte.
Schon mal fettes Danke im vorraus  
if(NTT_DoInteract(_npc))
{
for(i = 0; i < 16; i++)
{
if((i % 4) == 0)
me.SelectNPCMenu(0x0D36);
if(me.areaid != NTC_AREA_ID_ACT_1)
break;
NTC_Delay(500);
}
}
|
|
|
03/18/2011, 23:21
|
#918
|
Administrator
elite*gold: 41624
Join Date: Jan 2010
Posts: 22,728
Received Thanks: 12,655
|
Quote:
Originally Posted by Aceridos
Jo, Danke Muddy, habs schonma kapiert
Kann ich auch verschieden spectypes kombinieren? Oder nur entweder all oder ein speziellen Typ?
|
Den Teil über Zahlensysteme hast du gelesen?
Wenn ja, hast du ihn nicht verstanden. Wenn nein: schäm dich!
Was du dort in der Config angibst, ist eine Bitmaske, mit dem die Eigenschaft spectype des Monsters maskiert wird.
Das Ergebnis ist wieder eine Zahl, die dann 0 ist, wenn kein einziges Bit übereinstimmt und größer 0 ist, sobald auch nur ein Bit übereinstimmt.
Zum Verständnis würde ich die Zahlen zunächst mal wieder in Binärzahlen umwandeln, damit man direkt sieht, welche Bits gesetzt sind.
Das sieht dann so aus:
Code:
unit.spectype
0x01 : All
0000 0001
0x02 : Super Unique
0000 0010
0x04 : Champion
0000 0100
0x08 : Boss
0000 1000
0x10 : Minion
0001 0000
Wie man unschwer erkennt, ist für jeden Typ ein einzelnes Bit gesetzt.
Will man nun mehre verschiedene Typen zugleich ausdrücken, muss man nur die Bitmuster kombinieren.
Möchte man also beispielsweise eine Maske für Champions und Bosse, muss man einfach die Bitmuster kombinieren, bzw. genauer gesagt eine Bitweise ODER Operation durchführen.
Auch das klingt wieder nach mehr als es eigentlich ist und sieht so aus:
Code:
0000 0100 // Chamion
0000 1000 // Boss
------------------
0000 1100 == 0x0C
Was man nun hat ist eine Bitmaske, mit der man die Eigenschaft spectype eines Monsters abgleichen kann.
Der Abgleich liefert immer dann eine Zahl größer 0 (entspricht true), wenn das Monster entweder ein Champion oder ein Boss ist und immer dann eine 0 (entspricht false), wenn das Monster weder Champion noch Boss ist.
Für Champions und Bosse kannst du deine Config Variable also mit 0x0C initialisieren, für andere Kombinationen baust du dir einfach nach obigem Schema eine passendes Bitmuster zusammen und wandelst es danach in eine Hexadezimalzahl um.
Wenn du ganz Faul bist kannst du die Rechnereich auch von der Laufzeitumgebung machen lassen.
0x0C entspricht ganz einfach 0x04|0x08.
Ich würde dir aber eher dazu raten, es selbst zu machen, weil du dann eher weisst, was du eigentlich gerade tust.
Quote:
Originally Posted by Bastian74
Verblüffend wie schnell Du bist Muddy.
Vielen Dank, habe es jetzt gecheckt :-)
Kannst Du mir bitte noch sage wo ich das reinkopieren soll:
Also die Datei bitte.
Schon mal fettes Danke im vorraus  
if(NTT_DoInteract(_npc))
{
for(i = 0; i < 16; i++)
{
if((i % 4) == 0)
me.SelectNPCMenu(0x0D36);
if(me.areaid != NTC_AREA_ID_ACT_1)
break;
NTC_Delay(500);
}
}
|
Die Änderung erfolgt direkt im Rush Script, bei der genannten Zeile.
Das Rush Script findet sich unter "../scripts/NTBot/Bots/MWRush.ntj".
Die passende Zeile zeigt dir jeder bessere Editor an.
Sofern noch nichts in der Richtung vorhanden ist, empfehle ich Notepad++.
Eine Anleitung dazu findest du  .
Lg
Muddy
|
|
|
03/18/2011, 23:24
|
#919
|
elite*gold: 0
Join Date: Oct 2010
Posts: 211
Received Thanks: 44
|
Steht im Screenshot
Ist die MWRush.ntj
/edit: Da war ich zu langsam
Danke für deinen ausführlichen Beitrag, hab den Link tatsache nicht gelesen... tut mir leid 
Ich hols jetzt nach 
Danke für die geile Erklärung!
|
|
|
03/19/2011, 07:12
|
#920
|
elite*gold: 0
Join Date: Sep 2010
Posts: 38
Received Thanks: 16
|
Rush Script - Fehler ausgebessert
Hallo,
anbei das verbesserte Rush-Script, wo der Fehler um zum Akt 2 zu gelangen ausgebessert wurde. Soeben getestet. Geht einwandfrei.
Vielen Dank nochmals Muddy. Bist mein Held.
Code:
/**
* This file was written by
* Check the programming section for updates and further scripts
* Last Update: 02/20/2011
*/
// Global variables
var _MWR_BossKilledAndariel = false;
var _MWR_BossKilledSummoner = false;
var _MWR_BossKilledDuriel = false;
var _MWR_BossKilledCouncil = false;
var _MWR_BossKilledMephisto = false;
var _MWR_BossKilledDiablo = false;
var _MWR_BossKilledSchenk = false;
var _MWR_BossKilledIzual = false;
var _MWR_BossKilledRadament = false;
var _MWR_RescuedAnya = false;
var _MWR_TPSafe = false;
var _MWR_CorrectTombId = -1;
var _MWR_IsActiveQuester;
var _MWR_ActiveQuesterName = "";
var _MWR_ActiveQuesterConfirmed = false;
var _MWR_ConfirmationRequestTicks = GetTickCount();
var _MWR_CommenceRush = false;
var _MWR_AnnounceStatus = true;
// Global constants
const _MWR_UNIT_AMULET_CLASSID = 521;
const _MWR_UNIT_STAFF_CLASSID = 92;
const _MWR_UNIT_FULLSTAFF_CLASSID = 91;
const _MWR_UNIT_BOOK_OF_SKILL = 552;
const _MWR_UNIT_SCROLL_OF_RESISTANCE = 646;
const _MWR_STATUS_WAITING = 0;
const _MWR_STATUS_INTERACTING = 1;
const _MWR_STATUS_MOVING = 2;
const _MWR_STATUS_TALKING = 3;
const _MWR_STATUS_PICKUP = 4;
function NTMain()
{
Include("libs/common/NTCommon.ntl");
NTC_IncludeLibs();
if(!NTC_IncludeConfig("NTBot/char_configs", false))
{
Include("NTBot/char_configs/NTConfig.ntl");
Include("MWRush/MWRushConfig_Quester.ntl");
}
NT_LoadConfig();
NTSI_LoadNIPFiles("NTBot/item_configs");
MWC_Initialize();
RegisterEvent(EVENT_SCRIPTMSG, MWR_ScriptMsgEvents);
var _output, _startTicks;
if(!NTTM_CheckAct())
{
NTC_SendMsgToScript("MWBotGame.ntj", NTTM_CheckAct, 62);
return;
}
if(!MWConfig_IsRusher)
{
_MWR_IsActiveQuester = MWR_SetQuesterStatus();
if(_MWR_IsActiveQuester)
{
Print("ÿc2I will be the active Quester.");
if(!MWR_CarriesItem(NTC_UNIT_CUBE) && me.diff > 0 && MWConfig_RushActs.indexOf(2) > -1)
Print("ÿc1WARNING: " + me.charname + " is set as active quester, but does not carry a horadric cube!");
}
else
Print("ÿc2I will relax while someone else does all the work. :)");
}
SetStatusText("ÿc2Waiting for all characters to join...");
while(!MWR_AllPlayersPresent() && !_MWR_CommenceRush)
NTC_Delay(1000)
_MWR_ConfirmationRequestTicks = GetTickCount();
_startTicks = GetTickCount();
if(MWConfig_IsRusher)
{
_MWR_ActiveQuesterName = "";
Say(".InvalidateQuester");
}
Print("ÿc8Quests scheduled: ");
for(var i = 1; i <= 5; i++)
{
_output = "";
if(MWConfig_RushActs.indexOf(i) > -1)
{
_output = "ÿc8Actÿc1 " + i + "ÿc8:ÿc2 ";
for(var j = 0; j < MWConfig_QuestSchedule.length; j++)
{
if(MWConfig_QuestSchedule[j].indexOf("A" + i) > -1)
_output += MWConfig_QuestSchedule[j].substr(2) + " ";
}
}
if(_output.length > 19)
Print(_output);
}
if(MWConfig_RushActs.length > 0)
{
if(MWConfig_RushActs.indexOf(1) > -1)
{
if(!MWR_DoActI())
{
NTC_SendMsgToScript("MWBotGame.ntj", MWR_DoActI, 108);
return;
}
else
Print("ÿc2Act I completed!");
}
if(MWConfig_RushActs.indexOf(2) > -1)
{
if(!MWR_DoActII())
{
NTC_SendMsgToScript("MWBotGame.ntj", MWR_DoActII, 118);
return;
}
else
Print("ÿc2Act II completed!");
}
if(MWConfig_RushActs.indexOf(3) > -1)
{
if(!MWR_DoActIII())
{
NTC_SendMsgToScript("MWBotGame.ntj", MWR_DoActIII, 128);
return;
}
else
Print("ÿc2Act III completed!");
}
if(MWConfig_RushActs.indexOf(4) > -1)
{
if(!MWR_DoActIV())
{
NTC_SendMsgToScript("MWBotGame.ntj", MWR_DoActIV, 138);
return;
}
else
Print("ÿc2Act IV completed!");
}
if(MWConfig_RushActs.indexOf(5) > -1)
{
if(!MWR_DoActV())
{
NTC_SendMsgToScript("MWBotGame.ntj", MWR_DoActV, 148);
return;
}
else
Print("ÿc2Act V completed!");
}
}
UnregisterEvent(EVENT_SCRIPTMSG);
Print("ÿc2Rush completed in ÿc8" + MWC_ConvertTicksToTimeString(GetTickCount() - _startTicks));
}
function MWR_DoActV()
{
if(!MWConfig_IsRusher)
{
NTTM_CheckAct(5);
if(_MWR_IsActiveQuester)
{
if(MWConfig_QuestSchedule.indexOf("A5Q1") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Bloody Foothills");
while(!MWR_EnterNearbyTP(110) && NTC_InTown())
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledSchenk)
NTC_Delay(2000);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Harrogath");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_5))
return false;
}
}
if(MWConfig_QuestSchedule.indexOf("A5Q3") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Frozen River");
while(!_MWR_TPSafe || !MWR_EnterNearbyTP(114) && NTC_InTown())
NTC_Delay(1000);
_MWR_TPSafe = false;
_npc = NTC_FindUnit(NTC_UNIT_OBJECT, 558, 5);
if(_npc)
MWR_ActivateObject(_npc);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_5))
return false;
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Malah");
if(!NTTM_TownMove("malah"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_MALAH, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
if(NTT_DoInteract(_npc))
MWR_CancelNpcInteraction();
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
if(!MWR_EnterNearbyTP(114))
return false;
_npc = NTC_FindUnit(NTC_UNIT_OBJECT, 558, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_ActivateObject(_npc);
MWR_CancelNpcInteraction();
Say(".Rescued Anya");
}
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_5))
return false;
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Malah");
if(!NTTM_TownMove("malah"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_MALAH, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
if(NTT_DoInteract(_npc))
MWR_CancelNpcInteraction();
}
if(MWR_UseQuestItem(_MWR_UNIT_SCROLL_OF_RESISTANCE))
me.Cancel(1);
}
}
else
{
if(MWConfig_QuestSchedule.indexOf("A5Q1") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledSchenk)
NTC_Delay(2000);
}
if(MWConfig_QuestSchedule.indexOf("A5Q3") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_RescuedAnya)
NTC_Delay(2000);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Malah");
if(!NTTM_TownMove("malah"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_MALAH, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
if(NTT_DoInteract(_npc))
MWR_CancelNpcInteraction();
}
if(MWR_UseQuestItem(_MWR_UNIT_SCROLL_OF_RESISTANCE))
me.Cancel(1);
}
}
}
else
{
if(!NTTM_CheckAct())
return false;
if(MWConfig_QuestSchedule.indexOf("A5Q1") > -1)
{
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(111))
return false;
NTP_DoPrecast(true);
NTM_MoveTo(110, 3866, 5122);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Bloody Foothills.");
NTA_ClearPosition(5, true, 2, false, false);
NTM_MoveTo(110, 3866, 5122);
while(!MWR_IsQuesterNearby() || !MWR_CheckQuesterAct())
NTC_Delay(500);
if(NTA_KillMonster(GetLocaleString(22435)))
Say(".Killed Schenk");
NTSI_PickItems();
NTA_ClearPosition(20, true, 2, false, false);
NTM_MoveTo(110, 3866, 5122);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_5))
NTTM_CheckAct();
}
if(MWConfig_QuestSchedule.indexOf("A5Q3") > -1)
{
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(113))
return false;
NTP_DoPrecast(true);
if(!NTM_MoveToStair(me.areaid, 114))
return false;
if(!NTM_TakeStair(114))
return false;
if(!NTM_MoveToPresetUnit(114, NTC_UNIT_OBJECT, 460, 3, 3))
return false;
NTM_MoveToPresetUnit(114, NTC_UNIT_OBJECT, 460, 3, 3);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Frozen River, not safe though.");
NTA_ClearPosition(40, true, 2, false, false);
Say(".TPSafe");
while(!_MWR_RescuedAnya)
{
NTM_MoveToPresetUnit(114, NTC_UNIT_OBJECT, 460, 5, 5);
NTA_ClearPosition(40, true, 2, false, false);
NTC_Delay(5000);
}
NTM_MoveToPresetUnit(114, NTC_UNIT_OBJECT, 460, 3, 3);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_5))
NTTM_CheckAct();
}
}
return true;
}
function MWR_DoActIV()
{
var _npc, _prePos;
if(!MWConfig_IsRusher)
{
NTTM_CheckAct(4);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
if(_MWR_IsActiveQuester)
{
if(MWConfig_QuestSchedule.indexOf("A4Q1") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Plains Of Despair");
while(!MWR_EnterNearbyTP(105) && NTC_InTown())
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledIzual)
NTC_Delay(2000);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Pandemonium Fortress");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_4))
return false;
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Tyrael");
if(!NTTM_TownMove("tyrael"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_TYRAEL_ACT_4, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
MWR_TalkToNpc(_npc, true);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
}
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Chaos Sanctuary");
while(!_MWR_TPSafe || !MWR_EnterNearbyTP(108) && NTC_InTown())
NTC_Delay(1000);
_MWR_TPSafe = false;
NTM_WalkTo(7768, 5261);
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledDiablo)
NTC_Delay(2000);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Pandemonium Fortress");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_4))
return false;
}
}
else
{
if(MWConfig_QuestSchedule.indexOf("A4Q1") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledIzual)
NTC_Delay(2000);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Tyrael");
if(!NTTM_TownMove("tyrael"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_TYRAEL_ACT_4, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
}
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledDiablo)
NTC_Delay(2000);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Tyrael");
if(!NTTM_TownMove("tyrael"))
return false;
if(_MWR_IsActiveQuester)
{
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_TYRAEL_ACT_4, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
}
}
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Portal To Harrogath");
while(!MWR_UseRedPortal(566, 109))
NTC_Delay(1000);
}
else
{
if(!NTTM_CheckAct())
return false;
if(MWConfig_QuestSchedule.indexOf("A4Q1") > -1)
{
NTTMGR_TownManager();
while(!MWR_IsQuesterNearby() || !MWR_CheckQuesterAct())
NTC_Delay(500);
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(106))
return false;
NTP_DoPrecast(true);
if(!NTM_MoveToPresetUnit(105, NTC_UNIT_MONSTER, 256, 10, 10))
{
if(!NTM_MoveToPresetUnit(105, NTC_UNIT_MONSTER, 256, -10, -10))
{
if(!NTM_MoveToPresetUnit(105, NTC_UNIT_MONSTER, 256, 10, -10))
{
if(!NTM_MoveToPresetUnit(105, NTC_UNIT_MONSTER, 256, -10, 10))
return false;
}
}
}
_prePos = new coord(me.x, me.y);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Plains of Despair.");
if(NTA_KillMonster(256))
Say(".Killed Izual");
NTSI_PickItems();
NTM_MoveTo(me.areaid, _prePos.x + 1, _prePos.y + 1);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_4))
NTTM_CheckAct();
}
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(107))
return false;
NTP_DoPrecast(true);
if(!NTM_MoveTo(108, 7792, 5292))
return false;
if(!MWR_ClearCS())
return false;
NTM_MoveTo(108, 7768, 5255);
while(!MWR_CheckQuesterAct())
NTC_Delay(500);
if(!NTM_MakeTP())
return false;
else
Say(".TPSafe");
while(!MWR_IsQuesterNearby() || !MWR_CheckQuesterAct())
NTC_Delay(500);
NTM_MoveTo(108, 7792, 5292);
NTP_DoPrecast(true);
NTC_PutSkill(109, NTC_HAND_RIGHT);
NTC_FindUnit(NTC_UNIT_MONSTER, 243, 150);
if(NTA_KillMonster(243))
Say(".Killed Diablo");
NTSI_PickItems();
NTM_MoveTo(108, 7768, 5255);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_4))
NTTM_CheckAct();
NTTM_TownMove("tyrael");
NTC_FindUnit(NTC_UNIT_OBJECT, 566, 100);
MWR_UseRedPortal(566, 109);
}
return true;
}
function MWR_DoActIII()
{
var _npc, _waypoint, _offsetVectors, _monster, _council, _minIndex, _minDist, _dist;
if(!MWConfig_IsRusher)
{
NTTM_CheckAct(3);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
if(_MWR_IsActiveQuester)
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Travincal");
while(!MWR_EnterNearbyTP(83) && NTC_InTown())
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledCouncil)
NTC_Delay(2000);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Kurast Docks");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_3))
return false;
}
}
else
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledCouncil)
NTC_Delay(2000);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Deckard Cain");
if(!NTTM_TownMove("cain"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_CAIN_ACT_3, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
if(_MWR_IsActiveQuester)
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Durance Of Hate");
while(!MWR_EnterNearbyTP(102) && NTC_InTown())
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledMephisto)
NTC_Delay(2000);
NTC_Delay(2500);
}
else
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledMephisto)
NTC_Delay(2000);
}
for(var i = 0; i < 5; i++)
{
MWR_CheckDeath();
if(NTC_InTown())
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
continue;
if(!MWR_EnterNearbyTP(102))
continue;
}
MWR_UpdateStatus(_MWR_STATUS_INTERACTING, "Portal");
if(!MWR_UseRedPortal(342, 103))
continue;
else
return true;
}
return false;
}
else
{
if(!NTTM_CheckAct())
return false;
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(83))
return false;
NTP_DoPrecast(true);
_offsetVectors = new Array();
_offsetVectors.push(new vector(51, -34));
_offsetVectors.push(new vector(51, -53));
_offsetVectors.push(new vector(51, -77));
_offsetVectors.push(new vector(51, -100));
_offsetVectors.push(new vector(49, -118));
_offsetVectors.push(new vector(59, -130));
_offsetVectors.push(new vector(79, -130));
_offsetVectors.push(new vector(93, -130));
_waypoint = NTC_FindUnit(NTC_UNIT_OBJECT, 237);
if(!_waypoint)
return false;
if(!NTM_MoveTo(me.areaid, _waypoint.x + 81, _waypoint.y - 29))
return false;
for(var i = 0; i < _offsetVectors.length; i++)
NTM_MoveTo(me.areaid, _waypoint.x + _offsetVectors[i].x, _waypoint.y + _offsetVectors[i].y);
NTA_ClearPosition(15, true, 2, false, false);
NTM_MoveTo(me.areaid, _waypoint.x + _offsetVectors[_offsetVectors.length - 1].x, _waypoint.y + _offsetVectors[_offsetVectors.length - 1].y);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Travincal.");
while(!MWR_IsQuesterNearby() || !MWR_CheckQuesterAct())
{
if(GetDistance(me.x, me.y, _waypoint.x + _offsetVectors[_offsetVectors.length - 1].x, _waypoint.y + _offsetVectors[_offsetVectors.length - 1].y) > 7.5)
NTM_MoveTo(me.areaid, _waypoint.x + _offsetVectors[_offsetVectors.length - 1].x + 2, _waypoint.y + _offsetVectors[_offsetVectors.length - 1].y + 2);
NTA_ClearPosition(15, true, 2, false, false);
NTC_Delay(500);
}
NTM_MoveTo(me.areaid, _waypoint.x + 96, _waypoint.y - 90);
_council = new Array(GetLocaleString(2860), GetLocaleString(2862), GetLocaleString(2863));
while(_council.length > 0)
{
//_monster, _council, _index, _minDist
_minIndex = -1;
_minDist = 1E3;
for(var i = 0; i < _council.length; i++)
{
_monster = NTC_FindUnit(NTC_UNIT_MONSTER, _council[i], 3);
if(_monster && _monster.IsAttackable() && NTA_IsValidMonster(_monster))
{
_dist = GetDistance(_monster.x, _monster.y, _waypoint.x + _offsetVectors[_offsetVectors.length - 1].x + 5, _waypoint.y + _offsetVectors[_offsetVectors.length - 1].y + 55);
if(_dist < _minDist)
{
_minIndex = i;
_minDist = _dist;
}
}
}
if(_minIndex > -1)
{
if(NTA_KillMonster(_council[_minIndex]))
_council.splice(_minIndex, 1);
}
else
break;
}
Say(".Killed Council");
NTA_ClearPosition(50, true, 2, false, false);
NTM_MoveTo(me.areaid, _waypoint.x + 1, _waypoint.y + 1);
if(!NTM_TakeWaypoint(NTC_AREA_ID_ACT_3))
NTTM_CheckAct();
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(101))
return false;
NTP_DoPrecast(true);
if(!NTM_MoveToStair(me.areaid, 102))
return false;
if(!NTM_TakeStair(102))
return false;
NTM_MoveTo(me.areaid, 17625, 8070);
NTA_ClearPosition(40, true, 2, false, false);
NTM_MoveTo(me.areaid, 17590, 8069);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("Tp up @Durance Of Hate.");
while(!MWR_IsQuesterNearby())
NTC_Delay(500);
NTM_MoveTo(me.areaid, 17578, 8070);
NTM_MoveTo(me.areaid, 17549, 8082);
NTM_MoveTo(me.areaid, 17541, 8070);
NTC_FindUnit(NTC_UNIT_MONSTER, 242, 10);
if(NTA_KillMonster(242))
Say(".Killed Mephisto");
else
return false;
NTSI_PickItems();
NTA_ClearPosition(30, true, 2, false, false);
NTM_MoveTo(me.areaid, 17590, 8069);
NTA_ClearPosition(40, true, 2, false, false);
NTM_MoveTo(me.areaid, 17625, 8070);
NTA_ClearPosition(40, true, 2, false, false);
NTM_MoveTo(me.areaid, 17590, 8069);
return MWR_UseRedPortal(342, 103);
}
}
function MWR_DoActII()
{
var i, j;
var _object, _npc, _journal, _journalx, _journaly, _offset, _cube, _chest, _dest, _unit, _tombs, _portal, _path, _endTicks, _preCount;
if(!MWConfig_IsRusher)
{
NTTM_CheckAct(2);
if(_MWR_IsActiveQuester)
{
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_JERHYN, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
}
}
// Cube
if(MWConfig_GetHoradricCubesInNorm && !MWR_CarriesItem(NTC_UNIT_CUBE) && me.diff == 0)
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Halls Of The Dead");
while(!MWR_EnterNearbyTP(60) && NTC_InTown())
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_PICKUP, "Horadric Cube");
for(var i = 0; i < 10; i++)
{
if(MWR_CarriesItem(NTC_UNIT_CUBE))
break;
MWR_PickupItem(NTC_UNIT_CUBE);
NTC_Delay(500);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
return false;
}
}
if(_MWR_IsActiveQuester)
{
if(MWConfig_QuestSchedule.indexOf("A2Q1") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Sewers Level 3");
while(!MWR_EnterNearbyTP(49) && NTC_InTown())
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledRadament)
NTC_Delay(1000);
if(MWR_CheckDeath())
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
}
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Portal Clearance");
while(!_MWR_TPSafe)
NTC_Delay(1000);
_MWR_TPSafe = false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Sewers Level 3");
while(!MWR_EnterNearbyTP(49) && NTC_InTown())
NTC_Delay(1000);
for(i = 0; i < 10; i++)
{
MWR_PickupItem(_MWR_UNIT_BOOK_OF_SKILL);
if(MWR_CarriesItem(_MWR_UNIT_BOOK_OF_SKILL))
break;
NTC_Delay(250);
if(MWR_CountNearbyItems(_MWR_UNIT_BOOK_OF_SKILL) == 0)
break;
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
return false;
}
if(MWR_UseQuestItem(_MWR_UNIT_BOOK_OF_SKILL))
me.Cancel(1);
}
if(!MWCU_MoveCubeToInventory())
return false;
else
{
if(MWCU_GetItemsInCube().length > 0)
{
_cube = me.GetItems(NTC_UNIT_CUBE);
MWR_UpdateStatus(_MWR_STATUS_INTERACTING, "Cube");
if(_cube && _cube.length > 0)
{
NTCU_OpenCubeInt(_cube);
NTCU_CheckCubeInventoryInt();
NTCU_ClearCubeInt();
NTCU_CloseCubeInt();
}
}
me.Cancel(1);
}
// Amulet
for(i = 0; i < 10; i++)
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
continue;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Claw Viper Temple");
while(!MWR_EnterNearbyTP(61) && NTC_InTown())
NTC_Delay(1000);
if(!me.GetQuest(11, 12) || !me.GetQuest(11, 0) || !me.GetQuest(10, 12) || !me.GetQuest(10, 0))
{
MWR_UpdateStatus(_MWR_STATUS_INTERACTING, "Sun Altar");
for(j = 0; j < 20; j++)
{
_object = NTC_FindUnit(NTC_UNIT_OBJECT, 149, 5);
if(j % 5 == 0)
{
if(MWR_ActivateObject(_object))
break;
}
NTC_Delay(250);
}
if(j >= 20)
continue;
MWR_UpdateStatus(_MWR_STATUS_PICKUP, "Viper Amulet");
for(j = 0; j < 10; j++)
{
MWR_PickupItem(_MWR_UNIT_AMULET_CLASSID);
if(MWR_CarriesItem(_MWR_UNIT_AMULET_CLASSID))
break;
NTC_Delay(500);
}
if(j >= 10)
continue;
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
continue;
}
if(!me.GetQuest(11, 12) || !me.GetQuest(11, 0) || !me.GetQuest(10, 12) || !me.GetQuest(10, 0))
{
MWR_UpdateStatus(_MWR_STATUS_INTERACTING, "Viper Amulet");
if(NTC_InTown())
MWR_MoveQuestItemToCube(_MWR_UNIT_AMULET_CLASSID);
if(MWR_CarriesItem(_MWR_UNIT_AMULET_CLASSID))
break;
}
else
break;
}
if(i >= 10)
return false;
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Drognan");
if(!NTTM_TownMove("drognan"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_DROGNAN, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
}
// Staff
for(i = 0; i < 10; i++)
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
continue;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Maggot's Lair");
while(!MWR_EnterNearbyTP(64) && NTC_InTown())
NTC_Delay(1000);
if(!me.GetQuest(10, 12) || !me.GetQuest(10, 0))
{
MWR_UpdateStatus(_MWR_STATUS_PICKUP, "Staff");
for(j = 0; j < 10; j++)
{
MWR_PickupItem(_MWR_UNIT_STAFF_CLASSID);
if(MWR_CarriesItem(_MWR_UNIT_STAFF_CLASSID))
break;
NTC_Delay(500);
}
if(j >= 10)
continue;
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
continue;
}
if(!me.GetQuest(10, 12) || !me.GetQuest(10, 0))
{
MWR_UpdateStatus(_MWR_STATUS_INTERACTING, "Staff");
if(NTC_InTown())
MWR_MoveQuestItemToCube(_MWR_UNIT_STAFF_CLASSID);
if(MWR_CarriesItem(_MWR_UNIT_STAFF_CLASSID))
break;
}
else
break;
}
if(i >= 10)
return false;
if(!me.GetQuest(10, 12) || !me.GetQuest(10, 0))
{
_cube = me.GetItems(NTC_UNIT_CUBE);
MWR_UpdateStatus(_MWR_STATUS_INTERACTING, "Cube");
if(_cube && _cube.length > 0)
{
SetUIState(0x1, true);
if(!NTCU_OpenCubeInt(_cube[0]))
return false;
MWCU_Transmute(_cube[0]);
if(NTCU_CheckCubeInventoryInt() == 1)
{
NTCU_ClearCubeInt();
NTCU_CloseCubeInt();
}
else
{
NTCU_CloseCubeInt();
return false;
}
}
}
if(MWCU_MoveCubeToStash())
me.Cancel(1);
// Summoner
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Arcane Sanctuary");
while(!MWR_EnterNearbyTP(74) && NTC_InTown())
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledSummoner)
NTC_Delay(1000);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
for(var i = 0; i < 5; i++)
{
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
return false;
}
if(NTC_InTown())
break;
}
// Duriel
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Deckard Cain");
if(!NTTM_TownMove("cain"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_CAIN_ACT_2, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Tal Rasha's Tomb");
while((_MWR_CorrectTombId == -1 || !MWR_EnterNearbyTP(_MWR_CorrectTombId)) && NTC_InTown())
NTC_Delay(1000);
if(!NTC_FindUnit(NTC_UNIT_OBJECT, 100, 10) && MWR_CarriesItem(_MWR_UNIT_FULLSTAFF_CLASSID) && (!me.GetQuest(10, 12) || !me.GetQuest(10, 0)))
{
MWR_UpdateStatus(_MWR_STATUS_INTERACTING, "Orifice");
for(j = 0; j < 10; j++)
{
_object = NTC_FindUnit(NTC_UNIT_OBJECT, 152, 5);
if(j % 5 == 0)
MWR_ActivateObject(_object);
NTC_Delay(200);
if(GetUIState(0x0E))
break;
}
if(j >= 10)
return false;
MWR_InsertStaff();
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
return false;
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Duriel's Lair");
while(!MWR_EnterNearbyTP(73) && NTC_InTown())
NTC_Delay(1000);
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_TYRAEL_ACT_2, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
_MWR_BossKilledDuriel = true;
Say(".Killed Duriel");
MWR_TalkToNpc(_npc, true);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
if(!MWR_CheckDeath())
{
for(i = 0; i < 5; i++)
{
if(MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2) || MWR_EnterNearbyTP(296))
break;
NTC_Delay(2000);
}
if(i >= 5)
return false;
}
}
else
{
if(MWConfig_QuestSchedule.indexOf("A2Q1") > -1)
{
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Portal Clearance");
while(!_MWR_TPSafe)
NTC_Delay(1000);
_MWR_TPSafe = false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Sewers Level 3");
while(!MWR_EnterNearbyTP(49) && NTC_InTown())
NTC_Delay(1000);
for(i = 0; i < 10; i++)
{
MWR_PickupItem(_MWR_UNIT_BOOK_OF_SKILL);
if(MWR_CarriesItem(_MWR_UNIT_BOOK_OF_SKILL))
break;
NTC_Delay(500);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Lut Gholein");
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
return false;
}
if(MWR_UseQuestItem(_MWR_UNIT_BOOK_OF_SKILL))
me.Cancel(1);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Jehryn");
if(!NTTM_TownMove("palacefront"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledDuriel)
NTC_Delay(2000);
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Jehryn");
if(!NTTM_TownMove("palacefront"))
return false;
for(i = 0; i < 5; i++)
{
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_JERHYN, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
if(MWR_TalkToNpc(_npc, true))
break;
}
if(me.GetQuest(14, 4))
break;
}
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Meshif");
if(!NTTM_TownMove("meshif"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_MESHIF_ACT_2, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
if(NTT_DoInteract(_npc))
{
for(i = 0; i < 16; i++)
{
if((i % 4) == 0)
me.SelectNPCMenu(0x0D38);
if(me.areaid != 40)
break;
NTC_Delay(500);
}
}
return i < 16;
}
}
else
{
if(!NTTM_CheckAct())
return false;
NTTMGR_TownManager();
// Cube
if(MWConfig_GetHoradricCubesInNorm && me.diff == 0)
{
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(57))
return false;
NTP_DoPrecast(true);
if(NTM_MoveToStair(me.areaid, 60))
{
if(!NTM_TakeStair(60))
return false;
}
else
return false;
if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 354, -5, -5))
return false;
NTA_ClearPosition(25, true, 2, false, false);
if(NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 354, -5, -5))
{
for(i = 0; i < 10; i++)
{
_chest = NTC_FindUnit(NTC_UNIT_OBJECT, 354, 5);
if(_chest)
{
if(NTC_OpenChest(_chest))
break;
}
NTC_Delay(200);
}
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 354, -5, -5);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Halls of the Dead.");
_endTicks = GetTickCount() + 20E3; // Wait 20 seconds at most
_preCount = MWR_CountNearbyItems(NTC_UNIT_CUBE);
while(_preCount != 0 && MWR_CountNearbyItems(NTC_UNIT_CUBE) > 0 && _endTicks > GetTickCount())
{
NTA_ClearPosition(20, true, 2, false, false);
NTC_Delay(1000);
}
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 354, -5, -5)
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
NTTM_CheckAct();
}
else
return false;
}
// Radament
if(MWConfig_QuestSchedule.indexOf("A2Q1") > -1)
{
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(48))
return false;
NTP_DoPrecast(true);
if(NTM_MoveToStair(me.areaid, 49))
{
if(!NTM_TakeStair(49))
return false;
}
else
return false;
if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 355, 3, 3))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, 229, 5);
if(!_npc)
return false;
NTM_MoveTo(me.areaid, _npc.x + 5, _npc.y);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Sewers.");
NTM_MoveTo(me.areaid, _npc.x + 5, _npc.y + 5);
for(i = 0; i < 30; i++)
{
if(MWR_IsQuesterNearby())
break;
NTC_Delay(100);
}
if(NTA_KillMonster(229))
{
Say(".Killed Radament");
NTA_ClearPosition(40, true, 2, false, false);
NTM_MoveTo(me.areaid, _npc.x - 3, _npc.y - 3);
if(!NTM_MakeTP())
return false;
Say(".TPSafe");
NTA_ClearPosition(40, true, 2, false, false);
}
NTC_Delay(2500);
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 355, 3, 3);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
NTTM_CheckAct();
}
// Amulet
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(44))
return false;
NTP_DoPrecast(true);
if(NTM_MoveToStair(45, 58))
{
if(!NTM_TakeStair(58))
return false;
}
else
return false;
NTP_DoPrecast();
if(!NTM_MoveToStair(me.areaid, 61))
return false;
if(!NTM_TakeStair(61))
return false;
if(NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 149, 2, 2))
{
if(NTA_ClearPosition(30, true, 2, false, false))
{
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 149, -1, -6);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Claw Viper Temple.");
}
while(!MWR_IsQuesterNearby())
{
NTA_ClearPosition(10, true, 2, false, false);
NTC_Delay(500);
}
while(MWR_IsQuesterNearby())
{
NTA_ClearPosition(35, true, 2, false, false);
NTC_Delay(2500);
}
if(_MWR_AnnounceStatus)
Say("Don't forget talking to drognan. ;)");
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 149, -1, -6);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
NTTM_CheckAct();
}
else
return false;
// Staff
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(43))
return false;
NTP_DoPrecast(true);
for(i = 0; i < 3; i++)
{
if(!NTM_MoveToStair(me.areaid, 62 + i))
return false;
if(!NTM_TakeStair(62 + i))
return false;
}
NTP_DoPrecast();
if(NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 356, -5, -5))
{
if(NTA_ClearPosition(25, true, 2, false, false))
{
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 356, -5, -5);
var _chest;
for(i = 0; i < 10; i++)
{
_chest = NTC_FindUnit(NTC_UNIT_OBJECT, 356, 5);
if(_chest)
{
if(NTC_OpenChest(_chest))
break;
}
NTC_Delay(200);
}
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Maggot's Lair.");
}
_preCount = MWR_CountNearbyItems(_MWR_UNIT_STAFF_CLASSID);
while(_preCount != 0 && _preCount == MWR_CountNearbyItems(_MWR_UNIT_STAFF_CLASSID))
{
NTA_ClearPosition(10, true, 2, false, false);
NTC_Delay(1000);
}
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 356, -5, -5, false);
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
NTTM_CheckAct();
}
else
return false;
// Summoner
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(74))
return false;
NTP_DoPrecast(true);
_journal = GetPresetUnits(me.areaid, NTC_UNIT_OBJECT);
for(i = 0; i < _journal.length; i++)
{
if(_journal[i].id == 357)
{
_journalx = _journal[i].roomx * 5 + _journal[i].x;
_journaly = _journal[i].roomy * 5 + _journal[i].y;
break;
}
}
_vec = new vector(_journalx - me.x, _journaly - me.y);
if(Math.abs(_vec.x) > Math.abs(_vec.y))
_vec.y = 0;
else
_vec.x = 0;
_vec.normalize();
if(_vec.x == -1 && _vec.y == 0) // Northwest
_offset = new coord(46, 1);
else if(_vec.x == 0 && _vec.y == -1) // Northeast
_offset = new coord(50, 25);
else if(_vec.x == 0 && _vec.y == 1) // Southwest
_offset = new coord(41, 6);
else // Souheast
_offset = new coord(-15, 36);
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, _offset.x, _offset.y);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Arcane Sanctuary.");
while(!MWR_IsQuesterNearby())
{
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 357, _offset.x + 1, _offset.y + 1);
NTA_ClearPosition(5, true, 2, false, false);
NTC_Delay(1000);
}
if(NTA_KillMonster(250))
{
NTA_ClearPosition(20, true, 2, false, false);
_journal = NTC_FindUnit(NTC_UNIT_OBJECT, 357, 5);
if(_journal)
{
for(i = 0; i < 40; i++)
{
MWR_ActivateObject(_journal);
NTC_Delay(500);
me.Cancel(0);
me.Cancel(1);
_portal = NTM_FindPortalAreaInt(46);
NTC_Delay(250);
NTA_ClearPosition(15, true, 2, false, false);
if(_portal != -1)
break;
}
if(i >= 40)
return false;
}
NTM_UsePortal("Portal", 46);
Say(".Killed Summoner");
}
// Duriel
if(me.areaid != 46)
{
NTTM_CheckAct();
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(46))
return false;
}
NTP_DoPrecast(true);
_tombs = GetRoom();
if(!_tombs)
return false;
if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_TILE, _tombs.correcttomb - 28, 0, 0))
return false;
_unit = NTC_FindUnit(NTC_UNIT_TILE, _tombs.correcttomb - 28, 5);
if(!_unit)
return false;
Say(".TombID " + _unit.subareaid);
if(!NTM_TakeStair(_unit.subareaid))
return false;
if(!NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 152, -2, 2))
return false;
NTA_ClearPosition(35, true, 2, false, false);
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 152, -2, 2);
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Tal Rasha's Tomb.");
while(!MWR_IsQuesterNearby())
{
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 152, -5, 0);
NTA_ClearPosition(30, true, 2, false, false);
NTC_Delay(500);
}
while(!NTC_FindUnit(NTC_UNIT_OBJECT, 100, 5))
{
NTM_MoveToPresetUnit(me.areaid, NTC_UNIT_OBJECT, 152, -5, 0);
NTA_ClearPosition(30, true, 2, false, false);
NTC_Delay(1000);
}
if(!NTM_TakeUnit(NTC_UNIT_OBJECT, 100))
return false;
if(!NTA_KillMonster(211))
return false;
NTSI_PickItems();
NTC_Delay(2500);
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);
// Walk to Tyrael as path calculation and teleport do not really work in Duriels Lair
_path = new Array();
_path.push(new coord(22628, 15712));
_path.push(new coord(22615, 15707));
_path.push(new coord(22596, 15707));
_path.push(new coord(22579, 15707));
_path.push(new coord(22579, 15688));
_path.push(new coord(22579, 15670));
_path.push(new coord(22582, 15654));
_path.push(new coord(22580, 15637));
_path.push(new coord(22577, 15620));
_path.push(new coord(22577, 15603));
_path.push(new coord(22576, 15600));
for(var i = 0; i < _path.length; i++)
{
NTM_WalkTo(_path[i].x, _path[i].y);
if(GetDistance(me.x, me.y, _path[i].x, _path[i].y) > 3)
i--;
}
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Duriel's Lair.");
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_2))
NTTM_CheckAct();
NTC_Delay(10000);
return true;
}
return false;
}
function MWR_DoActI()
{
var i;
var _npc;
if(!MWConfig_IsRusher)
{
NTTM_CheckAct(1);
if(_MWR_IsActiveQuester)
{
// Enter a tp to catacombs level 4 if available
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Portal");
if(!NTTM_TownMove("portalspot"))
return false;
MWR_UpdateStatus(_MWR_STATUS_WAITING, "TP Catacombs");
while(!MWR_EnterNearbyTP(37) && NTC_InTown())
NTC_Delay(1000);
// Wait for quest completion
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledAndariel)
NTC_Delay(500);
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Rogue Encampment");
for(var i = 0; i < 5; i++)
{
if(!MWR_CheckDeath())
{
if(!MWR_EnterNearbyTP(NTC_AREA_ID_ACT_1))
continue;
}
if(NTC_InTown())
break;
}
}
else
{
MWR_UpdateStatus(_MWR_STATUS_WAITING, "Quest Completion");
while(!_MWR_BossKilledAndariel)
NTC_Delay(2000);
}
// Talk to Warriv and go east
MWR_UpdateStatus(_MWR_STATUS_MOVING, "Warriv");
if(!NTTM_TownMove("warriv"))
return false;
_npc = NTC_FindUnit(NTC_UNIT_NPC, NTC_NPC_ID_WARRIV_ACT_1, 5);
if(_npc)
{
MWR_UpdateStatus(_MWR_STATUS_TALKING, _npc.name);
MWR_TalkToNpc(_npc, true);
if(NTT_DoInteract(_npc))
{
for(i = 0; i < 16; i++)
{
if((i % 4) == 0)
me.SelectNPCMenu(0x0D36);
if(me.areaid != NTC_AREA_ID_ACT_1)
break;
NTC_Delay(500);
}
}
return i < 16;
}
}
else
{
if(!NTTM_CheckAct())
return false;
NTTMGR_TownManager();
if(!NTTM_TownMove("waypoint"))
return false;
if(!NTM_TakeWaypoint(35))
return false;
NTP_DoPrecast(true);
for(i = 0; i < 2; i++)
{
if(!NTM_MoveToStair(me.areaid, 36 + i))
return false;
if(!NTM_TakeStair(36 + i))
return false;
}
if(!NTM_MoveTo(me.areaid, 22595, 9615))
return false;
NTA_ClearPosition(20, true, 2, false, false);
if(!NTM_MoveTo(me.areaid, 22584, 9613))
return false;
if(!NTM_MakeTP())
return false;
else if(_MWR_AnnounceStatus)
Say("TP up @Catacombs.");
do
{
NTM_MoveTo(me.areaid, 22595, 9615);
NTA_ClearPosition(15, true, 2, false, false);
NTC_Delay(1000);
} while(!MWR_IsQuesterNearby());
if(!NTM_MoveTo(me.areaid, 22532, 9553))
return false;
if(!NTA_KillMonster(156))
return false;
else
Say(".Killed Andariel");
NTC_PingDelay(2000);
NTSI_PickItems();
if(!NTM_MoveTo(me.areaid, 22584, 9613) || !MWR_EnterNearbyTP(NTC_AREA_ID_ACT_1))
NTTM_CheckAct();
return true;
}
}
function MWR_IsQuesterNearby()
{
var _npc;
NTC_PutSkill(109, NTC_HAND_RIGHT);
for(var i = 0; i < 5; i++)
{
_npc = NTC_FindUnit(NTC_UNIT_PLAYER);
if(_npc)
{
while(_npc.GetNext())
{
if(MWConfig_ActiveQuestersName.toLowerCase() == _npc.name.toLowerCase() || _MWR_ActiveQuesterName == "" || _MWR_ActiveQuesterName.toLowerCase() == _npc.name.toLowerCase())
{
if(NTC_InMyParty(_npc.name))
return true;
}
}
}
NTC_Delay(250);
}
return false;
}
function MWR_EnterNearbyTP(dest)
{
var _portal;
if(me.areaid == dest)
return true;
for(var i = 0; i < 5; i++)
{
_portal = NTM_FindPortalAreaInt(dest);
if(_portal != -1)
break;
NTC_Delay(400);
}
if(_portal != -1)
{
for(var i = 0; i < 30; i++)
{
if(me.areaid == dest)
{
NTC_PingDelay(500);
if(MWConfig_IsRusher && NTC_InTown())
NTC_PutSkill(115, NTC_HAND_RIGHT);
return true;
}
if(i % 5 == 0)
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _portal);
if(i % 10 == 5)
NTM_GetCloserInt(_portal);
NTC_Delay(200);
}
}
return false;
}
function MWR_CheckDeath()
{
if(me.hp <= 0 || me.mode == 17)
{
Print("ÿc1Oh noes, I died! :'(");
for(var i = 0; i < 8; i++)
{
if(i % 4 == 0)
me.Cancel(0);
if(me.hp > 0 || NTC_InTown())
return true;
NTC_Delay(250);
}
}
return false;
}
function MWR_CarriesItem(classid)
{
var _items;
_items = me.GetItems(classid);
if(_items)
{
for(var i = 0; i < _items.length; i++)
{
if(_items[i].classid == classid)
return true;
}
}
return false;
}
function MWR_PickupItem(classid)
{
var _item;
_item = NTC_FindUnit(NTC_UNIT_ITEM, classid, 2);
if(_item)
{
do
{
if(_item.classid == classid)
{
if(NTSI_PickUpItemInt(_item))
{
Print("Picked up " + NTC_ItemQualityToD2Color[MWC_GetItemColorInt(_item)] + _item.name.split("\n")[0]);
return true;
}
}
}while(_item.GetNext());
}
return false;
}
function MWR_CountNearbyItems(classid)
{
var _item, _count;
_item = NTC_FindUnit(NTC_UNIT_ITEM, classid, 5);
_count = 0;
if(_item)
{
do
{
if(_item.classid == classid)
_count++;
}while(_item.GetNext());
}
return _count;
}
function MWR_MoveQuestItemToCube(classid)
{
var n;
var _items, _cube;
_items = me.GetItems();
_cube = me.GetItems(NTC_UNIT_CUBE);
if(!_items || !_cube || _cube.length < 1)
return false;
for(var i = 0 ; i < _items.length ; i++)
{
if(_items[i].classid == classid)
{
SetUIState(0x1, true);
if(_items[i].mode == 1)
{
SetUIState(0x1, true);
for(n = 0; n < 80; n++)
{
if((n % 40) == 0)
me.ClickItem(_items[i].itemloc);
NTC_Delay(100);
if(me.itemoncursor)
{
NTC_PingDelay(200);
break;
}
}
if(n >= 80)
{
me.Cancel(1);
break;
}
}
if(NTCU_MoveItemToCubeInt(_cube[0], _items[i]))
me.Cancel(1);
return true;
}
}
}
function MWR_ActivateObject(unit)
{
if(!unit)
return false;
for(var i = 0 ; i < 10 ; i++)
{
if((i % 5) == 0)
{
if(GetDistance(me, unit) > 2)
NTM_MoveTo(unit.areaid, unit.x + 2, unit.y + 2);
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, unit);
}
NTC_Delay(200);
if(unit.mode > 0)
return true;
}
return false;
}
function MWR_InsertStaff()
{
var _items;
_items = me.GetItems(_MWR_UNIT_FULLSTAFF_CLASSID);
if(_items)
{
for(var i = 0; i < _items.length; i++)
{
if(_items[i].classid == _MWR_UNIT_FULLSTAFF_CLASSID)
{
if(_items[i].itemloc == 0)
{
if(NTC_ItemToCursor(_items[i]))
{
NTC_Delay(250);
SubmitItem();
NTC_Delay(250);
}
me.Cancel(1);
return true;
}
break;
}
}
}
return false;
}
function MWR_UpdateStatus(status, desc)
{
var _enableConfirmation = false;
switch(status)
{
case _MWR_STATUS_WAITING:
MWC_SetStatusText("ÿc2(Waiting) " + desc);
break;
case _MWR_STATUS_INTERACTING:
MWC_SetStatusText("ÿc;(Interacting) " + desc);
break;
case _MWR_STATUS_MOVING:
_enableConfirmation = true;
MWC_SetStatusText("ÿc8(Moving) " + desc);
break;
case _MWR_STATUS_TALKING:
_enableConfirmation = true;
MWC_SetStatusText("ÿc3(Talking) " + desc);
break;
case _MWR_STATUS_PICKUP:
_enableConfirmation = true;
MWC_SetStatusText("ÿc<(Picking) " + desc);
break;
default:
MWC_SetStatusText("ÿc0(Misc) " + desc);
break;
}
if(_enableConfirmation && !_MWR_ActiveQuesterConfirmed && _MWR_IsActiveQuester && (GetTickCount() - _MWR_ConfirmationRequestTicks) > 30E3)
{
_MWR_ConfirmationRequestTicks = GetTickCount();
Say(".SetQuester " + me.charname);
}
}
function MWR_ScriptMsgEvents(msg)
{
var _messenger;
if(!msg)
return;
_messenger = msg.split(" ")[0];
switch(msg.split(" ")[1])
{
case "KILLED":
if(_messenger == me.charname)
break;
Print("ÿc8Boss Kill: ÿc2Confirmed");
switch(msg.split(" ")[2])
{
case "ANDARIEL":
_MWR_BossKilledAndariel = true;
break;
case "SUMMONER":
_MWR_BossKilledSummoner = true;
break;
case "DURIEL":
_MWR_BossKilledDuriel = true;
break;
case "COUNCIL":
_MWR_BossKilledCouncil = true;
break;
case "MEPHISTO":
_MWR_BossKilledMephisto = true;
break;
case "DIABLO":
_MWR_BossKilledDiablo = true;
break;
case "SCHENK":
_MWR_BossKilledSchenk = true;
break;
case "IZUAL":
_MWR_BossKilledIzual = true;
break;
case "RADAMENT":
_MWR_BossKilledRadament = true;
break;
}
break;
case "TPSAFE":
if(_messenger == me.charname)
break;
_MWR_TPSafe = true;
Print("ÿc2Clearance Acquired");
break;
case "TOMBID":
if(_messenger == me.charname)
break;
_MWR_CorrectTombId = parseInt(msg.split(" ")[2])
Print("ÿc2ID Confirmed");
break;
case "SETQUESTER":
if(MWConfig_IsRusher && _MWR_ActiveQuesterName == "")
{
_MWR_ActiveQuesterName = msg.split(" ")[2];
_MWR_AnnounceStatus = false;
Say(".Confirmed");
if(_MWR_ActiveQuesterName == me.charname)
_MWR_IsActiveQuester = true;
}
case "CONFIRMED":
if(_messenger == me.charname)
break;
if(_MWR_IsActiveQuester)
{
_MWR_AnnounceStatus = false;
_MWR_ActiveQuesterConfirmed = true;
_MWR_ActiveQuesterName = me.charname;
}
Print("ÿc8Quester Status: ÿc2Confirmed");
break;
case "INVALIDATEQUESTER":
Print("ÿc8Quester Status: ÿc1Invalidated");
_MWR_ConfirmationRequestTicks = GetTickCount() + 10E3;
_MWR_ActiveQuesterConfirmed = false;
_MWR_ActiveQuesterName = "";
_MWR_AnnounceStatus = true;
break;
case "START":
_MWR_CommenceRush = true;
break;
case "RESCUED":
_MWR_RescuedAnya = true;
break;
}
return;
}
function MWR_AllPlayersPresent()
{
var _players, _count;
if(!MWConfig_NumberOfCharsToRush)
return true;
_count = 0;
_players = GetPlayerUnit();
if(_players)
{
while(_players.GetNext())
{
if(NTC_InMyParty(_players.name))
_count++;
}
}
return _count >= MWConfig_NumberOfCharsToRush;
}
function MWR_CheckQuesterAct()
{
var _players;
_players = GetPlayerUnit();
if(_players)
{
while(_players.GetNext())
{
if(_players.level < 70 && MWR_CheckAct(_players.areaid) != me.act)
return false;
}
}
return true;
}
function MWR_CheckAct(areaid)
{
if(areaid < 1 || areaid > 132)
return -1;
else if(areaid < 40)
return 1;
else if(areaid < 75)
return 2;
else if(areaid < 103)
return 3;
else if(areaid < 109)
return 4;
else
return 5;
}
function MWR_SetQuesterStatus()
{
var _players;
if(MWConfig_ActiveQuestersName)
{
if(MWConfig_ActiveQuestersName.toLowerCase() == me.charname.toLowerCase())
return true;
else
return false;
}
_players = GetPlayerUnit();
if(_players)
{
while(_players.GetNext())
{
if(_players.level <= 70)
return false;
}
}
return true;
}
function MWR_UseRedPortal(classid, dest)
{
var _portal;
_portal = NTC_FindUnit(NTC_UNIT_OBJECT);
if(_portal)
{
do
{
if(_portal.classid == classid)
{
for(var i = 0; i < 20; i++)
{
if(me.areaid == dest)
{
NTC_PingDelay(500);
return true;
}
if(i % 5 == 0)
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, _portal);
if(i % 10 == 5)
NTM_GetCloserInt(_portal);
NTC_Delay(200);
}
}
} while(_portal.GetNext());
}
return false;
}
function MWR_ClearCS()
{
var _monster;
var i;
// Grand Vizier of Chaos
for(i = 0; i < 5; i++)
{
if(MWR_OpenSeal(395) && MWR_OpenSeal(396))
break;
NTC_Delay(1000);
}
if(i >= 5)
return false;
NTC_FindUnit(NTC_UNIT_MONSTER, GetLocaleString(2851), 10);
for(i = 0; i < 10; i++)
{
if(NTA_KillMonster(GetLocaleString(2851)))
{
NTA_ClearPosition(5, true, 2, false, false);
NTSI_PickItems();
break;
}
NTC_Delay(250);
}
if(i >= 10)
return false;
// Lord De Seis
for(i = 0; i < 5; i++)
{
if(MWR_OpenSeal(394))
break;
NTC_Delay(1000);
}
if(i >= 5)
return false;
NTC_FindUnit(NTC_UNIT_MONSTER, GetLocaleString(2852), 10);
for(i = 0; i < 10; i++)
{
NTM_MoveTo(me.areaid, 7791, 5226);
NTC_Delay(250);
_monster = NTC_FindUnit(NTC_UNIT_MONSTER, GetLocaleString(2852), 10);
if(_monster)
{
NTM_MoveTo(me.areaid, 7776, _monster.y + 10);
if(NTA_KillMonster(GetLocaleString(2852)))
{
NTA_ClearPosition(10, true, 2, false, false);
NTSI_PickItems();
break;
}
}
}
if(i >= 10)
return false;
// Infector Of Souls
for(i = 0; i < 5; i++)
{
if(MWR_OpenSeal(393) && MWR_OpenSeal(392))
break;
NTC_Delay(1000);
}
if(i >= 5)
return false;
NTC_FindUnit(NTC_UNIT_MONSTER, GetLocaleString(2853), 10);
for(i = 0; i < 10; i++)
{
if(NTA_KillMonster(GetLocaleString(2853)))
{
NTA_ClearPosition(10, true, 2, false, false);
NTSI_PickItems();
break;
}
NTC_Delay(250);
}
return true;
}
function MWR_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);
_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;
NTA_ClearPosition(5, true, 2, false, false);
}
return false;
}
function MWR_TalkToNpc(npc, cancelAll)
{
var _menuLoops;
_menuLoops = 0;
for(var i = 0; i < 40; i++)
{
if(!GetUIState(0x08) && i % 10 == 0)
{
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, npc);
NTC_PingDelay(250);
}
if(i % 5 == 0)
{
me.Cancel(0);
NTC_Delay(250);
}
if(GetUIState(0x08) || GetUIState(0x09))
{
if(_menuLoops < 5)
_menuLoops++;
else
{
if(cancelAll || GetUIState(0x09))
{
me.Cancel(1);
return !GetUIState(0x08);
}
return true;
}
}
NTC_Delay(100);
}
return false;
}
function MWR_UseQuestItem(classid)
{
var _item;
_item = me.GetItems(classid);
if(_item && _item.length > 0)
{
SetUIState(0x1, true);
for(var i = 0; i < 40; i++)
{
if(i % 10 == 0)
me.ClickItem(1, _item[0]);
_item = me.GetItems(classid);
if(!_item || _item.length == 0)
{
me.Cancel(1);
return true;
}
NTC_Delay(NTC_DELAY_FRAME);
}
}
return false;
}
|
|
|
03/19/2011, 12:55
|
#921
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Was mir grad auffällt: Die Sorc nimmt das TP in der Stadt nicht per Telekinese, das ist doch total ineffizient!
Und ich glaub das "CommonLog" funktioniert nicht richtig
edit: Ich mein das gemeinsame "CommonLog", die eigenen scheinen zu funktionieren.
|
|
|
03/19/2011, 13:53
|
#922
|
Administrator
elite*gold: 41624
Join Date: Jan 2010
Posts: 22,728
Received Thanks: 12,655
|
Quote:
Originally Posted by ldevil
Was mir grad auffällt: Die Sorc nimmt das TP in der Stadt nicht per Telekinese, das ist doch total ineffizient!
Und ich glaub das "CommonLog" funktioniert nicht richtig
edit: Ich mein das gemeinsame "CommonLog", die eigenen scheinen zu funktionieren.
|
Das ist ja auch nur bedingt möglich, nämlich nur dann, wenn man ein TP aus der Stadt in eine Ebene nimmt.
Und das ist irgendwie selten der Fall.
Was genau funktioniert daran denn nicht?
Lg
Muddy
|
|
|
03/19/2011, 14:13
|
#923
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Quote:
Originally Posted by Muddy_Waters
Das ist ja auch nur bedingt möglich, nämlich nur dann, wenn man ein TP aus der Stadt in eine Ebene nimmt.
Und das ist irgendwie selten der Fall.
Was genau funktioniert daran denn nicht?
Lg
Muddy
|
Hm ok, hab das vorher eben rasch getestet und da gings zufällig
Die beiden Bots überschreiben sich gegenseitig die Werte. Sprich es sind nicht alle Runen drin, die ich gefunden habe:
Sorc1:
El Rune: 0
Eld Rune: 0
Tir Rune: 0
Nef Rune: 0
Eth Rune: 0
Ith Rune: 0
Tal Rune: 178
Ral Rune: 125
Ort Rune: 198
Thul Rune: 132
Amn Rune: 147
Sol Rune: 89
Shael Rune: 0
Dol Rune: 0
Hel Rune: 36
Io Rune: 0
Lum Rune: 0
Ko Rune: 11
Fal Rune: 0
Lem Rune: 5
Pul Rune: 8
Um Rune: 4
Mal Rune: 6
Ist Rune: 5
Gul Rune: 3
Vex Rune: 0
Ohm Rune: 0
Lo Rune: 0
Sur Rune: 1
Ber Rune: 0
Jah Rune: 0
Cham Rune: 1
Zod Rune: 0
Sorc2:
El Rune: 0
Eld Rune: 0
Tir Rune: 0
Nef Rune: 0
Eth Rune: 0
Ith Rune: 0
Tal Rune: 160
Ral Rune: 87
Ort Rune: 166
Thul Rune: 94
Amn Rune: 104
Sol Rune: 69
Shael Rune: 0
Dol Rune: 0
Hel Rune: 49
Io Rune: 0
Lum Rune: 0
Ko Rune: 17
Fal Rune: 0
Lem Rune: 10
Pul Rune: 7
Um Rune: 5
Mal Rune: 5
Ist Rune: 2
Gul Rune: 1
Vex Rune: 0
Ohm Rune: 0
Lo Rune: 0
Sur Rune: 0
Ber Rune: 0
Jah Rune: 1
Cham Rune: 0
Zod Rune: 0
Gemeinsam:
El Rune: 0
Eld Rune: 0
Tir Rune: 0
Nef Rune: 0
Eth Rune: 0
Ith Rune: 0
Tal Rune: 595
Ral Rune: 404
Ort Rune: 643
Thul Rune: 374
Amn Rune: 478
Sol Rune: 274
Shael Rune: 0
Dol Rune: 0
Hel Rune: 142
Io Rune: 0
Lum Rune: 1
Ko Rune: 45
Fal Rune: 0
Lem Rune: 25
Pul Rune: 18
Um Rune: 10
Mal Rune: 14
Ist Rune: 5
Gul Rune: 4
Vex Rune: 0
Ohm Rune: 0
Lo Rune: 0
Sur Rune: 1
Ber Rune: 0
Jah Rune: 0
Cham Rune: 0
Zod Rune: 0
Wobei ich zugeben muss, dass ich erst die Log Ordner für die Chars nicht hatte, aber wieso stehen in den später erstellten "mycommonlog"s mehr hohe runen als im gemeinsamen?
|
|
|
03/19/2011, 14:34
|
#924
|
Administrator
elite*gold: 41624
Join Date: Jan 2010
Posts: 22,728
Received Thanks: 12,655
|
Das ganze Common Log ist ja so ausgelegt, dass die zu speichernden Werte solange mitgeschleppt werden, bis das schreiben erfolgreich war, um fälle auszugleichen, in denen zwei Chars gleichzeitig dieselbe Datei öffnen.
Es wird zunächst in das allgemeine Log geschrieben, danach in das Chareigene.
Erst wenn beides erfolgreich war, werden die zwischengespeicherten Daten gelöscht.
Ein Überschreiben halte ich eigentlich für unwahrscheinlich, da die Daten eigentlich immer nur ausgelesen und dann inkrementiert werden.
Ich würde einfach mal die Logs löschen und schauen, was sich tut, wenn auch die Char Logs direkt korrekt erstellt werden können.
Wenn sich das dann reproduzieren lässt, muss ich es mir nochmal anschauen, aber derzeit habe ich eigentlich keine Idee, woran das liegen könnte.
Lg
Muddy
|
|
|
03/19/2011, 16:10
|
#925
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
ok, ich hab jetzt mal die 3 logs gelöscht, mal schauen was passiert
Aber das mit dem TP hab ich scheinbar doch nicht kapiert, hab jetzt den ersten Akt durchgespielt und konnte jedes meiner tps zurück auf schlachtfeld per telekinese nehmen...
|
|
|
03/19/2011, 16:11
|
#926
|
elite*gold: 139
Join Date: Oct 2006
Posts: 12,058
Received Thanks: 24,258
|
Ich habe heut zum ersten mal seit langem wieder gebottet und musste mir dabei natürlich direkt mal deine neue Version anschaun, daher hier ein kleines Feedback.
Der Char mit dem ich den Bot genutzt habe war mein Summoner, da ich bei den anderen erstmal wieder das Equip zusammensuchen muss. Allein beim einstellen der Config habe ich schon feuchte Augen bekommen, ist ja wirklich unglaublich, was du alles eingebaut hast. Der Bot selbst läuft besser als ich es mir vorstellen könnte, das recasten der Skelette funktioniert einwandfrei und auch sonst stecken so viele Details in dem Bot, dass mir wirklich die Worte fehlen. Ich könnte ihm stundenlang beim farmen zu schauen, so gut läuft er.
Die einzigen "Kritikpunkte" die mir aufgefallen sind, waren zum einen das einstellen des Spectypes bei manchen Scripten, was ansich ja super ist, aber Leute die sich damit nicht auskennen wahrscheinlich verwirrt, weil dazu keine Erklärung vorhanden ist. Vielleicht solltest du da entweder in der Config, oder im Startpost noch eine kurze Übersicht machen, welche Monster welchem Spectype entsprechen. Der Zweite Punkt ist, dass es meiner Meinung nach sinnvoller wäre gegen Diablo und Baal auch Decrepify als Curse zu nehmen, aber ist ja auch nicht so schwer das noch umzustellen, wenn man weiß wo es steht. Gerade bei Baal ist Decrepify sehr nützlich, weil er dann nicht mehr so nervig herumported und casted.
Alles in allem kann ich mich nur davor verneigen, was du hier auf die Beine gestellt hast!
|
|
|
03/19/2011, 16:51
|
#927
|
elite*gold: 0
Join Date: Jan 2011
Posts: 35
Received Thanks: 4
|
Ich nochmal 
Wie kann ich ausstellen das der Bot in A2 auf dem Weg zu DIriel fast alles killt? Der soll nur unten den Raum cleanen wo der Stab rein kommt, das gleiche im Weltsteinturm ebene 2 und 3 soll er nur durch und dann nur den Throne cleanen.
Wie und wo kann ich das machen?
Ansonsten kann ich nur sagen Super Arbeit mit sehr viel investierter Zeit, Hut ab!
Edit:
kann ich den roten Teil gegen was aunderes austauschen? Zum Beispiel gegen das Blaue?
Code:
MWConfig_Script.push(["NTDuriel.ntj", 10]);[COLOR="Red"] MWConfig_ClearPathToDurielSpectype = 0x01;[/COLOR]
Code:
MWConfig_Script.push(["NTPit.ntj", 10]); [COLOR="Blue"]MWConfig_ClearPathToPitSpectype = 0; NTConfig_ClearPitLevel1 = 2; // 0 : don't clear, 1 : clear path only, 2 : clear all[/COLOR]
|
|
|
03/19/2011, 17:29
|
#928
|
Administrator
elite*gold: 41624
Join Date: Jan 2010
Posts: 22,728
Received Thanks: 12,655
|
Quote:
Originally Posted by lanara
Ich habe heut zum ersten mal seit langem wieder gebottet und musste mir dabei natürlich direkt mal deine neue Version anschaun, daher hier ein kleines Feedback.
Der Char mit dem ich den Bot genutzt habe war mein Summoner, da ich bei den anderen erstmal wieder das Equip zusammensuchen muss. Allein beim einstellen der Config habe ich schon feuchte Augen bekommen, ist ja wirklich unglaublich, was du alles eingebaut hast. Der Bot selbst läuft besser als ich es mir vorstellen könnte, das recasten der Skelette funktioniert einwandfrei und auch sonst stecken so viele Details in dem Bot, dass mir wirklich die Worte fehlen. Ich könnte ihm stundenlang beim farmen zu schauen, so gut läuft er.
Die einzigen "Kritikpunkte" die mir aufgefallen sind, waren zum einen das einstellen des Spectypes bei manchen Scripten, was ansich ja super ist, aber Leute die sich damit nicht auskennen wahrscheinlich verwirrt, weil dazu keine Erklärung vorhanden ist. Vielleicht solltest du da entweder in der Config, oder im Startpost noch eine kurze Übersicht machen, welche Monster welchem Spectype entsprechen. Der Zweite Punkt ist, dass es meiner Meinung nach sinnvoller wäre gegen Diablo und Baal auch Decrepify als Curse zu nehmen, aber ist ja auch nicht so schwer das noch umzustellen, wenn man weiß wo es steht. Gerade bei Baal ist Decrepify sehr nützlich, weil er dann nicht mehr so nervig herumported und casted.
Alles in allem kann ich mich nur davor verneigen, was du hier auf die Beine gestellt hast! 
|
Ich finde den Angriffalgorithmus ja nach wie vor etwas unaufgeräumt.
Das mit den Spectypes ist wie schon gesagt ganz kurz vor Release entstanden, darum die fehlende Dokumentation.
Das mit den Flüchen müsste ich mir mal anschauen, im Zweifelsfall belege ich einfach den derzeit nicht genutzen Skill am Index 7 damit.
Aber wann ich dazu komme kann ich nicht sagen, das Semester geht wieder los und insofern habe ich auch entsprechend weniger Zeit mich darum zu kümmern.
In jedem Fall bedanke ich mich für das ausführliche Feedback.
Quote:
Originally Posted by Mystery^_X
Ich nochmal 
Wie kann ich ausstellen das der Bot in A2 auf dem Weg zu DIriel fast alles killt? Der soll nur unten den Raum cleanen wo der Stab rein kommt, das gleiche im Weltsteinturm ebene 2 und 3 soll er nur durch und dann nur den Throne cleanen.
Wie und wo kann ich das machen?
Ansonsten kann ich nur sagen Super Arbeit mit sehr viel investierter Zeit, Hut ab!
Edit:
kann ich den roten Teil gegen was aunderes austauschen? Zum Beispiel gegen das Blaue?
Code:
MWConfig_Script.push(["NTDuriel.ntj", 10]);[COLOR=Red] MWConfig_ClearPathToDurielSpectype = 0x01;[/COLOR]
Code:
MWConfig_Script.push(["NTPit.ntj", 10]); [COLOR=Blue]MWConfig_ClearPathToPitSpectype = 0; NTConfig_ClearPitLevel1 = 2; // 0 : don't clear, 1 : clear path only, 2 : clear all[/COLOR]
|
Wenn du mit dem blauen, nur den Wert, also 0 meinst, dann ja.
Ansonsten habe ich mich zu der Spectype Thematik in den letzten Beiträgen recht ausführlich geäussert, insofern empfehle ich dir einfach die Lektüre dieser Beiträge.
Es wäre mir übrigens neu, dass für Baal irgendwelche Pfade gesäubert werden.
Lg
Muddy
|
|
|
03/19/2011, 17:51
|
#929
|
elite*gold: 0
Join Date: Jul 2006
Posts: 469
Received Thanks: 235
|
Also das mit dem gemeinsamen log klappt wirklich nicht. Ich nehm an das läuft etwa so ab der Fehler:
Bot x öffnet das Log (Zustand a)
Bot y öffnet das Log (Zustand a)
Bot x erhöht Zustand a um seine Werte x' -> Zustand a+x'
Bot y erhöht Zustand a um seine Werte y' -> Zustand a+y'
Wodurch die Werte x' von Bot x verloren gehen.
Aber wie gesagt ist eigentlich nicht tragisch.
|
|
|
03/19/2011, 18:45
|
#930
|
Administrator
elite*gold: 41624
Join Date: Jan 2010
Posts: 22,728
Received Thanks: 12,655
|
Quote:
Originally Posted by ldevil
Also das mit dem gemeinsamen log klappt wirklich nicht. Ich nehm an das läuft etwa so ab der Fehler:
Bot x öffnet das Log (Zustand a)
Bot y öffnet das Log (Zustand a)
Bot x erhöht Zustand a um seine Werte x' -> Zustand a+x'
Bot y erhöht Zustand a um seine Werte y' -> Zustand a+y'
Wodurch die Werte x' von Bot x verloren gehen.
Aber wie gesagt ist eigentlich nicht tragisch.
|
Klingt nachvollziehbar.
Eventuell baue ich das einfach so um, dass das Schreiben nur zu Beginn eines Spiels stattfindet. Dann ist es unwahrscheinlicher, dass die sich in die Quere kommen.
Danke nochmal für den Hinweis.
Lg
Muddy
|
|
|
 |
|
Similar Threads
|
[Release] D2NT 3.1 1.13c
07/17/2016 - Diablo 2 - 91 Replies
hi,
hab eben den d2nt3.1 gefunden. ein neues baba script is dabei.
release thread eon
D2NT3.1
|
[Realease] Muddy's Waypoint Catcher
08/21/2013 - Diablo 2 Programming - 46 Replies
Moin zusammen,
hier mal die erste Release Version eines kleinen Scripts genannt Waypoint Catcher. Das ganze ist jetzt nichtmal 24h alt, dementsprechend sind vermutlich noch einige Bugs vorhanden. Hinweise dazu nehme ich gerne entgegen. ;)
Features:
- Suchen sämtlicher Wegpunkte mit Ausnahme, wobei in Akt ein durch Probleme im Jail Bereich nach dem Wegpunkt Outer Cloister abgebrochen wird
- Wahlweise auch mit TP an jedem gefundenen Wp, sodass man damit auch anderen (nicht-Bots) die...
|
[D2NT] Long Dia Release
05/10/2011 - Diablo 2 Programming - 28 Replies
Ein kleines Script für diablo, es startet beim eingang macht ein tp cleart den weg zum star macht am star noch ein tp dann läufts wie das normale nur cleart es schöner :)
hoffe euch gefällts ich habs noch nicht wirklich getestet (2-3 runs) bugs können gerne hier gepostet werden verbesserungs vorschläge auch :D
installation:
1.)Script in den Bot ordner kopieren
2.)Script im editor oder vergleichbaren öffnen
3.) Msg´s anpassen (ist nicht schwer)
4.) in der char config die zeile...
|
D2NT 3.0 Pickit release
10/22/2010 - Diablo 2 - 77 Replies
edit
|
Muddy's D2NT Help
07/29/2010 - Diablo 2 - 3 Replies
hi i just started to use the bot it work's great.
how do i set up the skill's i use on my Sorc and pick up itme's?
.....
if you reply to this post please use english
|
All times are GMT +1. The time now is 17:25.
|
|