Cookie clicker tools

Cookie clicker tools (visual)

目前为 2018-12-07 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Cookie clicker tools
  3. // @namespace orteil.dashnet.org
  4. // @version 2.180
  5. // @description Cookie clicker tools (visual)
  6. // @author Anton
  7. // @match http://orteil.dashnet.org/cookieclicker/*
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. var tAutoBuy, tPopGolden, tClickFrenzy, oldTitle = '',
  14. tPriority, tBankAuto, tAscendDetector, isClickingNow = false,
  15. tSeasonSwitcher, tDragon, tReloadPageOnWrongBuff, tAutoClickInterval = 75;
  16.  
  17. var _GameHelpers = {
  18. isHardcore: function () {
  19. return parseInt(Game.ascensionMode) === 1
  20. && !Game.HasAchiev('Hardcore')
  21. && Game.HasAchiev('True Neverclick');
  22. },
  23. isNeverclick: function () {
  24. return parseInt(Game.ascensionMode) === 1
  25. && !Game.HasAchiev('True Neverclick');
  26. },
  27. isAscend: function () {
  28. return parseInt(Game.OnAscend) === 1;
  29. },
  30. hasDragon: function () {
  31. return Game.Has('A crumbly egg');
  32. },
  33. getMilkMult: function() {
  34. var milkMult = 1;
  35. if (Game.Has('Santa\'s milk and cookies')) milkMult *= 1.05;
  36. if (Game.hasAura('Breath of Milk')) milkMult *= 1.05;
  37. milkMult *= Game.eff('milk');
  38. return milkMult;
  39. },
  40. getKittenPercentByUpgradeName: function(kName) {
  41. var milkMult = _GameHelpers.getMilkMult();
  42. if (kName === 'Kitten helpers') return Game.milkProgress*0.1*milkMult;
  43. if (kName === 'Kitten workers') return Game.milkProgress*0.125*milkMult;
  44. if (kName === 'Kitten engineers') return Game.milkProgress*0.15*milkMult;
  45. if (kName === 'Kitten overseers') return Game.milkProgress*0.175*milkMult;
  46. if (kName === 'Kitten managers') return Game.milkProgress*0.2*milkMult;
  47. if (kName === 'Kitten accountants') return Game.milkProgress*0.2*milkMult;
  48. if (kName === 'Kitten specialists') return Game.milkProgress*0.2*milkMult;
  49. if (kName === 'Kitten experts') return Game.milkProgress*0.2*milkMult;
  50. if (kName === 'Kitten consultants') return Game.milkProgress*0.2*milkMult;
  51. if (kName === 'Kitten assistants to the regional manager') return Game.milkProgress*0.175*milkMult;
  52. if (kName === 'Kitten marketeers') return Game.milkProgress*0.15*milkMult;
  53. if (kName === 'Kitten analysts') return Game.milkProgress*0.125*milkMult;
  54. if (kName === 'Kitten angels') return Game.milkProgress*0.1*milkMult;
  55. return 0;
  56. },
  57. getDragonAuraName: function (aura) {
  58. if (typeof Game.dragonAuras[aura] !== 'undefined') {
  59. return Game.dragonAuras[aura].name + " (" + Game.dragonAuras[aura].desc + ")";
  60. }
  61. return 'Unknown (' + aura + ')';
  62. },
  63. beautify: function(n, floats) {
  64. return n < 1 ? String(n) : Beautify(parseFloat(n), floats);
  65. },
  66. dragonHasAura2: function () {
  67. return Game.dragonLevel >= 21;
  68. }
  69. };
  70.  
  71. var _GameStat = {
  72. halloweenSeasonUpgrades: ['Skull cookies','Ghost cookies','Bat cookies','Slime cookies','Pumpkin cookies','Eyeball cookies','Spider cookies'],
  73. valentineUpgrades: ['Pure heart biscuits','Ardent heart biscuits','Sour heart biscuits','Weeping heart biscuits','Golden heart biscuits','Eternal heart biscuits'],
  74. christmasUpgrades: ['Christmas tree biscuits','Snowflake biscuits','Snowman biscuits','Holly biscuits','Candy cane biscuits','Bell biscuits','Present biscuits'],
  75. getBuffMult: function () {
  76. var buffMult = 1;
  77. for (var buff in Game.buffs) {
  78. if (Game.buffs[buff] !== 0 && typeof Game.buffs[buff].multCpS !== 'undefined') {
  79. buffMult = buffMult * Game.buffs[buff].multCpS;
  80. }
  81. }
  82. return buffMult <= 0 ? 1 : buffMult;
  83. },
  84. getNormalCookiesPs: function () {
  85. return Game.cookiesPs > 0 ? Game.cookiesPs / _GameStat.getBuffMult() : 1;
  86. },
  87. getMinimalMoney: function () {
  88. return Math.floor(_GameStat.getNormalCookiesPs() * 42100 * _BotSettings.options.bankStoragePercent / 100);
  89. },
  90. getMoneyCanSpend: function () {
  91. return Game.cookies - _GameStat.getMinimalMoney();
  92. },
  93. getWrinklerCount: function () {
  94. var wrinklersCount = 0;
  95. for (var i in Game.wrinklers) {
  96. if (Game.wrinklers[i].sucked > 0) {
  97. wrinklersCount++;
  98. }
  99. }
  100. return wrinklersCount;
  101. },
  102. getUpgradeListToUnlock: function() {
  103. var result = [];
  104. for (var x in Game.UnlockAt) {
  105. if (Game.UnlockAt.hasOwnProperty(x) &&
  106. Game.Upgrades.hasOwnProperty(Game.UnlockAt[x].name) &&
  107. Game.Upgrades[Game.UnlockAt[x].name].bought === 0)
  108. {
  109. result.push(Game.UnlockAt[x]);
  110. }
  111. }
  112.  
  113. for (x in _GameStat.halloweenSeasonUpgrades) {
  114. if (_GameStat.halloweenSeasonUpgrades.hasOwnProperty(x) &&
  115. Game.Upgrades[_GameStat.halloweenSeasonUpgrades[x]].bought === 0)
  116. {
  117. result.push({cookies:'',name:_GameStat.halloweenSeasonUpgrades[x],require:'Kill wrinkler',season:'halloween'});
  118. }
  119. }
  120.  
  121. for (x in Game.easterEggs) {
  122. if (Game.easterEggs.hasOwnProperty(x) &&
  123. Game.Upgrades[Game.easterEggs[x]].bought === 0)
  124. {
  125. result.push({cookies:'',name:Game.easterEggs[x],require:'Find egg',season:'easter'});
  126. }
  127. }
  128.  
  129. var lastValentineName = '';
  130. for (x in _GameStat.valentineUpgrades) {
  131. if (_GameStat.valentineUpgrades.hasOwnProperty(x) &&
  132. Game.Upgrades[_GameStat.valentineUpgrades[x]].bought === 0)
  133. {
  134. result.push({cookies:'',name:_GameStat.valentineUpgrades[x],require:lastValentineName,season:'valentines'});
  135. lastValentineName = _GameStat.valentineUpgrades[x];
  136. }
  137. }
  138.  
  139. for (x in _GameStat.christmasUpgrades) {
  140. if (_GameStat.christmasUpgrades.hasOwnProperty(x) &&
  141. Game.Upgrades[_GameStat.christmasUpgrades[x]].bought === 0)
  142. {
  143. result.push({cookies:Game.Upgrades[_GameStat.christmasUpgrades[x]].basePrice,name:_GameStat.christmasUpgrades[x],require:'Christmas',season:'christmas'});
  144. }
  145. }
  146.  
  147. return result;
  148. }
  149. };
  150.  
  151. var _BotStat = {
  152. getHistoryList: function() {
  153. var hist = [];
  154. hist.push('2.169 - added achievements Neverclick and Hardcore');
  155. hist.push('2.156 - lumps harvesting + achievement');
  156. hist.push('2.155 - fix some bugs with new version of the Game');
  157. hist.push('2.136 - buyAll function (it is a kind of cheat)');
  158. hist.push('2.128 - santa and dragon upgrades');
  159. hist.push('2.122 - season switcher');
  160. hist.push('2.118 - show season unlocks in "Need to unlock" table');
  161. hist.push('2.114 - option to disable auto clicking');
  162. hist.push('2.113 - info table "Achievements to unlock"');
  163. hist.push('2.112 - info table "Need to unlock"');
  164. hist.push('2.111 - option to buy infernal upgrades');
  165. hist.push('2.109 - kill all wrinklers button');
  166. hist.push('2.107 - click first 15 minutes after ascend');
  167. hist.push('2.101 - remove all bufs on negative multiplier (same as reload page)');
  168. hist.push('2.100 - Info section + ascend detector');
  169. hist.push('2.099 - mouse click upgrades');
  170. hist.push('2.097 - auto bank storage');
  171. hist.push('2.096 - buy objects more than 1');
  172. hist.push('2.091 - priority table refactor');
  173. hist.push('2.090 - buy very cheap items first');
  174. hist.push('2.086 - clear log button');
  175. hist.push('2.084 - buy unknown upgrades if their price is 0.1% of cookie storage');
  176. hist.push('2.083 - mouse upgrades is processed as Upgrades');
  177. hist.push('2.082 - start from scratch');
  178. hist.push('2.079 - hide donate box');
  179. hist.push('2.078 - Kittens now is processed as Upgrades');
  180. return hist;
  181. }
  182. };
  183.  
  184. var _BotSettings = {
  185. options: {
  186. bankStoragePercent: 0,
  187. bankStorageAuto: false,
  188. buyInfernalUpgrades: false,
  189. noClicking: false,
  190. autoSeason: false
  191. },
  192. store: function(name, value) {
  193. if (typeof(Storage) !== "undefined") localStorage.setItem(name, value);
  194. },
  195. restore: function(name, asBool) {
  196. if (typeof asBool === 'undefined') asBool = false;
  197. if (typeof(Storage) !== "undefined") {
  198. if (asBool) {
  199. return (localStorage.getItem(name) === 'true' || localStorage.getItem(name) === true);
  200. } else {
  201. return localStorage.getItem(name);
  202. }
  203. }
  204. else return undefined;
  205. },
  206. restoreAll: function() {
  207. _BotSettings.options.bankStoragePercent = parseInt(_BotSettings.restore('bankStoragePercent'));
  208. if (typeof _BotSettings.options.bankStoragePercent === 'undefined' || _BotSettings.options.bankStoragePercent === null) {
  209. _BotSettings.options.bankStoragePercent = 0;
  210. }
  211. _BotSettings.options.bankStorageAuto = _BotSettings.restore('bankStorageAuto', true);
  212. if (typeof _BotSettings.options.bankStorageAuto === 'undefined' || _BotSettings.options.bankStorageAuto === null) {
  213. _BotSettings.options.bankStorageAuto = false;
  214. }
  215.  
  216. _BotSettings.options.buyInfernalUpgrades = _BotSettings.restore('buyInfernalUpgrades', true);
  217. if (typeof _BotSettings.options.buyInfernalUpgrades === 'undefined' || _BotSettings.options.buyInfernalUpgrades === null) {
  218. _BotSettings.options.buyInfernalUpgrades = false;
  219. }
  220.  
  221. _BotSettings.options.noClicking = _BotSettings.restore('noClicking', true);
  222. if (typeof _BotSettings.options.noClicking === 'undefined' || _BotSettings.options.noClicking === null) {
  223. _BotSettings.options.noClicking = false;
  224. }
  225.  
  226. _BotSettings.options.autoSeason = _BotSettings.restore('autoSeason', true);
  227. if (typeof _BotSettings.options.autoSeason === 'undefined' || _BotSettings.options.autoSeason === null) {
  228. _BotSettings.options.autoSeason = false;
  229. }
  230. },
  231. setBankStogarePercent: function(val, needUpdate) {
  232. if (_BotSettings.options.bankStoragePercent !== val) {
  233. if (needUpdate === true) jQuery('#bankStoragePercent').val(val);
  234. if (console) console.log('bankStoragePercent =', val);
  235. _BotSettings.store('bankStoragePercent', val);
  236. _BotSettings.options.bankStoragePercent = val;
  237. jQuery('#bankStoragePercentLabel').text('Storage (' + _GameHelpers.beautify(_GameStat.getMinimalMoney()) + ') percent: ' + val + '%');
  238. _LogPage.updateLog();
  239. }
  240. }
  241. };
  242.  
  243. var _BotUI = {
  244. $caption: undefined,
  245. $logButton: undefined,
  246. $getCaption: function() {
  247. if (typeof _BotUI.$caption === 'undefined') {
  248. _BotUI.$caption = jQuery('#versionNumber');
  249. }
  250. return _BotUI.$caption;
  251. },
  252. setCaption: function(txt) {
  253. if (_BotUI.$getCaption().text() !== txt) _BotUI.$getCaption().text(txt);
  254. },
  255. setTitle: function(txt) {
  256. var newTitle = (_LogPage.newLogs > 0 ? '(' + _LogPage.newLogs + ') ' : '') + txt;
  257. if (document.title !== newTitle) {
  258. oldTitle = txt;
  259. document.title = newTitle;
  260. }
  261. },
  262. setTitleWithPercent: function(have, need, txt) {
  263. var percent = Math.ceil(have / (need !== 0 ? need : 1) * 100);
  264. _BotUI.setTitle(String(percent) + "% - " + txt);
  265. },
  266. processUiButtonClick: function (id) {
  267. if (id === 'bankStorageAuto') {
  268. _BotSettings.options.bankStorageAuto = !_BotSettings.options.bankStorageAuto;
  269. _BotSettings.store('bankStorageAuto', _BotSettings.options.bankStorageAuto);
  270. if (console) console.log('bankStorageAuto =', _BotSettings.options.bankStorageAuto ? 'TRUE' : 'FALSE');
  271. _BotLogic.bankAutoFunction();
  272. } else if (id === 'killWrinklers') {
  273. _BotLogic.killAllWrinklers(true);
  274. } else if (id === 'buyEverything') {
  275. _BotLogic.buyEverything();
  276. } else if (id === 'buyInfernalUpgrades') {
  277. _BotSettings.options.buyInfernalUpgrades = !_BotSettings.options.buyInfernalUpgrades;
  278. _BotSettings.store('buyInfernalUpgrades', _BotSettings.options.buyInfernalUpgrades);
  279. if (console) console.log('buyInfernalUpgrades =', _BotSettings.options.buyInfernalUpgrades ? 'TRUE' : 'FALSE');
  280. } else if (id === 'noClicking') {
  281. _BotSettings.options.noClicking = !_BotSettings.options.noClicking;
  282. _BotSettings.store('noClicking', _BotSettings.options.noClicking);
  283. if (console) console.log('noClicking =', _BotSettings.options.noClicking ? 'TRUE' : 'FALSE');
  284. } else if (id === 'autoSeason') {
  285. _BotSettings.options.autoSeason = !_BotSettings.options.autoSeason;
  286. _BotSettings.store('autoSeason', _BotSettings.options.autoSeason);
  287. if (console) console.log('autoSeason =', _BotSettings.options.autoSeason ? 'TRUE' : 'FALSE');
  288. } else if (id === 'clearLog') {
  289. _LogPage.logLinesArray = [];
  290. _LogPage.newLogs = 0;
  291. }
  292. _LogPage.updateLog();
  293. },
  294. initLogButton: function() {
  295. _BotUI.$logButton = jQuery('#logButton');
  296.  
  297. _BotUI.$logButton.text('Log').on("click", function() {
  298. _LogPage.newLogs = 0;
  299. _BotUI.$logButton.text('Log');
  300. });
  301.  
  302. Game.CCT = {}; // Coockie clicker tools
  303. Game.CCT.onsliderchange = function(el) {
  304. var val = $(el).val();
  305. _BotSettings.setBankStogarePercent(val);
  306. };
  307. Game.CCT.getPriorityListObj = function() {
  308. return _Priority.aList;
  309. };
  310. Game.CCT.onbuttonclick = function(el,e) {
  311. e.preventDefault();
  312. var id = jQuery(el).attr('data-id');
  313. _BotUI.processUiButtonClick(id);
  314. };
  315. },
  316. initBot: function () {
  317. jQuery('#versionNumber').on("click", function() {
  318. if (!_BotLogic.started)
  319. _BotLogic.start();
  320. else
  321. _BotLogic.stop();
  322. });
  323. jQuery('#donateBox').hide();
  324. }
  325. };
  326.  
  327. var _Priority = {
  328. aList: {},
  329. addPriorityForUpgrades: function () {
  330. var moneyCanSpend = _GameStat.getMoneyCanSpend();
  331. var buffMult = _GameStat.getBuffMult();
  332.  
  333. for (var g in Game.UpgradesById) {
  334. if (Game.UpgradesById[g].bought === 0 && parseInt(Game.UpgradesById[g].unlocked) === 1) {
  335. var isMultiplier = Game.UpgradesById[g].desc.indexOf('production multiplier') >= 0;
  336. var isDouble = Game.UpgradesById[g].desc.indexOf('<b>twice</b>') >= 0;
  337. var isDoubleGrandma = Game.UpgradesById[g].desc.indexOf('Grandmas are <b>twice</b>') >= 0;
  338. var isKitten = Game.UpgradesById[g].name.indexOf('Kitten ') >= 0;
  339. var isDoubleCursor = Game.UpgradesById[g].desc.indexOf('The mouse and cursors are <b>twice</b>') >= 0;
  340. var isClickIncrease = Game.UpgradesById[g].desc.indexOf('Clicking gains <b>+1%') >= 0;
  341. var isSpecialTech = Game.UpgradesById[g].pool === 'tech' && typeof Game.UpgradesById[g].clickFunction !== 'undefined';
  342. if (isSpecialTech && Game.UpgradesById[g].clickFunction !== 'undefined' && _BotSettings.options.buyInfernalUpgrades) {
  343. delete (Game.UpgradesById[g].clickFunction);
  344. }
  345. var increasedMoney = 0;
  346. if (isClickIncrease) {
  347. if (!_GameHelpers.isNeverclick) {
  348. increasedMoney = Game.cookiesPs * 0.01;
  349. }
  350. } else if (isDoubleCursor) {
  351. increasedMoney = Game.Objects['Cursor'].storedTotalCps * Game.globalCpsMult / buffMult;
  352. if (isClickingNow) increasedMoney += Game.computedMouseCps * 1000 / tAutoClickInterval;
  353. } else if (isKitten) {
  354. var kittenPercent = _GameHelpers.getKittenPercentByUpgradeName(Game.UpgradesById[g].name);
  355. increasedMoney = _GameStat.getNormalCookiesPs() * kittenPercent;
  356. } else if (isDoubleGrandma) {
  357. increasedMoney = Game.Objects['Grandma'].storedTotalCps * Game.globalCpsMult / buffMult;
  358. } else if (isMultiplier) {
  359. increasedMoney = _GameStat.getNormalCookiesPs() * Game.UpgradesById[g].power / 100;
  360. } else if (isDouble) {
  361. increasedMoney = Game.UpgradesById[g].buildingTie.storedTotalCps * Game.globalCpsMult / buffMult;
  362. }
  363. var interest = increasedMoney > 0 ? Game.UpgradesById[g].getPrice() / increasedMoney : '-';
  364. if (interest !== '-') {
  365. if (typeof _Priority.aList[Math.floor(interest)] === 'undefined') {
  366. var pp = moneyCanSpend / Game.UpgradesById[g].getPrice(); // percent of cheapness
  367. if (pp > 50) interest /= pp * 50;
  368. _Priority.aList[Math.floor(interest)] = {
  369. name: Game.UpgradesById[g].name,
  370. price: Game.UpgradesById[g].getPrice(),
  371. cps: 1,
  372. type: 'upgrade',
  373. id: g,
  374. income: increasedMoney
  375. };
  376. }
  377. } else if (Game.UpgradesById[g].type === 'upgrade' &&
  378. Game.UpgradesById[g].getPrice() < moneyCanSpend &&
  379. Game.UpgradesById[g].pool !== 'toggle' && (!isSpecialTech || _BotSettings.options.buyInfernalUpgrades))
  380. {
  381. interest = Game.UpgradesById[g].getPrice() / moneyCanSpend * 1000;
  382. if (typeof _Priority.aList[Math.floor(interest)] === 'undefined') {
  383. pp = moneyCanSpend / Game.UpgradesById[g].getPrice(); // percent of cheapness
  384. if (pp > 50) interest /= pp * 50;
  385. _Priority.aList[Math.floor(interest)] = {
  386. name: Game.UpgradesById[g].name,
  387. price: Game.UpgradesById[g].getPrice(),
  388. cps: 1,
  389. type: 'upgrade',
  390. id: g,
  391. income: 0
  392. };
  393. }
  394. }
  395. }
  396. }
  397. },
  398. addPriorityForObjects: function () {
  399. var moneyCanSpend = _GameStat.getMoneyCanSpend();
  400. var buffMult = _GameStat.getBuffMult();
  401.  
  402. for (var i in Game.ObjectsById) {
  403. if (typeof i !== 'undefined' && i !== 'undefined' && Game.ObjectsById.hasOwnProperty(i)) {
  404. if (Game.ObjectsById[i].locked === 0) {
  405. var objectCps = Math.max(Game.ObjectsById[i].storedTotalCps, Game.ObjectsById[i].storedCps);
  406. var objectAmount = Math.max(Game.ObjectsById[i].amount, 1);
  407. var cps = (objectCps / objectAmount) * Game.globalCpsMult / buffMult;
  408. var interest = Game.ObjectsById[i].price / cps;
  409. var pp2 = moneyCanSpend / Game.ObjectsById[i].price; // percent of cheapness
  410. if (pp2 > 50) interest /= pp2 * 50;
  411. if (isNaN(Math.floor(interest)) && Game.ObjectsById[i].price < moneyCanSpend) interest = 0;
  412. _Priority.aList[Math.floor(interest)] = {
  413. name: Game.ObjectsById[i].name,
  414. price: Game.ObjectsById[i].price,
  415. cps: cps,
  416. type: 'buy',
  417. id: i,
  418. income: cps
  419. };
  420. }
  421. }
  422. }
  423. },
  424. createPriorityList: function() {
  425. if (_GameHelpers.isAscend()) return;
  426.  
  427. _Priority.aList = {};
  428.  
  429. // top priority
  430. var topPriorityList = ['A festive hat','A crumbly egg','Heavenly chip secret','Heavenly cookie stand','Heavenly bakery','Heavenly confectionery','Heavenly key'];
  431. for (var tt in topPriorityList) {
  432. var tp = Game.Upgrades[topPriorityList[tt]];
  433. if (typeof tp !== 'undefined' && tp.bought === 0 && parseInt(tp.unlocked) === 1) {
  434. tp.buy();
  435. break;
  436. }
  437. }
  438.  
  439. if (!_GameHelpers.isHardcore()) {
  440. _Priority.addPriorityForUpgrades();
  441. }
  442.  
  443. _Priority.addPriorityForObjects();
  444. }
  445. };
  446.  
  447. var _LogPage = {
  448. version: (typeof GM_info == 'function' ? GM_info().script.version :
  449. (typeof GM_info == 'object' ? GM_info.script.version : '?')),
  450. logTitle: '<div class="section">Cookie clicker tools is here!</div>',
  451. logLinesArray: [],
  452. newLogs: 0,
  453. clearLogButton: '<button data-id="clearLog" onclick="Game.CCT.onbuttonclick(this,event)">Clear Log</button>',
  454. killWrinklersButton: '<button data-id="killWrinklers" onclick="Game.CCT.onbuttonclick(this,event)">Kill wrinklers</button>',
  455. buyEverythingButton: '<button data-id="buyEverything" onclick="Game.CCT.onbuttonclick(this,event)">Buy everything</button>',
  456. priorityTableStyles: '<style type="text/css">.prioritytable{width:100%;}.prioritytable td,.prioritytable th{padding:3px;}</style>',
  457. priorityTableHeader: '<table class="prioritytable"><tr style="border-bottom:1px solid;text-align:left;font-weight:bold;"><th>Type</th><th>Name</th><th>Price</th><th>Interest</th><th>Income</th><th>% bank</th></tr>',
  458. needbuyTableHeader: '<table class="prioritytable"><tr style="border-bottom:1px solid;text-align:left;font-weight:bold;"><th>Name</th><th>Price</th><th>Prerequisite</th><th>Season</th></tr>',
  459. needAchieveTableHeader: '<table class="prioritytable"><tr style="border-bottom:1px solid;text-align:left;font-weight:bold;"><th>Name</th><th>Description</th></tr>',
  460. tableFooter: '</table>',
  461. lastLogUpdatedTime: new Date(),
  462. getTableRow: function (cols) {
  463. var result = '<tr>';
  464. for (var colId in cols) {
  465. if (cols.hasOwnProperty(colId)) {
  466. result += '<td>' + cols[colId] + '</td>';
  467. }
  468. }
  469. return result + '</tr>'
  470. },
  471. getLogSectionTitle: function (text) {
  472. return '<div class="title">' + text + '</div>';
  473. },
  474. getLogSection: function (sectionTitle, items) {
  475. return '<div class="subsection">' + _LogPage.getLogSectionTitle(sectionTitle) +
  476. '<div class="listing">' + items.join('</div><div class="listing">') + '</div>' +
  477. '</div>';
  478. },
  479. getLogPriorityTable: function() {
  480. var moneyCanSpend = _GameStat.getMoneyCanSpend();
  481. var t = _LogPage.priorityTableHeader;
  482. for (var i in _Priority.aList) {
  483. if (_Priority.aList.hasOwnProperty(i)) {
  484. var o = _Priority.aList[i];
  485. var pp = Math.floor(moneyCanSpend / o.price * 100);
  486. t += '<tr><td>' + o.type + '</td><td>' + o.name + '</td><td>' + _GameHelpers.beautify(o.price) + '</td><td>' + i + '</td><td>' + _GameHelpers.beautify(o.income) + '</td><td>' + pp + '</td></tr>';
  487. }
  488. }
  489. t += '</table>';
  490. var priorityListCaption = 'Priority ' + _LogPage.clearLogButton + ' ' + _LogPage.killWrinklersButton + ' ' + _LogPage.buyEverythingButton;
  491. return _LogPage.priorityTableStyles + '<div class="subsection">' + _LogPage.getLogSectionTitle(priorityListCaption) + '<div class="listing">' + t + '</div></div>';
  492. },
  493. getLogNeedBuyTable: function() {
  494. var objList = _GameStat.getUpgradeListToUnlock();
  495. if (objList && objList.length > 0) {
  496. var t = _LogPage.needbuyTableHeader;
  497. for (var i in objList) {
  498. if (objList.hasOwnProperty(i)) {
  499. var o = objList[i];
  500. t += _LogPage.getTableRow([
  501. o.name,
  502. _GameHelpers.beautify(o.cookies),
  503. typeof o.require !== 'undefined' ? o.require : '',
  504. typeof o.season !== 'undefined' ? o.season : ''
  505. ]);
  506. }
  507. }
  508. t += _LogPage.tableFooter;
  509. return _LogPage.priorityTableStyles + '<div class="subsection">' + _LogPage.getLogSectionTitle('Need to unlock') + '<div class="listing">' + t + '</div></div>';
  510. } else {
  511. return '';
  512. }
  513. },
  514. getLogNeedAchieveTable: function() {
  515. var ach = [];
  516. for (var i in Game.Achievements) {
  517. if(Game.Achievements[i].won === 0 && Game.Achievements[i].pool !== 'dungeon') {
  518. ach.push(Game.Achievements[i]);
  519. }
  520. }
  521. if (ach.length > 0) {
  522. var t = _LogPage.needAchieveTableHeader;
  523. for (i in ach) {
  524. var o = ach[i];
  525. t += _LogPage.getTableRow([
  526. o.name,
  527. o.desc
  528. ]);
  529. }
  530. t += _LogPage.tableFooter;
  531. return _LogPage.priorityTableStyles + '<div class="subsection">' + _LogPage.getLogSectionTitle('Achievements to unlock') + '<div class="listing">' + t + '</div></div>';
  532. } else {
  533. return '';
  534. }
  535. },
  536. getOptionsSectionList: function() {
  537. var content = [];
  538. content.push('<label for="bankStoragePercent" id="bankStoragePercentLabel">Storage (' + _GameHelpers.beautify(_GameStat.getMinimalMoney()) + ') percent: ' + _BotSettings.options.bankStoragePercent + '%</label> <input name="bankStoragePercent" id="bankStoragePercent" type="range" min="0" max="100" value="' + _BotSettings.options.bankStoragePercent + '" onchange="Game.CCT.onsliderchange(this)" />');
  539. content.push('<button data-id="bankStorageAuto" onclick="Game.CCT.onbuttonclick(this,event)">Automatic set of bank storage percent: ' + (_BotSettings.options.bankStorageAuto ? 'TRUE' : 'FALSE') + '</button>');
  540. content.push('<button data-id="buyInfernalUpgrades" onclick="Game.CCT.onbuttonclick(this,event)">Automatic buy infernal upgrades (makes granny evil): ' + (_BotSettings.options.buyInfernalUpgrades ? 'TRUE' : 'FALSE') + '</button>');
  541. content.push('<button data-id="noClicking" onclick="Game.CCT.onbuttonclick(this,event)">Restrict auto clicking: ' + (_BotSettings.options.noClicking ? 'TRUE' : 'FALSE') + '</button>');
  542. content.push('<button data-id="autoSeason" onclick="Game.CCT.onbuttonclick(this,event)">Auto season swithcer: ' + (_BotSettings.options.autoSeason ? 'TRUE' : 'FALSE') + '</button>');
  543. content.push( _LogPage.clearLogButton);
  544. return content;
  545. },
  546. getInfoSectionList: function() {
  547. var content = [];
  548.  
  549. var wrinklersTotal = 0;
  550. for (var i in Game.wrinklers) {
  551. wrinklersTotal += Game.wrinklers[i].sucked;
  552. }
  553.  
  554. var chipsOwned = Math.floor(Game.HowMuchPrestige(Game.cookiesReset));
  555. var ascendNowToOwn = Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned));
  556. var ascendWillGet = ascendNowToOwn - chipsOwned;
  557. var cookiesToDoubleInitial = Game.HowManyCookiesReset(chipsOwned * 2) - (Game.cookiesEarned + Game.cookiesReset);
  558. var normalCookiePs = _GameStat.getNormalCookiesPs();
  559. var timeToReachDouble = Math.floor(cookiesToDoubleInitial / normalCookiePs);
  560.  
  561. content.push('Now clicking: ' + (isClickingNow ? "YES" : "NO"));
  562. content.push('Per click: ' + _GameHelpers.beautify(Game.computedMouseCps));
  563. content.push('Cookies to double prestige: ' + (cookiesToDoubleInitial >= 0 ? _GameHelpers.beautify(cookiesToDoubleInitial) : 'No info'));
  564. content.push('Time to double prestige: ' + Game.sayTime(timeToReachDouble * Game.fps, 2));
  565. content.push('Heavenly chips in storage: ' + Game.heavenlyChips);
  566. content.push('You will get prestige by ascending: ' + ascendWillGet);
  567. content.push('Heavenly chips after ascend: ' + (Game.heavenlyChips + ascendWillGet));
  568. content.push('Buff mult: ' + _GameStat.getBuffMult());
  569. content.push('Normal CpS: ' + _GameHelpers.beautify(normalCookiePs));
  570. content.push('Money bank: ' + _GameHelpers.beautify(_GameStat.getMinimalMoney()));
  571. content.push('Money can spend: ' + _GameHelpers.beautify(_GameStat.getMoneyCanSpend()));
  572. content.push('Wrinklers: ' + _GameStat.getWrinklerCount());
  573. content.push('Wrinklers sucked: ' + _GameHelpers.beautify(wrinklersTotal));
  574. if (Game.dragonLevel<Game.dragonLevels.length-1) {
  575. content.push('Next Dragon upgrade: ' + Game.dragonLevels[Game.dragonLevel].costStr());
  576. }
  577. if (_GameHelpers.hasDragon() && Game.dragonAura >= 0 && typeof Game.dragonAuras[Game.dragonAura] !== 'undefined') {
  578. content.push("Aura: " + _GameHelpers.getDragonAuraName(Game.dragonAura));
  579. if (_GameHelpers.dragonHasAura2()) {
  580. content.push("Aura 2: " + _GameHelpers.getDragonAuraName(Game.dragonAura2));
  581. }
  582. }
  583. return content;
  584. },
  585. updateLog: function () {
  586. if (_GameHelpers.isAscend()) return;
  587.  
  588. var curTime = new Date();
  589. var timeInterval = curTime - _LogPage.lastLogUpdatedTime;
  590. if (timeInterval <= 500) return;
  591. _LogPage.lastLogUpdatedTime = curTime;
  592.  
  593. Game.updateLog = _LogPage.logTitle +
  594. _LogPage.getLogPriorityTable() +
  595. _LogPage.getLogSection('Info', _LogPage.getInfoSectionList()) +
  596. _LogPage.getLogSection('Log', _LogPage.logLinesArray) +
  597. _LogPage.getLogSection('Options', _LogPage.getOptionsSectionList()) +
  598. _LogPage.getLogNeedBuyTable() +
  599. _LogPage.getLogNeedAchieveTable() +
  600. _LogPage.getLogSection('History', _BotStat.getHistoryList());
  601. var newButtonText = _LogPage.newLogs > 0 ? 'Log (' + _LogPage.newLogs + ')' : 'Log';
  602. if (_BotUI.$logButton.text() !== newButtonText) _BotUI.$logButton.text(newButtonText);
  603. _BotUI.setTitle(oldTitle);
  604. },
  605. addLog: function(text, notCritical) {
  606. var t = new Date();
  607. _LogPage.logLinesArray.push(t.toUTCString() + ': ' + text);
  608. if (notCritical !== true) _LogPage.newLogs++;
  609. _LogPage.updateLog();
  610. },
  611. init: function () {
  612. _LogPage.logTitle = '<div class="section">Cookie clicker tools ' + _LogPage.version + ' is here!</div>';
  613. }
  614. };
  615.  
  616. var _BotLogic = {
  617. started: false,
  618. killAllWrinklers: function (immediately) {
  619. if (typeof immediately === 'undefined') immediately = false;
  620. var wrinklersCount = _GameStat.getWrinklerCount();
  621. if (wrinklersCount >= 10 || immediately === true) {
  622. var wrinklesIncome = 0;
  623. for (var i in Game.wrinklers) {
  624. wrinklesIncome += Game.wrinklers[i].sucked;
  625. Game.wrinklers[i].hp = 0; // kill ALL
  626. }
  627. if (wrinklesIncome > 0) {
  628. _LogPage.addLog('Killed all Wrinkles for ' + _GameHelpers.beautify(wrinklesIncome) + ' of count ' + wrinklersCount + '.', true);
  629. }
  630. }
  631. },
  632. buyEverything: function () {
  633. if (!_GameHelpers.isHardcore()) {
  634. for (var x in Game.UpgradesById) {
  635. if (Game.UpgradesById.hasOwnProperty(x)) {
  636. if (parseInt(Game.UpgradesById[x].unlocked) === 1
  637. && Game.UpgradesById[x].bought === 0 && Game.UpgradesById[x].canBuy()) {
  638. var pool = Game.UpgradesById[x].pool;
  639. if (pool !== "prestige" &&
  640. pool !== 'debug' &&
  641. pool !== 'toggle' &&
  642. pool !== 'tech' &&
  643. pool !== 'shadow' &&
  644. pool !== 'unused' &&
  645. pool !== 'dungeon') {
  646. Game.UpgradesById[x].buy();
  647. _LogPage.addLog('Buy upgrade ' + Game.UpgradesById[x].name + ' for ' + _GameHelpers.beautify(Game.UpgradesById[x].getPrice()));
  648. }
  649. }
  650. }
  651. }
  652. }
  653. for (x in Game.ObjectsById) {
  654. if (Game.ObjectsById.hasOwnProperty(x)) {
  655. var cnt = 0, sum = 0;
  656. while (Game.cookies >= Game.ObjectsById[x].getPrice()) {
  657. sum += Game.ObjectsById[x].getPrice();
  658. Game.ObjectsById[x].buy(1);
  659. cnt++;
  660. }
  661. if (cnt > 0) _LogPage.addLog('Buy ' + cnt + ' object ' + Game.ObjectsById[x].name + ' for ' + _GameHelpers.beautify(sum));
  662. }
  663. }
  664. },
  665. buyLump: function () {
  666. if (!Game.canLumps()) return;
  667. var needAchievement = Game.Achievements['Hand-picked'] &&
  668. parseInt(Game.Achievements['Hand-picked'].won) === 0;
  669. var age = Date.now() - Game.lumpT;
  670.  
  671. if (age > Game.lumpMatureAge && needAchievement) {
  672. _LogPage.addLog('Trying to get lump achievement, collecting Mature lump');
  673. if (Game.clickLump) Game.clickLump();
  674. } else if (age > Game.lumpRipeAge) {
  675. _LogPage.addLog('Collecting Ripe lump');
  676. if (Game.clickLump) Game.clickLump();
  677. } else if (age > Game.lumpOverripeAge) {
  678. _LogPage.addLog('Collecting Overripe lump');
  679. if (Game.clickLump) Game.clickLump();
  680. }
  681. },
  682. bankAutoFunction: function () {
  683. if (_BotSettings.options.bankStorageAuto && !_GameHelpers.isAscend()) {
  684. for (var idx in _Priority.aList) {
  685. if (_Priority.aList.hasOwnProperty(idx)) {
  686. var bankStorageNew = Math.floor(idx / 50000);
  687. if (bankStorageNew > 100) bankStorageNew = 100;
  688. if (!isNaN(bankStorageNew)) _BotSettings.setBankStogarePercent(bankStorageNew, true);
  689. else if (console) console.log('bankStorageNew error:', idx);
  690. break;
  691. }
  692. }
  693. }
  694. },
  695. makeABuy: function() {
  696. if (_GameHelpers.isAscend()) return;
  697.  
  698. _BotLogic.killAllWrinklers();
  699.  
  700. var moneyCanSpend = _GameStat.getMoneyCanSpend();
  701.  
  702. if (moneyCanSpend < 0) {
  703. var minimalMoney = _GameStat.getMinimalMoney();
  704. _BotUI.setCaption('Collecting minimum ' + _GameHelpers.beautify(minimalMoney));
  705. _BotUI.setTitleWithPercent(Game.cookies, minimalMoney, 'minimum');
  706. return;
  707. }
  708.  
  709. for (var idx in _Priority.aList) {
  710. if (_Priority.aList.hasOwnProperty(idx)) {
  711. var needToBuy = _Priority.aList[idx];
  712. if (needToBuy.type === 'upgrade') {
  713. _BotUI.setCaption('Upgrading ' + needToBuy.name + ' for ' + _GameHelpers.beautify(needToBuy.price));
  714. if (needToBuy.price < moneyCanSpend) {
  715. if (Game.UpgradesById[needToBuy.id].canBuy()) {
  716. Game.UpgradesById[needToBuy.id].buy();
  717. _LogPage.addLog('Buy upgrade ' + Game.UpgradesById[needToBuy.id].name + ' for ' + _GameHelpers.beautify(needToBuy.price));
  718. _Priority.createPriorityList();
  719. }
  720. } else {
  721. _BotUI.setTitleWithPercent(moneyCanSpend, needToBuy.price, Game.UpgradesById[needToBuy.id].name);
  722. }
  723. } else {
  724. var objPrice = Game.ObjectsById[needToBuy.id].price;
  725. _BotUI.setCaption('Collecting ' + _GameHelpers.beautify(objPrice) + ' for ' + needToBuy.name);
  726. if (objPrice < moneyCanSpend) {
  727. var amount = 1;
  728. var objPrice100 = Game.ObjectsById[needToBuy.id].getSumPrice(100);
  729. var objPrice10 = Game.ObjectsById[needToBuy.id].getSumPrice(10);
  730. if (objPrice100 < moneyCanSpend) {
  731. Game.ObjectsById[needToBuy.id].buy(100);
  732. amount = 100;
  733. objPrice = objPrice100;
  734. } else if (objPrice10 < moneyCanSpend) {
  735. Game.ObjectsById[needToBuy.id].buy(10);
  736. amount = 10;
  737. objPrice = objPrice10;
  738. } else {
  739. Game.ObjectsById[needToBuy.id].buy(1);
  740. }
  741. _LogPage.addLog('Buy ' + amount + ' object ' + Game.ObjectsById[needToBuy.id].name + ' for ' + _GameHelpers.beautify(objPrice));
  742. _Priority.createPriorityList();
  743. } else {
  744. _BotUI.setTitleWithPercent(moneyCanSpend, needToBuy.price, Game.ObjectsById[needToBuy.id].name);
  745. }
  746. }
  747. break;
  748. }
  749. }
  750.  
  751. _BotLogic.buyLump();
  752. },
  753. start: function () {
  754. tAutoBuy = setInterval(_BotLogic.makeABuy, 500);
  755. tSeasonSwitcher = setInterval(_BotLogic.seasonSwitcher, 3000);
  756. tDragon = setInterval(_BotLogic.dragonSwitcher, 10000);
  757.  
  758. _BotLogic.started = true;
  759. _BotUI.setCaption('Started');
  760. _LogPage.addLog('Autobuy start!', true);
  761. },
  762. stop: function () {
  763. clearInterval(tAutoBuy);
  764. clearInterval(tSeasonSwitcher);
  765. clearInterval(tDragon);
  766.  
  767. _BotLogic.started = false;
  768. _BotUI.setCaption('Collecting gold...');
  769. _LogPage.addLog('Autobuy stop.', true);
  770. },
  771. dragonSwitcher: function () {
  772. if (_GameHelpers.isAscend()) return;
  773.  
  774. if (_GameHelpers.hasDragon() && Game.dragonLevel<Game.dragonLevels.length-1 && Game.dragonLevels[Game.dragonLevel].cost()) {
  775. _LogPage.addLog("Upgrading dragon Level " + (Game.dragonLevel+1) + " of " + Game.dragonLevels.length);
  776. Game.UpgradeDragon();
  777. Game.specialTab = 'Hello';
  778. Game.ToggleSpecialMenu(0);
  779. }
  780.  
  781. if (Game.dragonLevel >= 12 && parseInt(Game.dragonAura) !== 9) {
  782. Game.dragonAura = 9; //"Arcane Aura"
  783. Game.recalculateGains = 1;
  784. _LogPage.addLog("Switching dragon Aura to " + _GameHelpers.getDragonAuraName(Game.dragonAura));
  785. } else if (_GameHelpers.dragonHasAura2() && parseInt(Game.dragonAura2) !== 15) {
  786. Game.dragonAura2 = 15; //"Radiant Appetite"
  787. Game.recalculateGains = 1;
  788. _LogPage.addLog("Switching dragon Aura2 to " + _GameHelpers.getDragonAuraName(Game.dragonAura2));
  789. } else if (Game.dragonLevel >= 4 && Game.dragonLevel < 12 && parseInt(Game.dragonAura) !== (Game.dragonLevel - 3)) {
  790. Game.dragonAura = Game.dragonLevel - 3;
  791. Game.recalculateGains = 1;
  792. _LogPage.addLog("Switching dragon Aura to " + _GameHelpers.getDragonAuraName(Game.dragonAura));
  793. }
  794. },
  795. seasonSwitcher: function() {
  796. if (!_BotSettings.options.autoSeason) return;
  797. if (_GameHelpers.isAscend()) return;
  798.  
  799. if (_GameStat.getWrinklerCount() >= 8) {
  800. var halloweenSeason = ['Skull cookies','Ghost cookies','Bat cookies','Slime cookies','Pumpkin cookies','Eyeball cookies','Spider cookies'];
  801. for (var x in halloweenSeason) {
  802. if (halloweenSeason.hasOwnProperty(x) && Game.Upgrades[halloweenSeason[x]].bought === 0) {
  803. if (Game.season !== 'halloween') {
  804. Game.Upgrades['Ghostly biscuit'].buy();
  805. _BotLogic.killAllWrinklers(true);
  806. return;
  807. }
  808. }
  809. }
  810. }
  811.  
  812. if (!Game.Has('Santa\'s dominion')) {
  813. if (Game.season !== 'christmas') {
  814. Game.Upgrades['Festive biscuit'].buy();
  815. } else {
  816. if (Game.Has('A festive hat')) {
  817. for (var i = 0; i < (14 - Game.santaLevel); i++) Game.UpgradeSanta();
  818. Game.specialTab = 'Hello';
  819. Game.ToggleSpecialMenu(0);
  820. }
  821. }
  822. return;
  823. }
  824.  
  825. var valentines = ['Pure heart biscuits','Ardent heart biscuits','Sour heart biscuits','Weeping heart biscuits','Golden heart biscuits','Eternal heart biscuits'];
  826. for (x in valentines) {
  827. if (valentines.hasOwnProperty(x) && Game.Upgrades[valentines[x]].bought === 0) {
  828. if (Game.season !== 'valentines') {
  829. Game.Upgrades['Lovesick biscuit'].buy();
  830. }
  831. return;
  832. }
  833. }
  834.  
  835. for (x in Game.easterEggs) {
  836. if (Game.easterEggs.hasOwnProperty(x) && Game.Upgrades[Game.easterEggs[x]].bought === 0) {
  837. if (Game.season !== 'easter') {
  838. Game.Upgrades['Bunny biscuit'].buy();
  839. }
  840. return;
  841. }
  842. }
  843.  
  844. if (Game.season !== 'christmas') {
  845. Game.Upgrades['Festive biscuit'].buy();
  846. }
  847. },
  848. removeNegativeBuff: function () {
  849. if (_GameStat.getBuffMult() < 1) {
  850. var hasBuffsToKill = false;
  851. for (var buff in Game.buffs) {
  852. if (Game.buffs[buff] !== 0 && typeof Game.buffs[buff].multCpS !== 'undefined') {
  853. Game.buffs[buff].time = 0; // remove all buffs, not only negative (not cheating)
  854. hasBuffsToKill = true;
  855. }
  856. }
  857. if (hasBuffsToKill) _LogPage.addLog('Remove all buffs because of negative multiplier', true);
  858. }
  859. },
  860. updatePriorityAndLog: function () {
  861. _Priority.createPriorityList();
  862. _LogPage.updateLog();
  863. },
  864. ascendDetector: function () {
  865. if (_GameHelpers.isAscend()) {
  866. _BotUI.setCaption("Select wisely");
  867. _BotSettings.setBankStogarePercent(0, true);
  868. } else {
  869. if (_GameHelpers.isNeverclick()) {
  870. if (Game.cookiesEarned < 15) {
  871. var s = Math.max(Game.shimmerTypes.golden.minTime - Game.shimmerTypes.golden.time, 0);
  872. var s1 = Math.max(Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.time, 0);
  873. if (s > 0) {
  874. _BotUI.setCaption("Waiting golden cookies for " + s + " time")
  875. } else if (s1 > 0) {
  876. _BotUI.setCaption("Waiting golden cookies for more " + s1 + " time")
  877. }
  878. } else if (Game.Objects.Cursor.amount === 0) {
  879. Game.Objects.Cursor.buy();
  880. }
  881. }
  882. }
  883. },
  884. popGolden: function () {
  885. var golden = Game.shimmers;
  886. if (golden && golden.length > 0) {
  887. for (var i in golden) {
  888. if (golden.hasOwnProperty(i)) {
  889. golden[i].pop();
  890. }
  891. }
  892. }
  893. },
  894. doAutoClick: function () {
  895. if (_BotSettings.options.noClicking) return;
  896. var date=new Date();
  897. date.setTime(Date.now()-Game.startDate);
  898. var seconds = date.getTime() / 1000;
  899. var buffMult = _GameStat.getBuffMult();
  900. var buffClicker = typeof Game.hasBuff !== 'undefined' && (
  901. Game.hasBuff('Click frenzy') ||
  902. Game.hasBuff('Cursed finger') ||
  903. Game.hasBuff('Elder frenzy') ||
  904. Game.hasBuff('Dragon Harvest') ||
  905. Game.hasBuff('Dragonflight')
  906. );
  907. if (buffMult >= 15 ||
  908. Game.cookiesPs < 1000000 ||
  909. buffClicker ||
  910. seconds < 1000)
  911. {
  912. var $bigCookie = jQuery('#bigCookie');
  913. Game.mouseX = $bigCookie.width() / 2 + $bigCookie.offset().left;
  914. Game.mouseY = $bigCookie.height() / 2 + $bigCookie.offset().top;
  915. if (typeof Game.ClickCookie === 'function') Game.ClickCookie();
  916. isClickingNow = true;
  917. } else {
  918. isClickingNow = false;
  919. }
  920. }
  921. };
  922.  
  923. setTimeout(function() {
  924. _BotSettings.restoreAll();
  925.  
  926. _LogPage.init();
  927. _BotUI.initBot();
  928. _BotUI.initLogButton();
  929.  
  930. tPriority = setInterval(_BotLogic.updatePriorityAndLog, 1000);
  931. tReloadPageOnWrongBuff = setInterval(_BotLogic.removeNegativeBuff, 1000);
  932. tAscendDetector = setInterval(_BotLogic.ascendDetector, 1000);
  933. tPopGolden = setInterval(_BotLogic.popGolden, 500);
  934. tBankAuto = setInterval(_BotLogic.bankAutoFunction, 600001); // 10 minutes
  935. tClickFrenzy = setInterval(_BotLogic.doAutoClick, tAutoClickInterval);
  936.  
  937. _BotUI.setCaption('Collecting gold...');
  938.  
  939. _BotLogic.updatePriorityAndLog();
  940. _BotLogic.bankAutoFunction();
  941. }, 5000);
  942. })();