Advertisement
ZergLurker

Скрипты

Dec 20th, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Отправляет все войска
  2.  
  3. javascript:
  4. var cookieName = "123";
  5. var coords = "478|593";
  6. var doc = document;
  7. var url = document.URL;
  8.  
  9. if (url.search(/screen=place/) != -1 && url.search(/try=confirm/) === -1 && document.forms[0].x.value === "" && document.forms[0].y.value === "")
  10.     {
  11.     if (window.frames.length > 0) { doc = window.main.document;     }    
  12.     url = document.URL;    
  13.     if (url.indexOf("screen=place") == -1) { alert("This script needs to be run from the rally point");     }    
  14.     coords = coords.split(" ");    
  15.     var index = 0;
  16.     farmcookie = document.cookie.match("(^|;) ?" + cookieName + "=([^;]*)(;|$)");    
  17.     if (farmcookie != null) { index = parseInt(farmcookie[2]); }
  18.     if (index >= coords.length) {index = 0;}
  19.     coords = coords[index];    
  20.     coords = coords.split("|");    
  21.     index = index + 1;    
  22.     cookie_date = new Date(2018, 03, 20);
  23.     document.cookie = cookieName + "=" + index + ";
  24.     expires=" + cookie_date.toGMTString();    
  25.     doc.forms[0].x.value = coords[0];    
  26.     doc.forms[0].y.value = coords[1];  
  27.     selectAllUnits(true);
  28.     document.forms[0].attack.click();
  29.     }
  30.     else
  31.     if (url.search(/screen=place/) != -1 && url.search(/try=confirm/) != -1)
  32.     { document.forms[0].submit.click(); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement