Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Oceanic_Contenders_Stream_light
- // @namespace http://www.reddit.com/user/NewCompte
- // @description Rotating Transparent Jerseys on ungridded light brioche texture pack
- // @include http://*.koalabeast.com:*
- // @license GPL
- // @author NewCompte, modified by brioche
- // @version 1
- // ==/UserScript==
- // set team jersesy for the right color HERE \
- // Ball Hits For Jesus v Mind The Cap = 7 vs 4 | <----------------------- I N P U T H E R E - the 2 numbers below to be exact
- // Balls Hits For Jesus v Lame Balls = 7 vs 0 /
- blueTeamJerseyIndex = 7
- redTeamJerseyIndex = 0
- function myRotatingBallsScript() {
- tagpro.ready(function(){
- //This is important.
- if(tagpro.events.drawPlayer)
- return;
- // Jerseys
- var jerseys = new Image();
- jerseys.src = "http://i.imgur.com/tK6VQvt.png";
- // brioche light no grid and no balls
- document.getElementById("tiles").src = "http://i.imgur.com/uuwrGYo.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));
- if (player.team == 1)
- context.drawImage(jerseys, redTeamJerseyIndex * 40, 40, 40, 40, drawPos.x, drawPos.y, 40 / tagpro.zoom, 40 / tagpro.zoom);
- if (player.team == 2)
- context.drawImage(jerseys, blueTeamJerseyIndex * 40, 0, 40, 40, drawPos.x, drawPos.y, 40 / tagpro.zoom, 40 / 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);
Add Comment
Please, Sign In to add comment