Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. // set = https://i.imgur.com/2mFs7YX.gif
  2. // tanro https://i.imgur.com/XL4pZ9E.png
  3. // tezca https://i.imgur.com/N4FCTBW.png
  4.  
  5. var items = [
  6. ['259106967', 'https://i.imgur.com/2mFs7YX.gif'], // kamień smoka na seta
  7. ['261218033', 'https://i.imgur.com/2mFs7YX.gif'], // kamień zakon na seta
  8. ['501961823', 'https://i.imgur.com/XL4pZ9E.png'], // zwoje na tanro
  9. ['502050118', 'https://i.imgur.com/N4FCTBW.png'], // zwoje na maho
  10. ];
  11.  
  12. var sheet = (function() {
  13. var style = document.createElement("style");
  14. style.appendChild(document.createTextNode(""));
  15. document.head.appendChild(style);
  16. return style.sheet;
  17. })();
  18.  
  19.  
  20.  
  21.  
  22. for(var i = 0; i<items.length; i++){
  23. sheet.insertRule("#item" + items[i][0] + ">img { content: url('" + items[i][1] + "') }", sheet.cssRules.length);
  24. }
  25.  
  26. sheet.insertRule(".item > small { opacity: 1 !important; color: palegoldenrod; }", sheet.cssRules.length);
  27. sheet.insertRule("#nick, #gold, #base3, #stats, .dmg, #hpProcent { color: palegoldenrod !important; }", sheet.cssRules.length);
  28. sheet.insertRule("#nick, #gold, #base3, #stats, .dmg, #hpProcent, #expProcent { text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }", sheet.cssRules.length);
  29. sheet.insertRule("#life2 { background-image: url('https://i.imgur.com/awluvN7.png'); }", sheet.cssRules.length);
  30. sheet.insertRule("#exp2 { background-image: url('https://i.imgur.com/yHlTGOA.png') !important; }", sheet.cssRules.length);
  31.  
  32.  
  33. setInterval(function(){
  34.  
  35. if (hero.ttl <=0 ) $("#exp2").css("filter","grayscale(100%)");
  36. else $("#exp2").css("filter", "grayscale(" + ( 50 * ( 30- Math.min(30, hero.ttl ) ) / 30 ) + "%)");
  37.  
  38.  
  39. }, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement