Advertisement
Tw100

NEW AUTO FARM 2.0 [_B_]

Aug 12th, 2017
19,200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const template = "b";
  2. const delay_tw100_clicks = 450; // ms
  3.  
  4. var light_to_send = Number(document.getElementsByName("light")[1].value);
  5.  
  6. var attackSenderInterval;
  7. var currentIndex = 1;
  8. var all;
  9.  
  10. if ($(document).ready)
  11. {
  12.     send_attacks();
  13. }
  14.  
  15. function send_attacks()
  16. {
  17.     all = document.getElementsByClassName("farm_icon_" + template);
  18.     attackSenderInterval = setInterval(send_attacks_update, delay_tw100_clicks);
  19. }
  20.  
  21. function send_attacks_update()
  22. {
  23.     if (light_to_send > GetCurrentLight()) {clearInterval(attackSenderInterval); UI.ErrorMessage("#Tw 100# Informa Não há Calavaria Leve."); return;}
  24.  
  25.     all[currentIndex].click();
  26.     currentIndex++;
  27.     if (currentIndex >= all.length - 1) {clearInterval(attackSenderInterval); UI.Success("#Tw 100# Todos os ataques foram enviados."); return;}
  28. }
  29.  
  30. function GetCurrentLight()
  31. {
  32.     return Number(document.getElementById("light").innerText);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement