Facebook games quick invite.

By niknah Last update Jan 21, 2010 — Installed 74,013 times.

mafia wars not working

in
Subscribe to mafia wars not working 21 posts, 11 voices



edc1512 User
FirefoxMacintosh

I changed the invite link from:
http://apps.facebook.com/inthemafia/remote/html...

to:
http://apps.facebook.com/inthemafia/status_invi...

and now is working again,

thanks for this script,

Enrico

 
Rork McGnarley User
FirefoxWindows

yes, they reverted back to the way it used to be...
"http://apps.facebook.com/inthemafia/status_invi..."

 
Rork McGnarley User
FirefoxWindows

Backround doesn't work, but Tabs does work after changing the link.

 
Thorne User
FirefoxWindows

For anyone who's not familiar with javascript, here is a quick how to.

Edit the quick invite script and find the line that starts with:


var urlReplaces=[


Now scroll down until you find Mafia Wars. It has this comment
// mafia wars, akhara, 21/jun/2009 above it.

The next line starts with
['/inthemafia/','" and ends with "#id#'],

What you want to do is replace everything between
['/inthemafia/',' ..and.. #id#'],
with
status_invite.php?from=

So now this line looks like this:
['/inthemafia/','status_invite.php?from=#id#'],

That's it! Save the file and close it. Refresh the browser, do the usual stuff and after the list loads all the names, just use the "In tabs" option and let the browser do its thing while it's loading all the tabs. If you have a very large number of invites the browser will probably become unresponsive for a bit, but don't end the task because it will return. Hopefully your computer has enough ram to handle it without crashing. The other option is to just CTRL+click every link listed into a new tab. It's not automatic, but at least it's an invite. :) Depending on how many invites you have you may have to do this a few times to get them all.

By the way, when it's done and you refresh the browser, the # of "My Mafia" doesn't seem to show the change. But, if you click the number, it updates.

 
ViXaY Xavier Scriptwright
FirefoxWindows

updated the script to match thorne's code. Thanks a ton!

 
Lord.Quackstar User
FirefoxWindows

Since my computer can't handle opening 67 tabs, i looked into the problem with the background adding. For some weird reason, GM_xmlhttpRequest isn't following the redirect. The resulting page from status_invite.php is http://mwfb.zynga.com/mwfb/status_invite.php?fr....

I've played with the script a little and the only way i could get it to work was changing the customurl variable to http://mwfb.zynga.com/mwfb/status_invite.php?fr.... However i think this might break the gifts part of the script.

Hope this helps

 
K Nelson User
FirefoxWindows

I don't really care if it breaks the gifting. People don't really need the gifting, and it's cheating anyway. I never use it.

@Lord.Quackstar Can you help me by showing me where in the script I need to modify to get it to work?

@ViXaY Xavier Why not just upload a version of the script that actually WORKS in the background, but has no gifting in it? It could still have all other features.

The important thing is processing INVITES. That's the name of the script. Can we PLEASE get a script which at least does that properly?

Your efforts are greatly appreciated, so please don't take this wrong. I just think that the gifting was a wrong direction to begin with. It needed a separate script.

 
ViXaY Xavier Scriptwright
FirefoxWindows

Gifting doesn't work as it is now, because it's been fixed.
Can you give me the exact code for fixing the background adding? I don't see how changing customURL fixes background adding.

 
KCMCL User
FirefoxWindows

Regards to gifting, this one seems to be spot on and the code is going to get added to the MWAP script..

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

 
Lord.Quackstar User
FirefoxWindows

If someone just usues the script for Mafia Wars, then change line 28 to:
var customUrl='http://mwfb.zynga.com/mwfb/status_invite.php?fr...;

The reason i'm changing this instead of the entry in the urlReplaces variable is because anything in there gets a prefix of http://apps.facebook.com/GAMENAMEHERE/. However, the customUrl variable just gets #id# replaced in line 141.

 
Lord.Quackstar User
FirefoxWindows

BTW:
This could all be solved if GM_xmlhttpRequest would actually follow the redirect. However i believe its some kind of JS redirect, because i don't see any 300's in the header of either page.

 
ViXaY Xavier Scriptwright
FirefoxWindows

I see how #id# would be replaced, but what about YOURIDHERE? I don't see where in the code it gets replaced? and does customURL work only for mafia wars or is it for all games? because then it would break the script for other games...

 
KCMCL User
FirefoxWindows

I can't see that either :: and when I follow instructions, it does not work...

 
Lord.Quackstar User
FirefoxWindows

First, i finally found the reason its not redirecting. The source of status_invite.php is a bunch of js. Ajax dosen't execute js.

Second, i guess i should have said it in more detail. YOURIDHERE is where your id needs to go. For those of you that don't know what it is, goto the recruiting page of mafia wars, and look at your invite link (the one that looks like http://apps.facebook.com/inthemafia/status_invi.... Your interested in the numbers after from=. Replace YOURIDHERE with those numbers.

Third, Yes this will break the script for other games. This is a bandaid solution, not a permanent one. This will only be fesable if you use this script for nothing but mafia wars.

Fourth, in order to obtain a permanent solution, your script needs to do 2 things: A) Find the current user's id and B) Tell when a link in urlReplaces has the prefix http:// and not add http://apps.facebook.com/GAMENAMEHERE/.

Hopefully this helps

 
chuck User
FirefoxWindows

@Thorne - You broke my crappy laptop and nearly broke my gamer but it worked. Had 50+ invites on each and took forever to fully open all the tabs but it eventually did its thing.

Thanks

 
Vu Quoc Viet User
FirefoxMacintosh

So when the add in the background going to work? I upgrade to the latest version but it's not work for me with the add in the background anymore

 
zaldun User
FirefoxWindows

I have tried several ways to add a FB contact to MW (she is playing it for sure):

- http://apps.facebook.com/inthemafia/status_invi...
- http://mwfb.zynga.com/mwfb/status_invite.php?fr...

and no one works for me, is there any other URL which works?

 
Thorne User
FirefoxWindows

Sorry about that Chuck. :) I did mention it can do that. :P When I was testing it, I had about 150 names sitting in my invite list and even with 6GB of ram my machine became very upset. LOL Until the background invite is resolved, there is a work around that I'm using that keeps my computer from chocking. I run the invites inside a VM. This way I'm only committing whatever ram I give the VM and worst case, I kill the task on the VM.

 
KCMCL User
FirefoxWindows

Hi everyone, untill this script is fixed correctly :: this works http://echk.com/mw/

 
elektroda User
FirefoxWindows

I also have problems adding mafia crew.... This also goes for Kingdom Wars as well. Other than that seams to be working fine..at least for me...

 
Lord.Quackstar User
FirefoxWindows

I don't get why people have problems with my link. I've been using it for a few weeks and it works great. I'm going to see if i can help scrape the id.

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