new bookmarklet discussion

22 views
Skip to first unread message

sam grafton

unread,
Feb 19, 2009, 11:39:38 AM2/19/09
to mysqlgame
im going to try to add some features since no one seems to be
maintaining the bookmarklet anymore. i somewhat suck at javascript
though.

sam grafton

unread,
Feb 19, 2009, 11:42:49 AM2/19/09
to mysqlgame
javascript:var%20m=document.createElement('script');m.setAttribute
('src','http://mysqlgame-ui-update.googlecode.com/svn/trunk/
BrianUiUpdate.js?
r='+new%20Date().getMilliseconds());document.body.appendChild(m);
(function(){})();void(m);

sam grafton

unread,
Feb 19, 2009, 11:43:39 AM2/19/09
to mysqlgame
i added the better totals alert into the options, and added a reset
for loot counters.
i dont know how this thing uses cookies so i cant make a toggle

sam grafton

unread,
Feb 19, 2009, 11:46:39 AM2/19/09
to mysqlgame
i figured out how the number formatting works. if the number
formatting is enabled, then row totals alert will be foramtted

Trohs

unread,
Feb 19, 2009, 12:22:46 PM2/19/09
to mysqlgame
That's nice... Well done!

SirKill

unread,
Feb 20, 2009, 3:05:18 AM2/20/09
to mysqlgame
Awesome update(s) I like the new row totals box.

SirKill

unread,
Feb 20, 2009, 3:09:36 AM2/20/09
to mysqlgame
Unfortunately, the counter Reset still isn't working. Instead of
setting dm,df to 0, it takes me to a different page and sets the URL
to the JS command (javascript:dm=0;df=0;)
Maybe put the reset in a function?

SirKill

unread,
Feb 27, 2009, 6:48:33 PM2/27/09
to mysqlgame
I've been working on a Excel Macro to calculate the totals from the
CVS dumps, and I'm getting different values than the JS Bookmarklet.
The bookmarklet says my total is: 988,755,433
My macro says my total is: 744,657,836

I have compared my results with stats and totals found here
http://mgw.homedns.org/mysqlgameStats/ so I'm not sure whose in error.

SirKill

unread,
Feb 27, 2009, 7:21:57 PM2/27/09
to mysqlgame
Here is the Macro I used.
http://exiledcode.ca/mysqlgame/MysqlGame.bas
You may want to remove:
If user = " yoshibot " Then
...
End If
I was using that to verify the values of each row.

On Feb 27, 3:48 pm, SirKill <soccersimo...@gmail.com> wrote:
> I've been working on a Excel Macro to calculate the totals from the
> CVS dumps, and I'm getting different values than the JS Bookmarklet.
> The bookmarklet says my total is: 988,755,433
> My macro says my total is: 744,657,836
>
> I have compared my results with stats and totals found herehttp://mgw.homedns.org/mysqlgameStats/so I'm not sure whose in error.

funkenstein

unread,
Feb 28, 2009, 6:30:19 AM2/28/09
to mysqlgame
Hey SirKill-
THanks for the macro. Where are you getting the CVS dumps?
The stats from mgw are 3 months old right?

Cheers-

On Feb 27, 6:48 pm, SirKill <soccersimo...@gmail.com> wrote:
> I've been working on a Excel Macro to calculate the totals from the
> CVS dumps, and I'm getting different values than the JS Bookmarklet.
> The bookmarklet says my total is: 988,755,433
> My macro says my total is: 744,657,836
>
> I have compared my results with stats and totals found herehttp://mgw.homedns.org/mysqlgameStats/so I'm not sure whose in error.

SirKill

unread,
Feb 28, 2009, 6:13:44 PM2/28/09
to mysqlgame
For Shard 3 they can be found here: http://exiledcode.ca/mysqlgame/dumps/
(there is a big gap from when i changed my google password but forgot
to update the script)
and all other shards: http://timlash.net/mysqlgame/stats/

On Feb 28, 3:30 am, funkenstein <luke.s...@gmail.com> wrote:
> Hey SirKill-
>  THanks for the macro.  Where are you getting the CVS dumps?
>  The stats from mgw are 3 months old right?
>
>  Cheers-
>
> On Feb 27, 6:48 pm, SirKill <soccersimo...@gmail.com> wrote:
>
> > I've been working on a Excel Macro to calculate the totals from the
> > CVS dumps, and I'm getting different values than the JS Bookmarklet.
> > The bookmarklet says my total is: 988,755,433
> > My macro says my total is: 744,657,836
>
> > I have compared my results with stats and totals found herehttp://mgw.homedns.org/mysqlgameStats/soI'm not sure whose in error.

bandito.lobster

unread,
Mar 2, 2009, 12:46:21 PM3/2/09
to mysqlgame
I looked at the VB macro and something is definitely odd with it. To
track my own stats / value I run a query on a compiled database table
everyday, which spits out a csv file for me. Since timlash runs a
scan of most of the shards every night, we could ask nicely of him to
setup a value calculation query to run after his scans are done. Here
is the query I run to get fairly accurate rankings, I'm sure timlash
is quite capable at figuring this out but to potentially save him time
here it is;

SELECT
rows.owner,
COUNT(rows.row_id) AS 'rows',
rows.clique,
SUM(rows.fuel_factories) AS 'total FF',
SUM(rows.fuel) AS 'total fuel',
SUM(rows.money_factories) AS 'total MF',
SUM(rows.money) AS 'total money',
SUM(rows.attackers) AS 'total attackers',
SUM(rows.attack_multiplier) AS 'total AM',
SUM(rows.defenders) AS 'total defenders',
SUM(rows.defense_multiplier) AS 'total DM',
SUM(rows.rc) AS 'RC',
SUM(POW(2, rows.money_factories + 1) * 10 - 40)
+ SUM(POW(2, rows.fuel_factories + 1) * 7.5 - 30)
+ SUM(POW(2, rows.attack_multiplier + 1) * 125 - 500)
+ SUM(POW(2, rows.defense_multiplier + 1) * 125 - 500)
+ ROUND(POW(1.5, COUNT(row_id) - 1) * 160000)- 160000
+ SUM(money)
+ SUM(attackers) * 20
+ SUM(defenders) * 10
AS total_value
FROM mysqlgame.rows rows
where rows.name <> 'Reserved'
GROUP BY rows.owner
order by total_value desc

There are a couple of points that I haven't taken the time to resolve
yet. First, this query will report the total number of unused row
creators an owner has, but not add the values of those row creators
into the total value. Another is quite an obvious omission from a
ranking query but I have yet to figure out how to get a ranking value
column to work in this query. Oh and the "where rows.name <>
'Reserved' " line accounts for Adam1213's name protection account,
otherwise it shows he has 32 rows, which is not true.

SirKill

unread,
Mar 2, 2009, 2:14:32 PM3/2/09
to mysqlgame
Thanks for taking a look at it. I'm also running the same scan for
Shard 3 since he hasn't got an account for it.

I know I'm getting different values different values from the
bookmarklet, but I'm not sure whose at fault. As I said I took a
random person's stats (someone with a couple of rows) from
http://mgw.homedns.org/mysqlgameStats/ and put them in a spreadsheet
and ran my Macro and got the same total values for the rows and for
the user's total value as were listed on the site. From what I can
tell, the formulas I'm using are identical to those you're using with
the exception that mine takes into account for unused row creators.

When I get some free time I might write something in php to put the
computed stats online.

On Mar 2, 9:46 am, "bandito.lobster" <bandito.lobs...@gmail.com>
wrote:

Mikhail Koryak

unread,
Mar 24, 2009, 9:40:16 PM3/24/09
to mysqlgame
I got back into the game a little bit again. its just not that fun
without some sort of READABLE stats. now we have readable stats.

v2.6: link to readable stats on my box

its very basic right now, just a prettier view into timlash's csv
stats with sorting. it would be nice to have rankings by player, but
that would require some more time(which i dont have) and work in perl
(which i dont know well). if someone wants to come up with a working
perl script, ill host it. email me and we can chat.

On Mar 2, 3:14 pm, SirKill <soccersimo...@gmail.com> wrote:
> Thanks for taking a look at it. I'm also running the same scan for
> Shard 3 since he hasn't got an account for it.
>
> I know I'm getting different values different values from the
> bookmarklet, but I'm not sure whose at fault. As I said I took a
> random person's stats (someone with a couple of rows) fromhttp://mgw.homedns.org/mysqlgameStats/ and put them in a spreadsheet
Reply all
Reply to author
Forward
0 new messages