User Pass
Home Sign Up Contact Log In
Forum > Goal Line Blitz > Greasemonkey Scripts > Greasemonkey Scripts (original thread)
Page:
 
tciss
offline
Link
 
Originally posted by Checkmate187
This is part of the script with the line causing that problem. I still have it running but have changed the color from red to black so it doesnt show up.


var sp = playText.indexOf('(')+1;
var ep = playText.indexOf(')');
var yt = playText.slice(sp,ep);

if(current_team == team1)
{

if(playText.match(' rush')!=null)
{
if(playText.indexOf("to the left")!=-1)
{
team1_plays++;
team1_Left++;
team1_Outside++;
play.style.color='black'; <--------------------***HERE IS THE LINE***
if(yt.indexOf("yd loss")!=-1)
{
team1_Lefty = team1_Lefty - parseFloat(yt.replace(" yd loss",""));
}
if(yt.indexOf("yd gain")!=-1)
{
team1_Lefty = team1_Lefty + parseFloat(yt.replace(" yd loss",""));
}
}
if(playText.indexOf("to the right")!=-1)
{
team1_plays++;
team1_Right++;
team1_Outside++;

I am thinking it was maybe put in so he could check the accuracy (highlight the plays it was counting) so he could double check.


You are thinking right. Just forgot to take it out.

RandomBeast found the bug causing NAN for the left yardage, so thanks.

I will be adding the additional features as I stated earlier, but work has gotten in the way.
 
jordan274
offline
Link
 
work is no excuse
 
TuNice
offline
Link
 
Originally posted by jordan274
work is no excuse


I WANT THE AUTO NEXT SCRIPT TO GET FIXED SO IT DOESNT CUT OFF SO EARLY. NO I WILL NOT TURN OFF MY CAPS LOCK. MY PINKY IS TOO LAZY. BYE. IM DONE TYPING. NOW. OKAY NOW. POST
 
tjsexkitten82
offline
Link
 
Originally posted by Jed

Highlighting your player in the replay

Originally posted by RandomBeast

You should be somewhat familiar with Greasemonkey to do this, as you will in essence be creating your own script for your player.

Now before we get started, you'll need to find the player ID of who you want to track on the replay. You can do that by clicking on any of your players on your home page. You'll see their ID at the end of the URL: "player_id=######"

###### = your player ID number. Save that number.

You'll also need a 16x16 image you want to show up for your player.

I'm using just a colored red circle with my player's initial on it, but you can put anything really. Just make sure it is 16x16 so it fits with the others in the replay. It should have some transparency if you want to make it a circle. Upload it to a server somewhere and save that URL.

Now, in Firefox go to Tools>Greasemonkey>New User Script...

For name, enter the name of your player
Put anything for Namespace (I put GLB for GoalLineBlitz)
You can put any description. Something like "Custom icon on replay for player XYZ"
For the includes, remove anything currently there, and add "http://goallineblitz.com/game/replay.pl?pbp_id=* " (no quotes)

It may ask you to browse for a text editor if you don't have one associated - browse to notepad or something similar.

It will open up a text file with a few lines at the top. Underneath those, put the following code:

window.setTimeout( function()
{
if(document.getElementById('#######')){
document.getElementById('#######').innerHTML = '<img src="http://www.maploco.com/maps/dots/red-circle.png">';
}
}
)

Replace the ###### in the two places with your player user ID you saved earlier. Replace the URL with the path to your image. Save that file. Next time you watch a replay, your player will have a custom icon.




Hey people, I created a pretty sweet little icon for your player. It's the exact size of the normal player circles, solid in color, and yet has a sweet little twist. Check it out!

Here it is in blue: http://img209.imageshack.us/img209/2636/glbbluedot2qq1.png
And in case you have 2 players on same team, in purple-red: http://img440.imageshack.us/img440/6235/glbreddot2ij7.png
Last edited Jun 20, 2008 18:39:02
 
RAPB
offline
Link
 
Originally posted by tciss
Originally posted by Checkmate187

This is part of the script with the line causing that problem. I still have it running but have changed the color from red to black so it doesnt show up.

play.style.color='black'; <--------------------***HERE IS THE LINE***


You are thinking right. Just forgot to take it out.

RandomBeast found the bug causing NAN for the left yardage, so thanks.

I will be adding the additional features as I stated earlier, but work has gotten in the way.


Thats not a bug, thats a feature. I instantly put on a couple of lines just alike.

- inside run right = green
- inside run left = deeppink
- outside run right = purple
- outside run left = orangeRed

I like it that way. The runs are highlighted.

But that damn NAN - problem... what has to be changed?
 
RandomBeast
offline
Link
 
find the line that says

team2_Lefty = team2_Lefty + parseFloat(playText.replace(" yd loss",""))

and change it to

team2_Lefty = team2_Lefty + parseFloat(yt.replace(" yd loss",""))
 
Checkmate187
offline
Link
 
Originally posted by RandomBeast
find the line that says

team2_Lefty = team2_Lefty + parseFloat(playText.replace(" yd loss",""))

and change it to

team2_Lefty = team2_Lefty + parseFloat(yt.replace(" yd loss",""))


That worked, but the numbers aren't right.
 
RandomBeast
offline
Link
 
you'll have to bring that up with tciss. I haven't checked the math, myself.
 
TuNice
offline
Link
 
Originally posted by chuffmaster2k
For anybody wondering what the game scout is it's at http://userscripts.org/users/56355/scripts

It adds a table that shows what how many rushes to the left, middle, right, how many those add up to and %inside and % outside for both teams.

It was working for me this afternoon when I installed it, but the boxes are blank now, so...


it only does running plays?
 
mw54finest
offline
Link
 
Originally posted by TuNice
it only does running plays?

At this time, yes. And with some bugs too. tciss has plans to add pass stats in the future. I volunteered to beta test.
 
jaspegs94
offline
Link
 
Wait so what do I do to make it so the scouting reports say something? It just says 0 or something.
 
TuNice
offline
Link
 
Originally posted by jaspegs94
Wait so what do I do to make it so the scouting reports say something? It just says 0 or something.


go to play by play
 
mw54finest
offline
Link
 
http://userscripts.org/scripts/show/28845

Use this script to have the box only show up in play by play. Also implemented the "left" fix above.
 
RIP Al Davis
offline
Link
 
Are there any to highlight plays with pancakes?
 
mw54finest
offline
Link
 
Originally posted by Kira
Are there any to highlight plays with pancakes?


I have not seen any yet. I don't think this is possible unless Bort fixes the replay.
 
Page:
 


You are not logged in. Please log in if you want to post a reply.