Conquer Club

Point Winnings Figure-Outer?

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.

Point Winnings Figure-Outer?

Postby wrightfan123 on Mon Dec 17, 2007 6:12 pm

I haven't looked in depth, but is there a Grease Monkey script that will tell you the amount of points each person would win if the someone won the game right at that moment? And if there isn't, could someone please make it?

-W123
User avatar
Corporal wrightfan123
 
Posts: 601
Joined: Sat Jan 06, 2007 2:58 pm
Location: Looking over every baseball team's schedule to try to determine who will win the World Series.

Postby Risktaker17 on Mon Dec 17, 2007 6:14 pm

I think there is, but I don't have any add-ons. So I dunno anything.
Highest place: 40 1/17/08
Highest point total: 2773 1/17/08
Top Poster Position: 97th
User avatar
Captain Risktaker17
 
Posts: 1495
Joined: Sun Apr 01, 2007 8:09 am

Postby Ishiro on Mon Dec 17, 2007 9:36 pm

A Greasemonkey script would never be completely correct. There is a math formula for the points, but it is based on the current scores of the players, player current scores are not listed on the game screen, since Greasemonkey is just javascript that runs on the displayed page, it would not have the current scores to calculate from.

It could estimate based on rank though...
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby hecter on Mon Dec 17, 2007 9:56 pm

Ishiro wrote:A Greasemonkey script would never be completely correct. There is a math formula for the points, but it is based on the current scores of the players, player current scores are not listed on the game screen, since Greasemonkey is just javascript that runs on the displayed page, it would not have the current scores to calculate from.

It could estimate based on rank though...

But greasemonkey can pull information from other pages, can it not?
In heaven... Everything is fine, in heaven... Everything is fine, in heaven... Everything is fine... You got your things, and I've got mine.
Image
User avatar
Private 1st Class hecter
 
Posts: 14632
Joined: Tue Jan 09, 2007 6:27 pm
Location: Tying somebody up on the third floor

Postby Aerial Attack on Mon Dec 17, 2007 11:11 pm

hecter wrote:But greasemonkey can pull information from other pages, can it not?


The short answer is NO.

The long answer is, yes it's possible but it would be severely convoluted.

Here is how you would have to do it for the long answer:

1) loop through all the players in the game
2) while looping through
a. check against your name so you know the score you want to calculate against
b. copy the target link to the profile page for that player.
c. open a new browser window to the profile page for that player.
d1.) Either write the player's score to a cookie saved on conquer club that the games pages and the profile pages both have access to [I believe you could use the same cookie that is used for Saved Searches and Map Opacity]
d2.) OR you send the player's score back as the result of the function that opened the new browser window [player profile browser window].
e. close the player profile browser window.
f. save this value to an array - making sure to note which one was YOURS
3) compare the values in the array against your score [from the array]
4) display a message box with how many points you would lose against each of the other players and how many you would win total

That's a lot of processing and code to handle basically 6 clicks and a calculator.

* - if this is a teams game - the loop in step 2 would have also needed to identify your teammates so as to average your team score and your opps team score.

* - Step 2d requires that the player's score always be in the same place on the page relative to other easily distinguished markers/identifiers. I'm not 100% sure that method d2 would even work.
Image
My Conquer Club Scripts | Bests: 2133, #205
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby Ishiro on Tue Dec 18, 2007 8:30 am

You could also handle it by writing essentially two scripts... the first would be for the Scoreboard, as you page through it, it will store all the scores to a file. The second would be the game script that would use the stored values in the file to do calculations. Your calculations would then be correct only immediately after a scoreboard refresh, and would become approximations after that.

The problem is that a script that pulled from other pages would be horrendously slow.

Now, if Lack were to modify the site to put the user's current score in the Hover text on the user's name or rank, then we could do something with it.
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby Night Strike on Tue Dec 18, 2007 5:40 pm

Couldn't you just check the score from the person's profile page since it's included there?? (By the way, I know nothing about scripts, but that's a different page than the scoreboard.)
Image
User avatar
Major Night Strike
 
Posts: 8512
Joined: Wed Apr 18, 2007 2:52 pm

Postby Herakilla on Tue Dec 18, 2007 10:45 pm

what if you made a script that went off people's ranks, it would just be an estimate but gives you an idea
Come join us in Live Chat!
User avatar
Lieutenant Herakilla
 
Posts: 4283
Joined: Fri Jun 09, 2006 8:33 pm
Location: Wandering the world, spreading Conquerism

Postby Ishiro on Tue Dec 18, 2007 10:47 pm

Yes.. but checking the score in a 6 person game means the script has to open 6 pages to get the info it needs.

Seriously, getting info from another page is a pain in the ass. The best bet is to first try to get Lack to include the player's current score in the tool tip hover text of either their name or their rank icon. Once the info is on the game page somewhere, it will be easy to script the calculations.
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby philh on Sat Dec 22, 2007 10:55 am

It's not quite that bad - you can download other pages using XMLHttpRequest, so no need to open a new browser window and no need to download images at the same time. The score would be easy to extract as long as the profile page doesn't change significantly.

Lack may not appreciate the server hit if a lot of people start using it, but it wouldn't be too hard to do.
Major philh
 
Posts: 85
Joined: Sat Jan 20, 2007 6:30 am


Return to Tool Archives

Who is online

Users browsing this forum: No registered users