Conquer Club

BOB version 1.2 [was CC Greasemonkey script - unofficial]

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.

What should the name of this script be?

Poll ended at Fri May 18, 2007 5:51 am

Bob
11
28%
TSAR
7
18%
TSAR BOMBA
6
15%
B.O.M.B.
5
13%
Trojan
1
3%
Trojan Horse
9
23%
 
Total votes : 39

Postby lackattack on Mon Sep 17, 2007 1:37 pm

The1exile wrote:The Pearl harbour map seems to have a bunch of missing bonuses in the xml, probably due to some new code? They work in game, but damned if i can see them.
You probably have outdated xml cached in your browser.
User avatar
Sergeant lackattack
 
Posts: 6096
Joined: Sun Jan 01, 2006 10:34 pm
Location: Montreal, QC

Postby benjikat on Mon Sep 17, 2007 2:01 pm

lackattack wrote:
The1exile wrote:The Pearl harbour map seems to have a bunch of missing bonuses in the xml, probably due to some new code? They work in game, but damned if i can see them.
You probably have outdated xml cached in your browser.



the current version of BOB also doesn't understand some of the new xml features so will show both the partial and the full aircraft bonues, as well as not showing the bombardment attack options.
User avatar
Sergeant 1st Class benjikat
 
Posts: 332
Joined: Thu Mar 08, 2007 10:03 am

BOB

Postby arizona on Wed Sep 19, 2007 4:32 am

Been away for a while, and what do I find when I come back. The Greasemonkey script to end all greasemonkey scripts.

My hat's off to all its authors.... wow.
Lieutenant arizona
 
Posts: 46
Joined: Mon Jul 24, 2006 3:49 am

Postby maritovw on Fri Sep 28, 2007 2:21 am

i'm sad to realize that nobody's working to make this add-on compatible with AJAX.... i know how to program but never had done it in JavaScript/AJAX...

however, lately i've been reading a bit about both, and i just have had an idea that might help make this script compatible with the new AJAX stuff.. here it goes:

as i understood, AJAX uses HTML, CSS and JavaScript; it's not another language, so BOB should be (theoretically) compatible with it... now, as i understand things work (without AJAX) is that the BOB script runs when the game page loads, therefore adding its content to the page.. as i see it, the problem is that AJAX refreshes only what is necessary, so the BOB part doesn't refresh and the info doesn't update to reflex the game's state..

what i suggest is to edit the info in the buttons' HTML (using BOB) as to make it do what is supposed to do (run the AJAX script as lack intended it to) AND then refresh the BOB info all over again (or only the necessary parts)... theoretically it should work, shouldn't it? after all, it is all JavaScript...

please, if you've read trough here (and understood what i've just said), please give your comments!! even if it is to support my idea or to make me notice my stupidity when thinking that could work :lol:
User avatar
Sergeant 1st Class maritovw
 
Posts: 195
Joined: Mon Jul 17, 2006 10:05 pm
Location: Guatemala

Postby Ishiro on Fri Sep 28, 2007 7:04 am

There are people working on it:
http://www.conquerclub.com/forum/viewtopic.php?t=27417

Its just a pain in the ass, and there are other issues. BOB was not designed to be run multiple times on one page, so things like the Map Inspect don't work properly at all, as well as they seem to interfere with what lack does to update armies. If you have AJAX and BOB on, you can deploy armies, attack, advance and fortify, and the map will never update.

I've personally gone through about 6 versions of BOB now, and none of them have worked. But I'm still working on it.
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby jako on Fri Sep 28, 2007 11:45 am

Ishiro wrote:There are people working on it:
http://www.conquerclub.com/forum/viewtopic.php?t=27417

Its just a pain in the ass, and there are other issues. BOB was not designed to be run multiple times on one page, so things like the Map Inspect don't work properly at all, as well as they seem to interfere with what lack does to update armies. If you have AJAX and BOB on, you can deploy armies, attack, advance and fortify, and the map will never update.

I've personally gone through about 6 versions of BOB now, and none of them have worked. But I'm still working on it.


i commend u on ur hard work. its people like u that make this an even better site than all the rest out there.
Image

Time to retire this much loved sig of mine with a new clan.
User avatar
Lieutenant jako
 
Posts: 1022
Joined: Sun Jun 03, 2007 4:50 am
Location: A lost soul with no-one to stalk.

Postby maritovw on Fri Sep 28, 2007 3:05 pm

ok, now i get it... then maybe the way to go would be to stop working on BOB, and star working on AJAXBOB, adapting the old BOB script so that it works properly again. though, this shouldn't be done all at once, but little by little, implementing in AJAXBOB one by one all the feautures BOB has (maybe some issues are easier to address than others, so you could start with the easier ones) so we can have at least some of the feautures working with AJAX.
User avatar
Sergeant 1st Class maritovw
 
Posts: 195
Joined: Mon Jul 17, 2006 10:05 pm
Location: Guatemala

Postby Aerial Attack on Fri Sep 28, 2007 5:37 pm

I believe that's actually what they are doing. They're just calling it BOB for continuity. MFontolan and Ishiro have both mentioned that they have had to start from scratch on many of the features.
User avatar
Sergeant Aerial Attack
 
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Postby Coleman on Sat Sep 29, 2007 4:44 pm

Does anyone know why BOB is not working for D-Day?
Warning: You may be reading a really old topic.
User avatar
Sergeant Coleman
 
Posts: 5402
Joined: Tue Jan 02, 2007 10:36 pm
Location: Midwest

Postby Coleman on Sat Sep 29, 2007 5:17 pm

Coleman wrote:Does anyone know why BOB is not working for D-Day?
Nevermind, figured it out, the title doesn't match the site name.
Warning: You may be reading a really old topic.
User avatar
Sergeant Coleman
 
Posts: 5402
Joined: Tue Jan 02, 2007 10:36 pm
Location: Midwest

Postby jedi-knight83 on Mon Oct 01, 2007 12:21 pm

Hi

im a bit confussed. Ive installed greasemonkey and got conquer club-BOB on it

want to change settings to a faded map... and is it possible to see a total of how many men everyone has??

cant see user settings in my script though!?

help anyone??
Private jedi-knight83
 
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Postby jedi-knight83 on Mon Oct 01, 2007 12:41 pm

ok with the latest version i have found this section

Code: Select all
//-----------------------------------------------------------------------------
//  DEFAULT OPTIONS SETTINGS
//-----------------------------------------------------------------------------

// THERE IS NO POINT IN EDITING THESE: CHANGES HERE WILL HAVE NO EFFECT
// There are TWO ways to edit the settings, EASY WAY: Use the new settings menu.
// HARD WAY. Go to about:Config in FireFox and - Search for BOB.OPTIONS.
// Then Edit that value - BE CAREFULL if you get the format wrong the script will crash,
// if you crash it and want to recover, set that option value to exactly the next 4 chars ({})
// this will re load the defaults below.
var DEFAULT_OPTIONS = new Object();
DEFAULT_OPTIONS['jumptomap'] = false;
DEFAULT_OPTIONS['colorblind'] = true;
DEFAULT_OPTIONS['textMapType'] = "Standard";
DEFAULT_OPTIONS['fadeMap'] = 0.0; // 0 = No Fade  1 = Total WhiteOut
DEFAULT_OPTIONS['24hourClockFormat'] = "am/pm";
DEFAULT_OPTIONS['mapInspect'] = true;
DEFAULT_OPTIONS['confirmEnds'] = true;
DEFAULT_OPTIONS['confirmAutoAttack'] = true;
DEFAULT_OPTIONS['confirmDeploy'] = true;
DEFAULT_OPTIONS['statsMode'] = "Extended";


It says not to edit here and to use the new settings menu?? can i ask where exactly this is?

also.. if i want to fade the map and see how many men each player has what should i change?

thanks in advance
Private jedi-knight83
 
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Postby Ishiro on Mon Oct 01, 2007 5:16 pm

When you are in a game, there should be a BOB menu on the left.
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby Coleman on Mon Oct 01, 2007 5:19 pm

Coleman wrote:
Coleman wrote:Does anyone know why BOB is not working for D-Day?
Nevermind, figured it out, the title doesn't match the site name.
Nevermind again, that isn't it, and I feel dumb for thinking it was as Circus Maximus doesn't match the title (Circvs Maximvs) and BOB works fine.

I wonder if BOB doesn't like the : in the file...
Warning: You may be reading a really old topic.
User avatar
Sergeant Coleman
 
Posts: 5402
Joined: Tue Jan 02, 2007 10:36 pm
Location: Midwest

Postby jedi-knight83 on Mon Oct 01, 2007 5:34 pm

thanks... but seems to have stoped the auto refresh!?!?
Private jedi-knight83
 
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Postby jedi-knight83 on Mon Oct 01, 2007 5:42 pm

and makes the game play VERY SLOW... is this normal?
Private jedi-knight83
 
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Issues with D-Day map

Postby hambone on Mon Oct 01, 2007 10:48 pm

Coleman wrote:
Coleman wrote:
Coleman wrote:Does anyone know why BOB is not working for D-Day?
Nevermind, figured it out, the title doesn't match the site name.
Nevermind again, that isn't it, and I feel dumb for thinking it was as Circus Maximus doesn't match the title (Circvs Maximvs) and BOB works fine.

I wonder if BOB doesn't like the : in the file...


I think this is because of the dash in the name of the map.

The problem is this line (about line 1060):
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

It's trying to split the data long 4 things: "armies=", a comma, a dash, and " alt=". Since the map name has a dash in it, it adds an additional, unexpected element to the array.

I've fixed it with the following hack that only works for the D-Day map. There will have to be another solution for maps in general.

change:
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

to:
Code: Select all
var armiesArr = map.innerHTML.replace(/D-Day/g,"DDay").split(/armies=|,|-|" alt="/);
armiesArr[0] = armiesArr[0].replace(/DDay/g,"D-Day");


--- use at your own risk... etc, etc.
Sergeant 1st Class hambone
 
Posts: 37
Joined: Thu Feb 08, 2007 10:17 am

Re: Issues with D-Day map

Postby hambone on Tue Oct 02, 2007 11:07 am

hambone wrote:I think this is because of the dash in the name of the map.

The problem is this line (about line 1060):
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

It's trying to split the data long 4 things: "armies=", a comma, a dash, and " alt=". Since the map name has a dash in it, it adds an additional, unexpected element to the array.

I've fixed it with the following hack that only works for the D-Day map. There will have to be another solution for maps in general.

change:
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

to:
Code: Select all
var armiesArr = map.innerHTML.replace(/D-Day/g,"DDay").split(/armies=|,|-|" alt="/);
armiesArr[0] = armiesArr[0].replace(/DDay/g,"D-Day");


--- use at your own risk... etc, etc.


here's a potential general fix:
change:
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

to:
Code: Select all
var armiesArr = map.innerHTML.replace(/-(\d)/g,"~$1").split(/armies=|,|~|" alt="/);
Sergeant 1st Class hambone
 
Posts: 37
Joined: Thu Feb 08, 2007 10:17 am

Postby RjBeals on Tue Oct 02, 2007 11:16 am

^ Has this been tested?
User avatar
Private RjBeals
 
Posts: 2506
Joined: Mon Nov 20, 2006 5:17 pm
Location: South Carolina, USA

Postby hambone on Tue Oct 02, 2007 11:22 am

RjBeals wrote:^ Has this been tested?

it works for me... someone else please give this a try and report back...
Sergeant 1st Class hambone
 
Posts: 37
Joined: Thu Feb 08, 2007 10:17 am

Postby delorean on Tue Oct 02, 2007 1:14 pm

hambone wrote:
RjBeals wrote:^ Has this been tested?

it works for me... someone else please give this a try and report back...


tested, working.
Lieutenant delorean
 
Posts: 8
Joined: Fri Jan 26, 2007 6:41 pm

Postby homes32 on Tue Oct 02, 2007 1:24 pm

works like a charm. thanks guys!
User avatar
Lieutenant homes32
 
Posts: 86
Joined: Wed Jan 31, 2007 4:05 pm
Location: under your bed

Postby jedi-knight83 on Tue Oct 02, 2007 1:58 pm

Hi

when i have BOB activated and the ajax thing turned off on my settings ... my games dont auto refresh... which is a bit annoying. Also.. when im in my go and make a move the screen refreshes take much longer than when bob is off and the ajax setting is normal.

any ideas or is this normal?
Private jedi-knight83
 
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Postby Ishiro on Tue Oct 02, 2007 3:43 pm

The auto refresh is part of AJAX, so if you have AJAX off, it does not auto refresh.

And with AJAX off in order to use Greasemonkey, the whole page reloads with every action. Using AJAX is what allows the page to load pieces and parts instead of the whole thing.

So, basically everything is working correctly for you.
Image
User avatar
Corporal 1st Class Ishiro
 
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Location: Under the Rainbow

Postby jedi-knight83 on Tue Oct 02, 2007 4:33 pm

so if it doesnt auto refresh.. i just have to keep hitting f5 myself to know when its my go next and to see whats going on with game play
Private jedi-knight83
 
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

PreviousNext

Return to Tool Archives

Who is online

Users browsing this forum: No registered users