7zgi

tw / new count troops

May 8th, 2020
1,432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.89 KB | None | 0 0
  1. /*______________________________________________________________________________
  2. ********************************************************************************
  3. WriterScriptIs : Salim Fadhil *
  4. VersionScript : 1.0 *
  5. DateWroteScript : 09-05-2020 *
  6. URL : https://forum.tribalwars.ae/index.php?members/abu-rajih.40926/*
  7. _______________________________________________________________________________*
  8. ********************************************************************************
  9. ######## ## ######### $$ $$ ## *
  10. ## ## ## ## ## ###### $$ $$ ## *
  11. ## ## ## ## ## # ## *
  12. ########## ## #### ## ## ## ## ######## ## ## ####### *
  13. ## ## ### ## ## ## ######## ## ## ## ## ## ## *
  14. ## ## ## ## ## ## ## ## ## ## ## ## ## ## *
  15. ## ## ## ## ## ## $$ ## ## ## ## ## ## ## ## *
  16. ## ## ###### ##### $$ ## ## ###### # ## ## ## ## *
  17. ## *
  18. ## ## *
  19. #### *
  20. _______________________________________________________________________________*
  21. *******************************************************************************/
  22. javascript:
  23. (function($) {
  24. window.popup = `
  25. <link href="https://fonts.googleapis.com/css2?family=Cairo&display=swap" rel="stylesheet">
  26. <div id="CountTroops" class="popup_style ui-draggable" style="width: 400px; position: fixed; top: 0px; left: 1px; display: block;">
  27. <div id="CountTroops_menu" style="text-align:center;font-family: 'Cairo', sans-serif;font-size:16px;" class="popup_menu ui-draggable-handle">سكربت حاصد الجيوش<a id="close_CountTroops" onclick="$('#CountTroops').remove();" href="#">X</a></div>
  28. <div id="CountTroops_content" class="popup_content" style="height: auto; overflow-y: auto;text-align:center;">
  29.  
  30. <center><b style="color:#555;font-family: 'Cairo', sans-serif;">كل الشكر والتقدير للداعم الرسمي : <a style="color:black;font-family: 'Cairo', sans-serif;" href="https://forum.tribalwars.ae/index.php?members/%D9%83%D9%8A%D9%81%D8%A7%D8%A7%D8%B2.39856/" target="_blank">كيفااز</a></b></center>
  31. <table align="center" >
  32.  
  33. <tr><th id = 'th' colspan = '4'><b style='font-family: Cairo, sans-serif;text-align:center;font-size:14px;'>مبرمج السكربت</b></th></tr>
  34. <tr><td id = 'td' colspan = '4'><a id="Salim" title = 'Abu.Rajih' href="https://forum.tribalwars.ae/index.php?members/abu-rajih.40926/" target="_blank">سيد الاساطير</a></td></tr>
  35. <tr><th id = 'th' colspan="3" >شرح للسكربت</th> <th id = 'th' ><a style='font-family: Cairo, sans-serif;font-size:16px;' href="https://forum.tribalwars.ae/index.php?threads/%D8%B3%D9%83%D8%B1%D8%A8%D8%AA-%D8%AD%D8%A7%D8%B5%D8%AF-%D8%A7%D9%84%D8%AC%D9%8A%D9%88%D8%B4-2020-%D9%86%D8%B3%D8%AE%D8%A9-%D8%B4%D9%87%D8%B1-%D9%85%D8%A7%D9%8A%D9%88.97104/" target="_blank">إضغط هنا</a></th></tr>
  36.  
  37. <tr>
  38. <th id="th" style="font-size:14px;">نوع المجموعة</th>
  39. <td id="td">
  40. <select id="GroupOption">
  41. </select>
  42. </td>
  43. <th id="th" style="font-size:14px;">فلترة حسب </td>
  44. <td id="td"><select id="chooseOption">
  45. <option value="5">الكل</option><option value="1">ملكك</option><option value="2">في القرى</option><option value="3">خارج القرى</option><option value="4">متحرك</option>
  46. </select></td>
  47. </tr>
  48. <tr><th id="th" class="bring_data_here" colspan="4"></th></tr>
  49.  
  50. <tr>
  51. <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spear.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="spear"></td> <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spy.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="spy"></td>
  52. </tr>
  53.  
  54. <tr>
  55. <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/sword.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="sword"></td> <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/light.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="light"></td>
  56. </tr>
  57.  
  58. <tr id="checkUnits">
  59. <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/archer.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="archer"></td> <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/marcher.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="marcher"></td>
  60. </tr>
  61.  
  62. <tr>
  63. <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/axe.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="axe"></td> <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/heavy.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="heavy"></td>
  64. </tr>
  65.  
  66. <tr>
  67. <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/catapult.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="catapult"></td> <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/ram.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="ram"></td>
  68. </tr>
  69.  
  70. <tr>
  71. <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/knight.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="knight"></td> <th id="th"><img src="https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/snob.png" style="vertical-align: middle" alt="" class=""></th><td id="td" class="snob"></td>
  72. </tr>
  73.  
  74. <tr style="display:none;" id="ShowTool">
  75. <th colspan="4" id="th"><input type="button" id="ShowDetails" class="btn" style="width:95%;" value="نسخ هذه المعلومات !" /></th>
  76. </tr>
  77.  
  78. <tr id="copyPlace" style="display:none">
  79. <th id="th" colspan="4"><textarea id="result" style="width:95%;height:100%;"></textarea></th>
  80. </tr>
  81.  
  82. <tr><th id="th" colspan="4">
  83. <input id="GETNOW" value="بدء عملية الإستخراج" class="btn btn-confirm-yes btn-larg" style="width:95%" type="button" />
  84. </th></tr>
  85. </table>
  86.  
  87. </div></div>
  88.  
  89. <script>
  90.  
  91. dragElement(document.getElementById("CountTroops"));
  92.  
  93. function dragElement(elmnt) {
  94. var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
  95. if (document.getElementById("CountTroops_menu")) {
  96. document.getElementById("CountTroops_menu").onmousedown = dragMouseDown;
  97. } else {
  98. elmnt.onmousedown = dragMouseDown;
  99. }
  100.  
  101. function dragMouseDown(e) {
  102. e = e || window.event;
  103. e.preventDefault();
  104. pos3 = e.clientX;
  105. pos4 = e.clientY;
  106. document.onmouseup = closeDragElement;
  107. document.onmousemove = elementDrag;
  108. }
  109.  
  110. function elementDrag(e) {
  111. e = e || window.event;
  112. e.preventDefault();
  113. pos1 = pos3 - e.clientX;
  114. pos2 = pos4 - e.clientY;
  115. pos3 = e.clientX;
  116. pos4 = e.clientY;
  117. elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
  118. elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
  119. }
  120.  
  121. function closeDragElement() {
  122. document.onmouseup = null;
  123. document.onmousemove = null;
  124. }
  125. }
  126.  
  127. </script>
  128.  
  129. <style>
  130. #close_CountTroops{border:1px solid #f33;color:#eee;background:#f33;text-align:center;width:16px;height:16px;}
  131. #close_CountTroops:hover{background:#f11;color:#fff;border:1px solid #f11;}
  132. #table,#th,#td { border:1px solid black; font-family: 'Cairo', sans-serif; font-size:16px; text-align:center; width:300px; }
  133. #Salim { font-family: 'Cairo', sans-serif; font-size: 20px; animation: salim 2s linear infinite; }
  134. @keyframes salim {
  135. 0% {text-shadow:0 0 3px #000;}
  136. 15% {text-shadow:0 0 9px #000;}
  137. 30% {text-shadow:0 0 3px #000;}
  138. 45% {color:rgba(80,80,80,.1);}
  139. 60% {text-shadow:0 0 3px #7d5d11;color:#222;}
  140. 80% {text-shadow:0 0 9px #000;}
  141. 100%{text-shadow:0 0 3px #000;}
  142. }
  143. </style>
  144. `;
  145. $('body').append(window.popup);
  146. if(window.game_data.units.length < 13){
  147. $('#checkUnits').hide();
  148. }
  149. window.index = $('#chooseOption').val();
  150. $('#chooseOption').on('change', function(){
  151. window.index = $(this).val();
  152. });
  153.  
  154.  
  155. $.get(`/game.php?village=`+window.game_data.village.id+`&screen=overview_villages&mode=units` , function(DataGot){
  156. $(DataGot).find('#paged_view_content > div').each(function(i,e){
  157. if(window.mobile == false){
  158. for(i = 0; i < $(this).find('a , strong').length; i++){
  159. if(!$(this).find('a , strong').eq(i)[0].href){
  160. $(this).find('a , strong').eq(i)[0].href = '/game.php?village='+window.game_data.village.id+'&amp;screen=overview_villages&amp;type=complete&amp;mode=units&amp;group='+0+'&amp;';
  161. }
  162. $('#GroupOption').append('<option value="'+$(this).find('a , strong').eq(i)[0].href+'" name="'+$.trim($(this).find('a , strong').eq(i).html())+'">'+ $.trim($(this).find('a , strong').eq(i).html()) +'</option>');
  163. }
  164.  
  165. setTimeout(()=>{
  166. window.group = $('#GroupOption').val();
  167. },100);
  168. $('#GroupOption').change(function(){
  169. window.group = $(this).val();
  170. });
  171. }
  172. else{
  173. if($(this).find('select').length == 0){
  174. for(i = 0; i < $(this).find('a , strong').length; i++){
  175. if(!$(this).find('a , strong').eq(i)[0].href){
  176. $(this).find('a , strong').eq(i)[0].href = '/game.php?village='+window.game_data.village.id+'&amp;screen=overview_villages&amp;type=complete&amp;mode=units&amp;group='+0+'&amp;';
  177. }
  178. $('#GroupOption').append('<option value="'+$(this).find('a , strong').eq(i)[0].href+'" name="'+$.trim($(this).find('a , strong').eq(i).html())+'">'+ $.trim($(this).find('a , strong').eq(i).html()) +'</option>');
  179. }
  180.  
  181. setTimeout(()=>{
  182. window.group = $('#GroupOption').val();
  183. },100);
  184. $('#GroupOption').change(function(){
  185. window.group = $(this).val();
  186. });
  187. }
  188. else{
  189. $('#GroupOption').replaceWith($(this).find('select').removeAttr('onchange').attr('id','GroupOption'));
  190. setTimeout(()=>{
  191. window.group = $('#GroupOption').val();
  192. },100);
  193. $('#GroupOption').change(function(){
  194. window.group = $(this).val();
  195. });
  196.  
  197. }
  198. }
  199. });
  200. });
  201.  
  202.  
  203.  
  204. $('#GETNOW').on('click' , function(){
  205. window.spear = 0; window.sword = 0; window.archer = 0; window.axe = 0; window.spy = 0; window.light = 0;
  206. window.marcher = 0; window.heavy = 0; window.ram = 0; window.catapult = 0; window.knight = 0; window.snob = 0;
  207. $('.spear').text(null);$('.sword').text(null);$('.archer').text(null);$('.axe').text(null);
  208. $('.spy').text(null);$('.light').text(null);$('.marcher').text(null);$('.heavy').text(null);
  209. $('.ram').text(null);$('.catapult').text(null);$('.knight').text(null);$('.snob').text(null);
  210. $.get(window.group , function(getData){
  211. $(getData).find('#units_table > tbody').each(function(){
  212. setTimeout(()=>{
  213. if(window.game_data.units.length == 13){
  214. if(window.index == 1){
  215. window.spear = parseInt(window.spear) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(3)').html()));
  216. window.sword = parseInt(window.sword) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(4)').html()));
  217. window.archer = parseInt(window.archer) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(6)').html()));
  218. window.axe = parseInt(window.axe) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(5)').html()));
  219. window.spy = parseInt(window.spy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(7)').html()));
  220. window.light = parseInt(window.light) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(8)').html()));
  221. window.marcher = parseInt(window.marcher) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(9)').html()));
  222. window.heavy = parseInt(window.heavy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(10)').html()));
  223. window.ram = parseInt(window.ram) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(11)').html()));
  224. window.catapult = parseInt(window.catapult) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(12)').html()));
  225. window.knight = parseInt(window.knight) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(13)').html()));
  226. window.snob = parseInt(window.snob) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(14)').html()));
  227. }else{
  228. window.spear = parseInt(window.spear) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(2)').html()));
  229. window.sword = parseInt(window.sword) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(3)').html()));
  230. window.archer = parseInt(window.archer) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(5)').html()));
  231. window.axe = parseInt(window.axe) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(4)').html()));
  232. window.spy = parseInt(window.spy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(6)').html()));
  233. window.light = parseInt(window.light) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(7)').html()));
  234. window.marcher = parseInt(window.marcher) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(8)').html()));
  235. window.heavy = parseInt(window.heavy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(9)').html()));
  236. window.ram = parseInt(window.ram) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(10)').html()));
  237. window.catapult = parseInt(window.catapult) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(11)').html()));
  238. window.knight = parseInt(window.knight) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(12)').html()));
  239. window.snob = parseInt(window.snob) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(13)').html()));
  240. }
  241.  
  242. $('.spear').text(window.spear);$('.sword').text(window.sword);$('.archer').text(window.archer);$('.axe').text(window.axe);
  243. $('.spy').text(window.spy);$('.light').text(window.light);$('.marcher').text(window.marcher);$('.heavy').text(window.heavy);
  244. $('.ram').text(window.ram);$('.catapult').text(window.catapult);$('.knight').text(window.knight);$('.snob').text(window.snob);
  245.  
  246. }else{
  247. if(window.index == 1){
  248. window.spear = parseInt(window.spear) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(3)').html()));
  249. window.sword = parseInt(window.sword) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(4)').html()));
  250. window.axe = parseInt(window.axe) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(5)').html()));
  251. window.spy = parseInt(window.spy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(6)').html()));
  252. window.light = parseInt(window.light) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(7)').html()));
  253. window.heavy = parseInt(window.heavy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(8)').html()));
  254. window.ram = parseInt(window.ram) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(9)').html()));
  255. window.catapult = parseInt(window.catapult) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(10)').html()));
  256. window.knight = parseInt(window.knight) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(11)').html()));
  257. window.snob = parseInt(window.snob) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(12)').html()));
  258. }else{
  259. window.spear = parseInt(window.spear) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(2)').html()));
  260. window.sword = parseInt(window.sword) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(3)').html()));
  261. window.axe = parseInt(window.axe) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(4)').html()));
  262. window.spy = parseInt(window.spy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(5)').html()));
  263. window.light = parseInt(window.light) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(6)').html()));
  264. window.heavy = parseInt(window.heavy) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(7)').html()));
  265. window.ram = parseInt(window.ram) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(8)').html()));
  266. window.catapult = parseInt(window.catapult) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(9)').html()));
  267. window.knight = parseInt(window.knight) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(10)').html()));
  268. window.snob = parseInt(window.snob) + parseInt($.trim($(this).find('tr:nth-child('+window.index+') > td:nth-child(11)').html()));
  269. }
  270.  
  271. $('.spear').text(window.spear);$('.sword').text(window.sword);$('.axe').text(window.axe);
  272. $('.spy').text(window.spy);$('.light').text(window.light);$('.heavy').text(window.heavy);
  273. $('.ram').text(window.ram);$('.catapult').text(window.catapult);$('.knight').text(window.knight);
  274. $('.snob').text(window.snob);
  275.  
  276. }
  277. },250);
  278. });
  279. });
  280.  
  281. setTimeout(function(){
  282. $('#ShowTool').show();
  283. },800);
  284.  
  285.  
  286.  
  287. });
  288.  
  289. $('#ShowDetails').on('click' , function(){
  290. var sp,sw,ax,ar,py,li,ma,he,ra,ca,kn,sn;
  291. if(window.game_data.units.length == 13){
  292. sp = $('.spear').text(); sw = $('.sword').text(); ax = $('.axe').text();
  293. ar = $('.archer').text(); py = $('.spy').text(); li = $('.light').text();
  294. ma = $('.marcher').text(); he = $('.heavy').text(); ra = $('.ram').text();
  295. ca = $('.catapult').text(); kn = document.querySelector('.knight').innerText; sn = $('.snob').text();
  296. }else{
  297. sp = $('.spear').text(); sw = $('.sword').text(); ax = $('.axe').text();
  298. py = $('.spy').text(); li = $('.light').text(); he = $('.heavy').text();
  299. ra = $('.ram').text(); ca = $('.catapult').text(); kn = document.querySelector('.knight').innerText;
  300. sn = $('.snob').text();
  301. }
  302. if(window.game_data.units.length == 13){
  303. if(window.Mobile == false){
  304. $('#result').val(`
  305. نوع المجموعة : [b][color=#a500a5]`+$('#GroupOption')[0].selectedOptions[0].getAttribute('name')+`[/color][/b] || فلترة حسب : [b][color=#a500a5]`+$('#chooseOption')[0].selectedOptions[0].text+`[/color][/b]
  306. [table]
  307. [**][img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spear.png[/img][||]
  308. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/sword.png[/img][||]
  309. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/axe.png[/img][||]
  310. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/archer.png[/img][||]
  311. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spy.png[/img][||]
  312. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/light.png[/img][||]
  313. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/marcher.png[/img][||]
  314. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/heavy.png[/img][||]
  315. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/ram.png[/img][||]
  316. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/catapult.png[/img][||]
  317. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/knight.png[/img][||]
  318. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/snob.png[/img][/**]
  319. [*]
  320. `+sp.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  321. `+sw.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  322. `+ax.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  323. `+ar.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  324. `+py.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  325. `+li.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  326. `+ma.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  327. `+he.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  328. `+ra.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  329. `+ca.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  330. `+kn+`[|]
  331. `+sn.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`
  332. [/table]
  333. `);
  334. }else{
  335. $('#result').val(`
  336. نوع المجموعة : [b][color=#a500a5]`+$('#GroupOption')[0].selectedOptions[0].innerText+`[/color][/b] || فلترة حسب : [b][color=#a500a5]`+$('#chooseOption')[0].selectedOptions[0].text+`[/color][/b]
  337. [table]
  338. [**][img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spear.png[/img][||]
  339. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/sword.png[/img][||]
  340. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/axe.png[/img][||]
  341. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/archer.png[/img][||]
  342. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spy.png[/img][||]
  343. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/light.png[/img][||]
  344. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/marcher.png[/img][||]
  345. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/heavy.png[/img][||]
  346. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/ram.png[/img][||]
  347. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/catapult.png[/img][||]
  348. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/knight.png[/img][||]
  349. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/snob.png[/img][/**]
  350. [*]
  351. `+sp.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  352. `+sw.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  353. `+ax.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  354. `+ar.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  355. `+py.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  356. `+li.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  357. `+ma.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  358. `+he.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  359. `+ra.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  360. `+ca.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  361. `+kn+`[|]
  362. `+sn.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`
  363. [/table]
  364. `);
  365. }
  366. }else{
  367.  
  368. if(window.Mobile == false){
  369. $('#result').val(`
  370. نوع المجموعة : [b][color=#a500a5]`+$('#GroupOption')[0].selectedOptions[0].getAttribute('name')+`[/color][/b] || فلترة حسب : [b][color=#a500a5]`+$('#chooseOption')[0].selectedOptions[0].text+`[/color][/b]
  371. [table]
  372. [**][img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spear.png[/img][||]
  373. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/sword.png[/img][||]
  374. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/axe.png[/img][||]
  375. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spy.png[/img][||]
  376. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/light.png[/img][||]
  377. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/heavy.png[/img][||]
  378. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/ram.png[/img][||]
  379. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/catapult.png[/img][||]
  380. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/knight.png[/img][||]
  381. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/snob.png[/img][/**]
  382. [*]
  383. `+sp.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  384. `+sw.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  385. `+ax.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  386. `+py.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  387. `+li.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  388. `+he.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  389. `+ra.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  390. `+ca.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  391. `+kn+`[|]
  392. `+sn.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`
  393. [/table]
  394. `);
  395. }else{
  396. $('#result').val(`
  397. نوع المجموعة : [b][color=#a500a5]`+$('#GroupOption')[0].selectedOptions[0].innerText+`[/color][/b] || فلترة حسب : [b][color=#a500a5]`+$('#chooseOption')[0].selectedOptions[0].text+`[/color][/b]
  398. [table]
  399. [**][img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spear.png[/img][||]
  400. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/sword.png[/img][||]
  401. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/axe.png[/img][||]
  402. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/spy.png[/img][||]
  403. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/light.png[/img][||]
  404. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/heavy.png[/img][||]
  405. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/ram.png[/img][||]
  406. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/catapult.png[/img][||]
  407. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/knight.png[/img][||]
  408. [img]https://dsae.innogamescdn.com/asset/d25bbc6/graphic/unit/recruit/snob.png[/img][/**]
  409. [*]
  410. `+sp.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  411. `+sw.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  412. `+ax.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  413. `+py.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  414. `+li.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  415. `+he.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  416. `+ra.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  417. `+ca.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`[|]
  418. `+kn+`[|]
  419. `+sn.replace(/\d(?=(?:\d{3})+$)/g, '$&.')+`
  420. [/table]
  421. `);
  422. }
  423. }
  424. window.UI.InfoMessage('يتم الان نسخ المعلومات ...' , 1000 , 'success');
  425. setTimeout(()=>{
  426. $('#copyPlace').show();
  427. $('#result').select();
  428. },1001);
  429. setTimeout(()=>{
  430. document.execCommand('copy');
  431. window.UI.InfoMessage('تم نسخ المعلومات بنجاح.' , 1000 , 'success');
  432. $('#copyPlace').hide();
  433. },1002);
  434. });
  435.  
  436. })(window.jQuery);
Add Comment
Please, Sign In to add comment