Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*______________________________________________________________________________
- ********************************************************************************
- WriterScriptIs : Abu.Rajih *
- VersionScript : 1.6 *
- DateWroteScript: 14-02-2020 *
- URL : https://forum.tribalwars.ae/index.php?members/abu-rajih.40926/*
- _______________________________________________________________________________*
- ********************************************************************************
- ######## ## ######### $$ $$ ## *
- ## ## ## ## ## ###### $$ $$ ## *
- ## ## ## ## ## # ## *
- ########## ## #### ## ## ## ## ######## ## ## ####### *
- ## ## ### ## ## ## ######## ## ## ## ## ## ## *
- ## ## ## ## ## ## ## ## ## ## ## ## ## ## *
- ## ## ## ## ## ## $$ ## ## ## ## ## ## ## ## *
- ## ## ###### ##### $$ ## ## ###### # ## ## ## ## *
- ## *
- ## ## *
- #### *
- _______________________________________________________________________________*
- *******************************************************************************/
- (function($) {
- if(window.game_data.screen == 'am_farm'){
- if($('#attacked_checkbox').is(':checked')){
- var sign = `
- <center>
- <table id = 'table'>
- <tr>
- <th id = 'th' colspan = '3'><b style='font-family:times new roman;font-size:16px;text-align:center;'>تم برمجة السكربت من قبل</b></th>
- </tr>
- <tr>
- <td id = 'td' colspan = '3'><a id="Salim" title = 'Abu.Rajih' href="https://forum.tribalwars.ae/index.php?members/abu-rajih.40926/" target="_blank">سيد الاساطير</a></td>
- </tr>
- <tr>
- <th id = 'th' colspan="2" > شرح السكربت </th> <th id = 'th' ><a style='font-family:times new roman;font-size:16px;' href="#" target="_blank">اضغط هنا</a></th>
- </tr>
- <tr>
- <th id="th" > <img src="https://dsae.innogamescdn.com/asset/aea668f/graphic/command/attack.png" title="عدد الهجمات على كل قريه"></th>
- <th id="th"> <span title="الموارد" class="icon header ressources"></span></th>
- <th id="th"> <img title="مستوى الحائط" src="https://dsae.innogamescdn.com/asset/aea668f/graphic/buildings/wall.png" class=""></th>
- </tr>
- <tr>
- <td id="td"><input type="text" title="عرض القرى التي عدد الهجمات فيها اقل من او تساوي" id="Attacks" style="width:95%;text-align:center;font-weight:bold;" placeholder="0" maxlength="2" onclick="javascript:this.select();" /></td>
- <td id="td" ><input type="text" title="عرض القرى التي مستوى الموارد فيها اقل من او تساوي" id="Resources" style="width:95%;text-align:center;font-weight:bold;" placeholder="0" maxlength="7" onclick="javascript:this.select();" /></td>
- <td id="td"><input type="text" title="عرض القرى التي مستوى الحائط فيها اقل من او تساوي" id="LvWall" style="width:95%;text-align:center;font-weight:bold;" placeholder="0" maxlength="2" onclick="javascript:this.select();" /></td>
- </tr>
- <tr>
- <th id="td" colspan="3"><input type="button" class="btn" style="width:100%;"id="StartFilter" value="بـدأ الفـلـتـره"/></th>
- </tr>
- </table>
- </center>
- <style>
- #table,#th,#td { border:1px solid black; font-family:times new roman; font-size:16px; text-align:center; width:300px; }
- #Salim { font-family:times new roman; font-size: 20px; animation: salim 2s linear infinite; }
- @keyframes salim {
- 0% {text-shadow:0 0 3px #000;}
- 15% {text-shadow:0 0 9px #000;}
- 30% {text-shadow:0 0 3px #000;}
- 45% {color:rgba(80,80,80,.1);}
- 60% {text-shadow:0 0 3px #7d5d11;color:#222;}
- 80% {text-shadow:0 0 9px #000;}
- 100%{text-shadow:0 0 3px #000;}
- }
- </style>`;
- $('body').on('input' , '#LvWall' , function(){
- if($('#LvWall').val() > 20)
- {
- $('#LvWall').css({'color':'red'});
- }else{
- $('#LvWall').css({'color':'black'});
- }
- });
- $('#plunder_list').before(sign);
- $( '#plunder_list tr').not('tr:eq(1)').each(function(){
- $(this).find('th:eq(2)').attr('style','text-align:center');
- $(this).find('th:eq(2)').append('<img src="https://dsae.innogamescdn.com/asset/aea668f/graphic/command/attack.png" title="عدد الهجمات على كل قريه">');
- var NoOfAttack = $(this).find('td:nth-child(4) > img').prop('tooltipText');
- var p = $(this).find('td:eq(2)').append ('<b id="NoAtt">' + NoOfAttack + '</b>' );
- var x = $(this).find('#NoAtt').text().match(/\d+/);
- var z = $(this).find('td:eq(2)').text(Number(x));
- z.css({
- 'text-align':'center',
- 'font-weight':'bold'
- });
- if($(this).find('td:eq(2)').text() == 'null' || $(this).find('td:eq(2)').text() == 'undefined'){
- var problem = '';
- $(this).find('td:eq(2)').text(problem);
- }
- else if($(this).find('td:eq(2)').text() >= 1){
- $(this).find('td:eq(2)').css({
- 'color':'#eee',
- 'text-decoration':'underline #eee',
- 'border':'1.2px solid #111',
- 'background':'#a00'
- });
- }
- });
- $('#StartFilter').on(`click`,function(){
- window.Attacks = $('#Attacks').val();
- window.ResourcesForFilter = $('#Resources').val();
- window.wallLevelToShow = $('#LvWall').val();
- $('#plunder_list > tbody > tr').not(`:first`).each(function(){
- window.ThisTr = $(this);
- window.NumberAttack = $(this).find('td:nth-child(3)').text();
- var wood = $(this).find(`td:nth-child(6) > span:nth-child(1) > span`).text();
- var stone = $(this).find(`td:nth-child(6) > span:nth-child(2) > span`).text();
- var iron = $(this).find(`td:nth-child(6) > span:nth-child(3) > span`).text();
- var Wood = wood.replace(/\./, '');
- var Stone = stone.replace(/\./, '');
- var Iron = iron.replace(/\./, '');
- window.FindWallLevel = $(this).find(`td:nth-child(7)`).text();
- var total = Number(Wood) + Number(Stone) + Number(Iron);
- if(window.FindWallLevel.match(/\?/g))
- {
- $(window.ThisTr).find(`td:nth-child(6) , td:nth-child(7) , td:nth-child(11)`).css({
- 'color':`#a00`,
- 'font-weight':`bold`
- });
- $(window.ThisTr).hide();
- }
- else if(Number(window.NumberAttack) <= window.Attacks && Number(total) <= window.ResourcesForFilter && window.FindWallLevel <= window.wallLevelToShow)
- {
- window.UI.InfoMessage(`تمت عملية الفلترة وإخفاء القرى التي عدد الهجمات فيها اعلى من `+window.Attacks+`<br>++<br>تمت عملية الفلترة وإخفاء القرى التي مستوى الموارد فيها اعلى من `+window.ResourcesForFilter.replace(/\d(?=(?:\d{3})+$)/g , '$&.')+`<br>++<br>تمت عملية الفلتره واخفاء القرى التي مستوى الحائط فيها اعلى من`+window.wallLevelToShow , 7000, `success`);
- $(window.ThisTr).show();
- $(window.ThisTr).find(`td:nth-child(7)`).css({
- 'color':`#0a0`,
- 'font-weight':`bold`
- });
- }
- else{
- $(window.ThisTr).hide();
- }
- });
- });
- }
- else{
- window.UI.InfoMessage('لم تقم بتفعيل خاصية (اظهر التقارير من القرى التي اهاجمها حاليا)' , 3000 , 'error');
- setTimeout(()=>{
- window.UI.InfoMessage('سيتم تفعيلها الان .. ثم سيقوم السكربت بتحديث الصفحه' , 500 , 'success');
- setTimeout(()=>{
- $('#attacked_checkbox').click();
- setTimeout(()=>{
- window.open('/game.php?village='+window.game_data.village.id+'&screen=am_farm' , '_self');
- },700);
- },1000);
- },2000);
- }
- }
- else{
- window.UI.InfoMessage('السكربت يعمل من مساعد النهب' , 3000 , 'error');
- return false;
- }
- })(window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement