Results 1 to 9 of 9

Thread: [VB.Net] ABer

  1. #1
    Josh's Avatar
    Joined
    Dec 2011
    Posts
    415
    Userbars
    2
    Thanks
    25
    Thanked
    378/143
    DL/UL
    82/6
    Mentioned
    120 times
    Time Online
    17d 9h 48m
    Avg. Time Online
    5m

    [VB.Net] ABer

    Code:
        Public Function buyitem(captchaurl, price, itemurl)
            Dim capimage As Bitmap = w.GrabPic(captchaurl, w.LastPage)
            Dim ocr As New Point
            ocr = docap(capimage)
            strhtml = w.PostWrapper("http://www.neopets.com/haggle.phtml", "current_offer=" & price & "&x=" & ocr.X & "&y=" & ocr.Y, itemurl)
            If strhtml.Contains("I accept your") = True Then
                'Item bought
                Return True
            Else
                Return False
    
            End If
    
        End Function
    
    
        Public Function neologin(ByVal user As String, ByVal pass As String)
    
            Dim strhtml As String
            strhtml = w.GetWrapper("http://neopets.com/", "")
            strhtml = w.PostWrapper("http://www.neopets.com/login.phtml?destination=%252Findex.phtml", "username=" & user & "&password=" & pass, "http://www.neopets.com/login.phtml")
           
    
            If InStr(strhtml, "Location: /index.phtml") Then
                Return True
            Else
                Return False
            End If
        End Function
        
    
    
    
        Private Sub cmdneo_Click(sender As Object, e As EventArgs) Handles cmdneo.Click
            If String.IsNullOrEmpty(txtneop.Text) Or String.IsNullOrEmpty(txtneop.Text) Then
                MsgBox("Username or Password empty")
            Else
                If neologin(txtneou.Text, txtneop.Text) = True Then
                    MsgBox("Logged into neo")
                    cmdstart.Enabled = True
                    lblstatus.Text = "Status: Logged in"
    
                Else
                    MsgBox("Failed to login")
    
                End If
    
            End If
    
    
        End Sub
    
        Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
            'Stuffs
    
            Do Until stopit = True
    
    
                strhtml = w.GetWrapper("http://www.neopets.com/objects.phtml?type=shop&obj_type=21")
                If strhtml.Contains("Enter your Neopets login information") Then
                    neologin(txtneou.Text, txtneop.Text)
                End If
                strhtml = w.GetWrapper("http://www.neopets.com/objects.phtml?type=shop&obj_type=21")
                temp1 = GetBetweenAll(strhtml, "<BR></A><B>", "</B><BR>")
                temp2 = GetBetweenAll(Replace(strhtml, ",", ""), "Cost: ", " NP")
                temp3 = GetBetweenAll(strhtml, "this.href='haggle.phtml?ob'+'j_info_id=", "';if (!")
                SetLabelText_ThreadSafe(lblbuy, "Searching shop...")
                For x = 0 To lstsearch.Items.Count - 1
                    For y = 0 To temp1.Count - 1
                        If LCase(temp1.Item(y)) = LCase(lstsearch.Items(x)) Then
                            Setaddlist_ThreadSafe(lstlog, "Found " & temp1.Item(y))
                            start_time = Now
    
                            strhtml = w.GetWrapper("http://www.neopets.com/haggle.phtml?obj_info_id=" & temp3.Item(y), w.LastPage)
                            cap = "http://www.neopets.com/captcha_show.phtml?_x_pwned=" & GetBetween(strhtml, "/captcha_show.phtml?_x_pwned=", """")
                            intpause = GetRandom(Convert.ToInt32(pausemin.Text), Convert.ToInt32(pausemax.Text))
                            Setaddlist_ThreadSafe(lstlog, "Waiting " & intpause & " ms")
                            System.Threading.Thread.Sleep(intpause)
    
                            If buyitem(cap, temp2.Item(y), "http://www.neopets.com/haggle.phtml?obj_info_id=" & temp3.Item(y)) = True Then
                                stop_time = Now
                                elapsed_time = stop_time.Subtract(start_time)
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Bought " & temp1.Item(y))
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Took " & elapsed_time.TotalMilliseconds.ToString("0") & " ms")
    
                            Else
                                stop_time = Now
                                elapsed_time = stop_time.Subtract(start_time)
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Missed " & temp1.Item(y))
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Took " & elapsed_time.TotalMilliseconds.ToString("0") & " ms")
    
                            End If
    
    
    
                        End If
    
                    Next
                Next
                intref = GetRandom(Convert.ToInt32(refmin.Text), Convert.ToInt32(refmax.Text))
    
    
                SetLabelText_ThreadSafe(lblbuy, "Pausing " & intref & " ms")
                System.Threading.Thread.Sleep(intref)
    
            Loop
            SetLabelText_ThreadSafe(lblbuy, "Idle")
        End Sub
    Most likely not the most efficient code, but gets 950 - 1100 millisecond buys for me. First real program Ive made in like 2+ years.

  2. The Following 4 Users Say Thank You to Josh For This Useful Post:

    Demetri (08-25-2014),Dokeu (06-11-2016),j03 (10-10-2014),siaospear (06-12-2016)

  3. #2
    BEDDOEDv's Avatar
    Joined
    Jul 2012
    Posts
    664
    Userbars
    3
    Thanks
    182
    Thanked
    109/53
    DL/UL
    106/0
    Mentioned
    32 times
    Time Online
    7d 10h 26m
    Avg. Time Online
    2m
    Quote Originally Posted by Josh View Post
    Code:
        Public Function buyitem(captchaurl, price, itemurl)
            Dim capimage As Bitmap = w.GrabPic(captchaurl, w.LastPage)
            Dim ocr As New Point
            ocr = docap(capimage)
            strhtml = w.PostWrapper("http://www.neopets.com/haggle.phtml", "current_offer=" & price & "&x=" & ocr.X & "&y=" & ocr.Y, itemurl)
            If strhtml.Contains("I accept your") = True Then
                'Item bought
                Return True
            Else
                Return False
    
            End If
    
        End Function
    
    
        Public Function neologin(ByVal user As String, ByVal pass As String)
    
            Dim strhtml As String
            strhtml = w.GetWrapper("http://neopets.com/", "")
            strhtml = w.PostWrapper("http://www.neopets.com/login.phtml?destination=%252Findex.phtml", "username=" & user & "&password=" & pass, "http://www.neopets.com/login.phtml")
           
    
            If InStr(strhtml, "Location: /index.phtml") Then
                Return True
            Else
                Return False
            End If
        End Function
        
    
    
    
        Private Sub cmdneo_Click(sender As Object, e As EventArgs) Handles cmdneo.Click
            If String.IsNullOrEmpty(txtneop.Text) Or String.IsNullOrEmpty(txtneop.Text) Then
                MsgBox("Username or Password empty")
            Else
                If neologin(txtneou.Text, txtneop.Text) = True Then
                    MsgBox("Logged into neo")
                    cmdstart.Enabled = True
                    lblstatus.Text = "Status: Logged in"
    
                Else
                    MsgBox("Failed to login")
    
                End If
    
            End If
    
    
        End Sub
    
        Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
            'Stuffs
    
            Do Until stopit = True
    
    
                strhtml = w.GetWrapper("http://www.neopets.com/objects.phtml?type=shop&obj_type=21")
                If strhtml.Contains("Enter your Neopets login information") Then
                    neologin(txtneou.Text, txtneop.Text)
                End If
                strhtml = w.GetWrapper("http://www.neopets.com/objects.phtml?type=shop&obj_type=21")
                temp1 = GetBetweenAll(strhtml, "<BR></A><B>", "</B><BR>")
                temp2 = GetBetweenAll(Replace(strhtml, ",", ""), "Cost: ", " NP")
                temp3 = GetBetweenAll(strhtml, "this.href='haggle.phtml?ob'+'j_info_id=", "';if (!")
                SetLabelText_ThreadSafe(lblbuy, "Searching shop...")
                For x = 0 To lstsearch.Items.Count - 1
                    For y = 0 To temp1.Count - 1
                        If LCase(temp1.Item(y)) = LCase(lstsearch.Items(x)) Then
                            Setaddlist_ThreadSafe(lstlog, "Found " & temp1.Item(y))
                            start_time = Now
    
                            strhtml = w.GetWrapper("http://www.neopets.com/haggle.phtml?obj_info_id=" & temp3.Item(y), w.LastPage)
                            cap = "http://www.neopets.com/captcha_show.phtml?_x_pwned=" & GetBetween(strhtml, "/captcha_show.phtml?_x_pwned=", """")
                            intpause = GetRandom(Convert.ToInt32(pausemin.Text), Convert.ToInt32(pausemax.Text))
                            Setaddlist_ThreadSafe(lstlog, "Waiting " & intpause & " ms")
                            System.Threading.Thread.Sleep(intpause)
    
                            If buyitem(cap, temp2.Item(y), "http://www.neopets.com/haggle.phtml?obj_info_id=" & temp3.Item(y)) = True Then
                                stop_time = Now
                                elapsed_time = stop_time.Subtract(start_time)
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Bought " & temp1.Item(y))
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Took " & elapsed_time.TotalMilliseconds.ToString("0") & " ms")
    
                            Else
                                stop_time = Now
                                elapsed_time = stop_time.Subtract(start_time)
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Missed " & temp1.Item(y))
                                Setaddlist_ThreadSafe(lstlog, "(" & Now.ToShortTimeString() & ") Took " & elapsed_time.TotalMilliseconds.ToString("0") & " ms")
    
                            End If
    
    
    
                        End If
    
                    Next
                Next
                intref = GetRandom(Convert.ToInt32(refmin.Text), Convert.ToInt32(refmax.Text))
    
    
                SetLabelText_ThreadSafe(lblbuy, "Pausing " & intref & " ms")
                System.Threading.Thread.Sleep(intref)
    
            Loop
            SetLabelText_ThreadSafe(lblbuy, "Idle")
        End Sub
    Most likely not the most efficient code, but gets 950 - 1100 millisecond buys for me. First real program Ive made in like 2+ years.
    hi josh, how would i use this code then. I no a little bit about scrips. I know greasemonkey a bit?
    i luv. i said i luv to hack


    Avatar Ss List (you need an account to see links)

  4. #3
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,077/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 5h 6m
    Avg. Time Online
    3h 13m
    Quote Originally Posted by BEDDOEDv View Post
    hi josh, how would i use this code then. I no a little bit about scrips. I know greasemonkey a bit?
    You need to create and design the full program using Visual Studio, and VB.NET is the language.
    (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.
    ------------------------


  5. #4
    BEDDOEDv's Avatar
    Joined
    Jul 2012
    Posts
    664
    Userbars
    3
    Thanks
    182
    Thanked
    109/53
    DL/UL
    106/0
    Mentioned
    32 times
    Time Online
    7d 10h 26m
    Avg. Time Online
    2m
    Quote Originally Posted by Infamous Joe View Post
    You need to create and design the full program using Visual Studio, and VB.NET is the language.

    i know, i must learn vb for sure!!!!!!
    i luv. i said i luv to hack


    Avatar Ss List (you need an account to see links)

  6. #5

    Joined
    Dec 2012
    Posts
    0
    Userbars
    0
    Thanks
    0
    Thanked
    3/3
    DL/UL
    16/0
    Mentioned
    Never
    Time Online
    2h 11m
    Avg. Time Online
    N/A
    Thank you!

  7. #6
    Dokeu's Avatar
    Joined
    Dec 2015
    Posts
    138
    Userbars
    7
    Thanks
    11
    Thanked
    10/10
    DL/UL
    62/0
    Mentioned
    8 times
    Time Online
    14d 15h 1m
    Avg. Time Online
    6m
    I need help to create my ab, with ur code, u can tell me what items need in my AB'? Labels txt box etc.. im new and im very interesed to programing,

  8. #7
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,077/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 5h 6m
    Avg. Time Online
    3h 13m
    Quote Originally Posted by Dokeu View Post
    I need help to create my ab, with ur code, u can tell me what items need in my AB'? Labels txt box etc.. im new and im very interesed to programing,
    You don't need any items on your form for it to be an autobuyer. You just need code that will perform the autobuyer process.


    Sent from my iPhone using Tapatalk
    (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.
    ------------------------


  9. #8
    Dokeu's Avatar
    Joined
    Dec 2015
    Posts
    138
    Userbars
    7
    Thanks
    11
    Thanked
    10/10
    DL/UL
    62/0
    Mentioned
    8 times
    Time Online
    14d 15h 1m
    Avg. Time Online
    6m
    Quote Originally Posted by Infamous Joe View Post
    You don't need any items on your form for it to be an autobuyer. You just need code that will perform the autobuyer process.


    Sent from my iPhone using Tapatalk
    I try to create a autobuyer with code, i copy and paste the code on my FORM, charge wrapper, and have many error, have any tutorial?? jajaj im very very very very newbie in create more programs (ONLY CAN CREATE AUTOCLICKS HAHAH) but i had more motivation to learn for programing neopets :B

  10. #9
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,077/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 5h 6m
    Avg. Time Online
    3h 13m
    Quote Originally Posted by Dokeu View Post
    I try to create a autobuyer with code, i copy and paste the code on my FORM, charge wrapper, and have many error, have any tutorial?? jajaj im very very very very newbie in create more programs (ONLY CAN CREATE AUTOCLICKS HAHAH) but i had more motivation to learn for programing neopets :B
    I recommend learning the basics before trying this.


    Sent from my iPhone using Tapatalk
    (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.
    ------------------------


Posting Permissions

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