FBMW*

By remarkable Last update Mar 11, 2009 — Installed 14,486 times.

Aggressive Refresh and Hitlist Timer

in
Subscribe to Aggressive Refresh and Hitlist Timer 11 posts, 4 voices



Merrill Scriptwright

Hey, it there anyway we can have the aggressive refresh auto-stop when the 15 min hitlist timer goes down to zero? This works great when the original Captcha comes up. Is there anyway to apply this to the new hitlist timer?

 
remarkable Script's Author

ill update it when someone posts the code change. I search the DB every day for it, yet no solution has been presented.

 
XeNoMoRpH User

Well, luckily I came up with something.

Place the following code:

var seek = Utils.getElementsByXPath('.//form[contains(@action,"http://apps.facebook.com/mobwars/hitlist/do.php")]');
if (seek.length > 0) { boss.preferences.aggressive = false; }

Before this code:

if (boss.preferences.hitlist_active && boss.stamina>0 && rl == 0)

 
Tim Smart Scriptwright

You can just update it to pick up the new hitlist captcha's. Only takes a few lines of code.

I made a version that works with the new Greasemonkey and does this.

 
XeNoMoRpH User

Or you do that. So (using Tim Smart's code), find

function captcha_gotcha()
  {
  var captcha = Utils.getElementsByClassName('cap');
  if (captcha.length>0)
    {
    boss.got_captcha=true;

and replace it with
function captcha_gotcha() {
	var captcha = Utils.getElementsByClassName('cap');
	var hitlist_captcha = Utils.getElementsByXPath('.//input[@name="cap_value"]');
	if (captcha.length > 0 || hitlist_captcha.length > 0) boss.got_captcha=true;

This code actually doesn't work for me. It does stop the agressive refresh, but any time I enter in the captcha it says it is incorrect. I'll just stick with what I previously had. Maybe it will work for other people though *shrug*

 
remarkable Script's Author

it didnt work for me either, it stopped the script from functioning.

 
Tim Smart Scriptwright

There is one other section of code you have to update. So you have already mentioned do this:

Find the following:

function captcha_gotcha()
  {
  var captcha = Utils.getElementsByClassName('cap');
  if (captcha.length>0)
    {
    boss.got_captcha=true;

Replace with:
function captcha_gotcha()
  {
  var captcha = Utils.getElementsByClassName('cap');
  var hitlist_captcha = Utils.getElementsByXPath('.//input[@name="cap_value"]');
  if (captcha.length>0||hitlist_captcha.length>0) boss.got_captcha=true;

Also find:

  if (boss.preferences.hide_ads==undefined) boss.preferences.hide_ads = true;
  if (boss.preferences.aggressive==undefined) boss.preferences.aggressive = false;
  if (captcha.length>0)
    {
    hide();
    adjust();

And replace with:
  if (boss.preferences.hide_ads==undefined) boss.preferences.hide_ads = true;
  if (boss.preferences.aggressive==undefined) boss.preferences.aggressive = false;
  if (captcha.length>0||hitlist_captcha.length>0)
    {
    hide();
    adjust();
    if(hitlist_captcha.length>0) var answer = Utils.getElementsByXPath('.//input[@name="cap_value"]')[0];
    else var answer = Utils.getElementsByXPath('.//input[@name="cap_answer"]')[0];

 
XeNoMoRpH User

I'm pretty sure you can change

if (boss.preferences.hide_ads==undefined) boss.preferences.hide_ads = true;
if (boss.preferences.aggressive==undefined) boss.preferences.aggressive = false;

to the following:

boss.preferences.hide_ads = boss.preferences.hide_ads || true;
boss.preferences.aggressive= boss.preferences.aggressive || false;

They do accomplish the same task, but I like simplifying scripts and what not. Your code seems to work, though I still have the issue when the normal captcha appears and I enter in the captcha, it is never right.

 
Tim Smart Scriptwright

Do you see it enter the answer into the box just before the form gets submitted?

 
remarkable Script's Author

Tim i tried your script and it didnt work for me either. The MWcaptcha failed to be entered multiple times and i have 30 points. Also the change you suggested here caused my preferences to go blank and the script to go to resting.

 
XeNoMoRpH User

Well, I was going to report back to you, but it appears that is only captcha right now, at least for me. So, it's all working just fine.

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