Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Need ideas to creat a botting program for MafiaWars in facebook

by oldmonk (Initiate)
on Aug 31, 2010 at 19:19 UTC ( #858217=perlquestion: print w/replies, xml ) Need Help??
oldmonk has asked for the wisdom of the Perl Monks concerning the following question:


I am trying to create a botting program which plays Zynga MafiaWars in Facebook (its a browser based game with lots of clicks)

I have tried IEAutomation but I could not click buttons/links inside the frames.

I have also tried Mechanize::Firefox, but it works in the background and its becoming very difficult for to see if it is really working.

If anyone has idea about the game then here is what I am looking to implement in the program.

1) Login to FB -- Done 2) Goto Mafia Game application -- Done 3) Collect properties if they any thing available to collect(it can be done by navigating through links, a condition to check if a "Collect All" button/link is available) 4) Scan gifts page and ignore certain unwanted requests. I think I can do this using mechanize-firefox by searching string patters 5) As extention, auto accept and send back gifts 6) Go to MyMafia page and grab all mafia details

if it is possible at all?

Can someone help me how to approach?
  • Comment on Need ideas to creat a botting program for MafiaWars in facebook

Replies are listed 'Best First'.
Re: Need ideas to creat a botting program for MafiaWars in facebook
by Limbic~Region (Chancellor) on Aug 31, 2010 at 23:49 UTC
    This is a violation of Facebook's terms of service.

    You will not collect users' content or information, or otherwise access Facebook, using automated means (such as harvesting bots, robots, spiders, or scrapers) without our permission.

    If you have obtained permission to do this and can legally extend that permission to PerlMonks at large, please do share. I am not inclined to help you otherwise (even if bothered to share your currently non-working code).

    Cheers - L~R

      Well, I don't think I am violating FB's terms in any means. just to give clarification: I am not collecting user's information. "Collect" means, collect my earnings in game at some regular period "Grab details" means, in the game, grab player wise (not personal) details, like which level, what's the profession (in game) and so on. I need them because its very difficult to manage the in game allies (called my mafia in this game) because the UI is so sucky. I need to regularly watch which player is active by monitoring his level with his previous week level and remove inactive players

        The application isn't developed by Facebook, It has it's own terms of service:

        "c) You and your activities on the Service will not:

        xiv) except as may be the result of standard search engine or Internet browser usage, use or launch, develop or distribute any automated system, including, without limitation, any spider, robot (or "bot"), cheat utility, scraper or offline reader that accesses the Service, or use or launch any unauthorized script or other software;"

        Well, I don't think I am violating FB's terms in any means....

        Really? I bolded the pertinent text: or otherwise access Facebook, using automated means. Perhaps you are using a browser that has difficulty when HTML is both italicized and bolded. I am not a lawyer but let me tell you how I read that: You can not even login to Facebook using an automated utility.

        As it turns out, you are (or are attempting to) violate both Facebook's terms of service and the games developer's terms of service as pointed out by marto.

        Please don't get the wrong impression of this site or the people that frequent it. There have been a number of lively debates on copyright protection, a company's right to an employee's intellectual property, etc. Let me try and frame why I believe you are getting such a negative reaction.

        First, we tend to expect people to put demonstrate some effort before asking for help. That typically means sharing the broken code they are trying to get working but sometimes you don't even have any idea where to start. Typically the right thing to do in that situation is to ask for pointers on what to read not "write my code for me". I am not saying that's what you said, but that's the way it came across. When someone points out that you are violating some policy, licence, TOS, etc - read it carefully before saying otherwise. Remember, you are coming to us for help which means you think we are more knowledgeable (at least in coding).

        Please take some time to spend looking around and reading. This is a great site with amazingly brilliant people. It would be a shame to write it off because you got off on the wrong foot.

        Cheers - L~R

        you may not think so, but FB's seem to think so
Re: Need ideas to creat a botting program for MafiaWars in facebook
by psini (Deacon) on Aug 31, 2010 at 19:51 UTC

    Please don't use <pre> tags in your posts, for they alter the rendering of the pages. See Perl Monks Approved HTML tags for the list of approved tags, thank you.

    Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

Re: Need ideas to creat a botting program for MafiaWars in facebook
by hok_si_la (Curate) on Sep 01, 2010 at 15:19 UTC
    For whatever reason as I read this thread, the Scala and Kolacny Brothers remake of Radiohead's "Creep" played itself in the depths of my mind.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://858217]
Approved by planetscape
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2018-07-21 00:27 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (442 votes). Check out past polls.