Advertisement
voxpopuli27

u wroga

Jan 18th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. javascript:
  2.  
  3. var nejm = [".T.", ":T:", "PasiChłop"]; // tutaj wpisujemy nick gracza lub skrót plemienia, można wpisać dowolną ilość
  4.  
  5.  
  6.  
  7.  
  8.  
  9. if ((window.location.href.match("overview_villages") != null)&&(window.location.href.match("away_detail") != null)){
  10.  
  11.  
  12. var iloscwiosek = $("table#units_table>tbody>tr").length;
  13. var i,j;
  14. suma3 =0;
  15. match = false;
  16.  
  17.  
  18.  
  19. for (i = 0; i < iloscwiosek-1; i++) {
  20. var wies = $("table#units_table>tbody>tr")[i].getElementsByTagName("td")[0];
  21. var nazwawioski=wies.innerText.toLowerCase();
  22.  
  23. for(j=0;j<nejm.length;j++){
  24.  
  25. if (nazwawioski.indexOf(nejm[j].toLowerCase())>1){
  26. wies.style.backgroundColor = "red";
  27. console.log("Wioska "+nazwawioski+ "nejm: "+nejm[j]);
  28. match = true;
  29. }
  30.  
  31. }
  32. }
  33.  
  34. if (match){
  35. UI.InfoMessage('Uwaga! Twój def znajduje się u wroga!',5000,'error')
  36. }else{
  37. UI.InfoMessage('Nie masz żadnego defa u wroga ;)',5000,'success')
  38. }
  39. }else{
  40. UI.InfoMessage('Przejdź do Przegląd -> Wojska -> Pomoc',5000,'error')
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement