RTU BOT 1.1

RTU BOT

  1. // ==UserScript==
  2. // @name RTU BOT 1.1
  3. // @description RTU BOT
  4. // @version 1.1
  5. // @namespace https://tampermonkey.net
  6. // @match https://rebuildtheuniverse.com
  7. // ==/UserScript==
  8. function mod() {
  9. var GetGreenGlow = function(elemid){
  10.  
  11. var iBool = 0;
  12.  
  13.  
  14. if (document.getElementById("tc" + elemid)) {
  15.  
  16. var sClassName = document.getElementById("tc" + elemid).className;
  17.  
  18. var iPosOfNum = sClassName.search("next_glow");
  19.  
  20. if (iPosOfNum > 0) {
  21.  
  22. iBool = 1;
  23.  
  24. }
  25.  
  26. }
  27.  
  28.  
  29. return iBool;
  30.  
  31. }
  32.  
  33.  
  34. var HoleBildUrl = function(elemid){
  35.  
  36. var sUrl = null;
  37.  
  38.  
  39. if (elemid >= 0 && elemid <= 74) {
  40.  
  41.  
  42. if (elemid===0) {
  43.  
  44. sUrl = "images/quantumfoam.jpg";
  45.  
  46. } else {
  47.  
  48. sUrl = "images/" + arUnit[elemid-1][11];
  49.  
  50. }
  51.  
  52. }
  53.  
  54. return sUrl;
  55.  
  56. }
  57.  
  58.  
  59. var GetCountForElem = function(elemid){
  60.  
  61. var iCount = 0;
  62.  
  63.  
  64. if (document.getElementById("idp" + elemid)) {
  65.  
  66. var elemText = document.getElementById("idp" + elemid).textContent;
  67.  
  68.  
  69. var iPosOfNum = elemText.search(":")+2;
  70.  
  71. var iLengthOfText = elemText.length;
  72.  
  73.  
  74. iCount = parseInt(elemText.substr(iPosOfNum,iLengthOfText-iPosOfNum));
  75.  
  76. }
  77.  
  78.  
  79. return iCount;
  80.  
  81. }
  82.  
  83.  
  84. var autoBuy = function(repeatInterval) {
  85.  
  86.  
  87. var CheckNext = function() {
  88.  
  89. for(var k = 74; k >= 0; k--) {
  90.  
  91. if (GetGreenGlow(k+1) == 1) {
  92.  
  93. tonext(k);
  94.  
  95. gritter(toTitleCase(arrayNames[k]), "Next auf " + GetCountForElem(k+1), HoleBildUrl(k),null, null);
  96.  
  97. k = -1;
  98.  
  99. }
  100.  
  101. }
  102.  
  103. }
  104.  
  105.  
  106. var CheckNewItems = function() {
  107.  
  108.  
  109. var arrayCount = [GetCountForElem(1),GetCountForElem(2),GetCountForElem(3),GetCountForElem(4),GetCountForElem(5),GetCountForElem(6),GetCountForElem(7),GetCountForElem(8),GetCountForElem(9),GetCountForElem(10)
  110.  
  111. ,GetCountForElem(11),GetCountForElem(12),GetCountForElem(13),GetCountForElem(14),GetCountForElem(15),GetCountForElem(16),GetCountForElem(17),GetCountForElem(18),GetCountForElem(19),GetCountForElem(20)
  112.  
  113. ,GetCountForElem(21),GetCountForElem(22),GetCountForElem(23),GetCountForElem(24),GetCountForElem(25),GetCountForElem(26),GetCountForElem(27),GetCountForElem(28),GetCountForElem(29),GetCountForElem(30)
  114.  
  115. ,GetCountForElem(31),GetCountForElem(32),GetCountForElem(33),GetCountForElem(34),GetCountForElem(35),GetCountForElem(36),GetCountForElem(37),GetCountForElem(38),GetCountForElem(39),GetCountForElem(40)
  116.  
  117. ,GetCountForElem(41),GetCountForElem(42),GetCountForElem(43),GetCountForElem(44),GetCountForElem(45),GetCountForElem(46),GetCountForElem(47),GetCountForElem(48),GetCountForElem(49),GetCountForElem(50)
  118.  
  119. ,GetCountForElem(51),GetCountForElem(52),GetCountForElem(53),GetCountForElem(54),GetCountForElem(55),GetCountForElem(56),GetCountForElem(57),GetCountForElem(58),GetCountForElem(59),GetCountForElem(60)
  120.  
  121. ,GetCountForElem(61),GetCountForElem(62),GetCountForElem(63),GetCountForElem(64),GetCountForElem(65),GetCountForElem(66),GetCountForElem(67),GetCountForElem(68),GetCountForElem(69),GetCountForElem(70)
  122.  
  123. ,GetCountForElem(71),GetCountForElem(72),GetCountForElem(73),GetCountForElem(74),GetCountForElem(75)];
  124.  
  125.  
  126. var MaxLevelProElem = 9;
  127.  
  128. var LevelDiffForNext = 5;
  129.  
  130.  
  131. bonusAll();10000
  132.  
  133.  
  134. for(var j = specialsbought; j < 75; j++) {
  135.  
  136. specialclick(j);
  137.  
  138. }
  139.  
  140.  
  141. for(var i = 75; i >= 1; i--) {
  142.  
  143. var a = "tc"+i;
  144.  
  145. if(document.getElementById(a)){
  146.  
  147. if(document.getElementById(a).style.opacity == 1){
  148.  
  149.  
  150. if(arrayCount[i-1]<= MaxLevelProElem){
  151.  
  152. calculsclick(i-1);
  153.  
  154. arrayCount[i-1] = ++arrayCount[i-1];
  155.  
  156. gritter(toTitleCase(arrayNames[i-1]), "Von " + (arrayCount[i-1]-1) + " auf " + arrayCount[i-1], HoleBildUrl(i-1), null, null);
  157.  
  158. }
  159.  
  160. }
  161.  
  162. }
  163.  
  164. }
  165.  
  166.  
  167. setTimeout(function(){CheckNext()}, 1000);
  168.  
  169.  
  170. };
  171.  
  172. return setInterval(CheckNewItems, repeatInterval);
  173.  
  174. };
  175.  
  176. autoBuy(3000);
  177. }
  178. mod()