Can anyone tell me how to format the text so that it highlights for visual basic? And if you guys want anything that isnt commented to be commented, then just post and I will. Also, recently neopets has changed some of its code so i would test this before fully adding any of this code you your project. Lastly, most of the functions are ricky's functions found in his module. If you guys need that posted I can add that or you can pm him probably. Login: I had this right in my wrapper so you may need to change some of this. Code (Text): Public Function Login(ByRef Pass As String, ByRef User As String) As Boolean 'frmMain.lblStatus.Text = "Logging in." Dim strHTML As String strHTML = Req("Post", "www.neopets.com/login.phtml?username=" & User & "&password=" & Pass & "&destination=%2Fpetcentral.phtml", "http://www.neopets.com/hi.phtml") If InStr(strHTML, "badpassword") <> 0 Then MsgBox("You entered an invalid username/password combination!" & vbNewLine & "Please try again.", vbCritical, "Login Failure") Login = False 'Check if account is frozen. ElseIf InStr(strHTML, "This account has been") <> 0 Then MsgBox("ACCOUNT FROZEN!" & vbNewLine & "Please use another.", vbCritical, "Login Failure") Login = False 'Check if we tried to login to many times. ElseIf InStr(strHTML, "too many times") <> 0 Then MsgBox("You have tried to guess the password to many times in the last hour!" & vbNewLine & "Try again later.", vbCritical, "Login Failure") 'If we passed all of the above, then we're logged in. Login = False Else Login = True Exit Function End If End Function Stuff For Restocking: Code (Text): Private Sub After() strHTML = w.Req("Get", "http://www.neopets.com/objects.phtml?type=inventory", "") Dim stuffs() As String stuffs = rickysModule.MatchAll(strHTML, "onclick=" & Chr(34) & "openwin(", ")") If stuffs(0) = "" Then SetText(lbPLog, Now & " - Error in After Buy.") Exit Sub End If w.Req("Get", "http://www.neopets.com/iteminfo.phtml?obj_id=" & stuffs(UBound(stuffs)), "http://www.neopets.com/objects.phtml?type=inventory") If rbStock.Checked = True Then w.Req("Post", "http://www.neopets.com/useobject.phtml?obj_id=" & stuffs(UBound(stuffs)) & "&action=stockshop", "http://www.neopets.com/iteminfo.phtml") SetText(lbPLog, Now & " - Item stocked in shop.") ElseIf rbDeposit.Checked = True Then w.Req("Post", "http://www.neopets.com/useobject.phtml?obj_id=" & stuffs(UBound(stuffs)) & "&action=safetydeposit", "http://www.neopets.com/iteminfo.phtml") SetText(lbPLog, Now & " - Item deposited in SDB.") ElseIf rbGallery.Checked = True Then w.Req("Post", "http://www.neopets.com/useobject.phtml?obj_id=" & stuffs(UBound(stuffs)) & "&action=stockgallery", "http://www.neopets.com/iteminfo.phtml") SetText(lbPLog, Now & " - Item placed in gallery.") ElseIf rbNeoFriend.Checked = True Then w.Req("Post", "http://www.neopets.com/useobject.phtml?obj_id=" & stuffs(UBound(stuffs)) & "&action=give", "http://www.neopets.com/iteminfo.phtml") w.Req("Post", "http://www.neopets.com/useobject.phtml?obj_id=" & stuffs(UBound(stuffs)) & "&action=&or_name=" & txtNeofriend.Text, "http://www.neopets.com/useobject.phtml") SetText(lbPLog, Now & " - Item given to Neofriend.") Else SetText(lbPLog, Now & " - After buy messed up.") End If End Sub OCR: Basically ricky's ocr with some parts taken out. Just thought I should include it. Code (Text): Public Function ONRScan(ByRef picBox As PictureBox) As Point Dim neopetPicture As Bitmap = DirectCast(picBox.Image, Bitmap) Dim now As Integer = DateTime.Now.Millisecond Dim width As Integer = neopetPicture.Width, height As Integer = neopetPicture.Height Dim unPixel As Color = Color.White Dim darkPixel As Color = Color.White For a As Integer = 0 To height - 1 Step 10 For b As Integer = 0 To width - 1 Step 10 unPixel = neopetPicture.GetPixel(b, a) If unPixel.GetBrightness() < darkPixel.GetBrightness() Then darkPixel = unPixel ONRScan.X = b ONRScan.Y = a End If Next Next 'Dim fin As Integer = DateTime.Now.Millisecond 'MessageBox.Show("The neopet is at :" + ONRScan.X.ToString() + ", " + ONRScan.Y.ToString() + " and was found in " + (fin - now).ToString() + " ms.") 'For p As Integer = 0 To width - 2 ' neopetPicture.SetPixel(p, ONRScan.Y, Color.White) 'Next 'For k As Integer = 0 To height - 2 ' neopetPicture.SetPixel(ONRScan.X, k, Color.White) 'Next 'picBox.Image = neopetPicture End Function Auto Buy Function with Addons Built in: Addons were: Rsban Checker Timed Buy/Timed Wait Checks login every 20 refreshes. Code (Text): 'Auto buying function Public Sub AutoBuy() If chkShopBanned.Checked = True Then Dim banned As Boolean = False Do While banned = False strHTML = w.Req("Get", "http://neopets.com/objects.phtml?type=shop&obj_type=21", "") If strHTML.Contains("Sorry, we are sold out of everything!") Then SetText(lbPLog, Now & " - RS Banned. Check again in " & txtBannedCheck.Text & " Minutes") For i As Integer = 1 To (txtBannedCheck.Text * 60) Thread.Sleep(1000) If cmdStart.Text = "Start" Then i = (txtBannedCheck.Text * 60) End If Next Else SetText(lbPLog, Now & " - Not RS Banned. Check again in " & txtBannedCheck.Text & " Minutes") banned = True End If Loop waitTimeSecond = Now.AddMinutes(txtRun.Text) End If If chkRunandPause.Checked = True Then rsTimeSecond = Now.AddMinutes(txtBannedCheck.Text) SetText(lbPLog, Now & " - Running Program for " & txtRun.Text & " Minutes") End If Do While cmdStart.Text = "Stop" Dim pol As Point Dim Items() As String Dim Links() As String Dim Prices() As String Dim Bought As Boolean = False strHTML = w.Req("GET", "http://www.neopets.com/objects.phtml?type=shop&obj_type=" & CStr(txtShop.Text), "") 'If there are items in the shop, checks to see what items are there If strHTML.Contains("Are you sure you wish to purchase") Then Items = rickysModule.MatchAll(strHTML, "Are you sure you wish to purchase ", " at ") Links = rickysModule.MatchAll(strHTML, "onClick=" & Chr(34) & "this.href='haggle.phtml?ob'+'j", "'") Prices = rickysModule.MatchAll(strHTML, "in stock<BR>Cost: ", " ") Dim i As Short = 0 Do Until i = lbItemWanted.Items.Count For p As Short = 0 To UBound(Items) If Items(p).Equals(lbItemWanted.Items.Item(i)) Then strHTML = w.Req("Get", "http://www.neopets.com/haggle.phtml?obj" & Links(p), "http://www.neopets.com/objects.phtml?type=shop&obj_type=" & txtShop.Text) If InStr(1, strHTML, " is SOLD OUT!") <> 0 Then 'lstLog.AddItem(Time & " - Missed " & lstItemsPage.List(x) & ". Item Sold out.") Else xPic.Image = w.DownloadJPG("http://www.neopets.com/captcha_show.phtml?_x_pwned=" & rickysModule.GetBetween(strHTML, "/captcha_show.phtml?_x_pwned=", ChrW(34)), "") pol = w.ONRScan(xPic) SetText(lbAll, Now & " - Attempting to Buy " & Items(p)) SetText(lbAttempt, Now & " - Attempting to Buy " & Items(p)) strHTML = w.Req("POST", "http://www.neopets.com/haggle.phtml?current_offer=" & CInt(System.Math.Round(Prices(p) * txtHaggle.Text * 0.01, 0)) & "&x=" & CStr(pol.X) & "&y=" & CStr(pol.Y), "http://www.neopets.com/haggle.phtml?obj" & Links(p)) If InStr(1, strHTML, "has been added to your inventory") <> 0 Then 'Logs SetText(lbAll, Now & " - Bought " & Items(p) & " for " & System.Math.Round(Prices(p) * txtHaggle.Text * 0.01, 0)) SetText(lbBought, Now & " - Bought " & Items(p) & " for " & System.Math.Round(Prices(p) * txtHaggle.Text * 0.01, 0)) SetText(tsAttemp, tsAttemp.Text + 1) SetText(tsBought, tsBought.Text + 1) SetText(tsSpent, tsSpent.Text + CInt(System.Math.Round(Prices(p) * txtHaggle.Text * 0.01, 0))) SetText(lbPLog, Now & " - Waiting 6000 miliseconds") 'Add Deposit, Stock etc stuff here. If Not rbNothing.Checked = True Then Call After() End If 'Sleeps Thread.Sleep(5200) Bought = True Exit Do ElseIf InStr(1, strHTML, "SOLD OUT!") <> 0 Then AttMiss(Items, p) ElseIf InStr(1, strHTML, "You don't have that kind of money") <> 0 Then AttMiss(Items, p, "Not Enough NP") SetText(lbPLog, Now & " - Withdrawing " & txtAmountWith.Text & " Neopoints.") w.Req("Get", "http://www.neopets.com/bank.phtml", "") If chkPIN.Checked = False Then w.Req("Post", "http://www.neopets.com/process_bank.phtml?type=withdraw&amount=" & txtAmountWith.Text, "http://www.neopets.com/bank.phtml") Else w.Req("Post", "http://www.neopets.com/process_bank.phtml?type=withdraw&amount=" & txtAmountWith.Text & "&pin=" & txtPIN.Text, "http://www.neopets.com/bank.phtml") End If ElseIf InStr(1, strHTML, "You must select the correct pet") <> 0 Then AttMiss(Items, p, "Wrong Pet") ElseIf InStr(1, strHTML, "Your Current Offer</b> : ") <> 0 Then AttMiss(Items, p, "Offer To Low") ElseIf InStr(1, strHTML, "Sorry, you can only carry") <> 0 Then AttMiss(Items, p, "To many items") Else 'Error Section SetText(lbPLog, Now & " : Error Unknown.") End If End If 'Leaves the loop Exit Do End If Next i = i + 1 Loop End If If Bought = False Then 'Wait Time Dim mili As Short mili = rickysModule.MakeRandom(txtMin.Text * 1000, txtMax.Text * 1000) SetText(lbPLog, Now & " - Waiting " & mili & " miliseconds") Thread.Sleep(mili) LoginCheck += 1 'Login Check If LoginCheck >= 20 And strHTML.Contains("Login to Neopets!") Then w.Login(txtPass.Text, txtUser.Text) SetText(lbPLog, Now & " - Logged back in to Neopets") LoginCheck = 0 ElseIf LoginCheck >= 20 Then SetText(lbPLog, Now & " - Currently Logged into Neopets") LoginCheck = 0 End If End If If chkShopBanned.Checked = True And Now > rsTimeSecond Then strHTML = w.Req("Get", "http://neopets.com/objects.phtml?type=shop&obj_type=21", "") If strHTML.Contains("Sorry, we are sold out of everything!") Then SetText(lbPLog, Now & " - RS Banned. Check again in " & txtBannedCheck.Text & " Minutes") For i As Integer = 1 To (txtBannedCheck.Text * 60) Thread.Sleep(1000) If cmdStart.Text = "Start" Then i = (txtBannedCheck.Text * 60) End If Next Else SetText(lbPLog, Now & " - Not RS Banned. Check again in " & txtBannedCheck.Text & " Minutes") End If rsTimeSecond = Now.AddMinutes(txtBannedCheck.Text) End If If chkRunandPause.Checked = True And Now > waitTimeSecond Then SetText(lbPLog, Now & " - Pausing Program for " & txtPause.Text & " Minutes") For i As Integer = 1 To (txtPause.Text * 60) Thread.Sleep(1000) If cmdStart.Text = "Start" Then i = (txtPause.Text * 60) End If Next SetText(lbPLog, Now & " - Running Program for " & txtRun.Text & " Minutes") waitTimeSecond = Now.AddMinutes(txtRun.Text) rsTimeSecond = Now.AddMinutes(txtBannedCheck.Text) End If Loop SetText(lbPLog, Now & " - Program Stopped") SetText(lbStatus, "Stopped") End Sub Friend Finder Source: Contains 3 Functions: 1)Find 2)Friend Request 3)Auction Check - Checks friends and finds neofriend only auctions to steal their items Code (Text): Private Sub Fird() Dim y As Long y = 0 Call SetTextL(lblFFStatus, "Grabbing Names from Avatar Board") 'href="/randomfriend.phtml?user=, " For x As Integer = 0 To 20 strHTML = w.Req("Get", "http://neopets.com/neoboards/boardlist.phtml?board=21&next=" & y, "") Call Extract(lbFFList) y = y + 41 Wait(300) Next y = 0 Call SetTextL(lblFFStatus, "Grabbing Names from Stock Board") For x As Integer = 0 To 20 strHTML = w.Req("Get", "http://neopets.com/neoboards/boardlist.phtml?board=12&next=" & y, "") Call Extract(lbFFList) y = y + 41 Wait(300) Next y = 0 Call SetTextL(lblFFStatus, "Grabbing Names from Auctions") For x As Integer = 0 To 20 strHTML = w.Req("Get", "http://neopets.com/auctions.phtml?auction_counter=" & y, "") Call Extract(lbFFList) y = y + 20 Wait(300) Next y = 0 'Call SetTextL(lblFFStatus, "Removing Dupes") 'rickysModule.RemoveDupes(lbFFList) Call SetTextL(lblFFStatus, "Done, Grabbed " & lbFFList.Items.Count & " Names") 'cmdFFStart.Text = "Start" Me.Frd.Suspend() End Sub Public Sub FrRequest() For i As Integer = 0 To lbFRList.Items.Count - 1 strHTML = w.Req("Get", "http://www.neopets.com/neofriend_requests.phtml", "") strHTML = w.Req("Post", "http://www.neopets.com/process_neofriend_requests.phtml?_ref_ck=" & rickysModule.GetBetween(strHTML, "name='_ref_ck' value='", "'") & "&neofriend_add=" & lbFRList.Items.Item(i) & "++&dowhat=add_single_neofriend", "http://neopets.com/neofriend_requests.phtml") If strHTML.Contains("Not receiving Neofriend requests") Then SetText(lbFrLog, lbFRList.Items.Item(i) & " is not accepting requests.") Else SetText(lbFrLog, lbFRList.Items.Item(i) & " added as Friend.") End If Wait(txtSpeed.Text) Next SetText(lbFrLog, Now & " - Program Finished.") End Sub Private Sub PowerAuction() 'Gets Info Dim strUserNames() As String Dim strAccepted() As String Dim bolPowerStarter As Boolean = True Dim intPlacement As Integer = 0 Do Until bolPowerStarter = False strHTML = w.Req("Get", "http://neopets.com/**********.phtml?view=all&search=&range=&page=" & intPlacement, "") strUserNames = rickysModule.MatchAll(strHTML, "<a href='randomfriend.phtml?randomfriend=", "'") strAccepted = rickysModule.MatchAll(strHTML, "size=1>", "<") 'Makes the list Dim i As Integer For i = 0 To UBound(strUserNames) SetText(ListBox1, strAccepted(i)) If strAccepted(i) = "Accepted!" Then strHTML = w.Req("Get", "http://neopets.com/genie.phtml?type=find_user&auction_username=" & strUserNames(i), "") If strHTML.Contains("auctions.phtml?type=bids&auction_id=") = True Then Dim Items() As String Dim Links() As String Links = rickysModule.MatchAll(strHTML, "auctions.phtml?type=bids&auction_id=", Chr(34)) Dim x As Integer For x = 0 To UBound(Links) Items(x) = rickysModule.GetBetween(strHTML, "auctions.phtml?type=bids&auction_id=" & Chr(34) & Items(x), "<") 'ListBox1.Items.Add(Items(x) & " - " & "http://www.neopets.com/auctions.phtml?type=bids&auction_id=" & Links(x)) SetText(ListBox1, Items(x) & " - " & "http://www.neopets.com/auctions.phtml?type=bids&auction_id=" & Links(x)) Next Else SetText(ListBox1, strUserNames(i) & " has no auctions.") End If End If Wait(txtAFSpeed.Text) Next intPlacement = intPlacement + 1 If strHTML.Contains("Next") = False Then bolPowerStarter = False End If Wait(txtAFSpeed.Text) Loop End Sub Money Tree Source: Unfinished if I remember correctly Features:Grabs NP, Grabs Items, Grabs *contains Code (Text): Private Sub TreeSub(ByRef username As String, ByRef password As String, Optional ByRef proxy As String = "") Dim time As Double ' Used to get a random time Dim Yes As Boolean = False ' used for login Dim activate As Boolean = True ' used to make sure login is correct Dim Bought As Byte = 0 ' used to keep track of how many item grab the user gets w.ClearCookies() If Not proxy = "" Then w.UseProxy(rickysModule.ParseLeft(proxy, ":"), rickysModule.ParseRight(proxy, ":")) Else w.NoProxy() End If Yes = w.Login(txtUser.Text, txtPass.Text) If Yes = True Then SetText(lbLog, "Logged in account " & username) strHTML = w.Req("GET", "http://www.neopets.com/index.phtml", "") activate = True Else SetText(lbLog, "Problem Loggin in Account " & username) activate = False End If Do While cmdStart.Text = "Stop" And activate = True strHTML = w.Req("Get", "http://www.neopets.com/donations.phtml", "") If strHTML.Contains("<BR>(donated by") Then 'Retrives all the data about the page, links, np and who donated Dim Links() As String = rickysModule.MatchAll(strHTML, "<a href='takedonation_new.phtml?donation_id=", "'") Dim Items() As String = rickysModule.MatchAll(strHTML, "<br><b>", "</b><br>") Dim i As Short Do While i < lbList.Items.Count - 1 For x As Short = 0 To UBound(Items) - 1 If lbList.Items.Item(i).Equals(Items(x)) Then strHTML = w.Req("Get", "http://www.neopets.com/takedonation_new.phtml?donation_id=" & Links(x), "http://neopets.com/donations.phtml") 'logs you got or missed it, also if there is something messed up ends the grabbing toolAttempts.Text += 1 If strHTML.Contains("You got it!") Then lbLog.Items.Add(Now & " : Grabbed " & Items(x)) toolGrabbed.Text += 1 Bought += 1 ElseIf InStr(1, strHTML, "Oops") <> 0 Then lbLog.Items.Add(Now & " : Missed " & Items(x)) toolMissed.Text += 1 End If ElseIf lbList.Items.Item(i).ToString.Contains("*") And Items(x).Contains(lbList.Items.Item(i).ToString.Substring(0, lbList.Items.Item(i).ToString.Length - 1)) Then strHTML = w.Req("Get", "http://www.neopets.com/takedonation_new.phtml?donation_id=" & Links(x), "http://neopets.com/donations.phtml") 'logs you got or missed it, also if there is something messed up ends the grabbing toolAttempts.Text += 1 If strHTML.Contains("You got it!") Then lbLog.Items.Add(Now & " : Grabbed " & Items(x)) toolGrabbed.Text += 1 Bought += 1 ElseIf InStr(1, strHTML, "Oops") <> 0 Then lbLog.Items.Add(Now & " : Missed " & Items(x)) toolMissed.Text += 1 End If ElseIf Items(x).Contains(" NP") And rickysModule.GetBetween(Items(x), "", " NP") >= txtNPMin.Text Then strHTML = w.Req("Get", "http://www.neopets.com/takedonation_new.phtml?donation_id=" & Links(x), "http://neopets.com/donations.phtml") 'logs you got or missed it, also if there is something messed up ends the grabbing toolAttempts.Text += 1 If strHTML.Contains("You got it!") Then lbLog.Items.Add(Now & " : Grabbed " & Items(x)) toolGrabbed.Text += 1 Bought += 1 ElseIf InStr(1, strHTML, "Oops") <> 0 Then lbLog.Items.Add(Now & " : Missed " & Items(x)) toolMissed.Text += 1 End If End If Next Loop i += 1 End If time = rickysModule.MakeRandom(txtMin.Text * 1000, txtMax.Text * 1000) SetText(lbLog, Now & " - Refreshed for " & time & " secs.") Thread.Sleep(time) If Bought >= 10 Then Exit Sub End If Loop End Sub Enjoy.