FBMW++

By Pea Cracker Last update Feb 24, 2009 — Installed 38,660 times. Daily Installs: 0, 0, 4, 1, 0, 2, 0, 0, 0, 2, 1, 1, 0, 0, 2, 8, 0, 4, 1, 0, 6, 4, 0, 1, 0, 1, 2, 0, 3, 1, 0

script isnt working

Subscribe to script isnt working 19 posts, 10 voices

fart man User

the script isnt working anyone else notice?

 
BLIK User

Same here............not working for me

 
Zen1 User

Simple fixes for new Mob and Experience locations.
You have to know how to edit the script to apply these changes.

Search for:

/* Mobsters except myself */
var header = document.getElementById('app8743457343_header');
var str = header.getElementsByTagName('a');
str = str[1].innerHTML;

Replace with:

/* Mobsters except myself */
var header = document.getElementById('app8743457343_navMenu');
var str = header.getElementsByTagName('a');
str = str[7].innerHTML;

Search for:

case 'Level':
if (this.level != parseInt(result[2])) this.new_level = true;
this.level = parseInt(result[2]);
break;

Replace with:

case 'Level':
if (this.level != parseInt(result[2])) this.new_level = true;
this.level = parseInt(result[2]);
// exp: is now INSIDE the Level: div
var result = str.match(/exp:[^0-9]*([0-9]+)\//);
//alert('exp=' + result[1]);
this.exp = parseInt(result[1]);
break;

 
BLIK User

How do I add the updates?

do I install it again?

 
biosong Scriptwright

can anyone create a fix for the "auto job", thanks

 
Zen1 User

Also need to fix the time remaining changes.

Search for:

var re = /(Cash|Health|Energy|Stamina|Exp|Level):\s*\$?([0-9]+)\/?([0-9]+)?(?:.*?more in:.*?(\d+:\d+)|)/

Replace with:

var re = /(Cash|Health|Energy|Stamina|Exp|Level):\s*\$?([0-9]+)\/?([0-9]+)?(?:\s*more in:\s*(\d+:\d+)|)/

 
davevg User

Here is a snippet of an alternate way of getting this information, you'd need to do the rest of the fields as well. May be better as layout changes don't break this:

  this.stamina = parseInt(document.getElementById('app8743457343_cur_recovery').innerHTML);
  var stamtime = document.getElementById('app8743457343_cur_recovery_countdown');
  this.stamina_time = Page.now + (stamtime?parseInt(stamtime.innerHTML.split(':')[0])*60 + parseInt(stamtime.innerHTML.split(':')[1]):0);
  this.max_stamina = parseInt(document.getElementById('app8743457343_cur_recovery').parentNode.innerHTML.match(/\/(\d+)/)[1]);

Only problem is the experience/level is not selectable using this method.

 
scripts_rule User

I applied the fixes suggested by Zen1 but my script is now doing an endless loop of checking for buildings, new weapons, jobs, etc. I must've done something wrong. I guess I'll have to wait for the next update.

 
sm00th101 User

Davevg, I like fixes that don't break easy. However, I'm not a programmer and don't know what the code means, or even where fields start and end, and which ones to update. I can do the "search for this" and "replace with this" option. If you could explain your fix in those terms, I'd appreciate it

 
Zen1 User

After applying my changes, you need to reset the database to let the script find all the values again. It should work fine after that.

Dave, yes you can do it the way you show, but there is a lot of code to replace and it will run much slower as you are searching the document many times.

 
John Doe111 Scriptwright

I have done all the changes exactly and reset the db but still loops. It doesnt see the cash. Anyone that got it working can u upload the script?

 
scripts_rule User

Thanks Zen1. I made the changes you suggested again and it seems to be working now. Aside from it stopping after every hitlist kill, everything else looks okay.

 
whyme User

Thanks Zen1. It works for me as well... I had to reset the DB twice (it kept looping through checking for new weapons, new jobs, etc. after first reset), but seems to be working now with the exception of Bank not updating, hitlist stopping after a bounty kill, and Victims list not updating.

 
Zen1 User

I got the victim list working:

Find:

// who is your own mob ... need to create/scan a mob list
if (document.body.innerHTML.match(/You killed /) && Page.c_page=='hitlist')
{
if (document.getElementById('app8743457343_content').getElementsByTagName('A')[0])
{
var killing = document.getElementById('app8743457343_content').getElementsByTagName('A')[0];

Replace with:

// who is your own mob ... need to create/scan a mob list
if (document.body.innerHTML.match(/You killed /) && Page.c_page=='hitlist')
{
if (document.getElementById('app8743457343_content').getElementsByTagName('A')[2])
{
var killing = document.getElementById('app8743457343_content').getElementsByTagName('A')[2];

Note the change is really only changing [0] to [2] in two places - I gave extra surrounding code for context.

So while this does fix tracking the victims, I have not been able to get any bounties in automatic - only by manually clicking on the attack links.

 
Zen1 User

My version is based more on the FBMW* 1.27L version http://userscripts.org/scripts/review/39510
These changes are generic enough to work in both.
I am having no problem with Bank, nor hitlist stopping, but that is probably because of other differences between FBMW++ and FBMW*

 
scripts_rule User

Beautiful...just beautiful. Thank you! I'm using version J because for some reason when I tried the code changes with L, it didn't work. But I'm sure the problem was on my end.

 
whyme User

Awesome! That fixes the victim list... And all of a sudden the bank updated and it's not stopping after a hitlist kill. It's working perfectly for me now! You da man, Zen1!

 
John Doe111 Scriptwright

In case anyone wants to download the script with Zen1's fixes just get it here. I will take the script down when someone updates it here.

http://userscripts.org/scripts/show/46392

 
Daz Clio Cup User

just uploaded JohnDoe's script, works a treat. cheers

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel