战网中国

标题: 请教高手,帮忙看个kolbot autobiuld的问题。 [打印本页]

作者: 小渔    时间: 2016-10-28 10:37
标题: 请教高手,帮忙看个kolbot autobiuld的问题。
在测试kolbot autobiuld,遇到个问题,比如我每次从新启动后,它总是从4:邪恶巢穴杀尸体发火开始,不论它级别是否高过4级了。
但它又不执行开头的Scripts.ClearAnyArea = true;Config.ClearAnyArea.AreaList = [2];语句。纳闷!
请问:如何在程序开头设置检测自己等级,然后执行相应等级对应的字段呢?
//        /d2bs/kolbot/libs/Builds/Sorceress.ExampleBuild.js

/**
*
* Instructions:        See /d2bs/kolbot/libs/config/Builds/README.txt
*
* Skill IDs:        See /d2bs/kolbot/sdk/skills.txt for a list of skill IDs.
*
* Stat IDs:
*
*         Strength        = 0
*         Energy        = 1
*         Dexterity        = 2
*         Vitality        = 3
*
*/
js_strict(true);

if (!isIncluded("common/Cubing.js")) { include("common/Cubing.js"); };
if (!isIncluded("common/Prototypes.js")) { include("common/Prototypes.js"); };
if (!isIncluded("common/Runewords.js")) { include("common/Runewords.js"); };

var AutoBuildTemplate = {

        1:        {       
                        //SkillPoints: [-1],                                                                                        // This doesn't matter. We don't have skill points to spend at lvl 1
                        //StatPoints: [-1,-1,-1,-1,-1],                                                                // This doesn't matter. We don't have stat points to spend at lvl 1
                        Update: function () {
                       
                                Scripts.ClearAnyArea = true;                                                        // We are only level 1 so we will start by clearing Blood Moor
                                        Config.ClearAnyArea.AreaList = [2];
                                Config.ClearType = 0;                                                                         // Monster spectype to kill in level clear scripts (0 = all)
                               
                                Config.PickitFiles.push("jiandan.nip");                                // File "level/1.nip" is not included, it's just an example.
                               
                                Config.OpenChests                = true;                                                 // Open chests. Controls key buying.
                                Config.LogExperience        = false;                                                 // Print experience statistics in the manager.
                                Config.StashGold                 = 200;                                                        // Minimum amount of gold to stash.
                                Config.AttackSkill                = [0, 36, -1, 36, 36, 0, 0];        // At level 1 we start with a +1 Fire Bolt staff
                                Config.LowManaSkill                = [0, 0];
                                Config.PublicMode                = 1;
                                Config.ScanShrines                = [15, 13, 12, 14, 7, 6, 2];       
                                Config.BeltColumn                = ["hp", "hp", "hp", "mp"];                // Keep tons of health potions!
                        }
                },
               
        2:        {
                        SkillPoints: [39],                                                                                         // 039 Icebolt:冰弹 + 1
                        StatPoints: [0, 3, 3, 3, 3],                                                                // Strength + 1 , Vitality + 4
                        Update: function () {
                                // Config.PickitFiles.splice(Config.PickitFiles.indexOf("level/1.nip"), 1);        // Will remove index "level/1.nip" from Config.PickitFiles
                                // Config.PickitFiles.push("level/2.nip");
                                Config.BeltColumn = ["hp", "hp", "mp", "mp"];
                                Config.MinColumn = [1, 1, 1, 1];
                        }
                },
               
        3:        {
                        SkillPoints: [40],                                                                                 // 040 Frozen Armor:冰封装甲 + 1
                        StatPoints: [0, 0, 3, 3, 3],                                                        // Strength + 2 , Vitality + 3
                        Update: function () {
                                Config.AttackSkill = [39, 36, -1, 36, 0, 0, 0];                // Ice Bolt and Fire Bolt
                        }
                },
               
        4:        {
                        SkillPoints: [37],                                                                                        // Warmth + 1
                        StatPoints: [0, 0, 0, 3, 3],                                                        // Strength + 3 , Vitality + 2
                        Update: function () {
                                Scripts.Corpsefire = true;                                                        // Lets try Corpsefire now that we're level 4
                                        Config.Corpsefire.ClearDen = true;
                               
                                Scripts.ClearAnyArea = false;                                                // Don't want to clear Blood Moor anymore (See lvl 1 above)
                                        Config.ClearAnyArea.AreaList = [];
                               
                                Config.BeltColumn = ["hp", "hp", "mp", "rv"];                 // Start keeping rejuvs since we have +1 Warmth
                                Config.MinColumn        = [1, 1, 1, 0];
                        }
                },

        5:        {
                        SkillPoints: [0],                                                                                        // 不加
                        StatPoints: [0, 0, 0, 0, 3],                                                        // Strength + 4 , Vitality + 1
                        Update: function () {
                               
                                Scripts.ClearAnyArea = true;                                                // Now we'll try enabling it again Cold Plains and Stony Field
                                        Config.ClearAnyArea.AreaList = [3, 4];                                
                               
                                Config.ScanShrines        = [15, 13, 12];
                                Config.AttackSkill         = [39, 36, -1, 38, 0, 39, 0];        // All the bolts!
                        }
                },

        6:        {
                        SkillPoints: [45],                                                                                        // 045 Ice Blast:冰风暴 + 1
                        StatPoints: [0, 0, 3, 3, 2],                                                        // Strength + 2 , Vitality + 2, Dexterity + 1
                        Update: function () {
                                Config.AttackSkill = [39, 36, -1, 36, 0, 38, 0];        // All the bolts!
                        }
                },

        7:        {
                        SkillPoints: [44],                                                                                        // 044 Frost Nova:霜之新星 +1
                        StatPoints: [3, 3, 3, 3, 3],
                        Update: function () {
                                Config.AttackSkill = [39, 36, -1, 36, 0, 38, 0];
                                Config.LowManaSkill = [0,0];
                        }
                },

        8:        {
                        SkillPoints: [-1],
                        StatPoints: [-1,-1,-1,-1,-1],
                        Update: function () {
                                Config.AttackSkill = [39, 36, -1, 36, 0, 38, 0];
                                Config.LowManaSkill = [0,0];
                        }
                },

        9:        {
                        SkillPoints: [-1],
                        StatPoints: [-1,-1,-1,-1,-1],
                        Update: function () {
                                Config.AttackSkill = [39, 36, -1, 36, 0, 38, 0];
                                Config.LowManaSkill = [0,0];
                        }
                },


作者: 小渔    时间: 2016-10-28 10:40
我现在用一个sor做leader,一个nec follow,nec因为有召唤骷髅帮手,比较顺,sor打一下闪一下,效率不高。
作者: 小渔    时间: 2016-10-28 11:34
哪位能告诉我怎么检测自己的等级,我用swich(me.lever) case break,不行啊,它还是去巢穴。
作者: 小渔    时间: 2016-10-28 11:34
哪位能告诉我怎么检测自己的等级,我用swich(me.level) case break,不行啊,它还是去巢穴。
作者: x2931106    时间: 2016-10-28 13:46
直接於等級標籤//停用試試?
作者: rs6810    时间: 2016-10-28 14:30
你的char運行什麼腳本
作者: 小渔    时间: 2016-10-28 14:41
x2931106 发表于 2016-10-28 13:46
直接於等級標籤//停用試試?

这个我用false可以,可我奇怪他怎么不会按照自己等级判断执行。
作者: 小渔    时间: 2016-10-28 14:51
rs6810 发表于 2016-10-28 14:30
你的char運行什麼腳本

char运行D2BotLead或D2BotFollow都可以,关键是人物的配置文件里,
// AutoBuild System ( See /d2bs/kolbot/libs/config/Builds/README.txt for instructions )
        Config.AutoBuild.Enabled = true;                        //        This will enable or disable the AutoBuild system
       
        Config.AutoBuild.Template = "xxxx";        //        The name of the build associated with an existing
                                                                                                //        template filename located in libs/config/Builds/

        Config.AutoBuild.Verbose = true;                        //        Allows script to print messages in console
        Config.AutoBuild.DebugMode = true;                        //        Debug mode prints a little more information to console and
                                                                                                //        logs activity to /logs/AutoBuild.CharacterName._MM_DD_YYYY.log
                                                                                                //        It automatically enables Config.AutoBuild.Verbose
Config.AutoBuild.Enabled = true;这里设置为true。然后
Config.AutoBuild.Template = "xxxx";这里设置执行在d2bs\kolbot\libs\config\Builds里设置好的Class.xxxx.js文件。重点设置Class.xxxx.js,上面贴的内容只是一部分。
作者: rs6810    时间: 2016-10-28 14:57
本帖最后由 rs6810 于 2016-10-28 15:05 编辑
小渔 发表于 2016-10-28 14:51
char运行D2BotLead或D2BotFollow都可以,关键是人物的配置文件里,
// AutoBuild System ( See /d2bs/kol ...

原作的 autobiuld 功能未完成只是測試版
所以你光改人物的配置文件改到天荒地老效率還是差

免費堪用版網址如下
http://www.blizzhackers.cc/viewtopic.php?f=209&t=499016



作者: x2931106    时间: 2016-10-28 14:59
我所指的註釋掉的意思是

如1等不再執行    //1:

附設的說明也是這樣說的 ˋ試試看吧  
作者: 小渔    时间: 2016-10-28 15:14
rs6810 发表于 2016-10-28 14:57
原作的 autobiuld 功能未完成只是測試版
所以你光改人物的配置文件改到天荒地老效率還是差

哦,非常感谢!我学习下,试一试。好人谢谢!
作者: 小渔    时间: 2016-10-28 15:15
x2931106 发表于 2016-10-28 14:59
我所指的註釋掉的意思是

如1等不再執行    //1:

这个我知道,只是不想每次都改,谢谢!我在试试。
作者: x2931106    时间: 2016-10-28 15:19
每次都改?  請複製多一分原始稿  就不需要每次都改
作者: 小渔    时间: 2016-10-28 15:28
哦,不是,我是说测试是经常中断,重启,每次级别会不一样,那每次重启前就要注释掉前面已清场过的场景。
作者: 小渔    时间: 2016-10-28 15:28
哦,不是,我是说测试是经常中断,重启,每次级别会不一样,那每次重启前就要注释掉前面已清场过的场景。
作者: far    时间: 2016-10-30 16:01
帮你顶起来
作者: shaylin3    时间: 2016-11-17 14:31
學習~




欢迎光临 战网中国 (http://battlecn.net/) Powered by Discuz! X3.1