Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript:
- coords = "653|551 654|548 654|550 654|551 655|534 655|549 656|547 656|548 656|550 657|537 657|547 657|548 658|535 658|545 659|547 659|548 659|550 659|551 660|549 661|534 661|535 661|536 661|537 661|546 661|550 661|551 662|538 662|541 662|546 663|535 663|541 663|543 663|550 663|551 664|538 664|540 664|542 664|545 664|546 664|547 664|549 664|550 665|535 665|537 665|541 665|542 665|543 665|545 665|547 665|551 666|541 666|542 666|543 667|534 667|535 667|540 667|541 667|544 667|546 667|549 668|535 668|537 668|547 668|549 669|534 669|543 669|549 669|550 669|551 670|538 670|540 670|544 670|547 644|544 644|545 644|552 645|545 645|546 645|547 646|545 646|546 646|554 647|546 647|549 647|551 647|552 647|553 647|554 648|552 649|544 649|550 649|551 649|552 649|554 650|546 650|548 650|549 650|552 651|547 651|548 651|552 651|553 651|554 652|541 652|549 652|550 652|552 653|553 655|553 656|552 656|553 658|552 658|553 659|553 635|536 635|542 635|543 635|547 635|550 635|551 635|552 636|539 636|547 636|549 637|537 637|542 637|544 637|546 637|547 637|549 637|552 637|553 638|536 638|545 638|552 638|553 639|536 639|538 639|539 639|540 639|543 639|546 639|549 639|552 639|553 640|537 640|540 640|543 640|545 640|546 640|548 640|550 640|551 640|552 641|537 641|542 641|545 642|539 642|543 642|550 642|553 643|538 643|539 643|540 643|543 643|551 643|553".split(" ");
- fejkLimit=110;
- //nazwa,wartosc_zagroda
- wojska=[
- ["ram",1],
- ["spear",1],
- ["sword",1],
- ["axe",1],
- ["archer",1],
- ["spy",2],
- ["light",4],
- ["marcher",5],
- ["heavy",6],
- ["catapult",8],
- ];
- function losowanieCoordow()
- {
- index = Math.round(Math.random() * (coords.length - 1));
- document.getElementsByClassName("target-input-field target-input-autocomplete ui-autocomplete-input")[0].value = coords[index];
- poczatekC=coords[index].substring(0,3)
- koniecC=coords[index].substring(4,7)
- odleglosc=Math.hypot((poczatekC-game_data.village.x), (koniecC-game_data.village.y))
- czas=new Date(odleglosc * 30 * 60 * 1000 + Date.now());
- godzina=czas.getHours();
- if(godzina<8)
- {losowanieCoordow();}
- }
- function ataki()
- {
- b=document.getElementById("unit_input_ram");
- b.value=wojska[0][1];
- fejkLimit=fejkLimit-wojska[0][1]*5
- for(i=1;i<wojska.length-1;i++)
- {
- a=document.getElementById("unit_input_"+wojska[i][0]);
- if(a.attributes[6].value*wojska[i][1]>=fejkLimit)
- {
- a.value=parseInt(fejkLimit/wojska[i][1]);
- fejkLimit=0;
- } else if (a.attributes[6].value*wojska[i][1]>0){
- a.value=a.attributes[6].value;
- fejkLimit=fejkLimit-a.attributes[6].value*wojska[i][1];
- }
- }
- if(fejkLimit>0&&b.attributes[6].value>=parseInt(fejkLimit/5))
- {
- b.value=parseInt(fejkLimit/5);
- fejkLimit=0
- }
- if(fejkLimit>0)
- alert("Za mało jednostek");
- }
- //if(location!="https://pl126.plemiona.pl"+TribalWars.buildURL('GET', 'place'))
- //{
- //location=TribalWars.buildURL('GET', 'place');
- //}
- losowanieCoordow();
- ataki();
- function units(name, value) {
- if(document.getElementById("unit_input_"+name)!== null)
- {document.getElementById("unit_input_"+name).value=value;}}
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement