Page 1 of 4 123 ... LastLast
Results 1 to 20 of 77
  1. #1
    Super hacker skidude's Avatar
    Join Date
    Aug 2004
    Location
    greece
    Posts
    5,160

    Default [D2NT Release]Item Logging with XML 3.0+

    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.
    Last edited by skidude; 06-29-2010 at 01:24 PM.

  2. #2

    Default

    Hello, i've done everything you have said here and i continue to get the error

    <D2NT Error> C:\users\me\desktop\d2nt\scripts\libs\common\NTIte mlogger.ntl (65) : TypeError:_hfile is null
    Please help.

  3. #3
    Super hacker skidude's Avatar
    Join Date
    Aug 2004
    Location
    greece
    Posts
    5,160

    Default

    Try replacing your NTItemlogger with this RAW OUTPUT 6A9ixcY1

    If u don't want the xml logging u don't have to use it. I don't use it on my bot
    Last edited by skidude; 06-26-2010 at 06:47 PM.

  4. #4

    Default

    awesome, that seems to have worked, i had the same error as elimaxwell

  5. #5
    Super hacker skidude's Avatar
    Join Date
    Aug 2004
    Location
    greece
    Posts
    5,160

    Default

    Glad to hear that fixed the error.

  6. #6

    Default

    <D2NT Error> E:\Program Files\Diablo II\MD\D2NT\scripts\libs\common\NTSnagIt.ntl (159) :referenceError: NTI_WriteLog is not defined.


    had this error in snagit, town manager, and i cant figure out how to define it, help would be appreciated :)

  7. #7

    Default

    well I'm not sure why, but after i completed this xml logging update, my bot will just sit there staring at whatever item it's just cubed/crafted.
    Right now I have crafting disabled, but yeah. no errors or anything, just sits there until it's time for the next run lol
    Makes no sense considering none of the things required for the xml are directly realted to crafting scripts, but whatever. it's a complicated program!

  8. #8
    Super hacker skidude's Avatar
    Join Date
    Aug 2004
    Location
    greece
    Posts
    5,160

    Default

    Quote Originally Posted by tanic View Post
    <D2NT Error> E:\Program Files\Diablo II\MD\D2NT\scripts\libs\common\NTSnagIt.ntl (159) :referenceError: NTI_WriteLog is not defined.


    had this error in snagit, town manager, and i cant figure out how to define it, help would be appreciated :)
    You left out part of the snagit or deleted part that was needed, go back and recheck it

    Quote Originally Posted by commhunt View Post
    well I'm not sure why, but after i completed this xml logging update, my bot will just sit there staring at whatever item it's just cubed/crafted.
    Right now I have crafting disabled, but yeah. no errors or anything, just sits there until it's time for the next run lol
    Makes no sense considering none of the things required for the xml are directly realted to crafting scripts, but whatever. it's a complicated program!
    Check step 8,

    Topic is updated to match the maker's updates
    Last edited by skidude; 06-29-2010 at 01:25 PM.

  9. #9

    Default

    ok yeah, I skiped steps 1-8 via /* */ ing the original code and pasting in your updated files, so i kinda forgot that the cube file was edited as well ^.^ makes sense now lol.
    part A of step 8 was present, however part B was not. here's to calling functions that exist! xD

    thanks skidude!

  10. #10

    Default

    Quote Originally Posted by skidude View Post
    Try replacing your NTItemlogger with this RAW OUTPUT 6A9ixcY1

    If u don't want the xml logging u don't have to use it. I don't use it on my bot
    Thank you this fixed my problem. But now in my item log i want to it show me literally every item that i sell/keep not just uniques. How do i do this.
    Also what is the fourth picture of? I want it to look like the first, second, or fourth picture. How do i open/get that?
    Last edited by EliMaxwell; 06-30-2010 at 10:05 AM.

  11. #11

    Default

    Quote Originally Posted by EliMaxwell View Post
    Thank you this fixed my problem. But now in my item log i want to it show me literally every item that i sell/keep not just uniques. How do i do this.
    Also what is the fourth picture of? I want it to look like the first, second, or fourth picture. How do i open/get that?
    Go into D2NT\scripts\logs find the .xml file with the date you would like to look at. Open it in FireFox. You can open it with Chrome but the hover function won't work. Internet explorer won't work.

    From there you can click the button "Show All" and you will see every item the bot sold and kept.

  12. #12

    Default

    Quote Originally Posted by lordrylen View Post
    Go into D2NT\scripts\logs find the .xml file with the date you would like to look at. Open it in FireFox. You can open it with Chrome but the hover function won't work. Internet explorer won't work.

    From there you can click the button "Show All" and you will see every item the bot sold and kept.
    Okay thanks for answering that question. But how can i make my d2nt manager item log show everything like the first two pictures.

  13. #13

    Default

    I am going to guess this line in your NTConfig for your character.

    NTConfig_LogSoldQuality = 7; // item quality to log for sold (7 = unique, this is only for d2nt manager, xml logs magic,rare,etc)

    Change the 7 to something else...not sure what though.

  14. #14

    Default

    Yeah thats what i thought also, i changed it to 1 thinking 1 would be the lowest and it didnt work so i decided to ask here :)

  15. #15

    Default

    4 just showed me a charm the bot sold...

    It would seem that setting it to 4 shows magic items...
    Last edited by lordrylen; 06-30-2010 at 02:32 PM.

  16. #16

    Default

    is it possible to put multiple numbers for magic/rare/unique?

  17. #17

    Default

    I've tried adding multiple NTConfig_LogSoldQuality lines.
    I've tried NTConfig_LogSoldQuality = (4 || 6 || 7);

    But no luck.

    There has got to be a way.

  18. #18

    Default

    Guess we just have to wait for the guy that started this thread. He may know.

  19. #19

    Default

    figured I'd help :
    Quote Originally Posted by bigapple90
    i rewrote guide and am planning to add this part: To change the number/quality of items to log sold in the d2nt manager:

    Open NTTown, change :
    Code:
    if(_newitem.quality == NTConfig_LogSoldItems)
    to this:

    Code:
    for(var r = 0; r < NTConfig_LogSoldItems.length; r++)
                            if(_newitem.quality == NTConfig_LogSoldItems[r])
    Now open NTTownManager, do this twice, change:
    Code:
    if(_items[i].quality == NTConfig_LogSoldItems)
    to this:
    Code:
    for(var r = 0; r < NTConfig_LogSoldItems.length; r++)
                         if(_items[i].quality == NTConfig_LogSoldItems[r])
    Now open your char configs and change
    NTConfig_LogSoldItems = X;
    to an array, like so:
    NTConfig_LogSoldItems = [4,5,6,7]; // 4= magic, 5 = set, 6 = rare, 7 = unique
    4,5,6,7 will log magic,set,rare and unique, you can change it to something like 6,7 to only log rare and unique
    (this is to show what sold items are logged in the d2nt manager, the xml already logs magic+)

    --
    i also plan to update to add xml logging for cubed items
    Note: the lines might be
    NTConfig_LogSoldItems
    or something like
    NTConfig_LogSoldQuality

  20. #20
    Super hacker skidude's Avatar
    Join Date
    Aug 2004
    Location
    greece
    Posts
    5,160

    Default

    whoot glad u joined up bigapple ^.^

Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. D2NT Need help adding an item to loot
    By zan45 in forum Hacks Bots and Editors
    Replies: 1
    Last Post: 05-05-2010, 12:38 AM
  2. D2NT Item Log ~
    By dwrhunter in forum Hacks Bots and Editors
    Replies: 1
    Last Post: 04-17-2010, 01:32 PM
  3. Checking your avatar without logging in
    By DarkDemon in forum Tech Forum
    Replies: 0
    Last Post: 07-12-2006, 11:06 AM
  4. Please Help Problem With Logging In
    By MarcRR96 in forum Diablo II Discussion
    Replies: 9
    Last Post: 12-15-2005, 07:56 AM
  5. Hlp with logging onto my bnet account!
    By slimyizzy in forum Diablo II Discussion
    Replies: 8
    Last Post: 04-22-2005, 05:34 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •