Results 1 to 5 of 5

Thread: is this a scratch card autobuyer

  1. #1
    utahclock's Avatar
    Join Date
    Feb 2012
    Gender
    Posts
    671
    Thanks
    361
    Thanked 376 Times in 197 Posts


    Downloads
    122
    Uploads
    0
    Mentioned
    88 Post(s)
    Time Online
    15 d 16 h 59 m
    Avg. Time Online
    12 m
    Rep Power
    7

    is this a scratch card autobuyer

    can anyone of the programming team verify ?

    def WinterKiosk():
    print "Grabbing Scratch Card"
    request = mechanize.Request("http://www.neopets.com/winter/kiosk.phtml")
    response = state.open(request)
    soup = BeautifulSoup(response.get_data())
    if response.get_data().find("You were in the middle of scratching your card and left!",0,len(response.get_data())):
    print "OH NO!"
    state.follow_link(url_regex="kiosk2.phtml")
    else:

    state.select_form(nr=1)
    soups = BeautifulSoup(state.submit().get_data())
    if state.geturl() == "http://www.neopets.com/winter/process_kiosk.phtml":
    print "Please wait longer before trying again"
    else:
    card = soups('p')[4].contents[1].split("b>")[1].split("</b>")[0]
    print card #soups.prettify()
    state.select_form(nr=2)
    state.set_value_by_label(["Race to Riches Scratchcard"], "card_id")

    #state["card_id"] = ["select a cheese""Race to Riches Scratchcard"]#card
    state.submit()
    if state.geturl() == "http://www.neopets.com/winter/kiosk2.phtml":
    request = mechanize.Request("http://www.neopets.com/winter/process_kiosk.phtml?type=scratch&loc=1")
    request.add_header("Referer", "http://www.neopets.com/winter/kiosk2.phtml")
    response = state.open(request)

    request = mechanize.Request("http://www.neopets.com/winter/process_kiosk.phtml?type=scratch&loc=9")
    request.add_header("Referer", "http://www.neopets.com/winter/kiosk2.phtml")
    response = state.open(request)

    request = mechanize.Request("http://www.neopets.com/winter/process_kiosk.phtml?type=scratch&loc=7")
    request.add_header("Referer", "http://www.neopets.com/winter/kiosk2.phtml")
    response = state.open(request)

    request = mechanize.Request("http://www.neopets.com/winter/process_kiosk.phtml?type=scratch&loc=3")
    request.add_header("Referer", "http://www.neopets.com/winter/kiosk2.phtml")
    response = state.open(request)

    request = mechanize.Request("http://www.neopets.com/winter/process_kiosk.phtml?type=scratch&loc=5")
    request.add_header("Referer", "http://www.neopets.com/winter/kiosk2.phtml")
    response = state.open(request)

    randomn = random.randint(1, 4) * 2
    request = mechanize.Request("http://www.neopets.com/winter/process_kiosk.phtml?type=scratch&loc="+str(randomn ))
    request.add_header("Referer", "http://www.neopets.com/winter/kiosk2.phtml")
    response = state.open(request)

    print response.read()

  2. #2
    Banned
    Join Date
    Jun 2012
    Gender
    Location
    90 90
    Age
    31
    Posts
    1,714
    Thanks
    876
    Thanked 2,877 Times in 1,139 Posts


    Downloads
    44
    Uploads
    1
    Mentioned
    562 Post(s)
    Time Online
    118 d 6 h 45 m
    Avg. Time Online
    1 h 30 m
    Rep Power
    0
    Gamer IDs

    Gamertag: DarkByt3 PSN ID: raredaredevil
    Yes thats a scratch buyer , basically you just need to visit

    kiosk2.phtml and have kiosk.phtml as the refferer. That code also scratches the first 5 tiles in order and then uses a random function on the final scratch.
    Last edited by DarkByte; 03-07-2013 at 10:25 PM.

  3. #3
    ritzwin's Avatar
    Join Date
    Mar 2013
    Gender
    Location
    Canada
    Posts
    328
    Thanks
    35
    Thanked 57 Times in 30 Posts


    Downloads
    0
    Uploads
    0
    Mentioned
    23 Post(s)
    Time Online
    13 d 10 h 8 m
    Avg. Time Online
    11 m
    Rep Power
    5
    Good golly, people need to learn to refactor their code.

  4. #4
    Potatoes's Avatar
    Join Date
    Dec 2011
    Posts
    211
    Thanks
    17
    Thanked 19 Times in 18 Posts


    Downloads
    37
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    1 d 16 h 22 m
    Avg. Time Online
    1 m
    Rep Power
    6
    I understand this language lol! Is this python?

  5. #5
    Banned
    Join Date
    Jan 2013
    Gender
    Posts
    7
    Thanks
    747
    Thanked 1,255 Times in 692 Posts


    Downloads
    86
    Uploads
    0
    Mentioned
    464 Post(s)
    Time Online
    70 d 14 h 40 m
    Avg. Time Online
    56 m
    Rep Power
    0
    Quote Originally Posted by Potatoes View Post
    I understand this language lol! Is this python?
    Yeah, it's python.

    I guessed Javascript at first. But no, I believe it is python indeed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •