|
在测试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];
}
},
|
|