glbscripts.myfreeforum.org Forum Index glbscripts.myfreeforum.org
Forum dedicated to Greasemonkey Scripts made for Goal Line Blitz online game.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   Join! (free) Join! (free)
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Add Cash To HomePage Part II

 
Post new topic   Reply to topic    glbscripts.myfreeforum.org Forum Index -> Modified Scripts
View previous topic :: View next topic  
Author Message
mw54finest
Site Admin


Joined: 22 Jun 2008
Posts: 160

PostPosted: Wed Jun 25, 2008 9:31 am    Post subject: Add Cash To HomePage Part II Reply with quote

by sirnotappearinginthisfilm
Adds player's cash to the home page dynamically.

This is a modification of http://userscripts.org/scripts/show/27967 which hard coded the player info, my script iterates through each player found on the home page and adds the cash for each player found to the respective player's section.

Tested on a page with 3 players, would be nice to have someone with a large amount of players test it out to see if it works correctly.

I also noticed that the background color for each player doesn't expand with the addition of this extra row of player data. GLB uses a background image for this and it seems that once it's size is initially defined by the page it cannot be changed (I tried!).

edit: I've made some changes to the code to allow some customization. At the top of the code you will see the following:
Code:

var displayLocation = { BelowEnergy:false, RightOfEnergy:false, BelowXP:true};


setting one of these to true will change the location of where the cash amount will display. Try setting one of them to true (with the others being false) to see the differences. While it is possible to set them all to true it would be better to have one to true and the others to false.

I personally like the dollar amount below the XP and have set that to be the default.

edit#2: some people use this in conjunction with other greasemonkey scripts, to allow those to work as well someone suggested adding a timeout to the script. The length of the timeout is set in a variable at the top of the script. By default the timeout is set to 0. If you need to have a timeout change the number on this line:

Code:
var timeout = 0;


to the desired timeout. This number is the number of milliseconds. So to have the page wait 1 second it would be:
Code:

var timeout = 1000;


http://userscripts.org/scripts/show/29108



_________________
Eat, Sleep, Live GLB!


Last edited by mw54finest on Wed Jun 25, 2008 1:08 pm; edited 2 times in total
Back to top
View user's profile Send private message
mw54finest
Site Admin


Joined: 22 Jun 2008
Posts: 160

PostPosted: Wed Jun 25, 2008 10:00 am    Post subject: Reply with quote


BelowEnergy:true, RightOfEnergy:false, BelowXP:false


BelowEnergy:false, RightOfEnergy:false, BelowXP:true


BelowEnergy:false, RightOfEnergy:true, BelowXP:false
_________________
Eat, Sleep, Live GLB!


Last edited by mw54finest on Wed Jun 25, 2008 11:02 am; edited 2 times in total
Back to top
View user's profile Send private message
dlawilliams



Joined: 27 Jun 2008
Posts: 2

PostPosted: Fri Jun 27, 2008 1:51 pm    Post subject: Reply with quote

It works as long as I don't sort the players with the sort feature
Back to top
View user's profile Send private message
SNAITF
Developer


Joined: 25 Jun 2008
Posts: 65

PostPosted: Fri Jun 27, 2008 2:19 pm    Post subject: Reply with quote

dlawilliams wrote:
It works as long as I don't sort the players with the sort feature


That's what the timeout is for, by default it's set to 0.  Try setting it to 1000 (1 second delay) and refresh the page, if that doesn't work, go to 2000, etc.

If you own a good number of players the sort takes time, modify the timeout to compensate for that.


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    glbscripts.myfreeforum.org Forum Index -> Modified Scripts All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum