Conquer Club

Greasemonkey Script: Share Team Spoils (Deprecated)

Archival storage to keep things organized and uncluttered. Can't find what you need? Search for old topics here.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

Greasemonkey Script: Share Team Spoils (Deprecated)

Postby Dako on Sat Jun 19, 2010 2:56 am

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!
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Bruceswar on Sat Jun 19, 2010 3:53 am

I installed it and it is broken. The share button does not work?
Highest Rank: 26 Highest Score: 3480
Image
User avatar
Corporal Bruceswar
 
Posts: 9713
Joined: Sun Dec 23, 2007 12:36 am
Location: Cow Pastures

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Sat Jun 19, 2010 3:58 am

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.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Bruceswar on Sat Jun 19, 2010 3:58 am

nvm it was just really slow... took about a minute to post my cards.
Highest Rank: 26 Highest Score: 3480
Image
User avatar
Corporal Bruceswar
 
Posts: 9713
Joined: Sun Dec 23, 2007 12:36 am
Location: Cow Pastures

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Sat Jun 19, 2010 4:01 am

Are you sure? It should not take more than 10 secs lol.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Bruceswar on Sat Jun 19, 2010 4:04 am

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:"
Highest Rank: 26 Highest Score: 3480
Image
User avatar
Corporal Bruceswar
 
Posts: 9713
Joined: Sun Dec 23, 2007 12:36 am
Location: Cow Pastures

Re: NEW Greasemonkey Script: Share Team Spoils

Postby darth emperor on Sat Jun 19, 2010 7:35 am

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....
Image
User avatar
Sergeant 1st Class darth emperor
 
Posts: 2212
Joined: Fri Nov 03, 2006 12:45 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Sat Jun 19, 2010 4:49 pm

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?
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby darth emperor on Sat Jun 19, 2010 5:04 pm

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.
Image
User avatar
Sergeant 1st Class darth emperor
 
Posts: 2212
Joined: Fri Nov 03, 2006 12:45 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Sat Jun 19, 2010 5:27 pm

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 :-).
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby darth emperor on Sat Jun 19, 2010 5:43 pm

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
Image
User avatar
Sergeant 1st Class darth emperor
 
Posts: 2212
Joined: Fri Nov 03, 2006 12:45 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby the.killing.44 on Sat Jun 19, 2010 9:56 pm

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).
User avatar
Captain the.killing.44
 
Posts: 4724
Joined: Thu Oct 23, 2008 7:43 pm
Location: now tell me what got two gums and knows how to spit rhymes

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Sun Jun 20, 2010 5:00 am

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.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby darth emperor on Sun Jun 20, 2010 9:15 am

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>
Image
User avatar
Sergeant 1st Class darth emperor
 
Posts: 2212
Joined: Fri Nov 03, 2006 12:45 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Mon Jun 21, 2010 5:53 am

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.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby lord voldemort on Mon Jun 21, 2010 10:32 am

very cool and helpful script :D
Image
User avatar
Lieutenant lord voldemort
 
Posts: 9596
Joined: Sat Oct 20, 2007 4:39 am
Location: Launceston, Australia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby danryan on Mon Jun 21, 2010 10:58 am

Brilliant script, no delay at all and very handy. =D>
Sergeant 1st Class danryan
 
Posts: 3418
Joined: Tue Jan 09, 2007 8:30 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby eddie2 on Mon Jun 21, 2010 11:05 am

yep thank you this will be very helpful =D> =D> =D>
User avatar
Lieutenant eddie2
 
Posts: 4263
Joined: Sun Sep 20, 2009 10:56 am
Location: Southampton uk

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Foxglove on Mon Jun 21, 2010 11:13 am

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.
Brigadier Foxglove
 
Posts: 1308
Joined: Sun Dec 16, 2007 1:05 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Mon Jun 21, 2010 11:20 am

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.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby elfish_lad on Mon Jun 21, 2010 12:00 pm

Great job mate!

Cheers.
User avatar
Major elfish_lad
 
Posts: 1155
Joined: Sat Jul 18, 2009 7:49 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby slowreactor on Mon Jun 21, 2010 4:18 pm

Thank you Dako! VERY helpful!
Colonel slowreactor
 
Posts: 1356
Joined: Tue Jan 20, 2009 3:34 pm
Location: Ithaca, NY

Re: NEW Greasemonkey Script: Share Team Spoils

Postby pmchugh on Mon Jun 21, 2010 5:23 pm

Cheers, you just made me that slight bit more lazy :lol:
2009-08-12 03:35:31 - Squirrels Hat: MWAHAHAHAHAHAHA!!!!!!!!!!
2009-08-12 03:44:25 - Mr. Squirrel: Do you think my hat will attack me?
User avatar
Colonel pmchugh
 
Posts: 1264
Joined: Sat Feb 09, 2008 7:40 pm

Re: NEW Greasemonkey Script: Share Team Spoils

Postby lord voldemort on Mon Jun 21, 2010 10:51 pm

also....
Could you make the share spoils button not blue?
I keep thinking i have a set :(
Image
User avatar
Lieutenant lord voldemort
 
Posts: 9596
Joined: Sat Oct 20, 2007 4:39 am
Location: Launceston, Australia

Re: NEW Greasemonkey Script: Share Team Spoils

Postby Dako on Tue Jun 22, 2010 3:55 am

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.
Image
User avatar
Colonel Dako
 
Posts: 3987
Joined: Sun Aug 26, 2007 9:07 am
Location: St. Petersburg, Russia

Next

Return to Tool Archives

Who is online

Users browsing this forum: No registered users