Advertisement
Guest User

plemiona skrypcior

a guest
Mar 23rd, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. javascript:
  2. // ==UserScript==
  3. // @name Rekord farmy w profilu Poprawiony
  4. // @version 1.10
  5. // @author Filip Klich + DevilOfCry + Rizek
  6. // @include *://*.plemiona.pl/game.php?*screen=info_player*
  7. // ==/UserScript==
  8. //LICENCJA FREE SOFTWARE - drogi Supporcie <3 wyraĹĽam zgodÄ™ na uĹĽytkowanie i publikowanie tego skryptu przez każdą osobę
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. var nick=takeNick();
  14. console.log(nick);
  15. makeProfileGreatAgain(nick);
  16. makeProfileGreatAgain2(nick);
  17. })();
  18.  
  19. function makeProfileGreatAgain(nick){
  20. $['ajax']({
  21. async: true,
  22. url: 'https://pl'+ window.location.href.split("pl")[1].split(".")[0] +'.plemiona.pl/game.php?screen=ranking&mode=in_a_day&type=loot_res&name=' + nick,
  23. type: 'GET',
  24. success: function(test) {
  25. var t = $(test).find('.lit-item:nth-child(4)').html().split(`<span class="grey">.</span>`);
  26. var x=t[0];
  27. for (var i=1;i<t.length;i++) {x+=".";x+=t[i];}
  28. x+=" (" + $(test)['find']('.lit-item:first')['html']()+".) ";
  29. x+=" z dnia "+ $(test)['find']('.lit-item:nth-child(5)')['html']().replace("wczoraj", "wczorajszego");
  30. addLoot(x);
  31. }
  32. });
  33. }
  34.  
  35.  
  36. function makeProfileGreatAgain2(nick){
  37. $['ajax']({
  38. async: true,
  39. url: 'https://pl'+ window.location.href.split("pl")[1].split(".")[0] +'.plemiona.pl/game.php?screen=ranking&mode=in_a_day&type=loot_vil&name=' + nick,
  40. type: 'GET',
  41. success: function(test) {
  42. var t = $(test).find('.lit-item:nth-child(4)').html().split(`<span class="grey">.</span>`);
  43. var x=t[0];
  44. for (var i=1;i<t.length;i++) {x+=".";x+=t[i];}
  45. x+=" (" + $(test)['find']('.lit-item:first')['html']()+".) ";
  46. x+=" z dnia "+ $(test)['find']('.lit-item:nth-child(5)')['html']().replace("wczoraj", "wczorajszego");
  47. addLoot(x);
  48. }
  49. });
  50. }
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. function takeNick(){
  60. var ret = document.getElementsByClassName("selected")[0];
  61. return (ret === undefined ? $("#content_value")[0].getElementsByTagName("h2")[0].innerText : ret.innerText);
  62. }
  63. function addLoot(loot){
  64. var tableRef = document.getElementById("player_info").getElementsByTagName("tbody")[0];
  65. var newRow = tableRef.insertRow(5);
  66.  
  67. var d = newRow.insertCell(0);
  68. var f = newRow.insertCell(0);
  69. f.appendChild(document.createTextNode('Rekord farmy'));
  70. d.appendChild(document.createTextNode(loot));
  71. }
  72.  
  73. function addLoot2(loot2){
  74. var tableRef = document.getElementById("player_info").getElementsByTagName("tbody")[0];
  75. var newRow = tableRef.insertRow();
  76.  
  77. var d1 = newRow.insertCell(0);
  78. var f1 = newRow.insertCell(0);
  79. f1.appendChild(document.createTextNode('Splądrowane wioski'));
  80. d1.appendChild(document.createTextNode(loot1));
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement