r/TagproScripts • • Sep 10 '15

[Request] Help coding a team win % script for PUBs

3 Upvotes

I had this idea earlier and it was pretty popular, so I'd like to give it a shot (with your help, of course). My idea is very simple:

  • Retrieve the win% for each player in the game

  • Take the geometric average of each team's win% (the 4th root of the product of their win%)

  • Display each team's average next to the scoreboard (or pretty much anywhere)

For example (rounding for simplicity):

RED

53%

49%

42%

50%

BLUE

44%

56%

52%

73%

RED: (0.53 * 0.49 * 0.42 * 0.5)1/4 = 0.0545371/4 = 0.48 = 48%

BLUE: (0.44 * 0.56* 0.52* 0.73)1/4 =0.093533441/4 = 0.55 = 55%

If there were only 3 players it would have to be 1/3 instead of 1/4 , 2 would be 1/2

I have no experience with using the TagPro API or coding in Javascript, so help would be greatly appreciated. Since this idea is pretty popular I eventually plan to release this script, so I would obviously give everyone who helps me credit. I ain't no script-stealing whore. Thanks!!!!


r/TagproScripts • • Sep 09 '15

[Userscript] Fix Stuck Keys

3 Upvotes

I'm posting this here in hopes that I can get some feedback. This script fixes an issue that has always bugged the hell out of me - when direction keys get "stuck" when you either open the chat window or your window loses focus.

You can grab my first attempt at the script here.

There is some ghetto hacks in there to try to watch/send the correct keypress count, because the counter is internal to tagpro, and the exposed method that should abstract the need for the counter didn't work. This imperfect solution causes certain scenarios to fail (but no worse than the current behavior), or causes you to have to press the direction key twice to start moving again sometimes (again, no worse than the current behavior).

Feel free to give any thoughts/feedback/critiques/requests.

-ButtSnake


r/TagproScripts • • Sep 08 '15

[Request] Add a 'shine.png' to the TagPro Replay's Extension.

3 Upvotes

Browncoat's Script lets you assign a 'shine.png' that is a 40x40 PNG that sits over the top of all balls in the game. If your ball spins, the Shine stays fixed in position.

I would love to have this option in ballparts's Recording Script. I have no idea how to make it happen though.


r/TagproScripts • • Aug 26 '15

Updated rules on userscripts!

Thumbnail
reddit.com
3 Upvotes

r/TagproScripts • • Aug 26 '15

[Request] Is this possible?

3 Upvotes

I would like to be able to do all of these things at once:

  • Put flair in the center of the balls.

  • Make flair the size of the balls. I would like to do this by referencing a larger PNG file instead of 'expanding' the current tiny PNG.

  • Add spin to the flair and the ball, but separately. In other words, the ball spins at one rate and the flair spins at another rate.

  • Overlay each ball with a PNG that is 40x40 pixels.

I've been told that Browncoat's Mod does most of these things, but I really, really want to make flair bigger.

Any ideas?


r/TagproScripts • • Aug 23 '15

Automatic CSV adding

Thumbnail
reddit.com
3 Upvotes

r/TagproScripts • • Aug 17 '15

[Request] Exit confirmation script

3 Upvotes

I'm looking for a script that will require an extra click to exit a game. Something along the lines of a pop up box asking "are you sure you want to exit this game?"


r/TagproScripts • • Aug 17 '15

[Help] What's wrong with my textures?

3 Upvotes

I've been trying to do a tagpro texture pack, but I seem to be off to a bad start.

Here's the tiles that I've been working on. http://i.imgur.com/YcmVLhh.png

However, on some maps (renegade, platypus), there's 1 or 2 pieces of lines that are missing.

What am I doing wrong here?

Edit: Images of the problems in action: http://imgur.com/a/14ngQ


r/TagproScripts • • Aug 16 '15

[Userscript] Chat Beep (beep on chat area activity)

Thumbnail gist.githubusercontent.com
3 Upvotes

r/TagproScripts • • Aug 02 '15

[BUG] the tagpro mspstats script is 'duplicates' on my screen and the columns don't work

3 Upvotes

Edit: mapstats

can't spell

I don't want to lose my current map stats though. Is there any way to fix this? I can link screenshots if that is helpful


r/TagproScripts • • Jul 31 '15

Super Report: The user friendly !mods caller (xpost)

Thumbnail
reddit.com
3 Upvotes

r/TagproScripts • • Jul 30 '15

[request] How do i change the wait time at the end of a match to 5 seconds from what it is now (~20)

3 Upvotes

I know how to live edit global-game.js file. I just don't know where in the code the setting is.


r/TagproScripts • • Jul 06 '15

A few script writing questions

3 Upvotes
  1. Is there a test server that I can use that won't boot me for being AFK, ban me for too many DC's etc, make me ruin games by debugging my script instead of playing, etc?

  2. Is there a unique game id available via the tagpro object? I can't find it anywhere. I'm currently having to use server, port, game end time as a stand in.

  3. Is there an HTTP API to get information about a game (i.e. to find out which players are in it)? Or is a server able to connect to the tagpro socket? I haven't tried that yet.

Thanks in advance.


r/TagproScripts • • Jul 02 '15

[REQUEST] Switch teams script

3 Upvotes

I used to have a script which put the switch teams button and a leave game button IIRC next to the sound buttons at the top right. It also auto switched you back to your team once you switched which was useful. I cleared my computer and now can't seem to find it anywhere, does anyone have a link to said script?


r/TagproScripts • • May 14 '15

[Request] Show win percentage to the hundredth decimal place

3 Upvotes

Not sure if this exists. Couldn't find it on the wiki or searching r/tagpro. Tagpro-stats has it, but I think it would be cool to see on your profile page as well.


r/TagproScripts • • May 12 '15

[Request] Changes the size of Marsballs in JSON

3 Upvotes

Basically, a mars ball script for mapmaking.

Does a few things:

  1. Most importantly, allows you to change the size of marsball in the JSON (or in the editor, if possible)

  2. Adds a button to the unfortunate editor like all the other elements.

Optimally, the script will cause the Marsball button to popup on the editor, and a button below the 'source' button to edit the size of each


r/TagproScripts • • May 09 '15

[Request] Can someone update the script/texture pack in this video? It broke with 3.0

Thumbnail
youtube.com
3 Upvotes

r/TagproScripts • • May 07 '15

[Request] A userscript that fixes the sound problems on chrome.

3 Upvotes

There is a problem with the Tagpro sounds on chrome that a lot of people suffer from. NewCompte made an extension that fixes this problem, however, he never registered it on the google system so chrome keeps on removing the extension everytime i open chrome. Is there a way to take the code NC used and make it into a userscript and if not could someone make a new one that solves this problem? Thanks in advance.


r/TagproScripts • • Apr 27 '15

Discussion Should I use Pastebin or Github for my scripts? And how would you make your script auto-update?

3 Upvotes

Pastebin or Github? Can you not auto-update from Pastebin? I don't even understand Github, it's a weird interface imo. Pastebin you can click one button and its copied; I understand its down to my own preference, but witch one(or another similar site) would you recommend?

How would I go about auto-updating my script? Is it just the Update URL?

I have one more question, one that would be the most helpful. How would I make it so that when the user presses Raw it automatically asks if you want to install the script?

I'll add how to auto-update scripts into the wiki; thanks!


r/TagproScripts • • Apr 24 '15

Userscript Update [Userscript] YAIS (update): Options Menu + Leaderboard Popup

3 Upvotes

Options Button Screenshot: http://i.imgur.com/NVqnAF3.png
Options Menu Screenshot: http://i.imgur.com/qNB2Td0.png
Leaderboard Popup Screenshot: http://i.imgur.com/ocyD67Z.png
Script: http://pastebin.com/6ULUbDET


How to install Userscripts (using Chrome)...

  1. Install the TamperMonkey extension (http://tampermonkey.net)

  2. Once it's installed, click the icon (looks like 2 circles inside a rectangle) and choose "Add a new script"

  3. Delete any text already in the editor.

  4. Copy/Paste the new Userscript text - it starts with: // ==UserScript==

  5. Click Save.

  6. Done! The script will now automatically run whenever your on the webpage/s it's designed for.


r/TagproScripts • • Apr 20 '15

[Request] Can someone fix the bug in beachballs.

3 Upvotes

So theres a bug with the beachballs spin script where balls stay on the screen, and the name stays on the scoreboard when someone leaves or refreshes. Has this been fixed already? AFAIK this is the latest script http://pastebin.com/FyvGCD9t


r/TagproScripts • • Apr 01 '15

[REQUEST] A script that automatically congratulates players on reaching a new degree.

3 Upvotes

Preferably something you can customize the text for, so at the end of the match, immediately after the green text for a new degree shows up, players can say something unique like:

"Congratulations [playerID]! Keep it up!"

"Nice job [playerID], one step closer to 360 :)"

or even a simple

"Grats [playerID]!"

I just thought of this because I was in a game where afterwards it said "Someball has reached 1°." Or whatever it actually says. Two players congratulated him (myself and K1nn1ck) and I think that sort of thing motivates even the newest players to keep playing. When they see how friendly and encouraging our community is, before you know it they'll be pushing triple digit degrees, they'll be active members of this sub, and they'll be congratulating all the new Some Balls on their earliest achievements.

I know the auto-congratulate feature really seems like a product of laziness, but it would definitely help me because if I lose, I can get pretty salty for various reasons, and if the first thing out of my mouth is "congratulations!" to a player on the opposing team, it'll remind me it's just a game and plus I'll look like a dick if I say "Congratulations! my team did nothing". So yeah that's pretty much it.


r/TagproScripts • • Mar 30 '15

What are some funny audio scripts

3 Upvotes

r/TagproScripts • • Mar 24 '15

Wins until next degree.

3 Upvotes

I did not make this, just searched on the subreddit and did not see it.

// ==UserScript==
// @name          TagPro Wins Until Next Degree
// @namespace     http://www.reddit.com/user/tpcarl/
// @description   Displays wins needed until next degree on score screen.
// @include       http://tagpro-*.koalabeast.com*
// @license       GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @author        ben, modified by ballparts
// @version       .1
// ==/UserScript==
 
$('article > div.section.smaller').after( "<center><h3><div><p id='winsneeded'></p></div></h3></center>" );
 
url = $('a[href^="/profile"]').attr('href');
if(url !== undefined) {
        var n = url.lastIndexOf('/');
        var profileNum = url.substring(n + 1);
        profilePage = String('/profile/'+profileNum);
    localStorage.setItem('profilePage',profilePage);
 
}
 
 
if(document.URL.search('profile')<1) {
        $( "#winsneeded" ).load(localStorage.getItem('profilePage') + ' article > h3 > div', function(){
                $('#winsneeded > div:last-child').css({'font-size':'50%'});
        });
}    

r/TagproScripts • • Mar 10 '15

Userscript Update Randomize Flairs

3 Upvotes

I've (finally) fixed the bug where opening a group link to a new server kicked you from the group, so (assuming GitHub/TamperMonkey don't somehow do clever stuff to do it automatically), get the most recent version here.

As always, comment/message if you find any bugs and I'll try and fix them for you.

(Previous post with more information here)