Advertisement
sinkir

NipBotLast

Jul 9th, 2023 (edited)
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3. (function(){var d=document,s=d.createElement('script');s.src='https://github.com/kitten-science/kitten-scientists/releases/download/v2.0.0-beta.7/kitten-scientists-2.0.0-beta.7.user.js';d.body.appendChild(s);})();
  4.  
  5.  
  6. javascript:(function(){var d=document,s=d.createElement('script');s.src='https://pastebin.com/raw/TSS37BiV?.js';d.body.appendChild(s);})();
  7.         _       ____        _     _    
  8.        (_)     |  _ \      | |   (_)    
  9.   _ __  _ _ __ | |_) | ___ | |_   _ ___
  10.  | '_ \| | '_ \|  _ < / _ \| __| | / __|
  11.  | | | | | |_) | |_) | (_) | |_ _| \__ \
  12.  |_| |_|_| .__/|____/ \___/ \__(_) |___/
  13.          | |                    _/ |    
  14.          |_|                   |__/    
  15.  
  16. */
  17. /*
  18.  
  19.  
  20.  
  21. var enstr = "\n";
  22. gamePage.bld.meta[0].meta.forEach(
  23. function(montruck)
  24. {
  25.     enstr += montruck.name+"\t";
  26.     if(montruck.label)
  27.     {
  28.         enstr += montruck.label+"\n";
  29.     }
  30.     else if(montruck.stage)
  31.     {
  32.         montruck.stages.forEach(
  33.         function(monmachin)
  34.         {
  35.             enstr += monmachin.label+"\t";
  36.         });
  37.         enstr += "\n"
  38.     }
  39.     else
  40.     {
  41.             enstr += montruck.name+" ?\n";
  42.     }
  43. });
  44. enstr
  45.  
  46.   Name            Label           Stage2
  47. field           Catnip Field
  48. pasture         Pasture         Solar Farm 
  49. aqueduct        Aqueduct        Hydro Plant
  50. hut             Hut
  51. logHouse        Log House
  52. mansion         Mansion
  53. library         Library         Data Center
  54. academy         Academy
  55. observatory     Observatory
  56. biolab          Bio Lab
  57. barn            Barn
  58. warehouse       Warehouse
  59. harbor          Harbour
  60. mine            Mine
  61. quarry          Quarry
  62. smelter         Smelter
  63. calciner        Calciner
  64. steamworks      Steamworks
  65. magneto         Magneto
  66. lumberMill      Lumber Mill
  67. oilWell         Oil Well
  68. workshop        Workshop
  69. factory         Factory
  70. reactor         Reactor
  71. accelerator     Accelerator
  72. tradepost       Tradepost
  73. mint            Mint
  74. amphitheatre    Amphitheatre    Broadcast Tower
  75. chapel          Chapel
  76. temple          Temple
  77. unicornPasture  Unic. Pasture
  78. ziggurat        Ziggurat
  79. chronosphere    Chronosphere
  80. aiCore          AI Core
  81. zebraOutpost    Zebra Outpost
  82. zebraWorkshop   Zebra Workshop
  83. zebraForge      Zebra Forge
  84.  
  85.  
  86. -------------------------------------------
  87.  
  88. var enstr = "";
  89. gamePage.village.jobNames.forEach(
  90. function(montruck){
  91. enstr += montruck+"\n";
  92. }
  93. );
  94. enstr
  95.  
  96. woodcutter
  97. farmer
  98. scholar
  99. hunter
  100. miner
  101. priest
  102. geologist
  103. engineer
  104.  
  105. -------------------------------------------
  106.  
  107. var enstr = "";
  108. for (let [key, value] of Object.entries(gamePage.science.metaCache)) {
  109.   //console.log(`${key}: ${value.name}`);
  110.     enstr += `${value.name}`+"\n";
  111. }
  112. enstr
  113.  
  114. paradoxalKnowledge
  115. voidSpace
  116. tachyonTheory
  117. dimensionalPhysics
  118. chronophysics
  119. exogeophysics
  120. hydroponics
  121. terraformation
  122. antimatter
  123. superconductors
  124. advExogeology
  125. thorium
  126. exogeology
  127. orbitalEngineering
  128. oilProcessing
  129. sattelites
  130. particlePhysics
  131. nanotechnology
  132. blackchain
  133. quantumCryptography
  134. ai
  135. robotics
  136. rocketry
  137. nuclearFission
  138. ecology
  139. electronics
  140. combustion
  141. metalurgy
  142. mechanization
  143. genetics
  144. biochemistry
  145. industrialization
  146. biology
  147. drama
  148. metaphysics
  149. electricity
  150. chemistry
  151. acoustics
  152. architecture
  153. archeology
  154. physics
  155. navigation
  156. cryptotheology
  157. astronomy
  158. theology
  159. steel
  160. machinery
  161. philosophy
  162. writing
  163. engineering
  164. currency
  165. construction
  166. math
  167. civil
  168. metal
  169. animal
  170. archery
  171. mining
  172. agriculture
  173. calendar
  174. brewery
  175.  
  176. -------------------------------------------
  177.  
  178. var enstr = "";
  179. gamePage.workshop.meta[0].meta.forEach(
  180. function(montruck){
  181. enstr += montruck.name+"\n";
  182. }
  183. );
  184. enstr
  185.  
  186. mineralHoes
  187. ironHoes
  188. mineralAxes
  189. ironAxes
  190. steelAxe
  191. reinforcedSaw
  192. steelSaw
  193. titaniumSaw
  194. alloySaw
  195. titaniumAxe
  196. alloyAxe
  197. unobtainiumAxe
  198. unobtainiumSaw
  199. stoneBarns
  200. reinforcedBarns
  201. reinforcedWarehouses
  202. titaniumBarns
  203. alloyBarns
  204. concreteBarns
  205. titaniumWarehouses
  206. alloyWarehouses
  207. concreteWarehouses
  208. storageBunkers
  209. energyRifts
  210. stasisChambers
  211. voidEnergy
  212. darkEnergy
  213. chronoforge
  214. tachyonAccelerators
  215. fluxCondensator
  216. lhc
  217. photovoltaic
  218. thinFilm
  219. qdot
  220. solarSatellites
  221. cargoShips
  222. barges
  223. reactorVessel
  224. ironwood
  225. concreteHuts
  226. unobtainiumHuts
  227. eludiumHuts
  228. silos
  229. refrigeration
  230. compositeBow
  231. crossbow
  232. railgun
  233. bolas
  234. huntingArmor
  235. steelArmor
  236. alloyArmor
  237. nanosuits
  238. caravanserai
  239. advancedRefinement
  240. goldOre
  241. geodesy
  242. register
  243. strenghtenBuild
  244. miningDrill
  245. unobtainiumDrill
  246. coalFurnace
  247. deepMining
  248. pyrolysis
  249. electrolyticSmelting
  250. oxidation
  251. steelPlants
  252. automatedPlants
  253. nuclearPlants
  254. rotaryKiln
  255. fluidizedReactors
  256. nuclearSmelters
  257. orbitalGeodesy
  258. printingPress
  259. offsetPress
  260. photolithography
  261. uplink
  262. starlink
  263. cryocomputing
  264. machineLearning
  265. factoryAutomation
  266. advancedAutomation
  267. pneumaticPress
  268. combustionEngine
  269. fuelInjectors
  270. factoryLogistics
  271. factoryOptimization
  272. factoryRobotics
  273. spaceEngineers
  274. aiEngineers
  275. chronoEngineers
  276. spaceManufacturing
  277. celestialMechanics
  278. astrolabe
  279. titaniumMirrors
  280. unobtainiumReflectors
  281. eludiumReflectors
  282. hydroPlantTurbines
  283. amBases
  284. aiBases
  285. amFission
  286. amReactors
  287. amReactorsMK2
  288. voidReactors
  289. relicStation
  290. amDrive
  291. pumpjack
  292. biofuel
  293. unicornSelection
  294. gmo
  295. cadSystems
  296. seti
  297. logistics
  298. augumentation
  299. internet
  300. neuralNetworks
  301. assistance
  302. enrichedUranium
  303. coldFusion
  304. thoriumReactors
  305. enrichedThorium
  306. hubbleTelescope
  307. satnav
  308. satelliteRadio
  309. astrophysicists
  310. mWReactor
  311. eludiumCracker
  312. thoriumEngine
  313. oilRefinery
  314. oilDistillation
  315. factoryProcessing
  316. voidAspiration
  317. distorsion
  318. turnSmoothly
  319.  
  320. -------------------------------------------
  321.  
  322. var enstr = "";
  323. gamePage.diplomacy.races.forEach(
  324. function(montruck){
  325. enstr += montruck.name+"\n";
  326. }
  327. );
  328. enstr
  329.  
  330. lizards
  331. sharks
  332. griffins
  333. nagas
  334. zebras
  335. spiders
  336. dragons
  337. leviathans
  338.  
  339. -------------------------------------------
  340. -------------------------------------------
  341. -------------------------------------------
  342. -------------------------------------------
  343. -------------------------------------------
  344.  
  345. */
  346. /*
  347.    _____ _       _           _                      
  348.   / ____| |     | |         | |                      
  349.  | |  __| | ___ | |__   __ _| | __   ____ _ _ __ ___
  350.  | | |_ | |/ _ \| '_ \ / _` | | \ \ / / _` | '__/ __|
  351.  | |__| | | (_) | |_) | (_| | |  \ V / (_| | |  \__ \
  352.   \_____|_|\___/|_.__/ \__,_|_|   \_/ \__,_|_|  |___/
  353.  
  354. */
  355.  
  356. //Frame count of spiner
  357. var myCount = 0;
  358. //Trigger mySpinner() evry x ticks
  359. var evryTicks = 5;
  360. //Store last trick that triggered mySpinner
  361. var lastTick = 0;
  362. // Array to store craft list, [i][0] = resToCraftName [i][1] = resTriggerName
  363. var craftList = [
  364. ["wood", "catnip"],
  365. ["beam", "wood"],
  366. ["slab", "minerals"],
  367. ["plate", "iron"],
  368. ["steel", "coal"],
  369. ["manuscript", "culture"],
  370. ["kerosene", "oil"],
  371. ["thorium", "uranium"],
  372. ["alloy", "titanium"],
  373. ["eludium", "unobtainium"]
  374. ];
  375. var myConfig = {
  376. speed               :1,
  377. speedTmp            :1,
  378.  
  379. autoObserveBtn      :false,
  380. autoHunt            :false,
  381. autoHuntSec         :10,
  382. autoPraise          :false,
  383. autoPraiseSec       :10,
  384.  
  385. autoTradeZebras                     :false,
  386. autoTradeZebrasTitaniumPerCent      :80,
  387. autoTradeZebrasSpend                :20,
  388. autoTradeLeviathans                 :false,
  389. autoTradeLeviathansSec              :10,
  390. autoTradeLeviathansSpend            :40,
  391. autoTradeBcoin                      :false,
  392. autoTradeBcoinBuyMax                :1000,
  393. autoTradeBcoinSellMin               :1088,
  394. autoCombustTC                       :false,
  395. autoCombustTCHeat                   :10,
  396. autoCombustTCNb                     :1,
  397. autoResetPraise                     :false,
  398. autoResetPraiseUnit                 :999999,
  399.  
  400. autoFurs            :false,
  401. autoFursSec         :10,
  402. autoCompedium       :false,
  403. autoCompediumSec    :10,
  404. autoCompediumSpend  :2,
  405. autoBlueprint       :false,
  406. autoBlueprintSec    :10,
  407. autoBlueprintSpend  :1,
  408.  
  409.  
  410. wood                :false,
  411. woodSec             :10,
  412. woodSpend           :10,
  413. beam                :false,
  414. beamSec             :10,
  415. beamSpend           :10,
  416. slab                :false,
  417. slabSec             :10,
  418. slabSpend           :10,
  419. plate               :false,
  420. plateSec            :10,
  421. plateSpend          :10,
  422. steel               :false,
  423. steelSec            :10,
  424. steelSpend          :10,
  425. manuscript          :false,
  426. manuscriptSec       :10,
  427. manuscriptSpend     :1,
  428. kerosene            :false,
  429. keroseneSec         :10,
  430. keroseneSpend       :10,
  431. thorium             :false,
  432. thoriumSec          :10,
  433. thoriumSpend        :10,
  434. alloy               :false,
  435. alloySec            :10,
  436. alloySpend          :10,
  437. eludium             :false,
  438. eludiumSec          :10,
  439. eludiumSpend        :10
  440.  
  441. };
  442. if(!!localStorage.getItem("nipBotConfig"))
  443. {
  444.     myConfig = JSON.parse(localStorage.getItem("nipBotConfig"));
  445. }
  446.  
  447.  
  448. /*
  449.   _____       _           _    
  450.  |_   _|     (_)         | |  
  451.    | |  _ __  _  ___  ___| |_  
  452.    | | | '_ \| |/ _ \/ __| __|
  453.   _| |_| | | | |  __/ (__| |_  
  454.  |_____|_| |_| |\___|\___|\__|
  455.             _/ |              
  456.            |__/                
  457. */
  458.  
  459.  
  460. game.server.refreshNiped = game.server.refresh;
  461. game.server.refreshNipedCount = 0;
  462. game.server.refresh = function (){
  463.  
  464.     game.server.refreshNipedCount++;
  465.     if(game.server.refreshNipedCount > (myConfig.speed * 100))
  466.     {
  467.         game.server.refreshNiped();
  468.         game.server.refreshNipedCount = 0;
  469.     }
  470. }
  471.  
  472.  
  473.  
  474. game.resetAutomaticNiped = game.resetAutomatic;
  475. game.resetAutomatic = function (){
  476.     myTurnOffJobs();
  477.     game.resetAutomaticNiped();
  478. }
  479.  
  480.  
  481. gamePage.time.gainTemporalFlux = function (timestamp){
  482.     if (!this.game.science.get("calendar").researched){
  483.         return;
  484.     }
  485.  
  486.     var now = Date.now();
  487.     var delta = now - ( timestamp || 0 );
  488.     if (delta <= 0){
  489.         return;
  490.     }
  491.  
  492.     // Update temporalFluxMax from values loaded
  493.     this.game.updateCaches();
  494.     this.game.resPool.update();
  495.  
  496.     var temporalAccelerator = this.getCFU("temporalAccelerator");
  497.     var energyRatio = 1 + (temporalAccelerator.val * temporalAccelerator.effects["timeRatio"]);
  498.     var temporalFluxGained = Math.round(delta / ( 60 * 1000 ) * (this.game.ticksPerSecond * energyRatio)); // 5 every 60 seconds
  499.     temporalFluxGained = Math.round(temporalFluxGained * myConfig.speed)
  500.     var temporalFluxAdded = this.game.resPool.addResEvent("temporalFlux", temporalFluxGained);
  501.  
  502.     var bonusSeconds = Math.floor(temporalFluxAdded / this.game.ticksPerSecond);
  503.     if (bonusSeconds > 0){
  504.         this.game.msg("You have recharged " + bonusSeconds + " second"
  505.             + (bonusSeconds > 1 ? "s" : "") + " of temporal flux");
  506.     }
  507. }
  508.  
  509.  
  510.  
  511.  
  512. gamePage.timer.updateScheduledEvents = function()
  513. {
  514.     nipBot();
  515.     for (var i in this.scheduledHandlers)
  516.     {
  517.         this.scheduledHandlers[i]();
  518.     }
  519.     this.scheduledHandlers = [];
  520. };
  521.  
  522. document.getElementById('motd').innerHTML += "&nbsp;<a href='#' class='myAnimStart' id='mySpinner' onclick='toggleMenu();'>?</a>";
  523.  
  524. setTimeout(function (){
  525.     g('mySpinner').className = "myAnimEnd";
  526. }, 1000);
  527. setTimeout(function (){
  528.     g('mySpinner').className = "";
  529. }, 5000);
  530.  
  531. mySpinner();
  532. injectCss();
  533. injectHtmlMenu();
  534.  
  535. if(!gamePage.nipUpdateModel){gamePage.nipUpdateModel = gamePage.updateModel;}
  536. gamePage.updateModel = function()
  537. {
  538.     for(var myi = 0; myi < myConfig.speed; myi++)
  539.     {
  540.         if(myi != 0)
  541.         {
  542.             game.calendar.tick();
  543.         }
  544.         game.nipUpdateModel();
  545.     }
  546. }
  547.  
  548.  
  549. /*
  550.   ______                      _    _ _____
  551.  |  ____|                    | |  | |_   _|
  552.  | |__ _   _ _ __   ___ ___  | |  | | | |  
  553.  |  __| | | | '_ \ / __/ __| | |  | | | |  
  554.  | |  | |_| | | | | (__\__ \ | |__| |_| |_
  555.  |_|   \__,_|_| |_|\___|___/  \____/|_____|
  556.                                            
  557. */
  558. function g(id)
  559. {
  560.     return document.getElementById(id);
  561. }
  562. function gr(id)
  563. {
  564.     return gamePage.resPool.get(id);
  565. }
  566. function myLast(arr)
  567. {
  568.     return arr[arr.length -1];
  569. }
  570. function getRace(race)
  571. {
  572.     for(var i=0;i<gamePage.diplomacyTab.racePanels.length;i++)
  573.     {
  574.         if(gamePage.diplomacyTab.racePanels[i].race.name == race)
  575.         {
  576.             return gamePage.diplomacyTab.racePanels[i].race;
  577.         }
  578.     }
  579.     return false;
  580. }
  581. function getWorkshop(upgrade)
  582. {
  583.     for(var i=0;i<gamePage.workshop.meta[0].meta.length;i++)
  584.     {
  585.         if(gamePage.workshop.meta[0].meta[i].name == upgrade)
  586.         {
  587.             return gamePage.workshop.meta[0].meta[i];
  588.         }
  589.     }
  590.     return false;
  591. }
  592.  
  593.  
  594.  
  595. function toggleMenu()
  596. {
  597.    
  598.     if(g('myMenuId').style.display == "none")
  599.     {
  600.         myConfig.speedTmp = myConfig.speed;
  601.         myConfig.speed = 1;
  602.         printHtmlMenu();
  603.         g('myMenuId').style.display = "block";
  604.     }
  605.     else
  606.     {
  607.         myConfig.speed = myConfig.speedTmp;
  608.        
  609.         mySaveConfig();
  610.         g('myMenuId').style.display = "none";
  611.     }
  612. }
  613.  
  614. function mySpinner()
  615. {  
  616.     var frames = ['⠋','⠛','⠙','⠹','⠸','⢸','⢰','⣰','⣠','⣤','⣄','⣆','⡆','⡇','⠇','⠏'];
  617.  
  618.     document.getElementById('mySpinner').innerHTML = ""+frames[myCount];
  619.     myCount++;
  620.     if(myCount >= frames.length)
  621.     {
  622.         myCount = 0;
  623.     }
  624. }
  625.  
  626.  
  627.  
  628. function printCss()
  629. {
  630.     var cssCode = "";
  631.     cssCode += `
  632.    
  633. #mySpinner
  634. {
  635.     text-decoration:none;
  636.     transition: transform ease 4s, background-color ease 4s;
  637.     transform-origin: left top;
  638. }
  639. .myAnimStart
  640. {
  641.     position: fixed;
  642.     transform: scale(30);
  643.     background-color:rgba(30,30,30,0.6);
  644. }
  645. .myAnimEnd
  646. {
  647.     position: fixed;
  648.     transform: scale(1);
  649.     background-color:rgba(200,200,200,0);
  650.  
  651. }
  652.  
  653. .close
  654. {
  655.     transition : background-color ease 0.3s;
  656. }
  657. .close:hover
  658. {
  659.     background-color:rgba(255,0,0,0.3);
  660. }
  661.  
  662. .scheme_grassy #myMenuId
  663. {
  664.     padding: 30px;
  665.     background-color: #C6EBA1; 
  666. }
  667. #myMenuIdTable
  668. {
  669.     text-align:center;
  670.     width:100%;
  671. }
  672. #myMenuIdTable > tbody > tr > td
  673. {
  674.     padding:8px 0 8px 0;
  675. }
  676.  
  677.     `;
  678.     return cssCode;
  679.    
  680. }
  681.  
  682.  
  683. function printHtmlMenu()
  684. {
  685.  
  686.     var myStrHtml = ""
  687.     myStrHtml = `
  688. <a href="#" class="close" onclick="toggleMenu();" style="position: absolute; top: 0px; right: 0px; padding:16px;">close</a>
  689.  
  690. <table id="myMenuIdTable"><tbody>
  691. <tr>
  692. <td style="text-align:right;"><input id="autoObserveBtn" type="checkbox" `+((myConfig.autoObserveBtn) ? "checked" : "")+`>
  693. <label for="autoObserveBtn">Auto Observe </label></td><td style="text-align:left;"> the Sky </td><td> </td><td> </td><td> </td><td> </td>
  694. </tr>
  695.    
  696. <tr style="display:`+((gr("manpower").unlocked) ? "table-row" : "none")+`">
  697. <td><input id="autoHunt" type="checkbox" `+((myConfig.autoHunt) ? "checked" : "")+`>
  698. <label for="autoHunt">Auto send </td><td>hunters</td><td> if </td><td>` +gr('manpower').title+` </td><td> will be full in </label>  </td><td><input type="number" id="autoHuntSec" value="`+(myConfig.autoHuntSec)+`" style="width:8ch" /> seconds</td>
  699. </tr>
  700.    
  701. <tr style="display:`+((gr("faith").unlocked) ? "table-row" : "none")+`">
  702. <td><input id="autoPraise" type="checkbox" `+((myConfig.autoPraise) ? "checked" : "")+`>
  703. <label for="autoPraise">Auto Praise </td><td> the sun</td><td> if </td><td>`+gr('faith').title+` </td><td> will be full in </label> </td><td><input type="number" id="autoPraiseSec" value="`+(myConfig.autoPraiseSec)+`" style="width:8ch" /> seconds</td>
  704. </tr>
  705.  
  706. <tr style="display:`+((gamePage.workshop.getCraft("parchment").unlocked) ? "table-row" : "none")+`">
  707. <td><input id="autoFurs" type="checkbox" `+((myConfig.autoFurs) ? "checked" : "")+`>
  708. <label for="autoFurs">Auto Craft </td><td>`+gr("parchment").title+` </td><td> if </td><td>`+gr('furs').title+` </td><td> is more than </label>  </td><td><input type="number" id="autoFursSec" value="`+(myConfig.autoFursSec)+`" style="width:18ch" /> units&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  709. </tr>
  710. <tr style="display:`+((gamePage.workshop.getCraft("compedium").unlocked) ? "table-row" : "none")+`">
  711. <td><input id="autoCompedium" type="checkbox" `+((myConfig.autoCompedium) ? "checked" : "")+`>
  712. <label for="autoCompedium">Auto Craft </td><td>`+gr("compedium").title+` </td><td> if </td><td> `+gr("science").title+` </td><td> will be full in </label> </td><td><input type="number" id="autoCompediumSec" value="`+(myConfig.autoCompediumSec)+`" style="width:8ch" /> sec, spend <input type="number" min="1" max="100" id="autoCompediumSpend" value="`+(myConfig.autoCompediumSpend)+`" style="width:8ch" />&#37;</td>
  713. </tr>
  714. <tr style="display:`+((gamePage.workshop.getCraft("blueprint").unlocked) ? "table-row" : "none")+`">
  715. <td><input id="autoBlueprint" type="checkbox" `+((myConfig.autoBlueprint) ? "checked" : "")+`>
  716. <label for="autoBlueprint">Auto Craft </td><td>`+gr("blueprint").title+` </td><td> if </td><td> `+gr("science").title+` </td><td> will be full in </label> </td><td><input type="number" id="autoBlueprintSec" value="`+(myConfig.autoBlueprintSec)+`" style="width:8ch" /> sec, spend <input type="number" min="1" max="100" id="autoBlueprintSpend" value="`+(myConfig.autoBlueprintSpend)+`" style="width:8ch" />&#37;</td>
  717. </tr>
  718.  
  719. <tr>
  720. <td>&nbsp;</td>
  721. <td>&nbsp;</td>
  722. <td>&nbsp;</td>
  723. <td>&nbsp;</td>
  724. <td>&nbsp;</td>
  725. <td>&nbsp;</td>
  726. </tr>
  727.  
  728. <tr style="display:`+((getRace("zebras").unlocked) ? "table-row" : "none")+`">
  729. <td><input id="autoTradeZebras" type="checkbox" `+((myConfig.autoTradeZebras) ? "checked" : "")+`>
  730. <label for="autoTradeZebras">Auto Trade </td><td>`+getRace("zebras").title+`</td><td> if </td><td>` +gr('titanium').title+` </td><td> is lower than </label>    </td><td><input type="number" min="0" max="100" id="autoTradeZebrasTitaniumPerCent" value="`+(myConfig.autoTradeZebrasTitaniumPerCent)+`" style="width:8ch" />&#37; try to send <input type="number" id="autoTradeZebrasSpend" value="`+(myConfig.autoTradeZebrasSpend)+`" style="width:8ch" /> trades</td>
  731. </tr>
  732.  
  733. <tr style="display:`+((getRace("leviathans").unlocked) ? "table-row" : "none")+`">
  734. <td><input id="autoTradeLeviathans" type="checkbox" `+((myConfig.autoTradeLeviathans) ? "checked" : "")+`>
  735. <label for="autoTradeLeviathans">Auto Trade </td><td>`+getRace("leviathans").title+`</td><td> if </td><td>` +gr('unobtainium').title+` </td><td> will be full in </label>   </td><td><input type="number" id="autoTradeLeviathansSec" value="`+(myConfig.autoTradeLeviathansSec)+`" style="width:8ch" /> sec, spend <input type="number" min="1" max="100" id="autoTradeLeviathansSpend" value="`+(myConfig.autoTradeLeviathansSpend)+`" style="width:8ch" />&#37;</td>
  736. </tr>
  737.  
  738. <tr style="display:`+((gr("blackcoin").unlocked) ? "table-row" : "none")+`">
  739. <td><input id="autoTradeBcoin" type="checkbox" `+((myConfig.autoTradeBcoin) ? "checked" : "")+`>
  740. <label for="autoTradeBcoin">Auto Trade </td><td>`+gr("blackcoin").title+`</td><td> Buy if </td><td>` +gr('blackcoin').title+` </td><td>price is lower than </label> </td><td><input type="number" id="autoTradeBcoinBuyMax" value="`+(myConfig.autoTradeBcoinBuyMax)+`" style="width:8ch" /> , Sell if pice is higher than <input type="number" id="autoTradeBcoinSellMin" value="`+(myConfig.autoTradeBcoinSellMin)+`" style="width:8ch" /> </td>
  741. </tr>
  742.  
  743. <tr style="display:`+((gamePage.religion.meta[1].meta[8].val) ? "table-row" : "none")+`">
  744. <td><input id="autoResetPraise" type="checkbox" `+((myConfig.autoResetPraise) ? "checked" : "")+`>
  745. <label for="autoResetPraise">Auto Reset </td><td>`+gr("faith").title+` </td><td> if accumulated</td><td>`+gr('faith').title+` </td><td> is more than </label>   </td><td><input type="number" id="autoResetPraiseUnit" value="`+(myConfig.autoResetPraiseUnit)+`" style="width:18ch" /> units&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  746. </tr>
  747.  
  748. <tr style="display:`+((getWorkshop("chronoforge").unlocked && gr("timeCrystal").unlocked) ? "table-row" : "none")+`">
  749. <td><input id="autoCombustTC" type="checkbox" `+((myConfig.autoCombustTC) ? "checked" : "")+`>
  750. <label for="autoCombustTC">Auto Combust </td><td>`+gr("timeCrystal").title+`</td><td> if </td><td>heat</td><td> is lower than </label>  </td><td><input type="number" id="autoCombustTCHeat" value="`+(myConfig.autoCombustTCHeat)+`" style="width:8ch" /> , Combust
  751. <select id="autoCombustTCNb">
  752.     <option value="1" `+((myConfig.autoCombustTCNb == 1)? `selected` : `` )+`>1</option>
  753.     <option value="5" `+((myConfig.autoCombustTCNb == 5)? `selected` : `` )+`>5</option>
  754.     <option value="45" `+((myConfig.autoCombustTCNb == 45)? `selected` : `` )+`>45</option>
  755.     <option value="500" `+((myConfig.autoCombustTCNb == 500)? `selected` : `` )+`>500</option>
  756. </select> TC</td>
  757. </tr>
  758.  
  759.  
  760. <tr>
  761. <td>&nbsp;</td>
  762. <td>&nbsp;</td>
  763. <td>&nbsp;</td>
  764. <td>&nbsp;</td>
  765. <td>&nbsp;</td>
  766. <td>&nbsp;</td>
  767. </tr>
  768.  
  769.     `;
  770.     // <input type="number" id="autoCombustTCNb" value="`+(myConfig.autoCombustTCNb)+`" style="width:8ch" />
  771.     //gamePage.time.heat
  772.     myStrHtml += genCraftList();
  773.     myStrHtml += `</body></table><br><br>&nbsp;&nbsp;&nbsp;!Déja Vus ! speed : <input id="mySpeed" type="number" min="1" max="640" value="`+(myConfig.speedTmp)+`" style="width:5ch"><br><br>
  774.     <a href="#" class="close" onclick="toggleMenu();" style="position: relative; top: 0px; right: 0px; padding:16px;">close</a>
  775.     <br><br>`;
  776.    
  777.    
  778.     g("myMenuId").innerHTML = myStrHtml;
  779.  
  780. }
  781.  
  782. function genCraftList()
  783. {
  784.     var myStr = "";
  785.     var trDisplay = "";
  786.     craftList.forEach(function(truck){ 
  787.     //if(gamePage.workshop.getCraft(truck[0]).unlocked)
  788.     //{
  789.    
  790.     console.log(truck[0]+" et "+truck[0]);
  791.  
  792.     if( (gamePage.workshop.getCraft(truck[0]).unlocked && gr(truck[0]).unlocked && gr(truck[1]).unlocked) )
  793.     {
  794.         trDisplay = "table-row";
  795.     }
  796.     else
  797.     {
  798.         trDisplay = "none";
  799.     }
  800.     console.log(trDisplay);
  801.         myStr += `
  802. <tr style="display:`+trDisplay+`">
  803. <td><input id="auto`+truck[0]+`" type="checkbox"  `+( (eval("myConfig."+truck[0]) ) ? "checked" : "")+`>
  804. <label for="auto`+truck[0]+`">Auto Craft </td><td>`+gr(truck[0]).title+` </td><td> if </td><td> `+gr(truck[1]).title+` </td><td> will be full in </label> </td><td><input type="number" id="auto`+truck[0]+`Sec" value="`+(eval('myConfig.'+truck[0]+'Sec'))+`" style="width:8ch" /> sec, spend <input type="number" min="1" max="100" id="auto`+truck[0]+`Spend" value="`+(eval('myConfig.'+truck[0]+'Spend'))+`" style="width:8ch" />&#37;</td>
  805. </tr>
  806.         `;
  807.     //}
  808.     }) 
  809.     return myStr;
  810. }
  811.  
  812. function injectCss()
  813. {
  814.     var cssCode = printCss();
  815.     var styleElement = document.createElement("style");
  816.     styleElement.type = "text/css";
  817.     if (styleElement.styleSheet)
  818.     {
  819.         styleElement.styleSheet.cssText = cssCode;
  820.     }
  821.     else
  822.     {
  823.         styleElement.appendChild(document.createTextNode(cssCode));
  824.     }
  825.     document.getElementsByTagName("head")[0].appendChild(styleElement);
  826.    
  827. }
  828.  
  829. function injectHtmlMenu()
  830. {
  831.     var myDiv = document.createElement("div");
  832.     //myDiv.innerHTML = myStrHtml;
  833.     myDiv.setAttribute("class", "dialog help");
  834.     myDiv.setAttribute("style", "height: 72vh !important;top:225px !important;display:none; overflow:auto;width:720px;margin-left:-30%;");
  835.     myDiv.setAttribute("id", "myMenuId");
  836.     document.body.appendChild(myDiv);
  837. }
  838.  
  839. function myTurnOffJobs()
  840. {
  841. myConfig.autoHunt           = false;
  842. myConfig.autoPraise         = false;
  843.  
  844. myConfig.autoTradeZebras        = false;
  845. myConfig.autoTradeLeviathans    = false;
  846. myConfig.autoTradeBcoin         = false;
  847. myConfig.autoCombustTC          = false;
  848. myConfig.autoResetPraise        = false;
  849.  
  850. myConfig.autoFurs           = false;
  851. myConfig.autoCompedium      = false;
  852. myConfig.autoBlueprint      = false;
  853.  
  854. myConfig.wood               = false;
  855. myConfig.beam               = false;
  856. myConfig.slab               = false;
  857. myConfig.plate              = false;
  858. myConfig.steel              = false;
  859. myConfig.manuscript         = false;
  860. myConfig.kerosene           = false;
  861. myConfig.thorium            = false;
  862. myConfig.alloy              = false;
  863. myConfig.eludium            = false;
  864.  
  865. localStorage.setItem("nipBotConfig", JSON.stringify(myConfig));
  866. }
  867.  
  868. function mySaveConfig()
  869. {
  870.    
  871. myConfig.speed              = g('mySpeed').value;
  872. //console.log(myConfig.speed);
  873. if(myConfig.speed < 1 || myConfig.speed > 640){myConfig.speed = 1}
  874.  
  875. myConfig.autoObserveBtn     = g('autoObserveBtn').checked;
  876. myConfig.autoHunt           = g('autoHunt').checked;
  877. myConfig.autoHuntSec        = g('autoHuntSec').value;
  878. myConfig.autoPraise         = g('autoPraise').checked;
  879. myConfig.autoPraiseSec      = g('autoPraiseSec').value;
  880.  
  881. myConfig.autoTradeZebras                    = g('autoTradeZebras').checked;
  882. myConfig.autoTradeZebrasTitaniumPerCent     = g('autoTradeZebrasTitaniumPerCent').value;
  883. myConfig.autoTradeZebrasSpend               = g('autoTradeZebrasSpend').value;
  884. myConfig.autoTradeLeviathans                = g('autoTradeLeviathans').checked;
  885. myConfig.autoTradeLeviathansSec             = g('autoTradeLeviathansSec').value;
  886. myConfig.autoTradeLeviathansSpend           = g('autoTradeLeviathansSpend').value;
  887. myConfig.autoTradeBcoin                     = g('autoTradeBcoin').checked;
  888. myConfig.autoTradeBcoinBuyMax               = g('autoTradeBcoinBuyMax').value;
  889. myConfig.autoTradeBcoinSellMin              = g('autoTradeBcoinSellMin').value;
  890. myConfig.autoCombustTC                      = g('autoCombustTC').checked;
  891. myConfig.autoCombustTCHeat                  = g('autoCombustTCHeat').value;
  892. myConfig.autoCombustTCNb                    = g('autoCombustTCNb').value;
  893. //myConfig.autoCombustTCNb                  = g('autoCombustTCNb').selected;
  894. myConfig.autoResetPraise                    = g('autoResetPraise').checked;
  895. myConfig.autoResetPraiseUnit                = g('autoResetPraiseUnit').value;
  896.  
  897. myConfig.autoFurs           = g('autoFurs').checked;
  898. myConfig.autoFursSec        = g('autoFursSec').value;
  899. myConfig.autoCompedium      = g('autoCompedium').checked;
  900. myConfig.autoCompediumSec   = g('autoCompediumSec').value;
  901. myConfig.autoCompediumSpend = g('autoCompediumSpend').value;
  902. myConfig.autoBlueprint      = g('autoBlueprint').checked;
  903. myConfig.autoBlueprintSec   = g('autoBlueprintSec').value;
  904. myConfig.autoBlueprintSpend = g('autoBlueprintSpend').value;
  905.  
  906.  
  907. myConfig.wood               = g('autowood').checked;
  908. myConfig.woodSec            = g('autowoodSec').value;
  909. myConfig.woodSpend          = g('autowoodSpend').value;
  910. myConfig.beam               = g('autobeam').checked;
  911. myConfig.beamSec            = g('autobeamSec').value;
  912. myConfig.beamSpend          = g('autobeamSpend').value;
  913. myConfig.slab               = g('autoslab').checked;
  914. myConfig.slabSec            = g('autoslabSec').value;
  915. myConfig.slabSpend          = g('autoslabSpend').value;
  916. myConfig.plate              = g('autoplate').checked;
  917. myConfig.plateSec           = g('autoplateSec').value;
  918. myConfig.plateSpend         = g('autoplateSpend').value;
  919. myConfig.steel              = g('autosteel').checked;
  920. myConfig.steelSec           = g('autosteelSec').value;
  921. myConfig.steelSpend         = g('autosteelSpend').value;
  922. myConfig.manuscript         = g('automanuscript').checked;
  923. myConfig.manuscriptSec      = g('automanuscriptSec').value;
  924. myConfig.manuscriptSpend    = g('automanuscriptSpend').value;
  925. myConfig.kerosene           = g('autokerosene').checked;
  926. myConfig.keroseneSec        = g('autokeroseneSec').value;
  927. myConfig.keroseneSpend      = g('autokeroseneSpend').value;
  928. myConfig.thorium            = g('autothorium').checked;
  929. myConfig.thoriumSec         = g('autothoriumSec').value;
  930. myConfig.thoriumSpend       = g('autothoriumSpend').value;
  931. myConfig.alloy              = g('autoalloy').checked;
  932. myConfig.alloySec           = g('autoalloySec').value;
  933. myConfig.alloySpend         = g('autoalloySpend').value;
  934. myConfig.eludium            = g('autoeludium').checked;
  935. myConfig.eludiumSec         = g('autoeludiumSec').value;
  936. myConfig.eludiumSpend       = g('autoeludiumSpend').value;
  937.  
  938. localStorage.setItem("nipBotConfig", JSON.stringify(myConfig));
  939.    
  940. }
  941.  
  942. /*
  943.   ______                 ____        _  
  944.  |  ____|               |  _ \      | |  
  945.  | |__ _   _ _ __  ___  | |_) | ___ | |_
  946.  |  __| | | | '_ \/ __| |  _ < / _ \| __|
  947.  | |  | |_| | | | \__ \ | |_) | (_) | |_
  948.  |_|   \__,_|_| |_|___/ |____/ \___/ \__|
  949.                                          
  950. */
  951.  
  952.  
  953. function nipBot()
  954. {
  955.     if(gamePage.ticks >= lastTick + evryTicks)
  956.     {
  957.         //console.log(gamePage.ticks);
  958.        
  959.        
  960.         mySpinner();
  961.         myJobs();
  962.         setTimeout(myJobsTrade1, 450);
  963.         setTimeout(myJobsTrade2, 850);
  964.  
  965.         lastTick = gamePage.ticks;
  966.     }
  967. }
  968.  
  969. function myJobsTrade1()
  970. {
  971.     if(myConfig.autoTradeZebras)
  972.     {
  973.         //console.log("BRUH_autoTradeZebras");
  974.         if(myConfig.autoTradeZebrasTitaniumPerCent == 100)
  975.         {
  976.             gamePage.diplomacy.tradeMultiple(getRace("zebras"), myConfig.autoTradeZebrasSpend);
  977.             //console.log("autoTradeZebrasTitaniumPerCent==100");
  978.         }
  979.         else if (gr("titanium").value < ((gr("titanium").maxValue / 100) * myConfig.autoTradeZebrasTitaniumPerCent) )
  980.         {
  981.             gamePage.diplomacy.tradeMultiple(getRace("zebras"), myConfig.autoTradeZebrasSpend);
  982.             //console.log("autoTradeZebrasTitaniumPerCent!=100");
  983.         }
  984.     }
  985. }
  986. function myJobsTrade2()
  987. {  
  988.     if(myConfig.autoTradeLeviathans)
  989.     {
  990.         //console.log("BRUH_autoTradeLeviathans");
  991.         //gamePage.diplomacy.tradeMultiple(getRace("leviathans"), 99)
  992.         if(getRace("leviathans").duration > 10)
  993.         {
  994.             if ((gr("unobtainium").value + (gr("unobtainium").perTickCached * 5 * myConfig.autoTradeLeviathansSec)) > gr("unobtainium").maxValue)
  995.             {
  996.                 nbToCraft = Math.floor( (gr("unobtainium").value * (myConfig.autoTradeLeviathansSpend / 100)) / 5000 );
  997.                 if(nbToCraft < 1){nbToCraft = 1;}
  998.                 gamePage.diplomacy.tradeMultiple(getRace("leviathans"), nbToCraft)
  999.                
  1000.                 //console.log("autoTradeLeviathans_nbToCraft="+nbToCraft);
  1001.             }
  1002.        
  1003.         }
  1004.     }  
  1005. }
  1006.  
  1007. function myJobs()
  1008. {
  1009.     var nbToCraft = 0;
  1010.     var objTemp;
  1011.     var objTempSec;
  1012.     var priceTmp;
  1013.    
  1014.     myConfig.speedTmp = myConfig.speed;
  1015.     myConfig.speed = 1;
  1016.     if(myConfig.autoObserveBtn)
  1017.     {
  1018.         if (g('observeBtn') != null)
  1019.         {
  1020.             g('observeBtn').click();
  1021.         }
  1022.     }
  1023.     if(myConfig.autoHunt)
  1024.     {
  1025.         if ((gr("manpower").value + (gr("manpower").perTickCached * 5 * myConfig.autoHuntSec)) > gr("manpower").maxValue)
  1026.         {
  1027.             gamePage.village.huntAll();
  1028.         }
  1029.     }  
  1030.  
  1031.    
  1032.  
  1033.    
  1034.     if(myConfig.autoTradeBcoin)
  1035.     {
  1036.         if(getRace("leviathans").duration > 1)
  1037.         {
  1038.             if(gamePage.calendar.cryptoPrice < myConfig.autoTradeBcoinBuyMax)
  1039.             {
  1040.                 if( (gamePage.resPool.resourceMap.relic.value / gamePage.calendar.cryptoPrice) >= (gamePage.resPool.resourceMap.blackcoin.value / 1000) )
  1041.                 //if(gamePage.resPool.resourceMap.relic.value >= (gamePage.calendar.cryptoPrice * 100) )
  1042.                 {
  1043.                     game.diplomacy.buyBcoin();
  1044.                 }
  1045.             }
  1046.             if(gamePage.calendar.cryptoPrice > myConfig.autoTradeBcoinSellMin)
  1047.             {
  1048.                 if(gamePage.resPool.resourceMap.blackcoin.value > 0)
  1049.                 {
  1050.                     game.diplomacy.sellBcoin();
  1051.                 }              
  1052.             }
  1053.         }
  1054.     }
  1055.     if(myConfig.autoCombustTC)
  1056.     {
  1057.         if(gamePage.time.heat < myConfig.autoCombustTCHeat)
  1058.         {
  1059.             if(myConfig.autoCombustTCNb == 1)
  1060.             {
  1061.                 gamePage.timeTab.cfPanel.children[0].children[0].onClick();
  1062.             }
  1063.             else if(myConfig.autoCombustTCNb == 5)
  1064.             {
  1065.                 gamePage.timeTab.cfPanel.children[0].children[0].model.nextCycleLink.handler();
  1066.             }
  1067.             else if(myConfig.autoCombustTCNb == 45)
  1068.             {
  1069.                 gamePage.timeTab.cfPanel.children[0].children[0].model.previousCycleLink.handler();
  1070.             }
  1071.             else if(myConfig.autoCombustTCNb == 500)
  1072.             {
  1073.                 gamePage.timeTab.cfPanel.children[0].children[0].model.tenErasLink.handler();
  1074.             }
  1075.            
  1076.             //gamePage.timeTab.cfPanel.children[0].children[0].onClick();
  1077.             //gamePage.timeTab.cfPanel.children[0].children[0].model.nextCycleLink.handler(); //x5
  1078.             //gamePage.timeTab.cfPanel.children[0].children[0].model.previousCycleLink.handler(); //x45
  1079.             //gamePage.timeTab.cfPanel.children[0].children[0].model.tenErasLink.handler(); //x500
  1080.         }
  1081.     }
  1082.     if(myConfig.autoResetPraise)
  1083.     {
  1084.         if(gamePage.religion.faith > myConfig.autoResetPraiseUnit)
  1085.         {
  1086.             //gamePage.tabs[5].resetFaithInternal(1.01);
  1087.             //gamePage.religionTab.resetFaithInternal(1.01);
  1088.             game.religion.resetFaith(1.01, false);
  1089.            
  1090.         }
  1091.     }
  1092.  
  1093.     if(myConfig.autoPraise)
  1094.     {
  1095.         if ((gr("faith").value + (gr("faith").perTickCached * 5 * myConfig.autoPraiseSec)) > gr("faith").maxValue)
  1096.         {
  1097.             gamePage.religion.praise();
  1098.         }
  1099.     }
  1100.    
  1101.     if(myConfig.autoFurs)
  1102.     {
  1103.         if (gr("furs").value > myConfig.autoFursSec)
  1104.         {
  1105.             gamePage.craft("parchment", Math.floor(gr("furs").value / 1000) );
  1106.         }
  1107.     }  
  1108.     if(myConfig.autoCompedium)
  1109.     {
  1110.         if ((gr("science").value + (gr("science").perTickCached * 5 * myConfig.autoCompediumSec)) > gr("science").maxValue)
  1111.         {
  1112.             //nbToCraft = Math.floor( (gr("science").perTickCached * 5 * myConfig.autoCompediumSec) / 10000);
  1113.             nbToCraft = Math.floor( (gr("science").value * (myConfig.autoCompediumSpend / 100)) / 10000 );
  1114.             if(nbToCraft < 1){nbToCraft = 1;}
  1115.             gamePage.craft("compedium", nbToCraft);
  1116.         }
  1117.     }  
  1118.     if(myConfig.autoBlueprint)
  1119.     {
  1120.         if ((gr("science").value + (gr("science").perTickCached * 5 * myConfig.autoBlueprintSec)) > gr("science").maxValue)
  1121.         {
  1122.             //nbToCraft = Math.floor( (gr("science").perTickCached * 5 * myConfig.autoBlueprintSec) / 25000);
  1123.             nbToCraft = Math.floor( (gr("science").value * (myConfig.autoBlueprintSpend / 100)) / 25000 );
  1124.             if(nbToCraft < 1){nbToCraft = 1;}
  1125.             gamePage.craft("blueprint", nbToCraft);
  1126.         }
  1127.     }
  1128.    
  1129.     craftList.forEach(function(truck){ 
  1130.     objTemp = eval("myConfig."+truck[0]);
  1131.     objTempSec = eval("myConfig."+truck[0]+"Sec");
  1132.     priceTmp = myLast(gamePage.workshop.getCraft(truck[0]).prices).val;
  1133.    
  1134.     if(objTemp)
  1135.     {
  1136.         if ((gr(truck[1]).value + (gr(truck[1]).perTickCached * 5 * objTempSec)) > gr(truck[1]).maxValue)
  1137.         {
  1138.             //nbToCraft = Math.floor( (gr(truck[1]).perTickCached * 5 * objTempSec) / priceTmp);
  1139.             nbToCraft = Math.floor( (gr(truck[1]).value * ( eval("myConfig."+truck[0]+"Spend") / 100)) / priceTmp );
  1140.             if(nbToCraft < 1){nbToCraft = 1;}
  1141.             gamePage.craft(truck[0], nbToCraft);
  1142.         }
  1143.     }
  1144.        
  1145.     })
  1146.     myConfig.speed = myConfig.speedTmp;
  1147.    
  1148. }
  1149.  
  1150.  
  1151. //
  1152. // Lag test
  1153. //
  1154.  
  1155. var checkLagOld = 0;
  1156. var checkLagNow = 0;
  1157. var checkLagSpeed = 0;
  1158. var checkLagIsLaggin = false;
  1159. var checkLagNbSecToCheck = 300;
  1160. checkLag();
  1161.  
  1162. function checkLag()
  1163. {
  1164.     //console.log("checkLag Start");
  1165.    
  1166.     checkLagOld = Math.round(game.calendar.trueYear() * game.calendar.seasonsPerYear * game.calendar.daysPerSeason * game.calendar.ticksPerDay / game.ticksPerSecond);
  1167.    
  1168.     setTimeout(checkLagNext, 1000);
  1169. }
  1170.  
  1171. function checkLagNext()
  1172. {
  1173.     //console.log("checkLagNow Start");
  1174.     checkLagNow = Math.round(game.calendar.trueYear() * game.calendar.seasonsPerYear * game.calendar.daysPerSeason * game.calendar.ticksPerDay / game.ticksPerSecond);
  1175.    
  1176.     calculatedSpeed = Math.round(checkLagNow - checkLagOld);
  1177.    
  1178.     console.log("Speed\t"+calculatedSpeed+"/"+myConfig.speed);
  1179.    
  1180.     if(checkLagIsLaggin)
  1181.     {
  1182.         if(calculatedSpeed > myConfig.speed + 2)
  1183.         {
  1184.             console.log("DejaVu!");
  1185.             setTimeout(checkLag, 1000*2);
  1186.         }
  1187.         else
  1188.         {
  1189.             console.log("DejaVu stoped ^^' "+game.calendar.year);
  1190.             checkLagIsLaggin = false;
  1191.             myConfig.speed = checkLagSpeed;
  1192.             setTimeout(checkLag, 1000*checkLagNbSecToCheck);
  1193.         }
  1194.     }
  1195.     else
  1196.     {
  1197.         //if(calculatedSpeed < myConfig.speed)
  1198.         //{
  1199.             checkLagIsLaggin = true;
  1200.             checkLagSpeed = myConfig.speed;
  1201.             myConfig.speed = 1;
  1202.             setTimeout(checkLag, 1000*5);
  1203.         //}
  1204.         //else
  1205.         //{
  1206.         //  setTimeout(checkLag, 1000*checkLagNbSecToCheck);           
  1207.         //}
  1208.     }
  1209.  
  1210. }
Tags: Kittensgame
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement