Verifex's GM Script Discussion (in General)

AdminQBVerifex [Serenity In Chaos] October 2 2006 5:04 PM EDT

Hi guys,

I'm almost ready to release the script, and I wanted to share what it looks like and what it does with all of you, so you can comment and possibly give me any feedback for last-minute changes before I release this crazy thing.

Here is the page with examples of the script. The script has alot of new enhancements to old features, and alot of the code has been reworked so it is easier to manage for me. Any final touches?

Sir Leon [Soup Ream] October 2 2006 5:15 PM EDT

/me salutes Verifex

It looks great!

AdminQBnovice [Cult of the Valaraukar] October 2 2006 5:23 PM EDT

you're a champ!

molans[Grumpy] October 2 2006 7:13 PM EDT

I just said to Verifex - I think the we should all (whole community) encourage central bank to give money for this type of things.

Maelstrom October 2 2006 7:19 PM EDT

Hey, we gave him a QB, how can he ask for more? :P
Nah, I'm just joking. I can't survive without the script, so I'll gladly send donations.

The new features look great, 'Fex - keep up the good work! :D

AdminQBVerifex [Serenity In Chaos] October 2 2006 7:22 PM EDT

I'm not sure the funds in central bank are meant to be part of the real CB economy unless it is absolutely necessary. But thanks for the thought. ;)

Also I hope that all the forging formulas are correct, when I release this, if anyone has any corrections to them, please let me know, I'll fix them ASAP.

Relic October 2 2006 10:11 PM EDT

The forging formula for the Soft Leather Armor in your currently released version needs one extra quench at the end of the cycle.

AdminQBVerifex [Serenity In Chaos] October 3 2006 12:49 AM EDT

Script is released now!

Get it here!

QBOddBird October 3 2006 12:52 AM EDT

Hey sweet, Advance can be turned off - I can use this even with my dialup!

Relic October 3 2006 12:53 AM EDT

Very nice Verifex, very nice indeed.

Flamey October 3 2006 3:38 AM EDT

awesome, it looks so sexy as well! fits nicely, so many options!

bartjan October 3 2006 4:11 AM EDT

Something doesn't really align that well...

Flamey October 3 2006 4:15 AM EDT

bart, i thought it might of been default font, but i have it on now, lines up just fine. though, you do happen to use a different font, my FF uses Arial, i see you use Times New Roman.

would Font have anything to do with it?

Flamey October 3 2006 4:28 AM EDT

i get cut off the same with BattleTech, but not with any others :\

Photobucket - Video and Image Hosting

AdminG Beee October 3 2006 5:21 AM EDT

I like it a lot and the bookmark feature is really nice.

But... :)

I keep hitting the x and deleting my training scripts by accident when navigating with my laptop mousepad. Any chance of adding a "are you sure doofus?" when clicking on the delete link.

Also, I like to have my training setups in a specific running order and it's a pain when I have to change something (due to training costs increasing for example) and my order is screwed up. This means I have to delete all the setups stored below the one I want to edit and re-doing everything. Any chance of an "edit" option on the training set up rather than just a delete and remake.

Lastly, not a complaint, merely an observation.
I often have multiple tabs open but the script doesn't allow for that with some. Example: if I right click and open Active Threads in a new tab I don't have the script options - collapse threads etc... Works in individual tabs for Train and Recent Battles.

AdminG Beee October 3 2006 5:38 AM EDT

oh yeah, and wouldn't it be cool if your bookmarked links went bold in your sidebar when the thread has been replied to since your last view :)

Flamey October 3 2006 5:45 AM EDT

i agree GB with bold links :D

Brakke Bres [Ow man] October 3 2006 5:46 AM EDT

I like the script!
Looks great!
Mine does align with the theme im using.

Vicious Cat October 3 2006 6:06 AM EDT

Very very nice Verifex :-)

The Death Company [...] October 3 2006 6:40 AM EDT

how do you add this script to firefox? If i can get working and its as good as everyone else is saying i will happily donate for the effort put into it

bartjan October 3 2006 6:46 AM EDT

First install the Greasemonkey extension (Tools->Extensions).

Flamey October 3 2006 7:05 AM EDT

1) If you don't already have GreaseMonkey, get it here:

2) Restart Firefox.

3) Open this link in a new window/tab :

4) Close that window/tab which had the script.

5) Refresh the sidebar. Right click - > This Frame - > Reload Frame.

read the question mark button, before you ask questions in forum/chat :)
sorry the actual links from forum didn't seem to work, so C&P :P

Silatt October 3 2006 7:47 AM EDT

When you have your Advance: button set to clan, does it check if they are actually in a clan, or just if they have the clan C in their name, I've battled a few folks that weren't in clan because of this confusion. Not experienced with the script yet just asking. Also when I go to edit my fight list, and I bring up clan member close to my score, and I hit fight, the pop up window comes up just fine, but I can't seem to make it go away without reloading CB. Other than those few questions it rocks :D

The Death Company [...] October 3 2006 9:07 AM EDT

cheers have got it installed now to have a play to see what its like

Flamey October 3 2006 9:25 AM EDT

leo have you tried pressing the actual pane to make it go away? if that doesn't work try opening it first, then fighting and try to toggle it then.

the clan advance is basically pressing the "C" key for you, have you pressed the "C" key in the standard fightlist before? it takes you clan members and opponents starting with a "C" :)

Maelstrom October 3 2006 2:16 PM EDT

Ah. The collapsing of threads is something that has always annoyed me. I click on the screen to bring focus back to Firefox, and the post I was reading disappears. Can you add an option to disable that in the next release? In the mean time, I'll continue commenting out that bit of code... ;)

AdminQBVerifex [Serenity In Chaos] October 3 2006 3:05 PM EDT

Released a 3.01 update to put a Posts: Off toggle for bartjan.

Slashundhack [We Forge Our Own Stuff] October 3 2006 3:18 PM EDT

Looks great and is less filling

QBJohnnywas October 4 2006 7:49 AM EDT

I've made a tiny donation...I'm broke so tiny in this case was everything I had!

Wow. I'd never used your add-ons before. And now, well, I'm not sure how I'm going to cope playing at work, where we can only use IE.

Love the train function. And mostly love the fightlist advance 'clan'.

One finger fighting!!!!!!!! Now I can drink cups of tea or smoke the evil Nick O'Teen while I fight!!! No more c-enter!!!

Thank you! I'll donate some more shortly once I've made some cash. Sorry GL, I know I still owe you some cash, but this deserves some more donations!!!

One suggestion that would make me happy - those areas of CB I go into weapons store or my user page.....any way we could have those as bookmarks?

Maelstrom October 4 2006 8:02 AM EDT

Johnny, you're a genius! That's how you can get your lazy link!
Since it's all just HTML links, it certainly is possible to add any page to the favorite list, though it may need to be done manually. I'll look into it ;)

QBJohnnywas October 4 2006 8:03 AM EDT

Yay!!!! I'm lazy!!!

Maelstrom October 4 2006 9:58 AM EDT

OK, got it. It's not as fancy as Verifex's bookmarks, since I don't want to figure out how to add the "Add bookmark" links to pages, but it works. You have to manually add to function calls to add the bookmarks to the pages you want, but you can add a link to pretty well any CB page.

If anyone's interested, I can post the changes needed to the code.

Verifex, if you want, I can send you my code so you can pretty things up ;)

Maelstrom October 4 2006 10:44 AM EDT

G Beee, I've also found out how you can re-order your training setups, without re-creating them, but you'll have to manually change the settings.

The training setups and bookmarks are stored in the file 'prefs.js' which (on my computer) is stored in the directory above the 'misccb2enhancements.user.js' file. For example, if Verifex's script is stored as
C:\Documents and Settings\Maelstrom\Application Data\Mozilla\Firefox\Profiles\fl06est4.default\gm_scripts\misccb2enhancements.user.js

then 'prefs.js' will be in the directory
C:\Documents and Settings\Maelstrom\Application Data\Mozilla\Firefox\Profiles\fl06est4.default\prefs.js

Open up that file in a text editor, and find the line that starts with
user_pref("greasemonkey.scriptvals. CB2 Enhancements.cb2train",

Now, the remaining data on that line is the training sets that you've defined. They're set up as follows:
"TRAINING_NAME1|train-2.tcl?m_to_edit= ... blah blah blah,,,TRAINING_NAME2|train-2.tcl?m_to_edit= ... lots of text,,,");

where TRAINING_NAME1 and 2 are the names you've given the training setups. Each setup is delimited (divided by) three commas (,,,). Note that there will probably be lots of text in between the name and the commas, which I have left off.

After some experimentation, I've found that you must first close down firefox, re-order the training setups, and then when you restart firefox, then changes will be in effect.

You can rearrage these simply by cutting and pasting each individual training setup into the order you want. Don't forget to keep the "); at the end of the line though. I'd recommend backing up the file before making any changes ;) To swap the positions of those two setups, you'd just change it to:
"TRAINING_NAME2|train-2.tcl?m_to_edit= ... lots of text,,,TRAINING_NAME1|train-2.tcl?m_to_edit= ... blah blah blah,,,");

Any questions? My bookmark changes are coming soon.

Maelstrom October 4 2006 11:17 AM EDT

To add "special" bookmarks that link to any CB page, and not just to forum posts, follow these steps.

In Firefox, go to Tools|Extensions, select GreaseMonkey, click Options, select "Misc CB2 Enhancements", and click Edit. This should cause the script to open up in a text editor. (If not... you can figure it out! :P) Now search for the following bit of code:

 // load up bookmarks (favorites) and training sets
And change it to:
  // load up bookmarks (favorites) and training sets
These are some sample bookmarks. The method loadSpecial() takes two arguments: first the relative link to the page you want, and second the name you want to give to the bookmark. If you want to link to your page, and not mine, you'll need to change the user ID to your own. To add or remove these special bookmarks, you have to add and remove calls to this loadSpecial() method.

Now we need to add the code for this method. From the lines you just added, scroll down a bit until you see the following:

  if (p.match('.sidebar.'+ft)) {
// sidebar code end
Immediatly after those lines, paste in the following:
function loadSpecial(link,name) {
  var spanner=document.createElement('span');
  var divs = top.frames[0].document.getElementById('favstore');
  var aer=document.createElement('a');
  var brer=document.createElement('br');"cbmain"
I made this loadSpecial() method by modifying Verifex's createFavLink() method, so you can look there to see what I've changed. Basically, it adds a link with a black background, white text, larger font size (13px), and without a button to delete it. If you want to remove it, you can remove the loadSpecial() method call, and mentioned earlier. You can easily modify the colour and size settings.

Now, save the file, and reload the CB sidebar in firefox. If Verifex's sidebar tool doesn't appear, you've messed something up. Go back and re-read what I told you :P If you can't figure out how to fix what you broke, re-install the script and try again.

Another thing. If you're like me, you have lots of vertical space in your sidebar. Verifex has coded his script so that after about 4 bookmarks have been added, a scrollbar appears, and you can only see a few at a time. To modify the code to allow more bookmarks to be shown at once, do the following: Open up the script (as above), and seach for "offsetHeight". There should be 6 instances of the in the file: two in the createTrainSet() method, two in the createFavLink() method, and two tucked away in the buildGMSidebar() method. So basically, three to limit the number of training sets to be shown, and three to limit the number of bookmarks to be shown. In each case, it'll look like this:

if (something.offsetHeight>50)
The number 50 states that 50 pixels-worth of bookmarks are allowed. Just change the number to, say, 250, and you're all set. If you want things to function correctly, you should change all three of the offsetHeights for the bookmarks. You can also change them for training sets, if you want more of those shown.

Any questions?

QBJohnnywas October 4 2006 11:54 AM EDT

I have a lazy link. I have a lazy link. I have a lazy link.

And breathe.

Thanks Mael!!!!!! And WTG Verifex. A very nice little toy! Very nice indeed.

AdminQBVerifex [Serenity In Chaos] October 4 2006 12:57 PM EDT

Thanks Mael! :)

I'm so proud someone was willing to dig into my code to figure it out. Woot!

Anyways, I'll release something to let you add and remove bookmarks from a whole host of pages, if you are all willing to wait a little. ;)

Also, as far as rearranging the training sets, I'll think about making a button for it, it is just that it would make the whole section there much more crowded then I like. Ahh well.

Maelstrom October 4 2006 2:31 PM EDT

Actually, your code is much easier to dig into now than in the previous version. Thanks!

The tricky thing is that there are some slight differences between JS and Java...

Though I did have some trouble in disabling the forum post collapsing, without disabling the bookmarking of forum posts. Those two things seem to be performed in the same methods. Took some fighting, but I got everything working as I wanted. Maybe you could separate those in the next release ;)

Vicious Cat October 5 2006 1:46 AM EDT

Sorry veri, I have a complaint.
My training setups are not being stored properly, or are getting corrupted somehow between sessions (ie closing down and reopening firefox)
I've not done any of the stuff yet that Mael suggested, so I'm not sure what's going on - anyone else noticed this?

QBJohnnywas October 5 2006 3:30 AM EDT

ok, one problem I've encountered twice now. After fighting, I click my training set and it goes to the train page. Unfortunately both times I had about 14k xp to train up on each minion. When the train page opened there was much much less - 2k the first time, and 135 the second. Now I didn't check the spell/stat levels before I clicked train, so I don't know if I lost XP or if it trained and then trained again...if you know what I mean...but if it was the case that I lost XP then I'm going to have to think again about using the training set function!

Kong Ming October 5 2006 3:39 AM EDT

Wow, this script is fantastic! Sending you a little donation :) Btw, is there any way to add other links to the bookmark? Like store, etc?

AdminQBVerifex [Serenity In Chaos] October 5 2006 3:16 PM EDT

Updated script!!!

version 3.1
-New buttons on lots of pages for adding favorites.
-New expert options on "settings" page.
-Added link to auction page on transfer log page

QBJohnnywas October 5 2006 3:19 PM EDT

My little problem with training - it just happened again - I was looking out for it. And I can confirm what I suspected had happened previously. When I finish a set of BA and click home and then my training set it's fine. It's when I finish a set of BA and click my training set straightaway while my last play by play is still showing.

Maelstrom October 5 2006 4:29 PM EDT

Johnny, what I've understood is that clicking the training set button is supposed to train stats, but it won't necessarily train all XP currently available. I don't know why.

AdminQBVerifex [Serenity In Chaos] October 5 2006 4:34 PM EDT

Maelstrom, and everyone else. The "train" page itself performs some calculations on your character so that trained XP is properly calculated when you first visit it. If you hit the training set button and you haven't gone to the train page recently, then it will not train XP properly. Best way to fix this? Go to train page, then click training set. I know this is not the best way to fix this, but it is the best I can do without making the script hit the training page twice.

AdminG Beee October 5 2006 4:35 PM EDT

Johnny, you need to navigate to the training page via the Places tab before using fex's script to train otherwise you'll always get this problem.

QBJohnnywas October 5 2006 5:13 PM EDT

I'm there! Nooby mistake!

thanks people!

QBJohnnywas October 5 2006 5:21 PM EDT

Oh, and thanks for the update!!!

AdminQBVerifex [Serenity In Chaos] October 5 2006 5:59 PM EDT

New script, pretty much to fix some formatting and weird issues people had.

Flamey October 6 2006 3:48 AM EDT

sorry if this has been mentioned but is there anyway to have the auctions page with all the items on auction in a bookmark? because you have to click search, and that is javascript or something, it isn't a link..

i was just wondering, would be nice :)

molans[Grumpy] October 6 2006 9:03 AM EDT

Bookmark table [Bookmark: + C x] is sometimes blocking Chatmail Send link [mainly in FS/WTB and if discussion is long [if it needs a scroll]). All best.

MissingNo October 6 2006 1:00 PM EDT

Can you make your script save the position of the left frame so we don't have to move it each time we log into CB2?

AdminQBVerifex [Serenity In Chaos] October 6 2006 1:06 PM EDT

flamey - Maybe, ask Mian he knows how
molans - Thats what the "X" button is for, it makes the bookmark thingy go away until you reload the page
opvines - Maybe I dunno, resizing frames is very "iffy" territory for Javascript.

MissingNo October 6 2006 5:58 PM EDT

It's probably not hard. You can save the frame position for the bottom frame for the chat. So it'd just be like that, except for the left frame.

Miandrital October 6 2006 7:29 PM EDT

If you want an all auctions link copy and paste this into the leftmost box in the Settings page:

/gc/search-2.tcl?sort=expires&one_line=&category=armor&category=weapons|All Auctions,,,

Maelstrom October 6 2006 7:40 PM EDT

/me checks settings page...
/jaw drops

Wow, I love it! That's what was in the new version! :D

That makes it easier for me to play around with my bookmarks, and for testing how I can change them around.

I modified the "add bookmark" code a bit (again) so that I can make two types of bookmarks, this time in an easier way. If the bookmark title starts with ' (an apostrophe), the font size is increased, the colours are inverted, and the "remove box" is not added: "permanent" bookmarks that stand out a bit, for things I check often ;)

molans[Grumpy] October 6 2006 8:35 PM EDT

Thanks (I feel a bit silly now [maybe because I am ;) ]).

chuck1234 October 15 2006 2:26 AM EDT


The script toolbar has disappeared from the sidebar. I tried re-installing the script, but even that doesn't help. The problem occurred after I mistakenly closed the script's toolbar.

chuck1234 October 15 2006 6:16 AM EDT

I reduced the chat window to a single line, and lo and behold, the script was hiding behind that window. Now, how did it get there in the first place?!!

Zoglog[T] [big bucks] October 15 2006 6:28 AM EDT

Chuck, if you go for a smaller resolution you can fit it all there quite easily :)

Mem October 15 2006 10:04 AM EDT

Ok, I'm having an issue with the whole click anywhere on a post and you collapse it bit. I can't even hit the links in the post before it collapses! This is a problem. I know you can fix it though, 'Fex!

bartjan October 15 2006 10:15 AM EDT

Mem: set Posts: Off
This thread is closed to new posts. However, you are welcome to reference it from a new thread; link this with the html <a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=001uy2">Verifex's GM Script Discussion</a>