Advertisement
gtoilet

config

Jan 19th, 2021
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.30 KB | None | 0 0
  1. /**
  2. * @filename Config.js
  3. * @author kolton
  4. * @desc config loading and default config values storage
  5. */
  6.  
  7. var Scripts = {};
  8.  
  9. var Config = {
  10. init: function (notify) {
  11. var i, n,
  12. configFilename = "",
  13. classes = ["Amazon", "Sorceress", "Necromancer", "Paladin", "Barbarian", "Druid", "Assassin"];
  14.  
  15. for (i = 0; i < 5; i += 1) {
  16. switch (i) {
  17. case 0: // Custom config
  18. if (!isIncluded("config/_customconfig.js")) {
  19. include("config/_customconfig.js");
  20. }
  21.  
  22. for (n in CustomConfig) {
  23. if (CustomConfig.hasOwnProperty(n)) {
  24. if (CustomConfig[n].indexOf(me.profile) > -1) {
  25. if (notify) {
  26. print("ÿc2Loading custom config: ÿc9" + n + ".js");
  27. }
  28.  
  29. configFilename = n + ".js";
  30.  
  31. break;
  32. }
  33. }
  34. }
  35.  
  36. break;
  37. case 1:// Class.Profile.js
  38. configFilename = classes[me.classid] + "." + me.profile + ".js";
  39.  
  40. break;
  41. case 2: // Realm.Class.Charname.js
  42. configFilename = me.realm + "." + classes[me.classid] + "." + me.charname + ".js";
  43.  
  44. break;
  45. case 3: // Class.Charname.js
  46. configFilename = classes[me.classid] + "." + me.charname + ".js";
  47.  
  48. break;
  49. case 4: // Profile.js
  50. configFilename = me.profile + ".js";
  51.  
  52. break;
  53. }
  54.  
  55. if (configFilename && FileTools.exists("libs/config/" + configFilename)) {
  56. break;
  57. }
  58. }
  59.  
  60. if (FileTools.exists("libs/config/" + configFilename)) {
  61. try {
  62. if (!include("config/" + configFilename)) {
  63. throw new Error();
  64. }
  65. } catch (e1) {
  66. throw new Error("Failed to load character config.");
  67. }
  68. } else {
  69. if (notify) {
  70. print("ÿc1" + classes[me.classid] + "." + me.charname + ".js not found!"); // Use the primary format
  71. print("ÿc1Loading default config.");
  72. }
  73.  
  74. // Try to find default config
  75. if (!FileTools.exists("libs/config/" + classes[me.classid] + ".js")) {
  76. D2Bot.printToConsole("Not going well? Read the guides: https://github.com/blizzhackers/documentation");
  77. throw new Error("ÿc1Default config not found. \nÿc9 Try reading the kolbot guides.");
  78. }
  79.  
  80. try {
  81. if (!include("config/" + classes[me.classid] + ".js")) {
  82. throw new Error();
  83. }
  84. } catch (e) {
  85. throw new Error("ÿc1Failed to load default config.");
  86. }
  87. }
  88.  
  89. try {
  90. LoadConfig.call();
  91. } catch (e2) {
  92. if (notify) {
  93. print("ÿc8Error in " + e2.fileName.substring(e2.fileName.lastIndexOf("\\") + 1, e2.fileName.length) + "(line " + e2.lineNumber + "): " + e2.message);
  94.  
  95. throw new Error("Config.init: Error in character config.");
  96. }
  97. }
  98.  
  99. if (Config.Silence && !Config.LocalChat.Enabled) {
  100. // Override the say function with print, so it just gets printed to console
  101. global._say = global.say;
  102. global.say = (what) => print('Tryed to say: '+what);
  103. }
  104.  
  105. try {
  106. if (Config.AutoBuild.Enabled === true && !isIncluded("common/AutoBuild.js") && include("common/AutoBuild.js")) {
  107. AutoBuild.initialize();
  108. }
  109. } catch (e3) {
  110. print("ÿc8Error in libs/common/AutoBuild.js (AutoBuild system is not active!)");
  111. print(e3.toSource());
  112. }
  113. },
  114.  
  115. // Time
  116. StartDelay: 0,
  117. PickDelay: 0,
  118. AreaDelay: 0,
  119. MinGameTime: 0,
  120. MaxGameTime: 0,
  121.  
  122. // Healing and chicken
  123. LifeChicken: 0,
  124. ManaChicken: 0,
  125. UseHP: 0,
  126. UseMP: 0,
  127. UseRejuvHP: 0,
  128. UseRejuvMP: 0,
  129. UseMercHP: 0,
  130. UseMercRejuv: 0,
  131. MercChicken: 0,
  132. IronGolemChicken: 0,
  133. HealHP: 0,
  134. HealMP: 0,
  135. HealStatus: false,
  136. TownHP: 0,
  137. TownMP: 0,
  138.  
  139. // General
  140. AutoMap: false,
  141. LastMessage: "",
  142. UseMerc: false,
  143. MercWatch: false,
  144. LowGold: 0,
  145. StashGold: 0,
  146. FieldID: false,
  147. DroppedItemsAnnounce: {
  148. Enable: false,
  149. Quality: [],
  150. LogToOOG: false,
  151. OOGQuality: []
  152. },
  153. CainID: {
  154. Enable: false,
  155. MinGold: 0,
  156. MinUnids: 0
  157. },
  158. Inventory: [
  159. [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  160. [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  161. [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  162. [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  163. ],
  164. LocalChat: {
  165. Enabled: false,
  166. Toggle: false,
  167. Mode: 0
  168. },
  169. Silence: false,
  170. PublicMode: false,
  171. PartyAfterScript: false,
  172. Greetings: [],
  173. DeathMessages: [],
  174. Congratulations: [],
  175. ShitList: false,
  176. UnpartyShitlisted: false,
  177. Leader: "",
  178. QuitList: [],
  179. QuitListMode: 0,
  180. QuitListDelay: [],
  181. HPBuffer: 0,
  182. MPBuffer: 0,
  183. RejuvBuffer: 0,
  184. PickRange: 40,
  185. MakeRoom: true,
  186. ClearInvOnStart: true,
  187. FastPick: false,
  188. ManualPlayPick: false,
  189. OpenChests: false,
  190. PickitFiles: [],
  191. BeltColumn: [],
  192. MinColumn: [],
  193. SkipEnchant: [],
  194. SkipImmune: [],
  195. SkipAura: [],
  196. SkipException: [],
  197. ScanShrines: [],
  198. Debug: false,
  199.  
  200. AutoMule: {
  201. Trigger: [],
  202. Force: [],
  203. Exclude: []
  204. },
  205.  
  206. ItemInfo: false,
  207. ItemInfoQuality: [],
  208.  
  209. LogKeys: false,
  210. LogOrgans: true,
  211. LogLowRunes: false,
  212. LogMiddleRunes: false,
  213. LogHighRunes: true,
  214. LogLowGems: false,
  215. LogHighGems: false,
  216. SkipLogging: [],
  217. ShowCubingInfo: true,
  218.  
  219. Cubing: false,
  220. CubeRepair: false,
  221. RepairPercent: 40,
  222. Recipes: [],
  223. MakeRunewords: false,
  224. Runewords: [],
  225. KeepRunewords: [],
  226. Gamble: false,
  227. GambleItems: [],
  228. GambleGoldStart: 0,
  229. GambleGoldStop: 0,
  230. MiniShopBot: false,
  231. TeleSwitch: false,
  232. MFSwitchPercent: 0,
  233. PrimarySlot: -1,
  234. LogExperience: false,
  235. TownCheck: false,
  236. PingQuit: [{Ping: 0, Duration: 0}],
  237. PacketShopping: false,
  238.  
  239. // Fastmod
  240. FCR: 0,
  241. FHR: 0,
  242. FBR: 0,
  243. IAS: 0,
  244. PacketCasting: 0,
  245. WaypointMenu: true,
  246.  
  247. // Anti-hostile
  248. AntiHostile: false,
  249. RandomPrecast: false,
  250. HostileAction: 0,
  251. TownOnHostile: false,
  252. ViperCheck: false,
  253.  
  254. // DClone
  255. StopOnDClone: false,
  256. SoJWaitTime: 0,
  257. KillDclone: false,
  258. DCloneQuit: false,
  259.  
  260. // Experimental
  261. FastParty: false,
  262. AutoEquip: false,
  263.  
  264. // GameData
  265. ChampionBias: 60,
  266.  
  267. // Attack specific
  268. Dodge: false,
  269. DodgeRange: 15,
  270. DodgeHP: 100,
  271. AttackSkill: [],
  272. LowManaSkill: [],
  273. CustomAttack: {},
  274. TeleStomp: false,
  275. NoTele: false,
  276. ClearType: false,
  277. ClearPath: false,
  278. BossPriority: false,
  279. MaxAttackCount: 300,
  280.  
  281. // Amazon specific
  282. LightningFuryDelay: 0,
  283. SummonValkyrie: false,
  284.  
  285. // Sorceress specific
  286. UseTelekinesis: false,
  287. CastStatic: false,
  288. StaticList: [],
  289.  
  290. // Necromancer specific
  291. Golem: 0,
  292. ActiveSummon: false,
  293. Skeletons: 0,
  294. SkeletonMages: 0,
  295. Revives: 0,
  296. ReviveUnstackable: false,
  297. PoisonNovaDelay: 2000,
  298. Curse: [],
  299. ExplodeCorpses: 0,
  300.  
  301. // Paladin speficic
  302. Redemption: [0, 0],
  303. Charge: false,
  304. Vigor: false,
  305. AvoidDolls: false,
  306.  
  307. // Barbarian specific
  308. FindItem: false,
  309. FindItemSwitch: false,
  310. FindPotion: false,
  311. FindPotionSwitch: false,
  312.  
  313. // Druid specific
  314. Wereform: 0,
  315. SummonRaven: 0,
  316. SummonAnimal: 0,
  317. SummonVine: 0,
  318. SummonSpirit: 0,
  319.  
  320. // Assassin specific
  321. UseTraps: false,
  322. Traps: [],
  323. BossTraps: [],
  324. UseFade: false,
  325. UseBoS: false,
  326. UseVenom: false,
  327. UseCloakofShadows: false,
  328. AggressiveCloak: false,
  329. SummonShadow: false,
  330.  
  331. // Custom Attack
  332. CustomClassAttack: '', // If set it loads common/Attack/[CustomClassAttack].js
  333.  
  334. // Script specific
  335. MFLeader: false,
  336. Mausoleum: {
  337. KillBloodRaven: false,
  338. ClearCrypt: false
  339. },
  340. Eldritch: {
  341. OpenChest: false,
  342. KillSharptooth: false,
  343. KillShenk: false,
  344. KillDacFarren: false
  345. },
  346. Pindleskin: {
  347. UseWaypoint: false,
  348. KillNihlathak: false,
  349. ViperQuit: false
  350. },
  351. Nihlathak: {
  352. ViperQuit: false
  353. },
  354. Pit: {
  355. ClearPath: false,
  356. ClearPit1: false
  357. },
  358. Snapchip: {
  359. ClearIcyCellar: false
  360. },
  361. Frozenstein: {
  362. ClearFrozenRiver: false
  363. },
  364. Rakanishu: {
  365. KillGriswold: false
  366. },
  367. AutoBaal: {
  368. Leader: "",
  369. FindShrine: false,
  370. LeechSpot: [15115, 5050],
  371. LongRangeSupport: false
  372. },
  373. KurastChests: {
  374. LowerKurast: false,
  375. Bazaar: false,
  376. Sewers1: false,
  377. Sewers2: false
  378. },
  379. Countess: {
  380. KillGhosts: false
  381. },
  382. Baal: {
  383. DollQuit: false,
  384. SoulQuit: false,
  385. KillBaal: false,
  386. HotTPMessage: "Hot TP!",
  387. SafeTPMessage: "Safe TP!",
  388. BaalMessage: "Baal!"
  389. },
  390. BaalAssistant: {
  391. KillNihlathak: false,
  392. FastChaos: false,
  393. Wait: 120,
  394. Helper: false,
  395. GetShrine: false,
  396. GetShrineWaitForHotTP: false,
  397. DollQuit: false,
  398. SoulQuit: false,
  399. SkipTP: false,
  400. WaitForSafeTP: false,
  401. KillBaal: false,
  402. HotTPMessage: [],
  403. SafeTPMessage: [],
  404. BaalMessage: [],
  405. NextGameMessage: []
  406. },
  407. BaalHelper: {
  408. Wait: 120,
  409. KillNihlathak: false,
  410. FastChaos: false,
  411. DollQuit: false,
  412. KillBaal: false,
  413. SkipTP: false
  414. },
  415. Corpsefire: {
  416. ClearDen: false
  417. },
  418. Hephasto: {
  419. ClearRiver: false,
  420. ClearType: false
  421. },
  422. Diablo: {
  423. Entrance: false,
  424. SealWarning: "Leave the seals alone!",
  425. EntranceTP: "Entrance TP up",
  426. StarTP: "Star TP up",
  427. DiabloMsg: "Diablo",
  428. WalkClear: false,
  429. SealOrder: ["vizier", "seis", "infector"]
  430. },
  431. DiabloHelper: {
  432. Wait: 120,
  433. Entrance: false,
  434. SkipIfBaal: false,
  435. SkipTP: false,
  436. OpenSeals: false,
  437. SafePrecast: true,
  438. SealOrder: ["vizier", "seis", "infector"],
  439. RecheckSeals: false
  440. },
  441. MFHelper: {
  442. BreakClearLevel: false
  443. },
  444. Wakka: {
  445. Wait: 1
  446. },
  447. BattleOrders: {
  448. Mode: 0,
  449. Getters: [],
  450. Idle: false,
  451. QuitOnFailure: false,
  452. SkipIfTardy: true,
  453. Wait: 10
  454. },
  455. BoBarbHelper: {
  456. Mode: -1,
  457. Wp: 35
  458. },
  459. Enchant: {
  460. Triggers: ["chant", "cows", "wps"],
  461. GetLeg: false,
  462. AutoChant: false,
  463. GameLength: 20
  464. },
  465. IPHunter: {
  466. IPList: [],
  467. GameLength: 3
  468. },
  469. Follower: {
  470. Leader: ""
  471. },
  472. Mephisto: {
  473. MoatTrick: false,
  474. KillCouncil: false,
  475. TakeRedPortal: false
  476. },
  477. AndarielHelper: {
  478. Wait: 120,
  479. KillNihlathak: false,
  480. FastChaos: false,
  481. DollQuit: false,
  482. KillBaal: false,
  483. SkipTP: false
  484. },
  485. RadamentHelper: {
  486. Wait: 120,
  487. KillNihlathak: false,
  488. FastChaos: false,
  489. DollQuit: false,
  490. KillBaal: false,
  491. SkipTP: false
  492. },
  493. DurielHelper: {
  494. Wait: 120,
  495. KillNihlathak: false,
  496. FastChaos: false,
  497. DollQuit: false,
  498. KillBaal: false,
  499. SkipTP: false
  500. },
  501. MephistoHelper: {
  502. Wait: 120,
  503. KillNihlathak: false,
  504. FastChaos: false,
  505. DollQuit: false,
  506. KillBaal: false,
  507. SkipTP: false
  508. },
  509. IzualHelper: {
  510. Wait: 120,
  511. KillNihlathak: false,
  512. FastChaos: false,
  513. DollQuit: false,
  514. KillBaal: false,
  515. SkipTP: false
  516. },
  517. ShopBot: {
  518. ScanIDs: [],
  519. ShopNPC: "anya",
  520. CycleDelay: 0,
  521. QuitOnMatch: false
  522. },
  523. Coldworm: {
  524. KillBeetleburst: false,
  525. ClearMaggotLair: false
  526. },
  527. Summoner: {
  528. FireEye: false
  529. },
  530. AncientTunnels: {
  531. OpenChest: false,
  532. KillDarkElder: false
  533. },
  534. OrgTorch: {
  535. WaitForKeys: false,
  536. WaitTimeout: false,
  537. UseSalvation: false,
  538. GetFade: false,
  539. MakeTorch: true,
  540. AntidotesToChug: 0
  541. },
  542. Synch: {
  543. WaitFor: []
  544. },
  545. TristramLeech: {
  546. Leader: "",
  547. Wait: 120
  548. },
  549. TravincalLeech: {
  550. Leader: "",
  551. Helper: false,
  552. Wait: 120
  553. },
  554. Tristram: {
  555. PortalLeech: false,
  556. WalkClear: false
  557. },
  558. Travincal: {
  559. PortalLeech: false
  560. },
  561. SkillStat: {
  562. Skills: []
  563. },
  564. Bonesaw: {
  565. ClearDrifterCavern: false
  566. },
  567. ChestMania: {
  568. Act1: [],
  569. Act2: [],
  570. Act3: [],
  571. Act4: [],
  572. Act5: []
  573. },
  574. ClearAnyArea: {
  575. AreaList: []
  576. },
  577. Rusher: {
  578. WaitPlayerCount: 0,
  579. Radament: false,
  580. LamEsen: false,
  581. Izual: false,
  582. Shenk: false,
  583. Anya: false,
  584. LastRun: ""
  585. },
  586. Rushee: {
  587. Quester: false,
  588. Bumper: false
  589. },
  590. AutoSkill: {
  591. Enabled: false,
  592. Build: [],
  593. Save: 0
  594. },
  595. AutoStat: {
  596. Enabled: false,
  597. Build: [],
  598. Save: 0,
  599. BlockChance: 0,
  600. UseBulk: true
  601. },
  602. AutoBuild: {
  603. Enabled: false,
  604. Template: "",
  605. Verbose: false,
  606. DebugMode: false
  607. }
  608. };
  609.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement