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

User avatar
lackattack
Posts: 6097
Joined: Sun Jan 01, 2006 10:34 pm
Location: Montreal, QC

Post by lackattack »

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
benjikat
Posts: 332
Joined: Thu Mar 08, 2007 10:03 am

Post by benjikat »

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.
arizona
Posts: 46
Joined: Mon Jul 24, 2006 3:49 am

BOB

Post by arizona »

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.
User avatar
maritovw
Posts: 195
Joined: Mon Jul 17, 2006 10:05 pm
Location: Guatemala

Post by maritovw »

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
Ishiro
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Gender: Male
Location: Under the Rainbow
Contact:

Post by Ishiro »

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
jako
Posts: 1022
Joined: Sun Jun 03, 2007 4:50 am
Gender: Male
Location: A lost soul with no-one to stalk.

Post by jako »

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
maritovw
Posts: 195
Joined: Mon Jul 17, 2006 10:05 pm
Location: Guatemala

Post by maritovw »

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
Aerial Attack
Posts: 1132
Joined: Mon Jun 04, 2007 7:59 pm
Location: Generation One: The Clan

Post by Aerial Attack »

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
Coleman
Posts: 5402
Joined: Tue Jan 02, 2007 10:36 pm
Gender: Male
Location: Midwest

Post by Coleman »

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

Post by Coleman »

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.
jedi-knight83
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Post by jedi-knight83 »

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??
jedi-knight83
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Post by jedi-knight83 »

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
User avatar
Ishiro
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Gender: Male
Location: Under the Rainbow
Contact:

Post by Ishiro »

When you are in a game, there should be a BOB menu on the left.
Image
User avatar
Coleman
Posts: 5402
Joined: Tue Jan 02, 2007 10:36 pm
Gender: Male
Location: Midwest

Post by Coleman »

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.
jedi-knight83
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Post by jedi-knight83 »

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

Post by jedi-knight83 »

and makes the game play VERY SLOW... is this normal?
hambone
Posts: 37
Joined: Thu Feb 08, 2007 10:17 am

Issues with D-Day map

Post by hambone »

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.
hambone
Posts: 37
Joined: Thu Feb 08, 2007 10:17 am

Re: Issues with D-Day map

Post by hambone »

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="/);
User avatar
RjBeals
Posts: 2506
Joined: Mon Nov 20, 2006 5:17 pm
Location: South Carolina, USA
Contact:

Post by RjBeals »

^ Has this been tested?
hambone
Posts: 37
Joined: Thu Feb 08, 2007 10:17 am

Post by hambone »

RjBeals wrote:^ Has this been tested?

it works for me... someone else please give this a try and report back...
delorean
Posts: 8
Joined: Fri Jan 26, 2007 6:41 pm

Post by delorean »

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

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


tested, working.
User avatar
homes32
Posts: 86
Joined: Wed Jan 31, 2007 4:05 pm
Location: under your bed

Post by homes32 »

works like a charm. thanks guys!
jedi-knight83
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Post by jedi-knight83 »

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?
User avatar
Ishiro
Posts: 324
Joined: Mon Jul 17, 2006 5:53 pm
Gender: Male
Location: Under the Rainbow
Contact:

Post by Ishiro »

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
jedi-knight83
Posts: 8
Joined: Fri Sep 28, 2007 6:27 pm

Post by jedi-knight83 »

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
Locked

Return to “Tool Archives”