kolton / d2bot-with-kolbot

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

Autobot wont use mana pots #1978

Closed thecoltster1 closed 5 years ago

thecoltster1 commented 5 years ago

I have an issue where my autobot wont use my settings for potions. I have the config setup like this,

/* Potion types for belt columns from left to right.
     * Rejuvenation potions must always be rightmost.
     * Supported potions - Healing ("hp"), Mana ("mp") and Rejuvenation ("rv")
     */
    Config.BeltColumn[0] = "hp";
    Config.BeltColumn[1] = "hp";
    Config.BeltColumn[2] = "mp";
    Config.BeltColumn[3] = "rv";
    /* Minimum amount of potions. If we have less, go to vendor to purchase more.
     * Set rejuvenation columns to 0, because they can't be bought.
     */
    Config.MinColumn[0] = 3;
    Config.MinColumn[1] = 3;
    Config.MinColumn[2] = 0;
    Config.MinColumn[3] = 2;

And like this in the \builds\Paladin.Hammerdin.js

`var AutoBuildTemplate={

1:  {
        Update: function(){
            Config.PickitFiles.push("LateGame.nip");
            Config.PickitFiles.push("MidGame.nip");
            Config.PickitFiles.push("EarlyGame.nip");
            Config.PickitFiles.push("HammerdinRunes.nip");
            Config.PickitFiles.push("AutoEquip/Hammerdin.xpac.nip");
            Config.PickitFiles.push("AutoEquip/PreMerc.xpac.nip");
            Config.PickitFiles.push("AutoEquip/Merc.xpac.nip");
            Config.Inventory[0]=[1,1,1,1,1,1,1,1,1,1];
            Config.Inventory[1]=[1,1,1,1,1,1,1,1,1,1];
            Config.Inventory[2]=[1,1,1,1,1,1,1,1,1,1];
            Config.Inventory[3]=[1,1,1,1,1,1,1,1,1,1];
            Config.AutoEquip=true;
            Config.OpenChests=false;
            Config.ClearType=0;//Monster spectype to kill in level clear scripts(0=all)
            Config.LogExperience=true;//Print experience statistics in the manager.
            Config.StashGold=200;//Minimum amount of gold to stash.
            Config.AttackSkill=[0,0,0,0,0,0,0];
            Config.LowManaSkill=[0,0];
            Config.PublicMode=2;
            Config.ScanShrines=[17,1,2,15,6,7,12,14 ,8,9,10,11];
            Config.BeltColumn=["hp","hp","mp","rv"]; //Keep tons of health potions!
            Config.MinColumn=[2,2,2,2];
            Config.HealHP=99;
            Config.HealMP=99;
            Config.LifeChicken=30;
            Config.ManaChicken=0;
            Config.MercChicken=0;
            Config.UseHP=50;
            Config.UseMP=3;
            Config.UseRejuvHP=35;
            Config.PickRange=60;
            Config.BossPriority=false;
            Config.Leader="Zer_Shout";
            Scripts.LevelLeader=true;
            Scripts.LevelFollower=false;
        }
    },`

For some reason he only picks up 3 health potions and a rejuvenation potion. So right now for some reason the bot thinks his belt is Config.BeltColumn=["hp","hp","hp","rv"];? Trying to figure out where my problem is located. Thanks.

Jestah66 commented 5 years ago

Rejuves should always be 0 because you can't buy them. You have zero in the mp column, it won't buy anything like that. Mine:

Config.BeltColumn[0] = "hp";
Config.BeltColumn[1] = "mp";
Config.BeltColumn[2] = "mp";
Config.BeltColumn[3] = "rv";

/* Minimum amount of potions. If we have less, go to vendor to purchase more.
 * Set rejuvenation columns to 0, because they can't be bought.
 */
Config.MinColumn[0] = 4;
Config.MinColumn[1] = 4;
Config.MinColumn[2] = 4;
Config.MinColumn[3] = 0;
thecoltster1 commented 5 years ago

I changed the config to the settings you provided but he still grabs 3 rows of health potions and leaves a row for rejuves. I changed it to the code you provided in both the config and the Paladin.Hammerdin.js in the Builds directory.

thecoltster1 commented 5 years ago

I found it, it was in the Paladin.Hammerdin.js line 279.

    21:     {
            SkillPoints: [112,113],
            StatPoints: [0,2,3,3,3],
            Update: function(){
                Config.BeltColumn=["hp","hp","mp","rv"];
            }
        },