Advertisement
7zgi

request resources /tw

Mar 14th, 2020
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:
  2. (function($) {
  3.  
  4.     if(!window.location.href.match(/&screen=market&mode=call/)){
  5.         window.UI.InfoMessage('السكربت يعمل من السوق --> طلب' , 1500 , 'error');
  6.         setTimeout(()=>{
  7.         window.UI.InfoMessage('سيتم نقلك الى مكان عمل السكربت ...' , 3000 , 'success');
  8.        window.location.href = '/game.php?village='+window.game_data.village.id+'&screen=market&mode=call';
  9.         },1500);
  10.        }
  11.  
  12. window.Developer = ["Salim Fadhil" , 'AbuRajih' ,'salim.rageh45@outlook.com' , '+96899745412' , '1.0' , 'https://forum.tribalwars.ae/index.php?members/abu-rajih.40926' , 'https://www.instagram.com/hzg_0/'];
  13. $('#village_list').before(`
  14. <center>
  15. <table align="center" id='CopyRight'>
  16. <thead>
  17. <tr>
  18. <th style='width:50px;text-align:center;'>المبرمج</th>
  19.   <th style='font-size:16px; font-weight:bold;'>:</th>
  20.   <th style='width:90px;text-align:center;'><a href=`+window.Developer[5]+` title=`+window.Developer[1]+` target='_blank'>`+window.Developer[0]+`</a></th>
  21. </tr>
  22. <tr>
  23. <th style='width:50px;text-align:center;'>E-Mail</th>
  24.   <th style='font-size:16px; font-weight:bold;'>:</th>
  25.   <th style='width:90px;text-align:center;'><a href='mailto:`+window.Developer[2]+`&subject=استفسار بخصوص السكربت' >`+window.Developer[2]+`</a></th>
  26. </tr>
  27. <tr>
  28. <th style='width:50px;text-align:center;'>WhatsApp</th>
  29.   <th style='font-size:16px; font-weight:bold;'>:</th>
  30.   <th style='width:90px;text-align:center;'><a href='https://api.whatsapp.com/send?phone=`+window.Developer[3]+`' target='_blank' >`+window.Developer[3]+`</a></th>
  31. </tr>
  32.  
  33. <tr>
  34. <th style='width:50px;text-align:center;'>Instgram</th>
  35.   <th style='font-size:16px; font-weight:bold;'>:</th>
  36.   <th style='width:90px;text-align:center;'><a href='`+window.Developer[6]+`' target='_blank' >`+window.Developer[6]+`</a></th>
  37. </tr>
  38.  
  39. </thead>
  40. </table>
  41.  
  42.  
  43. <table id="res_sum" class="vis overview_table" width="250px">
  44. <thead>
  45. <tr>
  46. <th colspan="3" style="text-align:center"><b>طلـب مـوارد</b></th>
  47. </tr>
  48. </thead>
  49.  
  50. <tbody>
  51. <tr>
  52. <td style="text-align:center" id="total_wood"><span class="res wood"></span><br/><input placeholder="0" type="text" style="text-align:center;font-weight:bold;font-style:times new roman;width:70%;" maxlength="6" id="WOD" /></td>
  53. <td style="text-align:center" id="total_stone"><span class="res stone"></span><br/><input placeholder="0" type="text" style="text-align:center;font-weight:bold;font-style:times new roman;width:70%;" maxlength="6" id="STN" /></td>
  54. <td style="text-align:center" id="total_iron"><span class="res iron"></span><br/><input placeholder="0" type="text" style="text-align:center;font-weight:bold;font-style:times new roman;width:70%;" maxlength="6" id="IRN" /></td>
  55. </tr>
  56.  
  57. <tr><th colspan="3" style="text-align:center;">سحب من القرى حسب مسافة السفر</th></tr>
  58. <tr>
  59. <td style="text-align:center" colspan="3">
  60. <input placeholder="0" type="text" style="text-align:center;font-weight:bold;font-style:times new roman;width:15%;" maxlength="2" title="ثواني" value="59" id="Seconds" disabled/> :
  61. <input placeholder="0" type="text" style="text-align:center;font-weight:bold;font-style:times new roman;width:15%;" maxlength="2" title="دقائق" value="59" id="Minutes" disabled/> :
  62. <input placeholder="0" type="text" style="text-align:center;font-weight:bold;font-style:times new roman;width:15%;" maxlength="2" title="ساعات" id="Hours" />
  63. </td>
  64. </tr>
  65.  
  66. <tr>
  67. <th colspan="3" style="text-align:center;"><input type="button" style="width:100%" title="ادخل الموارد ثم اضغط هذا الزر لسحب موارد" class="btn" id="GetResources" value="سحب موارد" /></th>
  68. </tr>
  69.  
  70. </tbody>
  71. </table>
  72.  
  73. </center>
  74.   <style>
  75.   #CopyRight,#CopyRight th{border:1px solid black !important;background:#eee;}
  76.   #CopyRight th , #CopyRight th a{background: #eddab0 !important;font-family: 'times new roman', sans-serif;font-size:15px;}
  77.  #CopyRight{background:white}
  78. </style>`);
  79.  
  80.     $('#GetResources').on('click' , function(WOD , STN , IRN){
  81.        WOD = $('#WOD').val(); STN = $('#STN').val(); IRN = $('#IRN').val();
  82.         $('#village_list > tbody > tr').each(function(){
  83.          window.time = $.trim($(this).find('td:nth-child(2)').text());
  84.  
  85.             if(window.time.split(':')[0] <= $('#Hours').val())
  86.             {
  87.                 $(this).find('input[type=checkbox]').click();
  88.             $(this).find('td.wood > input').val(WOD);
  89.             $(this).find('td.stone > input').val(STN);
  90.             $(this).find('td.iron > input').val(IRN);
  91.  
  92.             }
  93.             else{
  94.                 $(this).find('input[type=checkbox]').remove();
  95.                 $(this).attr('disabled')
  96.             }
  97.  
  98.         });
  99.  
  100.              $('input[type=submit]').eq(0).click();
  101.  
  102.     });
  103.  
  104.  
  105. })(window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement