Credits to bigapple90, Jinnay, doomknight, bajazzle, and agor. probably more too
**If you have no edits to your current files you can just replace them using the links below: You must do steps 9-13 if you want xml logging, otherwise do step 13**
NTCommon
NTTownManager
NTSnagIt
NTTown
NTCubing
Or do it yourself
Step [1][A]: Open NTCommon. Find this line:
var NTC_ItemQualityToD2Color = new Array(9);
Change it to:
Code:
var NTC_ItemQualityToD2Color = new Array(11);
[B.]: Now copy this code:
Code:
NTC_ItemQualityToD2Color[9] = "ÿc;"; //purple
NTC_ItemQualityToD2Color[10] = "ÿc1";//red
[C]: And paste it under this line:
NTC_ItemQualityToD2Color[8] = "ÿc8";
Step [2]: Add the red:
function NTC_IncludeLibs()
{
Include("libs/common/NTAttack.ntl");
Include("libs/common/NTCubing.ntl");
Include("libs/common/NTItemParser.ntl");
Include("libs/common/NTMove.ntl");
Include("libs/common/NTPrecast.ntl");
Include("libs/common/NTSnagIt.ntl");
Include("libs/common/NTTown.ntl");
Include("libs/common/NTTownManager.ntl");
Include("libs/common/NTTownMove.ntl");
Include("libs/common/NTItemlogger.ntl");
}
Step[3]: Copy this code and paste it at the end of NTCommon:
Code:
//--From Jinnay--
function NTC_LogLocation(script)
{
var _hfile = FileOpen("logs/loc/" + me.charname + "_LocInfo.txt", 1);
if(!_hfile)
return false;
_hfile.WriteLine(script);
_hfile.Close();
}
function NTC_GetLocation(index)
{
var _script;
if(arguments.length < 1)
index = false;
var _hfile = FileOpen("logs/loc/" + me.charname + "_LocInfo.txt", 0);
_script = _hfile.ReadLine();
_hfile.Close();
return _script;
}
Save and close NTCommon.
Step[4]: Open NTTownmanager; at the top add red
var _NTTMGR_BuyPots;
var _NTTMGR_BuyTP;
var _NTTMGR_BuyKey;
var _NTTMGR_DoHeal;
var _NTTMGR_DoID;
var _NTTMGR_DoRepair;
var _NTTMGR_DoRevive;
var _NTTMGR_RemoveCurse;
var _NTTMGR_Simple;
function NTTMGR_TownManager(simple)
{
var _cubing;
if(arguments.length < 1)
simple = false;
NTC_ClearCursor();
NTT_CleanPotions();
_NTTMGR_BuyPots = NTT_CheckBelt();
_NTTMGR_BuyTP = (NTTMGR_CheckScrolls(1) < 4);
_NTTMGR_BuyKey = (NTConfig_OpenChest && NTTMGR_CheckKeys() < 4);
_NTTMGR_DoHeal = NTT_CheckHeal();
_NTTMGR_DoID = NTT_CheckUnids();
_NTTMGR_DoRepair = NTT_CheckRepair(40);
_NTTMGR_DoRevive = NTT_CheckMerc();
_NTTMGR_RemoveCurse = NTTMGR_CheckCurse(NTConfig_CheckSelfSafe > 0x01 ? 0x7E : 0, NTConfig_CheckMercSafe > 0x01 ? 0x7E : 0);
_NTTMGR_Simple = simple;
NTCU_InitCubing();
...
...
etc
Step [5]: Find this function:
function NTTMGR_IDItems(npc)
{
...
...
etc
}
replace it with this one: function NTTMGR_IDItems(npc)
Save and close NTTownManager.
Step [6][A]: Open NTSnagIt. Find and add the red:
function NTSI_PickItems()
{
var i, _mode;
for(i = 0 ; i < 25 ; i++)
{
_mode = me.mode;
if((_mode >= 1 && _mode <= 3) || _mode == 5 || _mode == 6)
break;
NTC_Delay(NTC_DELAY_FRAME);
}
if(i < parseInt(NTConfig_SnagDelay/NTC_DELAY_FRAME))
NTC_PingDelay(NTConfig_SnagDelay-(i*NTC_DELAY_FRAME));
Include("libs/common/NTItemlogger.ntl");
NTSI_SnagIt();
}
[B.] Replace your:
function NTSI_SnagIt()
{
var i;
...
...
etc
}
with this one: function SnagIt()
[C] Find and add the red:
function NTSI_PickUpItemInt(snagitem)
{
var i;
var _classid;
_classid = snagitem.classid;
for(i = 0 ; i < 40 ; i++)
{
if((i % 10) == 0 && (snagitem.mode == 3 || snagitem.mode == 5))
{
if(GetDistance(me, snagitem) > 3)
NTM_MoveTo(snagitem.areaid, snagitem.x, snagitem.y);
if(NTC_ClearCursor())
NTC_DoClick(NTC_CLICK_LDOWN, NTC_SHIFT_NONE, snagitem);
}
NTC_Delay(NTC_DELAY_FRAME);
if(_classid == 523)
{
Print("Picked up " +
NTC_ItemQualityToD2Color[6] + GetLocaleString(2215));
return false;
}
else if(snagitem.mode != 3 && snagitem.mode != 5)
{
var _parent;
NTC_PingDelay(100);
_parent = snagitem.GetParent();
return (_parent && _parent.gid == me.gid);
}
}
return false;
}
Save and Close NTSnagIt
Step [7]: Open NTTown. Replace your
function NTT_GambleIt(npc)
{
...
...
etc
}
with this one: function NTT_GambleIt(npc)
Save and Close NTTown
Step [8][a]: Open NTCubing, find this line
NTC_SendLogToOOG(NTC_LOG_COMMON, _NTCU_LogString);
Paste this code right under it:
Code:
var crafted_itm = NTCU_GetCubeContents();
if(crafted_itm.length == 1)
if(crafted_itm[0].quality == 8 || crafted_itm[0].itemflag&0x400000 || crafted_itm[0].quality == 7 && crafted_itm[0].class == 2)
{
if(NTSI_CheckItem(crafted_itm[0]) != 0)
NTC_SendLogToOOG(NTC_LOG_ITEM,"ÿc2Kept: " + NTC_ItemQualityToMGRColor[crafted_itm[0].quality] + crafted_itm[0].name.split("\n")[0]+ ";" + crafted_itm[0].itemdesc + "\n ÿc2iLvl: " + crafted_itm[0].itemlevel + "\n ÿc2Cubed");
else
NTC_SendLogToOOG(NTC_LOG_ITEM,"ÿc1Sold: " + NTC_ItemQualityToMGRColor[crafted_itm[0].quality] + crafted_itm[0].name.split("\n")[0]+ ";" + crafted_itm[0].itemdesc + "\n ÿc2iLvl: " + crafted_itm[0].itemlevel + "\n ÿc2Cubed");
//^ doesnt actually sell the items ^
}
[B.] Copy this code and paste it at the end of NTCubing:
Code:
function NTCU_GetCubeContents()
{
var _items = me.GetItems();
var _cube_items = new Array();
for(i = 0 ; i < _items.length ; i++)
if(_items[i].mode == 0 && _items[i].itemloc == 3)
_cube_items.push(_items[i]);
return _cube_items;
}
Step [9]: Download this xmlstuff, you need it for XML logging
Step [10][A]: Open the txt file itemtoname.txt from xmlstuff
[B.] Copy everything in there (Ctrl + A then Ctrl + C) and close it.
[C] Now open your NTItemAlias and at the end paste the code that you just copied
Save and close NTItemAlias
Step [11]: Copy the logs folder from xmlstuff to your D2NT\scripts folder
Step [12]: Copy NTItemlogger.ntl from xmlstuff and paste it into your D2NT\scripts\libs\common folder
Step [13][A]: For each char you use, open their NTConfigs and add:
NTConfig_UseXMLItemlog = true; // Log kept and sold items as well in a XML log file
NTConfig_LogSoldItems = true; // Adds sold items to the manager's itemlog
NTConfig_LogSoldQuality = 7; // item quality to log for sold (7 = unique, this is only for d2nt manager, xml logs magic,rare,etc)
[B.] Also in the logs/loc folder make a txt file for each char to prevent first use errors. name it like so: (charNamehere)_LocInfo.txt
That should do it. Credits to their respective owners.
Bookmarks