Conquer Club

Greasemonkey Script Request

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 Request

Postby Silent Hysteria on Thu Jan 08, 2009 8:27 am

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
Last edited by Silent Hysteria on Mon Jan 12, 2009 1:01 pm, edited 2 times in total.
User avatar
Private 1st Class Silent Hysteria
 
Posts: 84
Joined: Sun Jul 13, 2008 9:08 am
Location: Saugus, MA

Re: GM help.

Postby homes32 on Thu Jan 08, 2009 10:41 pm

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.
-homes32

Highest Score: 1850
User avatar
Lieutenant homes32
 
Posts: 86
Joined: Wed Jan 31, 2007 4:05 pm
Location: under your bed

Re: GM help.

Postby cspare on Fri Jan 09, 2009 11:40 am

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.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm

Re: GM help.

Postby Silent Hysteria on Sat Jan 10, 2009 4:05 pm

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!
User avatar
Private 1st Class Silent Hysteria
 
Posts: 84
Joined: Sun Jul 13, 2008 9:08 am
Location: Saugus, MA

Re: Greasemonkey Script Request

Postby yeti_c on Tue Jan 13, 2009 5:12 am

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.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: Greasemonkey Script Request

Postby Silent Hysteria on Tue Jan 13, 2009 7:58 am

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
User avatar
Private 1st Class Silent Hysteria
 
Posts: 84
Joined: Sun Jul 13, 2008 9:08 am
Location: Saugus, MA

Re: Greasemonkey Script Request

Postby chipv on Tue Jan 13, 2009 8:14 am

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?
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: Greasemonkey Script Request

Postby cspare on Tue Jan 13, 2009 8:34 am

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.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm

Re: Greasemonkey Script Request

Postby chipv on Tue Jan 13, 2009 8:46 am

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.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: Greasemonkey Script Request

Postby cspare on Tue Jan 13, 2009 8:48 am

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?:)
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm

Re: Greasemonkey Script Request

Postby chipv on Tue Jan 13, 2009 8:53 am

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.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: Greasemonkey Script Request

Postby lancehoch on Tue Jan 13, 2009 10:00 am

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?
Sergeant lancehoch
 
Posts: 4183
Joined: Wed Dec 05, 2007 4:13 pm

Re: Greasemonkey Script Request

Postby chipv on Tue Jan 13, 2009 10:10 am

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.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: Greasemonkey Script Request

Postby Silent Hysteria on Tue Jan 13, 2009 1:17 pm

Would that be possible to have it search the index page and match them to the mygames page?
User avatar
Private 1st Class Silent Hysteria
 
Posts: 84
Joined: Sun Jul 13, 2008 9:08 am
Location: Saugus, MA

Re: Greasemonkey Script Request

Postby cspare on Tue Jan 13, 2009 2:44 pm

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.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm

Re: Greasemonkey Script Request

Postby Silent Hysteria on Wed Jan 14, 2009 9:19 am

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.
User avatar
Private 1st Class Silent Hysteria
 
Posts: 84
Joined: Sun Jul 13, 2008 9:08 am
Location: Saugus, MA

Re: Greasemonkey Script Request

Postby cspare on Wed Jan 14, 2009 9:32 am

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.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm

Re: Greasemonkey Script Request

Postby Silent Hysteria on Thu Jan 15, 2009 6:03 pm

That sounds like a great idea. Thanks!
User avatar
Private 1st Class Silent Hysteria
 
Posts: 84
Joined: Sun Jul 13, 2008 9:08 am
Location: Saugus, MA


Return to Tool Archives

Who is online

Users browsing this forum: No registered users