Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*______________________________________________________________________________
- ********************************************************************************
- WriterScriptIs : Abu.Rajih *
- VersionScript : 1.1 *
- DateWroteScript: 11-02-2020 *
- URL : https://forum.tribalwars.ae/index.php?members/abu-rajih.40926/*
- _______________________________________________________________________________*
- ********************************************************************************
- ######## ## ######### $$ $$ ## *
- ## ## ## ## ## ###### $$ $$ ## *
- ## ## ## ## ## # ## *
- ########## ## #### ## ## ## ## ######## ## ## ####### *
- ## ## ### ## ## ## ######## ## ## ## ## ## ## *
- ## ## ## ## ## ## ## ## ## ## ## ## ## ## *
- ## ## ## ## ## ## $$ ## ## ## ## ## ## ## ## *
- ## ## ###### ##### $$ ## ## ###### # ## ## ## ## *
- ## *
- ## ## *
- #### *
- _______________________________________________________________________________*
- *******************************************************************************/
- window.jQuery(($)=>{
- if(window.game_data.screen != 'info_player')
- {
- window.UI.InfoMessage('السكربت يعمل من بروفايل اللاعبين ...' , 3000 , 'error');
- }
- else{
- window.Developer = ["سيد الاساطير" , 'Abu.Rajih' , 'https://forum.tribalwars.ae/index.php?members/abu-rajih.40926'];
- window.UI.InfoMessage('تم تشغيل السكربت <br> مبرمج السكربت: AbuRajih' , 3000 , 'success');
- $('#villages_list').before(`<div id="village_notes_popup" class="popup_style ui-draggable ui-draggable-dragging" style="width: 38%;height:50%; position: fixed; top: 155px; left: 250px; display: none;cursor: move;">
- <div id="village_notes_popup_menu" class="popup_menu"><a id="closelink_village_notes_popup" class='hide' href="#">X</a></div>
- <div id="village_notes_popup_content" class="popup_content" style="height: 300px; overflow-y: auto;">
- <div style="width:100%; overflow:hidden;">
- <table align="center" id='CopyRight'>
- <thead>
- <tr>
- <th style='width:50px;text-align:center;'>المبرمج</th>
- <th style='font-size:16px; font-weight:bold;'>:</th>
- <th style='width:90px;text-align:center;'><a href=`+window.Developer[2]+` title=`+window.Developer[1]+` target='_blank'>`+window.Developer[0]+`</a></th>
- </tr>
- </thead>
- </table>
- <style>
- #CopyRight,#CopyRight th{border:1px solid black !important;background:#eee;}
- #CopyRight th , #CopyRight th a{background: #eddab0 !important;font-family: 'times new roman', sans-serif;font-size:15px;}
- </style><br>
- <table align='center' class="vis overview_table" height="10">
- <thead>
- <tr>
- <th style='text-align:center'><b>أختر</b></th>
- <th style='text-align:center'><b>جميع قراك <b id='villageNumber'></b></b></th>
- <th style='text-align:center'><b>الموارد</b></th>
- <th style='text-align:center'><b>التجار</b></th>
- </tr>
- </thead>
- <tbody id="TBODY"></tbody>
- </table></div>
- </div></div>
- <script>
- dragElement(document.getElementById("village_notes_popup"));
- function dragElement(elmnt) {
- var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
- if (document.getElementById(elmnt.id + "header")) {
- document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
- } else {
- elmnt.onmousedown = dragMouseDown;
- }
- function dragMouseDown(e) {
- e = e || window.event;
- e.preventDefault();
- pos3 = e.clientX;
- pos4 = e.clientY;
- document.onmouseup = closeDragElement;
- document.onmousemove = elementDrag;
- }
- function elementDrag(e) {
- e = e || window.event;
- e.preventDefault();
- pos1 = pos3 - e.clientX;
- pos2 = pos4 - e.clientY;
- pos3 = e.clientX;
- pos4 = e.clientY;
- elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
- elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
- }
- function closeDragElement() {
- document.onmouseup = null;
- document.onmousemove = null;
- }
- }
- </script>
- `);
- $('#villages_list > thead > tr > th:nth-child(3)').after('<th><span class="icon header ressources" title="إرسال موارد الى القريه"></span></th>');
- $.get('/game.php?village='+window.game_data.village.id+'&screen=overview_villages&mode=prod' ,
- function(data){
- $(data).find('#production_table > tbody > tr').not(':eq(0)').each(function(id){
- $(this).find('.rename-icon').remove();
- var villages = $(this).find('td:eq(1)').html();
- var resources = $(this).find('td:eq(3)').html();
- var dealer = $(this).find('td:eq(5)').html();
- $('#TBODY').append('<tr><td style="text-align:center;"><input type="radio" id="tr_'+id+'" name="choose" /></td><td style="text-align:center;">'+villages+'</td><td style="text-align:center;">'+resources+'</td><td style="text-align:center;">'+dealer+'</td></tr>');
- $('#villageNumber').text('('+Number(id + 1)+')');
- });
- $('#TBODY > tr').each(function(id){
- var ThisTr = $(this);
- $(this).find('input').click(function(){
- window.UI.InfoMessage('مبرمج السكربت: AbuRajih <br>سيتم فتح صفحة نقطة التجمع لتستطيع الهجوم <br> إنتظر لبضعة ثواي ...' , 2500 , 'success');
- var getMyVillageHref = $(ThisTr).find('a').attr('href');
- var getMyVillageId = getMyVillageHref.match(/\d+/);
- var ThisOne = $.trim(getMyVillageId);
- localStorage.setItem('MyVillage' , ThisOne);
- setTimeout(()=>{
- window.open('/game.php?village='+ localStorage.getItem('MyVillage') +'&screen=market&mode=send&target=' + localStorage.getItem('Target') , '_blank');
- },2000);
- });
- });
- });
- $('.hide').on('click',function(){
- $('#village_notes_popup').remove();
- $('#villages_list').find('th:nth-child(4) , td:nth-child(4)').remove();
- });
- $('#villages_list > tbody > tr').each(function(ID){
- $(this).append('<td><input type="radio" id="tr_'+ID+'" name="target" /></td>');
- $(this).click(function(){
- window.UI.InfoMessage('تم إختيار الهدف .. إنتظر لبضعة الثواني', 1500 , 'success');
- var getHref = $('#villages_list > tbody > tr:eq('+ID+')').find('a:nth-child(1)').attr('href');
- var getID = getHref.substring(getHref.lastIndexOf('=')+1);
- var ThisID = $.trim(getID);
- localStorage.setItem('Target', ThisID);
- setInterval(()=>{
- $('#village_notes_popup').css('display','block');
- },1500);
- });
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement