Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name التجسس على القرى
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://*.tribalwars.ae/game.php?*&screen=place*
- // @grant none
- // ==/UserScript==
- (function($) {
- var SpyInVillage = $('#units_entry_all_light').text()
- var RemoveBrackets = SpyInVillage.replace('(','').replace(')','');
- if(location.href.match(/&try=confirm/g)){
- setTimeout(function(){
- $('#troop_confirm_go').click();
- },1000);
- }
- if(RemoveBrackets < 10)
- {
- var URL = document.URL; var cut = URL.substring(URL.lastIndexOf('&'));
- if(cut == '&screen=place'){
- setTimeout(function(){$('#units_entry_all_light').css('color','red');$('#village_switch_right > span').click();},1000);
- }
- }
- else{
- var lightTr,spyTr,coords,i,Kons,Koor;
- lightTr = 10; //خفيف
- spyTr=1; //كشافة
- coords=''; //الاحداثيات لازم تكون على شكل سطر
- if(location.href.match(/&screen=place/g)){
- setTimeout(function(){
- $('#target_attack').click();
- },1000);
- }
- Kons=coords.split(' ');
- i=0;if($.cookie('Konsantre')!=null){i=$.cookie("Konsantre");}if(i>=Kons.length){i=0;UI.InfoMessage('هذه اخر احداثيه ,, انتهى السكربت من جميع القرى الموجوده',3000,'success');}
- Koor=Kons[i];Koor=Koor.split('|');i++;document.forms[0].x.value=Koor[0];document.forms[0].y.value=Koor[1];
- var date = new Date();date.setTime(date.getTime()+(10*60*1000));$.cookie("Konsantre",i,{expires:date});
- var spy = $('#unit_input_spy').next().html();if(spy.match(/\d+/g)>=spyTr){$('#unit_input_spy').val(spyTr);}
- var light = $('#unit_input_light').next().html();if(light.match(/\d+/g)>=lightTr){$('#unit_input_light').val(lightTr);}end();
- }
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement