Page 1 of 1
Greasemonkey Script Request

Posted:
Thu Jan 08, 2009 8:27 am
by Silent Hysteria
Ok, After looking at the developers guide to making GM scripts I have decided that I am not even close to being capable of writing a script. Is there anyone who is capable out there willing to chat with me to write 2 scripts I am looking for?
Script 1: Hide the Auto Attack button.
Script 2: On the My Games page, make it so it shows the names in red or green. Red being if the person is not online and green being if they are. I am sure there is a way to do it as we can see if we go to a persons profile. I just want to be able to see people I am in a game with by looking at the my games page.
Regards,
Silent Hysteria
Re: GM help.

Posted:
Thu Jan 08, 2009 10:41 pm
by homes32
you would be better off posting what you are looking for here in the open, that way if there are scripts that do what you want people can point them out to you. also you are more likley to catch someones interest.
Re: GM help.

Posted:
Fri Jan 09, 2009 11:40 am
by cspare
I agree with homes32. Just ask your questions here and I'm sure people would gladly help out. That way we are not only helping you but also other people with the same questions in the future.
Re: GM help.

Posted:
Sat Jan 10, 2009 4:05 pm
by Silent Hysteria
good point. I am looking for a script that hides the auto attack button and also a script that shows users online on the my games page. Like names are red and if they are online the names are green. Something to that effect. I will update the topic with the info. Thanks!
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 5:12 am
by yeti_c
Instead of hiding Auto Attack - you could get BOB or CM and they have confirmations on the press of it.
Regarding online/offline - it's tricky to do - because that info is available elsewhere - but not on the my games page - which means the script would have a lot of extra work to do - it could be done - but could increase site traffic a fair amount. (depending on the implementation)
C.
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 7:58 am
by Silent Hysteria
If I can see the auto attack button yeti, I am still gonna use it. Even if I have to confirm it. If it isn't there I can't use it. =)
Would that mean it would bog the site down? I didn't think stuff like that would effect the site itself. I just thought it would be nice to be able to see who was online in the games I am in without having to check everyone's profile. 23 games is a lot of profiles to check. Especially when there is a minimum of 3 people per game. =)
Thanks for the response!
Regards,
SH
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 8:14 am
by chipv
Silent Hysteria wrote:If I can see the auto attack button yeti, I am still gonna use it. Even if I have to confirm it. If it isn't there I can't use it. =)
Would that mean it would bog the site down? I didn't think stuff like that would effect the site itself. I just thought it would be nice to be able to see who was online in the games I am in without having to check everyone's profile. 23 games is a lot of profiles to check. Especially when there is a minimum of 3 people per game. =)
Thanks for the response!
Regards,
SH
Actually this isn't so bad - you would only need one AJAX request.
The thing is you can't see hidden users so this would not be very useful or reliable.
As for hiding the attack button, the code is so simple, it's not really worth putting into a script of its own.
Maybe you could ask yeti nicely if he would provide a hide auto attack button feature in BOB?
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 8:34 am
by cspare
chipv wrote:Actually this isn't so bad - you would only need one AJAX request.
(...)
Hmm, wouldn't you need 1 request for each player? So for 23 active games with 3 people per game that would add up to 69 requests. One profile page is about 22KB size so that would make 22*69 = 1518Kb for every time you refresh the active games page, which probably will be quite alot of times per day.
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 8:46 am
by chipv
cspare wrote:chipv wrote:Actually this isn't so bad - you would only need one AJAX request.
(...)
Hmm, wouldn't you need 1 request for each player? So for 23 active games with 3 people per game that would add up to 69 requests. One profile page is about 22KB size so that would make 22*69 = 1518Kb for every time you refresh the active games page, which probably will be quite alot of times per day.
No. This is not recommended at all.You could get a maximum of 700 ajax requests for a mygames page with 100 8 player games assuming
all different players. You can get all non-hidden online status with a single AJAX request.
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 8:48 am
by cspare
chipv wrote:cspare wrote:chipv wrote:Actually this isn't so bad - you would only need one AJAX request.
(...)
Hmm, wouldn't you need 1 request for each player? So for 23 active games with 3 people per game that would add up to 69 requests. One profile page is about 22KB size so that would make 22*69 = 1518Kb for every time you refresh the active games page, which probably will be quite alot of times per day.
No. This is not recommended at all.You could get a maximum of 700 ajax requests for a mygames page with 100 8 player games assuming
all different players. You can get all non-hidden online status with a single AJAX request.
Sounds interesting, how exactly?:)
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 8:53 am
by chipv
cspare wrote:chipv wrote:cspare wrote:chipv wrote:Actually this isn't so bad - you would only need one AJAX request.
(...)
Hmm, wouldn't you need 1 request for each player? So for 23 active games with 3 people per game that would add up to 69 requests. One profile page is about 22KB size so that would make 22*69 = 1518Kb for every time you refresh the active games page, which probably will be quite alot of times per day.
No. This is not recommended at all.You could get a maximum of 700 ajax requests for a mygames page with 100 8 player games assuming
all different players. You can get all non-hidden online status with a single AJAX request.
Sounds interesting, how exactly?:)
I'll SKype you.
Correction, though, the single AJAX request only tells you online users so you would still need to scrape (#mygames player - #online) users profiles.
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 10:00 am
by lancehoch
Couldn't you just get the information from the bottom of the Index page? Possibly code the script to search the index page and the My Games page for any names that appear on both? Would that be more than one request?
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 10:10 am
by chipv
lancehoch wrote:Couldn't you just get the information from the bottom of the Index page? Possibly code the script to search the index page and the My Games page for any names that appear on both? Would that be more than one request?
chipv wrote:cspare wrote:chipv wrote:cspare wrote:chipv wrote:Actually this isn't so bad - you would only need one AJAX request.
(...)
Hmm, wouldn't you need 1 request for each player? So for 23 active games with 3 people per game that would add up to 69 requests. One profile page is about 22KB size so that would make 22*69 = 1518Kb for every time you refresh the active games page, which probably will be quite alot of times per day.
No. This is not recommended at all.You could get a maximum of 700 ajax requests for a mygames page with 100 8 player games assuming
all different players. You can get all non-hidden online status with a single AJAX request.
Sounds interesting, how exactly?:)
I'll SKype you.
Correction, though, the single AJAX request only tells you online users so you would still need to scrape (#mygames player - #online) users profiles.
Yup.
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 1:17 pm
by Silent Hysteria
Would that be possible to have it search the index page and match them to the mygames page?
Re: Greasemonkey Script Request

Posted:
Tue Jan 13, 2009 2:44 pm
by cspare
Silent Hysteria wrote:Would that be possible to have it search the index page and match them to the mygames page?
Sure, but it's not so easy. For you I think it would be best to start with hiding the auto-attack button, that should be a good start.
Re: Greasemonkey Script Request

Posted:
Wed Jan 14, 2009 9:19 am
by Silent Hysteria
I wouldn't have the first idea with how to write the script. I have asked Yeti to add it to the BOB script so it can be used by anyone that wants it.
Re: Greasemonkey Script Request

Posted:
Wed Jan 14, 2009 9:32 am
by cspare
Silent Hysteria wrote:I wouldn't have the first idea with how to write the script. I have asked Yeti to add it to the BOB script so it can be used by anyone that wants it.
Well, if you really want to learn how to write scripts i think this is something you should start with. Even if yeti would add it to BOB. I think implementing this would be one of the easier scripts to make, probably with just a single line of code. To get an idea how scripts work and where to start I suggest you download the source code of a script that you are using regularly. Then you can try to read the code and try to understand what every line does. It might be fun to alter some code and see how it results.
Re: Greasemonkey Script Request

Posted:
Thu Jan 15, 2009 6:03 pm
by Silent Hysteria
That sounds like a great idea. Thanks!