*Author

gutsyDuck

  • Guest
stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg72245#msg72245
« on: May 21, 2010, 08:37:39 am »
Hi All,
I'm learning how to use greaseMonkey, (for those who doesn't know, it's a way for having your script executing on a page. this script can modify or add something to the page, same as javascript. )
For My first GreaseMonkey script I try to implement an helper for stat.
For now it's very simple, 3 buttons : win , lose, view current stat.
win : add 1 to  win counter.
lose : add 1 to lost counter.
view current stat : show the win and lost counter.
this is the first release. Other thing will come like the AI level, the opponent and so on.

As it is my first GreaseMonkey script, if you have comment ou suggestion fell free to help me improve ( for my english it's too late :P )

how to install it (firefox only):
1 - Be sure to have GreaseMonkey installed ( you should have a monkey head in the bottom roght corner )
2 - download the script ( attached to this post )
3 - follow this instruction : http://wiki.greasespot.net/Greasemonkey_Manual:Installing_Scripts

how to use it :
install it first :P
after each game just click the win or lost button. you can consult your stat with the third button.

PS : this tool can not be use to cheat in any way. when you reload the page informations are lost. There is no kind of communication with the game or server. It's only local. It's only a way to avoid killing trees and save pen.

JoshK

  • Guest
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg72289#msg72289
« Reply #1 on: May 21, 2010, 11:43:52 am »
Pretty neat.. any way to get it to store the information between sessions locally?

gutsyDuck

  • Guest
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg72423#msg72423
« Reply #2 on: May 21, 2010, 04:26:40 pm »
thx, yes there is some technic to store data. I'm learn how to do it. this release is the 0.0.1.
the 0.0.2 is on the way with the different opponent ( in order to know who defeat you and how many time). I will try to implement the storage for the third one.

Offline Planplan

  • Jr. Member
  • **
  • Posts: 130
  • Country: fr
  • Reputation Power: 8
  • Planplan is a Spark waiting for a buff.
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg75115#msg75115
« Reply #3 on: May 26, 2010, 09:47:48 am »
Basic but work great !

It could be really useful to plug such system to the Elements Statistics website. ( http://elementscommunity.org/forum/index.php/topic,2237.0.html )

gutsyDuck

  • Guest
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg75117#msg75117
« Reply #4 on: May 26, 2010, 09:53:35 am »
Your right !!!
perhaps...
no matter, version 0.2 is out.

adding FG and HB

PLAN :
add button for decking out.
storing data.

Offline Planplan

  • Jr. Member
  • **
  • Posts: 130
  • Country: fr
  • Reputation Power: 8
  • Planplan is a Spark waiting for a buff.
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg75122#msg75122
« Reply #5 on: May 26, 2010, 10:04:57 am »
Also, forgot to mention that it work with Opera too ( http://www.opera.com/docs/userjs/examples/#greasemonkey )

Offline Anothebrother

  • Full Member
  • ***
  • Posts: 374
  • Reputation Power: 0
  • Anothebrother is a Spark waiting for a buff.
  • New to Elements
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg75580#msg75580
« Reply #6 on: May 27, 2010, 01:36:26 am »
if you uploaded this to userscripts.org i'm sure it'd be much more used and accessible

gutsyDuck

  • Guest
Re: stathelper (greaseMonkey) v0.3 https://elementscommunity.org/forum/index.php?topic=6756.msg75801#msg75801
« Reply #7 on: May 27, 2010, 10:51:23 am »
version 0.3 is out

new :
 - data are now stored ( ;) JoshK ), so you can keep information from one session to another.
 - reseting stat button : be carefull : NO Warning !
 - deckout button : a deck out count for a lose, if you clicl on deck you add 1 to lost counter and when to deckout counter.

plan :
 - improving stat result presentation.

@AnotherBrother : don't you thinks it's to specialized to element for userscript.org ?

@PlanPlan : nice to know that's work with opera. For "element statistic", I'm ok to try to made a kind of import/export button. But I don't know how (for now).

Frz

  • Guest
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg75813#msg75813
« Reply #8 on: May 27, 2010, 11:26:49 am »
I wonder if it is possible to enable liveconnect on the elements game itself and get the data directly from it without pressing buttons...

gutsyDuck

  • Guest
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg75814#msg75814
« Reply #9 on: May 27, 2010, 11:29:44 am »
I don't think it'is possible, as element is a flash game and it's not connected with the script...
As I said, I'm learning how to use grease monkey. If someone know a solution or could explain me how to do, I'll try to make this.

Offline Anothebrother

  • Full Member
  • ***
  • Posts: 374
  • Reputation Power: 0
  • Anothebrother is a Spark waiting for a buff.
  • New to Elements
Re: stathelper (greaseMonkey) v0.3 https://elementscommunity.org/forum/index.php?topic=6756.msg76574#msg76574
« Reply #10 on: May 28, 2010, 05:55:58 pm »

@AnotherBrother : don't you thinks it's to specialized to element for userscript.org ?
not really I've seen plenty of userscripts on that site for online games like Simyard, Pigskin Empire, Goalline Blitz etc...

gutsyDuck

  • Guest
Re: stathelper (greaseMonkey) https://elementscommunity.org/forum/index.php?topic=6756.msg79407#msg79407
« Reply #11 on: June 01, 2010, 09:25:43 am »
version 0.4 is out

add :
- elemental master
- improve stat presentation (no, it's not a joke)
- quick win percent.

plan to next version :
change alert box for a div with nicer and easy reading présentation.


@Frz : as far as I know now, it's possible to connect the script to flash. For this I need zans (or dev) help and agreement. I send a message.... wait and see.

script is now aviable at http://userscripts.org/scripts/show/78060

 

blarg: