FBMW++

By Pea Cracker Last update Feb 24, 2009 — Installed 39,028 times.

Tweak: A random refresh that isn't aggressive

in
Subscribe to Tweak: A random refresh that isn't aggressive 14 posts, 8 voices



JT Guido Bones User

Thought I'd share this in case anyone else is interested. I like my sleep :) I've found I can't run aggressive overnight, it hangs up on the captcha's. But I still wanted a chance at getting some hits and the normal refresh of 60 secs is a bit too long. I decided I'd try randomizing the refresh a little to see if that helps with the captcha's. Ran last night without getting one captcha, and won about 5 hits. Here's how to do it:

Search for the following string in the code:
/* In-Code User Customization Values */

Add a new var: (in the code below the refresh is randomized between 1 and 20 seconds. If you want a shorter interval, change the 20 value)
var waitTime=Math.floor(Math.random()*20+1);

Then set norm_refresh to your new var:
var norm_refresh = waitTime; // refresh time in seconds, when not aggressive, in seconds (60 = 1 minute)

Good luck!

 
Chris D User

NO captcha's yet. Thanks.

 
JT Guido Bones User

I'm level 86. I don't get hits (that I win) anywhere near that fast at the moment.

 
gwoodyard User

How would you add a random time interval to the aggression mode? I want it to refresh every 1-5 seconds if possible.

Thanks in advance.

 
CR dloader User

pea, can u just add this in the next version? I'm confused and stupid when it comes to writing scripts, although i would like to learn one day.

 
JT Guido Bones User

gwoodyard,

I haven't tested this, but I believe this is where you would make that modification. Proceed at your own risk! :)

Search for:
Agg = function()

Add the variable declaration: (Again, modify the 4 for a different interval, 4 means 1-5 seconds)
var waitTime=Math.floor(Math.random()*4+1);

find the line that reads:
if (reload) window.location.href = "http://apps.facebook.com/mobwars/";

change it to:
if (reload)
{
setTimeout(window.location.href = "http://apps.facebook.com/mobwars/", waitTime);
}

I'm pretty sure that should work but don't quote me on that. :)

JT

 
FlyfisherMike User

This is what I've wanted/been waiting for.

 
farts User

this somehow fixes the requirement to have a career goal set too. nice

 
Chris D User

Really? I have been searching for hours through the script to find out why there was a job requirement.

Edit: I still cant get agg refresh to work unless I have a job requirement set.

 
Rasmus Trenskow User

Hi.

Does this also apply to 1.27?
I have searched for
if (reload) window.location.href = "http://apps.facebook.com/mobwars/";
but been unable to locate it.

I found this section, and modified it, but to no help.
Can anyone see what is wrong with my script?

Agg = function()
{
return function()
{
/* Inserted by Rasmus to add waittime to aggresive refresh */
var waitTime=Math.random()*4+1;
GM_log('Random timer added: '+waitTime);
if (boss.preferences.hitlist_active)
{
boss.preferences.aggressive = this.checked;
GM_setValue('boss', boss.toSource());
/* Edited by Rasmus to add waitTime to line so script pauses */
// window.location.href = "http://apps.facebook.com/mobwars/";
setTimeout(window.location.href = "http://apps.facebook.com/mobwars/", waitTime*1000);
}
else
{
if (!boss.preferences.aggressive)
{
alert('Are you crazy? Why would you do auto refresh if you are not going to hit anyone?');
}
boss.preferences.aggressive = false;
this.checked = false;
GM_setValue('boss', boss.toSource());
window.location.href = "http://apps.facebook.com/mobwars/";
}
}
}

And where do i find the log?

 
smack89 User

Huzzah,

Rasmus, Here is what you need to put in there for 1.27.

Search for "if (boss.targets&gt0 && boss.evaded&lt=5)"

Enter this right above that line:

var waitTime=Math.floor(Math.random()*10+1);
waitTime *= 1000;

And then, for the eles block below, change it to this:

else
{
setTimeout(function(){window.location.href = "http://apps.facebook.com/mobwars/"+(boss.preferences.hurl?"":"hitlist/");}, waitTime);
// window.location.href = "http://apps.facebook.com/mobwars/"+(boss.preferences.hurl?"":"hitlist/");
}

 
smack89 User

I've been using this random refresh and have hit fewer captchas, not completely eliminated though. I have a 5 second random rate and use two tabs. I've been raking in the hits though even thought my level is in the 20's.

 
FlyfisherMike User

I have it set to go random between 4-6 seconds. I never hit the refresh page anymore. This way maximizes the benefits while I'm away from the computator. Fewer Captchas and fewer refreshes but the duration is greatly improved.

 
smack89 User

This has been incorporated in the latest FBMW++ by davevg and CryptoNight. http://userscripts.org/topics/20233

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