Page 1 of 3

Greasemonkey Script: Share Team Spoils (Deprecated)

PostPosted: Sat Jun 19, 2010 2:56 am
by Dako
This script is not working anymore as it was incorporated into the site core.



This is a very simple script that works in a team games with cards only.

Once someone told you what spoils he has in the chat in a specified format - this info is added to a user name to the right side, so you can always see what spoils they have. This script works best when all of your teammates follow this certain format or they have this script. Note, that if they will not update their info on spoils each turn - script will show the last info available that might be outdated.

Once you hover that spoil image - you will get the info of the territory and if the player owns it.

It also adds a [share spoils] button to auto-post in the game team chat the spoils you have (in a proper format).

Screenshot:
Click image to enlarge.
image



Install link - http://userscripts.org/scripts/show/79539
Script works in Firefox and Google Chrome.

I plan to add a support of different spoils format in the future.

Enjoy and comment!

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 3:53 am
by Bruceswar
I installed it and it is broken. The share button does not work?

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 3:58 am
by Dako
How come it is broken? It should work - just doesn't behave well with all the ajax requests. It adds the data to the DB, but it shows in the game chat only after refresh. I will work on it later - it is not so easy to make it work.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 3:58 am
by Bruceswar
nvm it was just really slow... took about a minute to post my cards.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 4:01 am
by Dako
Are you sure? It should not take more than 10 secs lol.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 4:04 am
by Bruceswar
Dako wrote:Are you sure? It should not take more than 10 secs lol.



I am sure.. I tested it in my quads on Rail Europe, and thought it was broken. Then about 40 seconds later after I left the game I See a new chat which was the cards, but I did not see the side cards. It just said "Cards:"

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 7:35 am
by darth emperor
lol, so that's why you were asking.... thanks ill just test it out. I just hope that it doesn't reveal when the box of teammates is unchecked lol


EDIT:If my partner follows the format but he does a mistake and tell me spoils that there aren't it will be automatically showed as my partner said? well i supose yeah


EDIT2:Just tried,it was very fast showed the name rightly,even if you leave the botton unchecked it sends only to teams,and if you do in a normal game it written as "note to self" but it didn't show me neither the colour neither is showen the colour spoils next to my name.Just nothing happened next to the names....

The message it shows like that
Spoils:: Nyt

As is showen like that im not sure wich format have you choosen....

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 4:49 pm
by Dako
Ok, I will try to look into it. I still want to finish the script so it is working correctly. This is the 1st version with flawed functionality I guess.

To see the cards near your name you need to refresh the page for now.

The message is strange, which cards did you have?

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 5:04 pm
by darth emperor
Dako wrote:Ok, I will try to look into it. I still want to finish the script so it is working correctly. This is the 1st version with flawed functionality I guess.

To see the cards near your name you need to refresh the page for now.

The message is strange, which cards did you have?

well it shows the name correctly,(nyt is a region of AoR1)what it doesn't say is the colour of the cards. I refreshed but still doesnt appear the spoils.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 5:27 pm
by Dako
Ok, sorry, was a mistake for 'non colour coded' games.

Updated the script, now it works in team games with spoisl only and they should work correctly now. Please see again :-).

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 5:43 pm
by darth emperor
Dako wrote:Ok, sorry, was a mistake for 'non colour coded' games.

Updated the script, now it works in team games with spoisl only and they should work correctly now. Please see again :-).

ok,now it says perfectly :D altough i still don't see any image next to my name


EDIT:Now it works,my problem was that I have the stat in the left and not down,but when i put down the stats it shows it perfectly,but when is in the left the spoils don't show...

and sugg. it would better change card to spoils in order to follow CC's lingo

EDIT2:ok,now in single games it doesn't show the button of share spoils anymore

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sat Jun 19, 2010 9:56 pm
by the.killing.44
Should it, darth?

And in my quads game all of my teammates have posted their cards in a form shown in your thread, but only my cards are displayed (I used the [share spoils] button).

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sun Jun 20, 2010 5:00 am
by Dako
darth emperor wrote:
Dako wrote:Ok, sorry, was a mistake for 'non colour coded' games.

Updated the script, now it works in team games with spoisl only and they should work correctly now. Please see again :-).

ok,now it says perfectly :D altough i still don't see any image next to my name


EDIT:Now it works,my problem was that I have the stat in the left and not down,but when i put down the stats it shows it perfectly,but when is in the left the spoils don't show...

and sugg. it would better change card to spoils in order to follow CC's lingo

EDIT2:ok,now in single games it doesn't show the button of share spoils anymore

Ok, will change to Spoils.

Thsi script works in team games only. I will look into left/down stat system.

the.killing.44 wrote:Should it, darth?

And in my quads game all of my teammates have posted their cards in a form shown in your thread, but only my cards are displayed (I used the [share spoils] button).

Ok, I will test it with my teammates as well. Will tell you the results.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Sun Jun 20, 2010 9:15 am
by darth emperor
Yeah,I know it was just to inform you that it wasn't there anymore,that it worked...


well i have tried in dubs....my partner doesn't has the script but did as I told and they camed out very well...

Another suggestion would be that when you pass the mouse in the spoil and you see the name of the territory also that appears the colour.because maybe they can't see well the colour. Or that when you pass it highlights the territory like BoB.well just some sugg.

And again congrats for this script,even if this is the last version I love how it is =D> =D>

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 5:53 am
by Dako
Ok, new version uploaded - http://userscripts.org/scripts/source/79539.user.js

Changes:
  • Correct behaviour with game chat now (uses AJAX, uses CC update game mechanism)
  • Reacts on chat changes (ie someone has posted their spoils and you were on the same game screen)
  • Shows teammates spoils correctly
  • Added color names to the image titles
  • Added table-stats support

I think this should be good for now. Any other ideas or changes for the plugin?
i plan to add a support of other spoils formats in the future, but for now I am good with 1 working.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 10:32 am
by lord voldemort
very cool and helpful script :D

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 10:58 am
by danryan
Brilliant script, no delay at all and very handy. =D>

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 11:05 am
by eddie2
yep thank you this will be very helpful =D> =D> =D>

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 11:13 am
by Foxglove
Nice script, dakester. :)

One suggestion - add some sort of indicator to show if a team-mates card view might be incorrect or out of date.

I'm always wary of code that relies on other people to take actions! So if a person doesn't post their cards appropriately, their team mates' card view will be incorrect. For example, if player A cashes and ends the turn with 3 cards, but forgets to share their spoils, player B will still see that they have 5 cards according to the script.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 11:20 am
by Dako
lord voldemort wrote:very cool and helpful script :D

Yay!
danryan wrote:Brilliant script, no delay at all and very handy. =D>

Thanks :-).
eddie2 wrote:yep thank you this will be very helpful =D> =D> =D>

I hope so.

Foxglove wrote:Nice script, dakester. :)

One suggestion - add some sort of indicator to show if a team-mates card view might be incorrect or out of date.

I'm always wary of code that relies on other people to take actions! So if a person doesn't post their cards appropriately, their team mates' card view will be incorrect. For example, if player A cashes and ends the turn with 3 cards, but forgets to share their spoils, player B will still see that they have 5 cards according to the script.

Yes, I am aware of that. I will try to add a check for the number of spoils and the last chat line. So if they don't match - there will a notification of some sort. Hopefully I will put it out today.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 12:00 pm
by elfish_lad
Great job mate!

Cheers.

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 4:18 pm
by slowreactor
Thank you Dako! VERY helpful!

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 5:23 pm
by pmchugh
Cheers, you just made me that slight bit more lazy :lol:

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Mon Jun 21, 2010 10:51 pm
by lord voldemort
also....
Could you make the share spoils button not blue?
I keep thinking i have a set :(

Re: NEW Greasemonkey Script: Share Team Spoils

PostPosted: Tue Jun 22, 2010 3:55 am
by Dako
New version available:

http://userscripts.org/scripts/source/79539.user.js

- Old spoils info is now striked out (but you can still read it).
- [share this] button changed it's color and moved a bit to the right.