Advertisement
iradap

Autoheal com pełne

Aug 19th, 2018
1,813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.75 KB | None | 0 0
  1. var marudnymod = battleMsg;
  2. battleMsg = function(c, t) {
  3. var ret = marudnymod(c, t);
  4. if(c.indexOf("winner=") >= 0 && hero.hp < hero.maxhp && !g.dead) {
  5. lecz();
  6. }
  7. return ret;
  8. }
  9.  
  10. if(localStorage.getItem('Baka_leczenie') == null) localStorage.setItem('Baka_leczenie', 'on')
  11.  
  12.  
  13. function lecz() {
  14. if(localStorage.getItem('Baka_leczenie') == 'on') {
  15. if(hero.hp == hero.maxhp) return false;
  16.  
  17. for(var i in g.item) {
  18.  
  19. var item = g.item[i];
  20. var wymaganylvl = parseInt(item.stat.substr(item.stat.indexOf('lvl') + 4));
  21. if(item.tip.search('Gotowy do użycia za')>-1)continue;
  22. if(item.stat.indexOf('lvl') > -1) {
  23. if((g.item[i].stat.indexOf('fullheal') > -1 || g.item[i].name == 'Corncob') && wymaganylvl <= hero.lvl) {
  24. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  25. _g("moveitem&st=1&id=" + item.id);
  26. break;
  27. }
  28. }
  29. var item = g.item[i];
  30. var wymaganylvl = parseInt(item.stat.substr(item.stat.indexOf('lvl') + 4));
  31. if(item.tip.search('Gotowy do użycia za')>-1)continue;
  32. if(item.stat.indexOf('lvl') > -1) {
  33. if((g.item[i].stat.indexOf('fullheal') > -1 || g.item[i].name == 'White Beans') && wymaganylvl <= hero.lvl) {
  34. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  35. _g("moveitem&st=1&id=" + item.id);
  36. break;
  37. }
  38. }
  39. var item = g.item[i];
  40. var wymaganylvl = parseInt(item.stat.substr(item.stat.indexOf('lvl') + 4));
  41. if(item.tip.search('Gotowy do użycia za')>-1)continue;
  42. if(item.stat.indexOf('lvl') > -1) {
  43. if((g.item[i].stat.indexOf('fullheal') > -1 || g.item[i].name == 'Dill') && wymaganylvl <= hero.lvl) {
  44. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  45. _g("moveitem&st=1&id=" + item.id);
  46. break;
  47. }
  48. }
  49. var item = g.item[i];
  50. var wymaganylvl = parseInt(item.stat.substr(item.stat.indexOf('lvl') + 4));
  51. if(item.tip.search('Gotowy do użycia za')>-1)continue;
  52. if(item.stat.indexOf('lvl') > -1) {
  53. if((g.item[i].stat.indexOf('fullheal') > -1 || g.item[i].name == 'Cumin') && wymaganylvl <= hero.lvl) {
  54. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  55. _g("moveitem&st=1&id=" + item.id);
  56. break;
  57. }
  58. }
  59. var item = g.item[i];
  60. var wymaganylvl = parseInt(item.stat.substr(item.stat.indexOf('lvl') + 4));
  61. if(item.tip.search('Gotowy do użycia za')>-1)continue;
  62. if(item.stat.indexOf('lvl') > -1) {
  63. if((g.item[i].stat.indexOf('fullheal') > -1 || g.item[i].name == 'Large Bottle of Nightwatch Blood') && wymaganylvl <= hero.lvl) {
  64. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  65. _g("moveitem&st=1&id=" + item.id);
  66. break;
  67. }
  68. }
  69. var item = g.item[i];
  70. var wymaganylvl = parseInt(item.stat.substr(item.stat.indexOf('lvl') + 4));
  71. if(item.tip.search('Gotowy do użycia za')>-1)continue;
  72. if(item.stat.indexOf('lvl') > -1) {
  73. if((g.item[i].stat.indexOf('fullheal') > -1 || g.item[i].name == 'Anise') && wymaganylvl <= hero.lvl) {
  74. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  75. _g("moveitem&st=1&id=" + item.id);
  76. break;
  77. }
  78. }
  79. var item = g.item[i];
  80. var wymaganylvl = parseInt(item.stat.substr(item.stat.indexOf('lvl') + 4));
  81. if(item.tip.search('Gotowy do użycia za')>-1)continue;
  82. if(item.stat.indexOf('lvl') > -1) {
  83. if((g.item[i].stat.indexOf('fullheal') > -1 || g.item[i].name == 'Peas') && wymaganylvl <= hero.lvl) {
  84. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  85. _g("moveitem&st=1&id=" + item.id);
  86. break;
  87. }
  88. }else {
  89. if(g.item[i].stat.indexOf('fullheal') > -1) {
  90. _g("moveitem&st=1&id=" + item.id);
  91. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono ' + Math.abs(hero.maxhp - hero.hp) + 'hp');
  92. break;
  93. }
  94.  
  95.  
  96. if(hero.maxhp - hero.hp >= 16000 && item.name == 'Czarna perła życia') {
  97. _g("moveitem&st=1&id=" + item.id);
  98. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono 16k hp');
  99. break;
  100. }
  101.  
  102. if(hero.maxhp - hero.hp >= 3000 && item.name == 'Vial of Daywatch Blood') {
  103. _g("moveitem&st=1&id=" + item.id);
  104. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono 3k hp');
  105. break;
  106. }
  107.  
  108. if(hero.maxhp - hero.hp >= 16000 && item.name == 'Mix') {
  109. _g("moveitem&st=1&id=" + item.id);
  110. log('Uleczono mixem o nazwie ' + item.name + '. Przywrócono 16k hp');
  111. break;
  112. }
  113.  
  114.  
  115. }
  116.  
  117.  
  118. }
  119. }
  120. }
  121.  
  122.  
  123.  
  124. var ikonka = localStorage.getItem('Baka_leczenie') == 'on' ? 'http://i.imgur.com/pWp54Tx.gif' : 'http://i.imgur.com/LQu3DaK.gif'
  125.  
  126. $("<div id=Baka_leczenie tip='<center><b>Autoheal " + localStorage.getItem('Baka_leczenie') + "</b></center>' style='position: absolute; top: 1px; right: 1px; background: url(" + ikonka + "); width:33px; height:33px'>").click(function() {
  127. if(localStorage.getItem('Baka_leczenie') == 'on') {
  128. localStorage.setItem('Baka_leczenie', 'off')
  129. $("#Baka_leczenie").css({
  130. background: 'url(http://i.imgur.com/LQu3DaK.gif)'
  131. });
  132. document.getElementById("Baka_leczenie").setAttribute("tip", "<b>Autoheal off</b>");
  133.  
  134. } else {
  135. localStorage.setItem('Baka_leczenie', 'on')
  136. $("#Baka_leczenie").css({
  137. background: 'url(http://i.imgur.com/pWp54Tx.gif)'
  138. });
  139. document.getElementById("Baka_leczenie").setAttribute("tip", "<b>Autoheal on</b>");
  140.  
  141.  
  142. }
  143.  
  144. }).appendTo('#panel')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement