kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
346 stars 334 forks source link

Kolbot Logs - ItemLog - Add area and dropper mob info for items #3150

Open ilGaru opened 2 years ago

ilGaru commented 2 years ago

Hi, is it possible to add to the log file for dropped items informations about the area where the item dropped and the enemy who dropped it? Like "[Date Time] <Chaos Sanctuary - Diablo> (unique) ......"

cezars commented 2 years ago

This is a great idea, any know how to ?

gtoilet commented 2 years ago

it already does state where it was found ... im sure you could add a time grab on the s/s not sure about the enemy tho but hey look in the town.js ctrl+f .... kept start modding those kept lines as those referr to what is kept from the nip

cezars commented 2 years ago

Here need to define mob ? (i think it can`t be define if there lats of mobs on the area and u use hammer or light soso)

` Misc.itemLogger("Kept", item); Misc.logItem("Kept", item, result.line);

                    break;
                case -1: // unidentified
                    break;
                case 2: // cubing
                    Misc.itemLogger("Kept", item, "Cubing-Town");
                    Cubing.update();

                    break;
                case 3: // runeword (doesn't trigger normally)
                    break;
                case 5: // Crafting System
                    Misc.itemLogger("Kept", item, "CraftSys-Town");
                    CraftingSystem.update(item);

                    break;
                default:
                    Misc.itemLogger("Sold", item);
                    item.sell();

`

gtoilet commented 2 years ago

i know somewhere it defineds what monster when you chicken from game grab that code and slap it in somehow into the data on how it defines kept itmes snapshot

DarkHorseDre commented 2 years ago

I modified my misc.js to output a file (itemLogKept.txt) for only kept files (So I could query it via dropbox when at work and only see files that matched the pickit).

The following allows me to see the difficulty, profile, location etc. You can adapt the code to your needs:

if (desc2) {
    this.fileAction("logs/ItemLogKept.txt", 2, dateString + " - Diff: " + me.diff + " - Location: " + lastArea +" <" + me.profile + "> <" + action + "> (" + Pickit.itemQualityToName(unit.quality) + ") " + desc2 + (text ? " {" + text + "}" : "") + "\n");
        }

Also note my dates string includes the full date and time in international date format (i.e. each line starts 20211027 - 14:00:02) but I think this was added to Kolbot shortly after anyway. example line from my file: [2020/06/04 14:57:38] - Diff: 1 - Location: Catacombs Level 4 <SorcSontoo> <Kept> (unique) Cost: 6808 (49) | The Stone of Jordan | Ring | Required Level: 29 | +1 to All Skills | Adds 1-12 lightning damage | +20 to Mana | Increase Maximum Mana 25% As for name of mob which dropped the item - not sure the bot actually knows that? I don't think the item stores stats for the monster that dropped so the bot/game would have to monitor drops per mob, and I don't think Kolbot does that and not sure if it is possible in d2?..

cezars commented 2 years ago

i think there is a way to combine mob life chicken with item logs like gtoilet said. But we don`t know how :)