UserNameWTF

SandyOrbit Custom Ball and TagPro

Oct 14th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. // ==UserScript==
  2. // @name TagPro Behind Custom Ball
  3. // @namespace http://*.koalabeast.com:*
  4. // @version 1.4.1
  5. // @description Shows ball spin, empty power-up tiles, and pixel perfect tagpro/rolling bomb. Also new textures.
  6. // @match http://koalabeast.com
  7. // @copyright 2014+, Ly, Cumflakes, Cam
  8. // @include http://*.koalabeast.com*
  9. // @include http://*.jukejuice.com*
  10. // @include http://*.newcompte.fr*
  11. // @include http://justletme.be*
  12. // ==/UserScript==
  13.  
  14. tagpro.ready(function(){
  15. //This is important.
  16. if(tagpro.events.drawPlayer)
  17. return;
  18.  
  19. var image = new Image();
  20. image.src = "http://i.imgur.com/FKCVoxa.png";
  21.  
  22. tagpro.events.register({
  23. drawPlayer: function(player, context, drawPos, TILESIZE) {
  24.  
  25. if (player.tagpro)
  26. context.drawImage(image, 2 * 40, 0, 40, 40, drawPos.x, drawPos.y, 40 / tagpro.zoom, 40 / tagpro.zoom);
  27.  
  28. if (player.team == 1)
  29. context.drawImage(image, 1 * 40, 0, 40, 40, drawPos.x, drawPos.y, 40 / tagpro.zoom, 40 / tagpro.zoom);
  30. if (player.team == 2)
  31. context.drawImage(image, 0 * 40, 0, 40, 40, drawPos.x, drawPos.y, 40 / tagpro.zoom, 40 / tagpro.zoom);
  32.  
  33. if (player.bomb && Math.round(Math.random() * 4) == 1) {
  34. context.globalAlpha = 0.7;
  35. context.drawImage(image, 3 * 40, 0, 40, 40, drawPos.x, drawPos.y, 40 / tagpro.zoom, 40 / tagpro.zoom);
  36. context.globalAlpha = 1;
  37. }
  38. }
  39. });
  40. });
Advertisement
Add Comment
Please, Sign In to add comment