Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name My_Texture pack and spin
- // @namespace http://www.reddit.com/user/NewCompte
- // @description Rotating Transparent gridded brioche texture pack
- // @include http://*.koalabeast.com:*
- // @license GPL
- // @author NewCompte, modified by brioche
- // @version 1
- // ==/UserScript==
- function myRotatingBallsScript() {
- tagpro.ready(function(){
- //This is important.
- if(tagpro.events.drawPlayer)
- return;
- // Dark texture pack:
- //document.getElementById("tiles").src = "http://i.imgur.com/q2TFiHE.png";
- //document.getElementById("splats").src = "http://i.imgur.com/8g6gEF3.png";
- //document.getElementById("speedpad").src = "http://i.imgur.com/MNtipme.png";
- //document.getElementById("speedpadred").src = "http://i.imgur.com/QhJDOTY.png";
- //document.getElementById("speedpadblue").src = "http://i.imgur.com/HFMXOSb.png";
- //document.getElementById("portal").src = "http://i.imgur.com/9AjSUYN.png";
- // Ligh texture pack:
- document.getElementById("tiles").src = "http://i.imgur.com/ffC7hHr.png";
- document.getElementById("splats").src = "http://i.imgur.com/8g6gEF3.png";
- document.getElementById("speedpad").src = "http://i.imgur.com/Ag8bLdO.png";
- document.getElementById("speedpadred").src = "http://i.imgur.com/sF6aDVG.png";
- document.getElementById("speedpadblue").src = "http://i.imgur.com/RCMrISg.png";
- document.getElementById("portal").src = "http://i.imgur.com/c3YinY0.png";
- // Ligh texture pack with no diagonal grid:
- //document.getElementById("tiles").src = "http://i.imgur.com/bJJ9lWL.png";
- //document.getElementById("splats").src = "http://i.imgur.com/8g6gEF3.png";
- //document.getElementById("speedpad").src = "http://i.imgur.com/UTVZhL9.png";
- //document.getElementById("speedpadred").src = "http://i.imgur.com/SdQheBh.png";
- //document.getElementById("speedpadblue").src = "http://i.imgur.com/eNwF4AM.png";
- //document.getElementById("portal").src = "http://i.imgur.com/3ONRsjX.png";
- // Light texture pack with no grid at all:
- //document.getElementById("tiles").src = "http://i.imgur.com/vJcZ2nD.png";
- //document.getElementById("splats").src = "http://i.imgur.com/8g6gEF3.png";
- //document.getElementById("speedpad").src = "http://i.imgur.com/0fVV3Pl.png";
- //document.getElementById("speedpadred").src = "http://i.imgur.com/UzZs1Xb.png";
- //document.getElementById("speedpadblue").src = "http://i.imgur.com/LGqltmX.png";
- //document.getElementById("portal").src = "http://i.imgur.com/jJFGxcs.png";
- tagpro.events.register({
- drawPlayer: function(player, context, drawPos, TILESIZE) {
- context.save();
- context.translate(drawPos.x + (TILESIZE / 2) * (1 / tagpro.zoom), drawPos.y + (TILESIZE / 2) * (1 / tagpro.zoom));
- context.rotate(player.angle)
- context.translate(-drawPos.x - (TILESIZE / 2) * (1 / tagpro.zoom), -drawPos.y - (TILESIZE / 2) * (1 / tagpro.zoom));
- tagpro.tiles.drawWithZoom(context, player.team == 1 ? "redball" : "blueball", drawPos);
- if (player.bomb && Math.round(Math.random() * 4) == 1) {
- context.fillStyle = "rgba(255, 255, 0, .60)";
- context.beginPath();
- context.arc(drawPos.x + (TILESIZE / 2) * (1 / tagpro.zoom), drawPos.y + (TILESIZE / 2) * (1 / tagpro.zoom), 17 * (1 / tagpro.zoom), 0, Math.PI*2, true);
- context.closePath();
- context.fill();
- };
- if (player.tagpro) {
- context.strokeStyle = "#00FF00";
- context.fillStyle = "rgba(0, 255, 0, .20)";
- context.lineWidth = 2 * (1 / tagpro.zoom);
- context.beginPath();
- context.arc(drawPos.x + (TILESIZE / 2) * (1 / tagpro.zoom), drawPos.y + (TILESIZE / 2) * (1 / tagpro.zoom), 16 * (1 / tagpro.zoom), 0, Math.PI*2, true);
- context.closePath();
- if (!player.bomb)
- context.fill();
- context.stroke();
- }
- context.restore();
- }
- });
- });
- }
- var source = "("+ myRotatingBallsScript + ")()";
- var script = document.createElement('script');
- script.setAttribute("type", "application/javascript");
- script.textContent = source;
- document.body.appendChild(script);
Advertisement
Add Comment
Please, Sign In to add comment