Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post People that use...
10-26-2008 01:50 PM
by kiasyn
Last post by Jakious
Today 10:05 PM
23 Replies, 664 Views
Go to first new post Plastic Surgery Hell
Today 08:02 PM
by Li-Shun
Last post by .BloodyNightmare
Today 10:04 PM
10 Replies, 31 Views
Go to first new post Benita just got her...
Today 04:43 PM
Last post by Aethean
Today 10:00 PM
19 Replies, 107 Views
Go to first new post Price check + Selling a...
Today 09:59 PM
by 1x1
Last post by 1x1
Today 09:59 PM
0 Replies, 1 Views
Go to first new post Heather wants to kill a...
Today 06:49 PM
Last post by .BloodyNightmare
Today 09:58 PM
24 Replies, 84 Views
Reply
 
LinkBack Thread Tools Display Modes

 Money Grabber Source
Old 12-19-2006, 07:17 PM   #1 (permalink)
Æthean

Male Aethean is online now
 
Aethean's Avatar
 
Join Date: Nov 2006
Location: Ontario
Age: 18
Posts: 1,294
GPoints: 580
iTrader: 0 / 0%
Aethean Is Popular
Rep Power: 9
Money Grabber Source

Not commented.. have fun :P

Code:
Option Explicit

Dim strHTML As String
Dim strStock() As String
Dim strBuyLink() As String
Dim lngMissed As Long
Dim lngGrabbed As Long
Dim lngRefreshes As Long
Dim X As Integer

Private Declare Sub InitCommonControls Lib "comctl32.dll" ()

Private Sub cmdLogin_Click()
cmdLogin.Enabled = False
txtUser.Enabled = False
txtPass.Enabled = False
status.Panels(1).Text = "Logging in... (1/3)"
strHTML = wrapper.Request("GET", "http://www.neopets.com/loginpage.phtml", "http://www.neopets.com/index.phtml")
wrapper.Wait (Rand(250, 500))
status.Panels(1).Text = "Logging in... (2/3)"
strHTML = wrapper.Request("POST", "http://www.neopets.com/hi.phtml?destination=/petcentral.phtml&username=" & txtUser.Text, "http://www.neopets.com/loginpage.phtml")
wrapper.Wait (Rand(250, 500))
status.Panels(1).Text = "Logging in... (3/3)"
strHTML = wrapper.Request("POST", "http://www.neopets.com/login.phtml?username=" & txtUser.Text & "&password=" & txtPass.Text & "&destination=/petcentral.phtml", "http://www.neopets.com/hi.phtml")
    If InStrB(1, strHTML, "Location: /petcentral.phtml") Then
        status.Panels(1).Text = "Logged into " & txtUser.Text
        strHTML = wrapper.Request("GET", "http://neopets.com/petcentral.phtml", wrapper.LastPage)
        lblNp.Caption = GetBetween(strHTML, "NP : <a class=tl href=/objects.phtml?type=inventory>", "</a>")
        status.Panels(1).Text = "Idle"
        cmdLogout.Enabled = True
        cmdStart.Enabled = True
    Else
        status.Panels(1).Text = "Login error; try again"
        cmdLogin.Enabled = True
        txtUser.Enabled = True
        txtPass.Enabled = True
        wrapper.ClearCookies
    End If
End Sub

Private Sub cmdLogout_Click()
status.Panels(1).Text = "Logging out..."
cmdLogout.Enabled = False
cmdLogin.Enabled = True
cmdStart.Enabled = False
cmdStop.Enabled = False
lblNp.Caption = vbNullString
wrapper.ClearCookies
status.Panels(1).Text = "Logged out"
End Sub

Private Sub cmdStart_Click()
    If Len(txtMin.Text) = 0 Or Len(txtMax.Text) = 0 Then
        MsgBox "Enter in a value for the timings", vbCritical, "Error"
        Exit Sub
    End If
    
    If Len(txtAbove.Text) = 0 Then
        MsgBox "Enter in the ammount and above to grab", vbCritical, "Error"
        Exit Sub
    End If
    
    
lngRefreshes = 0
status.Panels(1).Text = "Starting soon..."
cmdStart.Enabled = False
cmdStop.Enabled = True
tmrGrab.Enabled = True
tmrGrab.Interval = Rand(txtMin.Text * 1000, txtMax.Text * 1000)
End Sub

Private Sub cmdStop_Click()
status.Panels(1).Text = "Stopping"
cmdStart.Enabled = True
cmdStop.Enabled = False
tmrGrab.Enabled = False
tmrGrab.Interval = 0
status.Panels(1).Text = "Stopped"
End Sub

Private Sub form_unload(cancel As Integer)
wrapper.ClearCookies
End
End Sub

Private Sub tmrGrab_Timer()
Dim lngSecLeft As Long

Erase strStock
Erase strBuyLink

If chkBreak.Value = vbChecked Then
    If lngRefreshes >= Val(txtBreak.Text) Then
        lngSecLeft = Rand(2000, 2300)
        Do Until lngSecLeft = 0
        status.Panels(1).Text = "Pausing for " & lngSecLeft & " seconds"
        lngSecLeft = lngSecLeft - 1
        wrapper.Wait (1000)
        Loop
        lngRefreshes = 0
        lngSecLeft = 0
        Exit Sub
    End If
End If

status.Panels(1).Text = "Refreshing..."
    strHTML = wrapper.Request("GET", "http://www.neopets.com/donations.phtml", wrapper.LastPage)
    lngRefreshes = lngRefreshes + 1
        Call MatchAll(strHTML, "border=1></a><br><b>", "</b><br>", strStock)
        Call MatchAll(strHTML, "<td width=120 align=center valign=top><a href='", "'>", strBuyLink)
        For X = 0 To UBound(strStock)
            If InStr(1, strStock(X), "NP") Then
            strStock(X) = Replace(strStock(X), " NP", vbNullString)
                If Val(strStock(X)) > Val(txtAbove.Text) Then
                    Call GrabItem
                    Exit Sub
                        Else
                    status.Panels(1).Text = "Idle"
                End If
            End If
        Next X
    status.Panels(1).Text = "Idle"
    tmrGrab.Interval = Rand(txtMin.Text * 1000, txtMax.Text * 1000)
End Sub

Public Function GrabItem()
status.Panels(1).Text = "Attempting to get " & strStock(X) & " NP..."
    strHTML = wrapper.Request("GET", "http://www.neopets.com/" & strBuyLink(X), "http://www.neopets.com/donations.phtml")
        If InStrB(1, strHTML, "we hope you enjoy your") Then
            status.Panels(1).Text = "Grabbed " & strStock(X) & " NP!"
            lngGrabbed = lngGrabbed + strStock(X)
            lblGrabbed.Caption = lngGrabbed
                
                If chkDeposit.Value = vbChecked Then
                    Call DepositNeopoints
                End If
                
                Else
            lngMissed = lngMissed + strStock(X)
            lblMissed.Caption = lngMissed
            status.Panels(1).Text = "Missed... Idle"
        End If
End Function

Public Function DepositNeopoints()
status.Panels(1).Text = "Depositing neopoints..."
    strHTML = wrapper.Request("GET", "http://www.neopets.com/bank.phtml", wrapper.LastPage)
        strHTML = wrapper.Request("POST", "http://www.neopets.com/process_bank.phtml?type=deposit&amount=" & strStock(X), "http://www.neopets.com/bank.phtml")
    status.Panels(1).Text = strStock(X) & " NP deposited; Idle"
End Function

Private Sub Form_Initialize()
Call InitCommonControls
End Sub

Private Sub TrayWrapper1_DoubleClick()
    'alert on double click
    'MsgBox "User Double Clicked Icon"
    
    If Me.WindowState = vbMinimized Then 'form is minimized, bring it back
        Me.WindowState = vbNormal
        Me.Visible = True
        Me.ZOrder vbBringToFront
        TrayWrapper1.Hide
    End If
End Sub

Private Sub Form_Resize()
    If Me.WindowState = vbMinimized Then 'they minimized the form
        Me.Visible = False
        TrayWrapper1.Show
    End If
End Sub
  Reply With Quote

 Re: Money Grabber Source
Old 12-19-2006, 07:18 PM   #2 (permalink)
Ryan
Guest

 
Posts: n/a
GPoints: 0 [Check]
iTrader: / %
Rep Power:
Re: Money Grabber Source

Nice job. ;D +rep. =o
  Reply With Quote

 Re: Money Grabber Source
Old 12-19-2006, 07:20 PM   #3 (permalink)
Kane for mod!

Male Flame is offline
 
Join Date: Sep 2006
Posts: 1,530
GPoints: 54
iTrader: 1 / 100%
Flame Is Recognizable
Rep Power: 9
Re: Money Grabber Source

nice o.o stupid ripperwrapper
__________________
[center]
  Reply With Quote

 Re: Money Grabber Source
Old 12-19-2006, 07:22 PM   #4 (permalink)
Æthean

Male Aethean is online now
 
Aethean's Avatar
 
Join Date: Nov 2006
Location: Ontario
Age: 18
Posts: 1,294
GPoints: 580
iTrader: 0 / 0%
Aethean Is Popular
Rep Power: 9
Re: Money Grabber Source

Stupid ripperwrapper? i find it better than gluraks... and faster too lol
  Reply With Quote

 Re: Money Grabber Source
Old 12-19-2006, 07:23 PM   #5 (permalink)
Kane for mod!

Male Flame is offline
 
Join Date: Sep 2006
Posts: 1,530
GPoints: 54
iTrader: 1 / 100%
Flame Is Recognizable
Rep Power: 9
Re: Money Grabber Source

so silly xD, personal choice
__________________
[center]
  Reply With Quote

 Re: Money Grabber Source
Old 12-19-2006, 07:25 PM   #6 (permalink)
Æthean

Male Aethean is online now
 
Aethean's Avatar
 
Join Date: Nov 2006
Location: Ontario
Age: 18
Posts: 1,294
GPoints: 580
iTrader: 0 / 0%
Aethean Is Popular
Rep Power: 9
Re: Money Grabber Source

Oooooohhh.. I use to use gluraks httpwrapper.. but i didnt really like the

"http://www.neopets.com/login.php", "username=sdfsdf", wrapper.lastpage)

better in just 1 line i thinks :P

although tData kicks ass xD
  Reply With Quote

 Re: Money Grabber Source
Old 12-19-2006, 07:26 PM   #7 (permalink)
Ryan
Guest

 
Posts: n/a
GPoints: 0 [Check]
iTrader: / %
Rep Power:
Re: Money Grabber Source

-wishes I knew how to program -_- -
  Reply With Quote

 Re: Money Grabber Source
Old 12-19-2006, 07:26 PM   #8 (permalink)
Kane for mod!

Male Flame is offline
 
Join Date: Sep 2006
Posts: 1,530
GPoints: 54
iTrader: 1 / 100%
Flame Is Recognizable
Rep Power: 9
Re: Money Grabber Source

for only $25 ill teach you xDDD. Nah if you need help hit me up on msn ryan
__________________
[center]
  Reply With Quote

 Re: Money Grabber Source
Old 12-20-2006, 07:57 AM   #9 (permalink)
Underground

Male gommle is offline
 
gommle's Avatar
 
Join Date: Sep 2006
Location: The o great land of Nooooooreeeway
Age: 20
Posts: 658
GPoints: 38
iTrader: 0 / 0%
gommle Is Recognizable
Rep Power: 7
Re: Money Grabber Source

VB code looks so incredibly messy, not to mention the incredibly long function names :P
__________________

  Reply With Quote

 Re: Money Grabber Source
Old 12-20-2006, 08:05 AM   #10 (permalink)
Ryan
Guest

 
Posts: n/a
GPoints: 0 [Check]
iTrader: / %
Rep Power:
Re: Money Grabber Source

Gommle, are you contributing this sorta thing..NO. -_-
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 10:06 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.13205099 seconds (100.00% PHP - 0% MySQL) with 19 queries