Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name TagPro Mod: Ball Spin + Better P-ups
- // @namespace http://www.reddit.com/user/NewCompte
- // @description Rotating Balls, pixel perfect power-ups, power-up spawn tile, and new textures.
- // @include http://*.koalabeast.com*
- // @include http://*.jukejuice.com*
- // @include http://*.newcompte.fr*
- // @include http://justletme.be*
- // @license GPL
- // @author NewCompte, small additions by Cumflakes
- // @version 0.5
- // ==/UserScript==
- function myRotatingBallsScript() {
- tagpro.ready(function(){
- if(tagpro.events.drawPlayer)
- return;
- document.getElementById("tiles").src = "http://i.imgur.com/2ZIC8sa.png";
- document.getElementById("speedpad").src = "http://i.imgur.com/22eydBT.png";
- document.getElementById("speedpadred").src = "http://i.imgur.com/mdS1Ex7.png";
- document.getElementById("speedpadblue").src = "http://i.imgur.com/oWxNfsx.png";
- document.getElementById("portal").src = "http://i.imgur.com/BEr4T9e.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, 0.5)";
- context.beginPath();
- context.arc(drawPos.x + (TILESIZE / 2) * (1 / tagpro.zoom), drawPos.y + (TILESIZE / 2) * (1 / tagpro.zoom), 19 * (1 / tagpro.zoom), 0, Math.PI*2, true);
- context.closePath();
- context.fill();
- };
- if (player.tagpro) {
- context.strokeStyle = "rgba(0, 255, 0, .8)";
- context.fillStyle = "rgba(0, 255, 0, .25)";
- context.lineWidth = 3 * (1 / tagpro.zoom);
- 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();
- 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
Advertisement