Results 1 to 3 of 3

Thread: [JAVA] Sean's wrapper help

  1. #1

    Rambo's Avatar
    Joined
    Sep 2013
    Posts
    136
    Userbars
    1
    Thanks
    19
    Thanked
    29/25
    DL/UL
    11/7
    Mentioned
    25 times
    Time Online
    4d 3h 14m
    Avg. Time Online
    1m

    [JAVA] Sean's wrapper help

    I am working of a marabot of sorts. Heres the code so far:
    Code:
        private int marabot(){
            Connection neo = new Connection("http://www.marapets.com"); // makes new object
            jLabel2.setText("Established Connection...");
            jLabel2.repaint();
            jTextArea1.setText(neo.post("/dologin.php", new String [][] {{"id", "USERIDINSERT"}, {"password", "insert password"}})); //login
            jLabel2.setText("Logged in...");
            jLabel2.repaint();
            String strHTML = neo.get("/countdown.php");
            // plushie machine
            if(strHTML.contains("You can use the Plushie Machine now"))
            {
              neo.get("http://www.marapets.com/plushies.php?do=claw&pos=right");
              jLabel2.setText("Did Plushie Machine");
              jLabel2.repaint();
              
            }
            return 0;
        }

    The login command doesnt work. In Python login works with this request:
    Code:
    values = {'id' : "useridinsert", 'password' : "passinsert"}
    @(you need an account to see links)

  2. #2
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,756
    Userbars
    176
    Thanks
    5,936
    Thanked
    33,184/6,625
    DL/UL
    23/36
    Mentioned
    3,871 times
    Time Online
    564d 11h 47m
    Avg. Time Online
    3h 13m
    So your labels aren't updating? Did you try saving the response as an HTML file to see what exactly is going on?

    Also I would recommend to have this all in something other than an integer... perhaps a boolean to return true if the login worked? @(you need an account to see links)
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  3. #3

    Rambo's Avatar
    Joined
    Sep 2013
    Posts
    136
    Userbars
    1
    Thanks
    19
    Thanked
    29/25
    DL/UL
    11/7
    Mentioned
    25 times
    Time Online
    4d 3h 14m
    Avg. Time Online
    1m
    Yes @(you need an account to see links), I checked the HTML and it didn't work. Its going to eventually run through all the dailes, and all users, so what the function returns is not important.

Posting Permissions

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