Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Copy and paste this entire message into Notepad.
- 'Change ShouldBeSeen from "True" to "False" to run in the background ("silently", although it still makes noise).
- 'pmax is the maximum size of the Places array.
- ' CONFIG OPTIONS START
- ShouldBeSeen = True
- pmax = 17
- max = 1000 ' Maximum user IDs
- ' CONFIG OPTIONS END
- 'Click on File > Save As...
- 'Click Desktop, then name it autoFR.vbs
- 'In the drop-down box labeled "File Type", select "All Files (*.*)".
- 'Double-click the file to run.
- 'To end the script early:
- 'a) close Internet Explorer
- 'b) hit Ctrl-Alt-Delete, then in Task Manager, go to Processes, click on wscript.exe (helps to sort by name),
- ' and click End Process. Then, terminate any iexplore.exe that it may have left behind.
- '
- '######### NO TECH SUPPORT WILL BE PROVIDED FOR THIS ##########
- 'The right to make exceptions is reserved.
- Dim objIE
- Dim objIE2 ' Multiple IE objects are used for pseudo-threading.
- Dim objIE3
- Dim objHTTP
- Dim PlaceIDs()
- Dim UserIDs()
- Dim a
- Dim b
- ' TASK: Get list of running games
- Set objHTTP = CreateObject("Msxml2.ServerXMLHTTP")
- objHTTP.Open "GET", "http://www.roblox.com/Games.aspx", False
- objHTTP.Send
- Tex = CStr(objHTTP.ResponseText)
- ReDim PlaceIDs(pmax)
- pind = 0
- position = InStr(Tex, "-item?id=")
- Do While True
- id = Split(Mid(Tex, position+9, 16), """")(0)
- PlaceIDs(pind) = id
- pind = pind + 1
- position = InStr(position+10,Tex,"-item?id=")
- If position = 0 Then
- Exit Do
- End If
- If pind = pmax Then
- pmax = pmax + 4
- ReDim Preserve PlaceIDs(pmax)
- End If
- Loop
- pmax = pind
- Tex = ""
- Set objHTTP = Nothing
- ' TASK: Load each place, in Internet Explorer (so that we have javascript)
- ' Only use the first IE object for now; this part goes quick anyways
- Set objIE = CreateObject("InternetExplorer.application")
- objIE.Visible = ShouldBeSeen
- pind = 0
- uind = 0
- ReDim UserIDs(max)
- Do Until pind = pmax
- If Rnd() < .3 Then
- WaitIE1
- objIE.Navigate "http://www.roblox.com/a-item?id=" & PlaceIDs(pind)
- WaitIE1
- objIE.Navigate "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(""ctl00$cphRoblox$TabbedInfo$GamesTab$LoadGamesButton"", """", true, """", """", false, true))"
- WaitIE1
- If isObject(objIE) Then 'Hacky crash fix
- page = 1
- WaitIE1
- WScript.sleep 300
- Tex = CStr(objIE.Document.Body.innerhtml)
- position = InStr(Tex, "/User.aspx?ID=")
- ' TASK: Capture the User IDs
- Do Until position = 0
- id = Split(Mid(Tex, position+14, 20), """")(0)
- UserIDs(uind) = id 'store it
- uind = uind + 1
- If uind = max Then 'expand array
- max = max + 250
- ReDim Preserve UserIDs(max)
- End If
- position = InStr(position+1, Tex, "/User.aspx?ID=")
- Loop
- 'next page
- objIE.Navigate "javascript:__doPostBack('ctl00$cphRoblox$TabbedInfo$GamesTab$RunningGamesDataPager_Footer$ctl01$ctl0" & page & "','')"
- WaitIE1
- ' Wait for the page to completely load
- Do While Not isObject(objIE.Document)
- Wscript.sleep 500
- Loop
- Tex = CStr(objIE.Document.Body.innerhtml)
- position = InStr(Tex, "/User.aspx?ID=")
- 'Get the user IDs
- Do Until position = 0
- id = Split(Mid(Tex, position+14, 20), """")(0)
- UserIDs(uind) = id 'store it
- uind = uind + 1
- If uind = max Then 'expand array
- max = max + 250
- ReDim Preserve UserIDs(max)
- End If
- position = InStr(position+1, Tex, "/User.aspx?ID=")
- Loop
- objIE.Navigate "javascript:__doPostBack('ctl00$cphRoblox$TabbedInfo$GamesTab$RunningGamesDataPager_Footer$ctl01$ctl0" & page & "','')"
- WaitIE1
- Tex = CStr(objIE.Document.Body.innerhtml)
- position = InStr(Tex, "/User.aspx?ID=")
- 'Capture user IDs
- Do Until position = 0
- id = Split(Mid(Tex, position+14, 20), """")(0)
- UserIDs(uind) = id 'store it
- uind = uind + 1
- If uind = max Then 'expand array
- max = max + 250
- ReDim Preserve UserIDs(max)
- End If
- position = InStr(position+1, Tex, "/User.aspx?ID=")
- Loop
- Else 'Corresponds to "Hacky Crash Fix"
- Set objIE = CreateObject("InternetExplorer.application")
- End If
- pind = pind + 1
- End If
- Loop
- ' Dump extra memory and quit IE
- ReDim Preserve UserIDs(uind-1)
- WaitIE1
- objIE.Quit
- 'Create our new IE objects. This is the pseudothreading part, since sending friend requests takes a while.
- Set objIE = CreateObject("InternetExplorer.application")
- objIE.Visible = ShouldBeSeen
- Set objIE2 = CreateObject("InternetExplorer.application")
- objIE2.Visible = ShouldBeSeen
- Set objIE3 = CreateObject("InternetExplorer.application")
- objIE3.Visible = ShouldBeSeen
- EnsureLoggedIn 'cause we don't want to get errors EVERY time...
- 'Send Friend Requests
- uind2 = 0
- Do Until uind2 = uind
- objIE.Navigate "http://www.roblox.com/My/FriendInvitation.aspx?RecipientID=" & UserIDs(uind2)
- objIE2.Navigate "http://www.roblox.com/My/FriendInvitation.aspx?RecipientID=" & UserIDs(uind2+1)
- objIE3.Navigate "http://www.roblox.com/My/FriendInvitation.aspx?RecipientID=" & UserIDs(uind2+2)
- Do While objIE.Busy
- WScript.sleep 300
- Loop
- Do While objIE2.Busy
- WScript.sleep 100
- Loop
- Do While objIE3.Busy
- WScript.sleep 100
- Loop
- objIE.Navigate "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(""ctl00$cphRoblox$lbSend"", """", true, """", """", false, true))"
- objIE2.Navigate "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(""ctl00$cphRoblox$lbSend"", """", true, """", """", false, true))"
- objIE3.Navigate "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(""ctl00$cphRoblox$lbSend"", """", true, """", """", false, true))"
- Do While objIE.Busy
- WScript.sleep 100
- Loop
- Do While objIE2.Busy
- WScript.sleep 100
- Loop
- Do While objIE3.Busy
- WScript.sleep 100
- Loop
- uind2 = uind2 + 3
- Loop
- 'we're done here. bah-bye.
- objIE.Quit
- objIE2.Quit
- objIE3.Quit
- MsgBox("FINISHED")
- WScript.quit
- Sub WaitIE1()
- Do While objIE.Busy
- WScript.sleep 200
- Loop
- End Sub
- Sub EnsureLoggedIn()
- notlogged = True
- Do While notlogged
- objIE.Navigate "http://www.roblox.com/My/Home.aspx"
- Do While objIE.Busy
- WScript.sleep 200
- Loop
- If objIE.LocationURL <> "http://www.roblox.com/My/Home.aspx" Then
- Login
- Else
- notlogged = False
- End If
- Loop
- End Sub
- Sub Login()
- 'WARNING: DON'T CALL THIS WITHOUT objIE EXISTING!
- objIE.Navigate "https://www.roblox.com/Login/Default.aspx"
- objIE.Visible = True
- Wscript.sleep 500
- MsgBox("Please login. Close this box after logging in.")
- objIE.Visible = ShouldBeSeen
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement