erevolution tools

erevolution prof

  1. // ==UserScript==
  2.  
  3. // @name erevolution tools
  4.  
  5. // @namespace https://www.erevollution.coms
  6.  
  7. // @description erevolution prof
  8.  
  9. // @include https://www.erevollution.com/*
  10.  
  11. // @exclude https://www.erevollution.com/en/special-items
  12.  
  13. // @version 0.0.1.20161218200915
  14. // ==/UserScript==
  15.  
  16. //auto eat
  17. setInterval(myMethod, 9720000);
  18.  
  19. function myMethod( )
  20. {
  21. document.getElementById("energyButton").click()
  22. }
  23.  
  24. //dmg calc prof
  25. function wepon(wep,hit,gold,resta,restp,st) {
  26. this.st = st;
  27.  
  28. this.idstring='#udarec'+st;
  29.  
  30. this.wep = wep;
  31.  
  32. this.hit =Math.ceil(hit);
  33.  
  34. this.gold = gold;
  35. this.goldta= (2.5-(nextta*gold)).toFixed(2);
  36. this.goldtp= (5-(nexttp*gold)).toFixed(2)
  37.  
  38. this.nextta=resta/hit;
  39. this.nextta=Math.ceil(this.nextta);
  40.  
  41. this.nexttp=restp/hit;
  42. this.nexttp=Math.ceil(this.nexttp);
  43.  
  44. this.changeWep = function (wep) {
  45. this.hit = this.hit/this.wep;
  46. console.log(hit);
  47. this.wep = wep;
  48. this.changeHit(this.hit*wep);
  49. }
  50. this.changeHit = function (hit) {
  51. this.hit =Math.ceil(hit);
  52.  
  53. this.nextta=resta/hit;
  54. this.nextta=Math.ceil(this.nextta);
  55.  
  56. this.nexttp=restp/hit;
  57. this.nexttp=Math.ceil(this.nexttp);
  58. }
  59. this.changeGold = function (gold) {
  60. this.gold = gold;
  61. this.goldta= ( (2.5 - (this.nextta*gold)).toFixed(2) );
  62. this.goldtp= ( (5 - (this.nexttp*gold)).toFixed(2));
  63. }
  64.  
  65. }
  66.  
  67.  
  68. function spremeniWep(owep,wep,gold){
  69. if(wep=="n"){
  70. owep.changeGold(gold);
  71. }
  72. if (gold=="n"){
  73. owep.changeWep(wep);
  74. }
  75.  
  76. $(owep.idstring).html("<b>"+owep.hit+"<br> "+owep.nextta+"<br> "+owep.goldta+" <br> "+owep.nexttp+" <br> "+owep.goldtp);
  77. jquery();
  78.  
  79. }
  80.  
  81.  
  82.  
  83.  
  84. function udarecEna(sprem){
  85. wepon1.changeHit(sprem);
  86. $(wepon1.idstring).html("<b>"+wepon1.hit+"<br> "+wepon1.nextta+"<br> 0 <br> "+wepon1.nexttp+" <br> 0 <br> - <br> - </b>");
  87. wepon2.changeHit(sprem);
  88. spremeniWep(wepon2);
  89. wepon3.changeHit(sprem);
  90. spremeniWep(wepon3);
  91. wepon4.changeHit(sprem);
  92. spremeniWep(wepon4);
  93. wepon5.changeHit(sprem);
  94. spremeniWep(wepon5);
  95. wepon6.changeHit(sprem);
  96. spremeniWep(wepon6);
  97. }
  98.  
  99. function udarecWep(gold,st,wep) {
  100. switch(st) {
  101. case 2:
  102. spremeniWep(wepon2,wep,gold);
  103. break;
  104. case 3:
  105. spremeniWep(wepon3,wep,gold);
  106. break;
  107. case 4:
  108. spremeniWep(wepon4,wep,gold);
  109. break;
  110. case 5:
  111. spremeniWep(wepon5,wep,gold);
  112. break;
  113. case 6:
  114. spremeniWep(wepon6,wep,gold);
  115. break;
  116. }
  117. }
  118.  
  119.  
  120.  
  121.  
  122. var x = document.getElementsByClassName("vs164-2");
  123. var moc = x[0].innerHTML;
  124. var car="";
  125. for(i=0;i<moc.length;i++)
  126. {
  127. if(moc[i]==","){
  128. car=moc[i-1];
  129. break;
  130. }
  131. }
  132.  
  133. moc=moc.replace(car+',',car);
  134. moc = parseFloat(moc, 10) ;
  135.  
  136. var razmerje = document.getElementsByClassName("vs165-5");
  137. var level = document.getElementsByClassName("vs164-6 vs164-13");
  138. level=level[0].innerHTML;
  139. achivment= $(".vs164-5").attr("src");
  140. achivment=achivment[19]+achivment[20];
  141. var list=[];
  142. for (i=0; i<razmerje.length ; i++){
  143. var thisseznam = razmerje[i].innerHTML;
  144.  
  145. thisseznam= thisseznam.replace(/<[^>]*>/g, ''); // Remove HTML tags
  146. thisseznam = thisseznam.replace(/[[^]]*]/g, ''); // Remove anything within square brackets
  147. list[i]=thisseznam;
  148. }
  149.  
  150. var st=0;
  151. var wep=1;
  152. var tp= list[0];
  153. tp= tp.replace(/,/g,'')
  154. tp=tp.split("/")
  155. var restp=tp[1]-tp[0];
  156.  
  157. var ta= list[1];
  158. ta=ta.replace(/,/g,'')
  159. ta=ta.split("/")
  160. var resta=ta[1]-ta[0];
  161.  
  162. var lk=5;
  163. var ak=0.05;
  164. var l=level*lk+moc;
  165. var a=1+achivment*ak;
  166. var ne=1;
  167. var k=l*a*ne;
  168. k=Math.ceil(k);
  169. var ene=1;
  170. var boos=1;
  171. var hit=k*ene*boos;
  172. var nextta=resta/hit;
  173. nextta=Math.ceil(nextta);
  174. var nexttp=restp/hit;
  175. nexttp=Math.ceil(nexttp);
  176.  
  177. var gold=0;
  178. var idstring="";
  179.  
  180. var wepon1=new wepon(wep,hit,gold,resta,restp,1);
  181. var wepon2=new wepon(wep,hit,gold,resta,restp,2);
  182. var wepon3=new wepon(wep,hit,gold,resta,restp,3);
  183. var wepon4=new wepon(wep,hit,gold,resta,restp,4);
  184. var wepon5=new wepon(wep,hit,gold,resta,restp,5);
  185. var wepon6=new wepon(wep,hit,gold,resta,restp,6);
  186.  
  187. var goldstring= "type='text'></input></label>";
  188.  
  189. var wepstring= "<option value='1'>none</option>"+
  190. "<option value='1.2'>1.2</option>"+
  191. "<option value='1.4'>1.4</option>"+
  192. "<option value='1.6'>1.6</option>"+
  193. "<option value='1.8'>1.8</option>"+
  194. "<option value='2'>2</option>"+
  195. "<option value='2.2'>2.2</option>"+
  196. "<option value='2.4'>2.4</option>"+
  197. "<option value='2.6'>2.6</option>"+
  198. "<option value='2.8'>2.8</option>"+
  199. "<option value='3'>3</option>"+
  200. "<option value='3.2'>3.2</option>"+
  201. "<option value='3.4'>3.4</option>"+
  202. "<option value='3.6'>3.6</option>"+
  203. "<option value='3.8'>3.8</option>"+
  204. "<option value='4'>4</option>"+
  205. "<option value='5'>5</option>"+
  206. "</select>";
  207.  
  208. var htmlStringdiv = "<div id='vse'><br></br> <h3 style='margin-top: 15px;clear: both;'>"+
  209. "<span>Info Calc</span></h3>"+
  210. "<div id='infCalc' class='vs165' >"+
  211. "<label >energy<input id='infCalc_energy' value='1' type='text'></input></label>"+
  212. "<label>Damege Booster </label> <select id='dmg'>"+
  213. "<option value='1'>none</option>"+
  214. "<option value='1.1'>1.1</option>"+
  215. "<option value='1.2'>1.2</option>"+
  216. "<option value='1.3'>1.3</option>"+
  217. "<option value='1.4'>1.4</option>"+
  218. "<option value='1.5'>1.5</option>"+
  219. "</select>"+
  220.  
  221. "<table border='1'> "+
  222. "<tbody>"+
  223. "<tr>"+
  224. "<td><b>Influence: <br> Next TA: <br> gold TA <br> Next TP: <br> gold TP<br> Wep <br> gold/peac </b> <td>"+
  225. "<td> <b> <span id='udarec1'>"+hit+"<br> "+nextta+"<br> 0 <br> "+nexttp+" <br> 0 <br> - <br> 0 </b> </span></td>"+
  226. "<td> <b> <span id='udarec2'>"+hit+"<br> "+nextta+"<br> cost g/m <br> "+nexttp+" <br> cost g/m </span> <br> <select class='oroz' id='n2'>"+wepstring+" <br> <input class='zlat' id='infCalc_gold2'"+goldstring+" </b> </td>"+
  227. "<td> <b> <span id='udarec3'>"+hit+"<br> "+nextta+"<br> cost g/m <br> "+nexttp+" <br> cost g/m </span> <br> <select class='oroz' id='n3'>"+wepstring+" <br> <input class='zlat' id='infCalc_gold3'"+goldstring+" </b> </td>"+
  228. "<td> <b> <span id='udarec4'>"+hit+"<br> "+nextta+"<br> cost g/m <br> "+nexttp+" <br> cost g/m </span> <br> <select class='oroz' id='n4'>"+wepstring+" <br> <input class='zlat' id='infCalc_gold4'"+goldstring+" </b> </td>"+
  229. "<td> <b> <span id='udarec5'>"+hit+"<br> "+nextta+"<br> cost g/m <br> "+nexttp+" <br> cost g/m </span> <br> <select class='oroz' id='n5'>"+wepstring+" <br> <input class='zlat' id='infCalc_gold5'"+goldstring+" </b> </td>"+
  230. "<td> <b> <span id='udarec6'>"+hit+"<br> "+nextta+"<br> cost g/m <br> "+nexttp+" <br> cost g/m </span> <br> <select class='oroz' id='n6'>"+wepstring+" <br> <input class='zlat' id='infCalc_gold6'"+goldstring+" </b> </td>"+
  231. "</tr>"+
  232. "</tdbody>"+
  233. "</table>"+
  234.  
  235. "</div>"+
  236. "<br></br>"+
  237. "<div>";
  238.  
  239. $(htmlStringdiv).insertAfter(".vs165:last");
  240.  
  241. jquery()
  242.  
  243. function jquery(){
  244. $(document).ready(function(){
  245. $("select").css("display","inline");
  246. $(".zlat").css("width", "50px");
  247.  
  248. $('#infCalc_energy').on('input',function(e){
  249. ene=$("#infCalc_energy").val();
  250. hit=k*ene*boos;
  251. hitwone=hit*wep;
  252. console.log(hit);
  253.  
  254. udarecEna(hit);
  255. });
  256.  
  257.  
  258. $('#dmg').on('change', function (e) {
  259. var optionSelected =$("option:selected", this);
  260. boos=this.value;
  261. hit=k*ene*boos;
  262. udarecEna(hit);
  263. });
  264.  
  265. $('.oroz').on('change', function (e) {
  266. var oid=$(this).attr('id');
  267. st=parseFloat(oid[1]);
  268. wep = parseFloat($('#n'+st).find(":selected").text());
  269. console.log(wep, st);
  270.  
  271. udarecWep("n",st,wep);
  272. });
  273.  
  274. $('.zlat').on('input',function(e){
  275. var gid=$(this).attr('id');
  276. st=parseFloat(gid[12]);
  277.  
  278. gold =parseFloat($("#infCalc_gold"+st).val());
  279. console.log(gold, st);
  280.  
  281. udarecWep(gold,st,"n");
  282. });
  283.  
  284. $("td").css("borderColor", "transparent");
  285. $("td").css("borderWidth", "3px");
  286. });
  287. }