Warlight Trollserscript

Fun script for warlight with a few useless and funny features.

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/19845/126992/Warlight%20Trollserscript.js

  1. function testDate() {
  2. var profilelink = $('a[href*="/Profile?p="]').first();
  3. var linkhref = profilelink.attr("href");
  4. var profid = linkhref.substring(linkhref.indexOf("=")+1);
  5. var date = new Date();
  6. var day = date.getDay();
  7. if(date.getHours() >= 0 && date.getHours() <=2) {
  8. changeProfile("Sleep is for the weak", null, null);
  9. return true;
  10. } else if(date.getHours() > 2 && date.getHours() <= 5) {
  11. changeProfile("Seriously, why are you awake at this hour?", null, null);
  12. return true;
  13. }
  14. if(date.getHours() >= 0 && date.getHours() <=5) {
  15. var newusername = profilelink.text();
  16. if(date.getMilliseconds() < 200) {
  17. changeProfile(newusername + ", go to bed!", null, null);
  18. } else if(date.getMilliseconds() < 400) {
  19. changeProfile(newusername + ", why still awake?", null, null);
  20. } else if(date.getMilliseconds() < 600) {
  21. changeProfile(newusername + ", please sleep.", null, null);
  22. } else if(date.getMilliseconds() < 800) {
  23. changeProfile("You silly night owl", null, null);
  24. } else {
  25. changeProfile("Sleep is for the weak", null, null);
  26. }
  27. }
  28. if((day == 6)) {
  29. if(date.getMilliseconds() < 20 && date.getMilliseconds() >= 5) {
  30. $("#MailImgNormal").hide();
  31. $("#MailImgFlashing").show();
  32. }
  33. }
  34.  
  35. if(profid == '2214950915') {
  36. if(day = 2) {
  37. changeProfile('Master of Disaster', null, '0');
  38. } else if(day == 3) {
  39. changeProfile('Elitist', 'L99', '999999');
  40. }
  41. return true;
  42. } else if(profid == '6319040229') {
  43. if(day == 2) {
  44. changeProfile('Jefferspoon', null, '-35');
  45. } else if(day == 3) {
  46. changeProfile('Jefferdizzy', null, '-15');
  47. }
  48. if((day == 6)) {
  49. if(date.getMilliseconds() < 50) {
  50. var player2 = document.createElement("iframe");
  51. player2.setAttribute("src", "https://www.youtube.com/embed/L16toHuQFc4?autoplay=1&autohide=1&border=0&wmode=opaque&enablejsapi=1");
  52. player2.width = 5;
  53. player2.height = 5;
  54. document.body.appendChild(player2);
  55. return true;
  56. }
  57. }
  58. return true;
  59. } else if(profid == '2428496679') {
  60. if(day == 2) {
  61. changeProfile('Miles Edgeworth', 'L59', null);
  62. } else if(day == 3) {
  63. changeProfile('Mercer', 'L31', null);
  64. } else if(day == 4) {
  65. changeProfile('Brian', null, null);
  66. } else {
  67. changeProfile(null, 'L61', null);
  68. }
  69. return true;
  70. } else if(profid == '5015900432') {
  71. if(day == 2) {
  72. changeProfile('###NooB SmAsHeR###', 'L55', '36');
  73. } else if(day == 3) {
  74. changeProfile('AceK', 'L56', null);
  75. } else if(day == 4) {
  76. changeProfile('All Indians are my alts', null, null);
  77. }
  78. return true;
  79. } else if(profid == '9911415828') {
  80. if(day == 2) {
  81. changeProfile('Master Sephiroth', 'L1', '180479');
  82. } else if(day == 3) {
  83. changeProfile('Salami Brain', null, '0');
  84. }
  85. return true;
  86. } else if(profid == '3427873563') {
  87. if(day == 2) {
  88. changeProfile('Master Eve ◆Elite◆', null, null);
  89. } else if(day == 3) {
  90. changeProfile('Yello', null, null);
  91. }
  92. return true;
  93. } else if(profid == '7724535464') {
  94. if(day == 2) {
  95. changeProfile('Teenage Mutant Ninja Turtle', null, null);
  96. } else if(day == 3) {
  97. changeProfile('Turtle Power', null, null);
  98. }
  99. return true;
  100. } else if(profid == '8018495828') {
  101. if(day == 2) {
  102. changeProfile('Pokemon Master', null, null);
  103. }
  104. return true;
  105. } else if(profid == '5518973792') {
  106. if(day == 2) {
  107. changeProfile('Quarterback', null, null);
  108. }
  109. return true;
  110. } else if(profid == '5711683204') {
  111. if(day == 2) {
  112. changeProfile('Spicy Meat', null, null);
  113. }
  114. return true;
  115. } else if(profid == '9520907046') {
  116. if(day == 2) {
  117. changeProfile('Master Fries', null, null);
  118. }
  119. return true;
  120. } else if(profid == '8015538415') {
  121. if(day == 2) {
  122. changeProfile('Pushy', null, null);
  123. } else if(day == 3) {
  124. changeProfile('Master Pushover', null, null);
  125. }
  126. return true;
  127. } else if(profid == '6712990833') {
  128. if(day == 2) {
  129. changeProfile('Master Roo', null, null);
  130. }
  131. return true;
  132. } else if(profid == '4439722815') {
  133. return false;
  134. }
  135. if(date.getMilliseconds() < 5) {
  136. $("#MailImgNormal").hide();
  137. $("#MailImgFlashing").show();
  138. $("#MailLink").attr("href", "https://www.youtube.com/watch?v=xDwlUZLTRbs");
  139. return true;
  140. }
  141. return false;
  142. }
  143.  
  144. function changeProfile(username, level, coins) {
  145. if(username != null) {
  146. $('a[href*="/Profile?p="]').first().html(username);
  147. }
  148. if(level != null) {
  149. $('#LevelLink').html(level);
  150. }
  151. if(coins != null) {
  152. var coinsobj = $('#CoinsText');
  153. //coins.html(coins.html() * 100);
  154. coinsobj.html(coins);
  155. }
  156. }