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 Heather wants to kill a...
Today 06:49 PM
Last post by Ruzzeh
Today 07:07 PM
3 Replies, 4 Views
Go to first new post Gaia Online.
Today 08:48 AM
by ~Bloo~
Last post by Phail-kun
Today 07:06 PM
1 Replies, 7 Views
Go to first new post Li Luv's you <3
Yesterday 05:38 AM
by Li-Shun
Last post by Li-Shun
Today 07:06 PM
45 Replies, 243 Views
Go to first new post If you had one day to...
11-03-2008 05:09 AM
Last post by Phail-kun
Today 07:03 PM
37 Replies, 635 Views
Go to first new post [CQ] Ich Weiss
11-18-2008 02:36 PM
Last post by sidespin
Today 07:03 PM
1 Replies, 15 Views
Reply
 
LinkBack Thread Tools Display Modes

 MTG Source [vb6]
Old 04-27-2007, 10:02 PM   #1 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
Rep Power: 0
MTG Source [vb6]

an mtger. Neopoint only btw. Learn from it, dont rip.
Thanks to rcad.
PHP Code:
Option Explicit
Private Type Item 
    Amount 
As Long
    OrigID 
As Long
End Type
Dim lngPrev 
As Long
Dim strStock
() As String
Private Sub cmdLogin_Click()
    
Dim strHTML As String
        cmdLogin
.Enabled False
        strHTML 
HTTP.GetWrapper("http://neopets.com/")
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 1"
        
strHTML HTTP.GetWrapper("http://neopets.com/loginpage.phtml""http://neopets.com/")
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 2"
        
strHTML HTTP.GetWrapper("http://neopets.com/hi.phtml?destination=%2Fpetcentral.phtml&username=" txtUsername.Text"http://neopets.com/loginpage.phtml")
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 3"
        
strHTML HTTP.GetWrapper("http://neopets.com/login.phtml?username=" txtUsername.Text "&password=" txtPassword.Text "&destination=%2Fpetcentral.phtml""http://neopets.com/hi.phtml?destination=%2Fpetcentral.phtml&username=" txtUsername.Text)
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 4"
        
If InStr(1LCase(strHTML), "location: /petcentral.phtml") <> Or InStr(1LCase(strHTML), "pass_remind") <> 0 Then
            stbStatus
.Panels(1).Text "Status: " "Login Successful!"
            
MsgBox "Login Successful!"
            
txtUsername.Enabled False
            txtPassword
.Enabled False
            stbStatus
.Panels(1).Text "Status: " "Logged in as " txtUsername.Text
        
ElseIf InStr(1LCase(strHTML), "frozen") <> 0 Then
            cmdLogin
.Enabled True
            MsgBox 
"This account is frozen!"
            
stbStatus.Panels(1).Text "Status: " "Account Frozen!"
        
Else
            
cmdLogin.Enabled True
            MsgBox 
"Invalid user/password combination!"
            
stbStatus.Panels(1).Text "Status: " "Invalid user/pass combination!"
End If
End Sub
Private Sub cmdStart_Click()
    
'set the interval nub
    lstLog.AddItem (Time & ": MTG STARTED!")
    tmrRef.Interval = RcadModule.Rand(500, 1000)
    tmrRef.Enabled = True
    stbStatus.Panels(1).Text = "Status: Checking the tree."
End Sub
Private Sub cmdStop_Click()
    lstLog.AddItem (Time & ": MTG STOPED!")
    tmrRef.Enabled = False
    tmrRef.Interval = RcadModule.Rand(500, 1000)
    stbStatus.Panels(1).Text = "Status: stopped."
End Sub

Private Sub tmrRef_Timer()
 Dim strHTML As String
    Dim i As Long
    Dim itmItem() As Item
    Dim lngCount As Long: lngCount = 0
    Dim lngHighest As Long: lngHighest = 0
    Dim lngID As Long
        Erase strStock()
        lstNP.Clear
        strHTML = HTTP.GetWrapper("http://www.neopets.com/donations.phtml", HTTP.LastPage)
        lngPrev = Replace(Extract(strHTML, "NP : <a class=tl href=/objects.phtml?type=inventory>", "</a>"), ",", "")
        If InStr(1, strHTML, "<br>(donated by ") <> 0 Then
            Call RcadModule.ExtractAll(strHTML, "border=1></a><br><b>", "</b><br>", strStock())
            For i = LBound(strStock) To UBound(strStock)
                lstNP.AddItem strStock(i)
            Next
            ReDim Preserve itmItem(lstNP.ListCount) As Item
            For i = LBound(strStock) To UBound(strStock)
                If InStr(1, strStock(i), " NP") <> 0 Then
                    itmItem(i).Amount = Val(Replace(strStock(i), " NP", ""))
                    itmItem(i).OrigID = i
                    lngCount = Val(lngCount) + 1
                End If
            Next
            If lngCount > 0 Then
                For i = LBound(itmItem) To UBound(itmItem)
                    If itmItem(i).Amount > lngHighest Then
                        lngHighest = itmItem(i).Amount
                        lngID = i
                    End If
                Next
                If lngHighest >= Val(txtmin.Text) Then
                    Call grabItem(itmItem(lngID).OrigID, strHTML)
                    Exit Sub
                End If
            End If
        Else
            lstNP.AddItem ("Nothing on tree.")
        End If
        tmrRef.Interval = Rand(500, 1000)
        stbStatus.Panels(1).Text = "Status: Waiting " & tmrRef.Interval & " ms!"
End Sub
Public Function grabItem(ByVal id As Long, ByVal strHTML As String)
    Dim strURLS() As String
    Dim strURL As String
    Dim lngAfter As Long
        Call RcadModule.ExtractAll(strHTML, "<a href='
takedonation_new.phtml?donation_id=", "'", strURLS())
        strURL = "http://www.neopets.com/takedonation_new.phtml?donation_id=" & strURLS(id)
        strHTML = HTTP.GetWrapper(strURL, HTTP.LastPage)
        strHTML = HTTP.GetWrapper("http://www.neopets.com/objects.phtml", HTTP.LastPage)
        lngAfter = Replace(Extract(strHTML, "NP : <a class=tl href=/objects.phtml?type=inventory>", "</a>"), ",", "")
        If lngAfter > lngPrev Then
            lstLog.AddItem (Time & ": Grabbed " & strStock(id) & "!")
        Else
            lstLog.AddItem (Time & ": Missed " & strStock(id) & "!")
        End If
End Function 

Last edited by Rockage; 05-13-2007 at 01:33 PM.
  Reply With Quote

 
Old 04-27-2007, 10:08 PM   #2 (permalink)
Underground

Male second2none is offline
 
Join Date: Sep 2006
Location: BrisBANE <----
Age: 19
Posts: 5,025
GPoints: 317
iTrader: 1 / 100%
second2none Is a Party Captainsecond2none Is a Party Captainsecond2none Is a Party Captain
Rep Power: 16
Nice :P Great Post.
With the new coding. Some things need to be changed
But .. still great post.
__________________
This is from:
Screenies Of A Mod
Code:
How did you do it? FLP , jotform, some other form of hacking? - First Class Noob
Lawl.. funny shit.

Quote:
Originally Posted by Kore
By k[ore] on Today, 08:44 AM
i'll give you rep alright, but it won't be positive.
Lawl Ownt

Hoes forgot to eat a dick and shut the FUCK UP!
  Reply With Quote

 
Old 04-28-2007, 02:37 PM   #3 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
Rep Power: 0
Yea, if someone wants to use it they can fix it themselves :P Im not going to fix this if its not going to work after beta layout is done anyways.
  Reply With Quote

 
Old 05-13-2007, 10:21 AM   #4 (permalink)
Underground

Male rcadble is offline
 
Join Date: Sep 2006
Posts: 227
GPoints: 60
iTrader: 0 / 0%
rcadble Is Recognizable
Rep Power: 7
Quote:
Originally Posted by Rockage View Post
an mtger. Neopoint only btw. Learn from it, dont rip.
PHP Code:
Option Explicit
Private Type Item 
    Amount 
As Long
    OrigID 
As Long
End Type
Dim lngPrev 
As Long
Dim strStock
() As String
Private Sub cmdLogin_Click()
    
Dim strHTML As String
        cmdLogin
.Enabled False
        strHTML 
HTTP.GetWrapper("http://neopets.com/")
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 1"
        
strHTML HTTP.GetWrapper("http://neopets.com/loginpage.phtml""http://neopets.com/")
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 2"
        
strHTML HTTP.GetWrapper("http://neopets.com/hi.phtml?destination=%2Fpetcentral.phtml&username=" txtUsername.Text"http://neopets.com/loginpage.phtml")
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 3"
        
strHTML HTTP.GetWrapper("http://neopets.com/login.phtml?username=" txtUsername.Text "&password=" txtPassword.Text "&destination=%2Fpetcentral.phtml""http://neopets.com/hi.phtml?destination=%2Fpetcentral.phtml&username=" txtUsername.Text)
        
stbStatus.Panels(1).Text "Status: " "Logging In Step 4"
        
If InStr(1LCase(strHTML), "location: /petcentral.phtml") <> Or InStr(1LCase(strHTML), "pass_remind") <> 0 Then
            stbStatus
.Panels(1).Text "Status: " "Login Successful!"
            
MsgBox "Login Successful!"
            
txtUsername.Enabled False
            txtPassword
.Enabled False
            stbStatus
.Panels(1).Text "Status: " "Logged in as " txtUsername.Text
        
ElseIf InStr(1LCase(strHTML), "frozen") <> 0 Then
            cmdLogin
.Enabled True
            MsgBox 
"This account is frozen!"
            
stbStatus.Panels(1).Text "Status: " "Account Frozen!"
        
Else
            
cmdLogin.Enabled True
            MsgBox 
"Invalid user/password combination!"
            
stbStatus.Panels(1).Text "Status: " "Invalid user/pass combination!"
End If
End Sub
Private Sub cmdStart_Click()
    
'set the interval nub
    lstLog.AddItem (Time & ": MTG STARTED!")
    tmrRef.Interval = RcadModule.Rand(500, 1000)
    tmrRef.Enabled = True
    stbStatus.Panels(1).Text = "Status: Checking the tree."
End Sub
Private Sub cmdStop_Click()
    lstLog.AddItem (Time & ": MTG STOPED!")
    tmrRef.Enabled = False
    tmrRef.Interval = RcadModule.Rand(500, 1000)
    stbStatus.Panels(1).Text = "Status: stopped."
End Sub

Private Sub tmrRef_Timer()
 Dim strHTML As String
    Dim i As Long
    Dim itmItem() As Item
    Dim lngCount As Long: lngCount = 0
    Dim lngHighest As Long: lngHighest = 0
    Dim lngID As Long
        Erase strStock()
        lstNP.Clear
        strHTML = HTTP.GetWrapper("http://www.neopets.com/donations.phtml", HTTP.LastPage)
        lngPrev = Replace(Extract(strHTML, "NP : <a class=tl href=/objects.phtml?type=inventory>", "</a>"), ",", "")
        If InStr(1, strHTML, "<br>(donated by ") <> 0 Then
            Call RcadModule.ExtractAll(strHTML, "border=1></a><br><b>", "</b><br>", strStock())
            For i = LBound(strStock) To UBound(strStock)
                lstNP.AddItem strStock(i)
            Next
            ReDim Preserve itmItem(lstNP.ListCount) As Item
            For i = LBound(strStock) To UBound(strStock)
                If InStr(1, strStock(i), " NP") <> 0 Then
                    itmItem(i).Amount = Val(Replace(strStock(i), " NP", ""))
                    itmItem(i).OrigID = i
                    lngCount = Val(lngCount) + 1
                End If
            Next
            If lngCount > 0 Then
                For i = LBound(itmItem) To UBound(itmItem)
                    If itmItem(i).Amount > lngHighest Then
                        lngHighest = itmItem(i).Amount
                        lngID = i
                    End If
                Next
                If lngHighest >= Val(txtmin.Text) Then
                    Call grabItem(itmItem(lngID).OrigID, strHTML)
                    Exit Sub
                End If
            End If
        Else
            lstNP.AddItem ("Nothing on tree.")
        End If
        tmrRef.Interval = Rand(500, 1000)
        stbStatus.Panels(1).Text = "Status: Waiting " & tmrRef.Interval & " ms!"
End Sub
Public Function grabItem(ByVal id As Long, ByVal strHTML As String)
    Dim strURLS() As String
    Dim strURL As String
    Dim lngAfter As Long
        Call RcadModule.ExtractAll(strHTML, "<a href='
takedonation_new.phtml?donation_id=", "'", strURLS())
        strURL = "http://www.neopets.com/takedonation_new.phtml?donation_id=" & strURLS(id)
        strHTML = HTTP.GetWrapper(strURL, HTTP.LastPage)
        strHTML = HTTP.GetWrapper("http://www.neopets.com/objects.phtml", HTTP.LastPage)
        lngAfter = Replace(Extract(strHTML, "NP : <a class=tl href=/objects.phtml?type=inventory>", "</a>"), ",", "")
        If lngAfter > lngPrev Then
            lstLog.AddItem (Time & ": Grabbed " & strStock(id) & "!")
        Else
            lstLog.AddItem (Time & ": Missed " & strStock(id) & "!")
        End If
End Function 
It's funny how you say "don't rip" yet this code was ripped straight from me
  Reply With Quote

 
Old 05-13-2007, 01:35 PM   #5 (permalink)
Banned

Male Rockage is offline
 
Join Date: Feb 2007
Posts: 87
GPoints: 24
iTrader: -1 / 0%
Rockage Is gaining popularity
Rep Power: 0
I gave you credit, I forgot to, If you saw what I wrote you can tell I wasn't trying to claim it as my own. Though If you notice I did change a lot it was yours, so sorry.
  Reply With Quote

 
Old 05-15-2007, 06:18 PM   #6 (permalink)
Underground

Male rcadble is offline
 
Join Date: Sep 2006
Posts: 227
GPoints: 60
iTrader: 0 / 0%
rcadble Is Recognizable
Rep Power: 7
Quote:
Originally Posted by Rockage View Post
I gave you credit, I forgot to, If you saw what I wrote you can tell I wasn't trying to claim it as my own. Though If you notice I did change a lot it was yours, so sorry.

ok it's cool now, I was in a bad mood when I wrote that.
  Reply With Quote

 
Old 06-21-2007, 06:20 AM   #7 (permalink)
Junior Member

Male Pieter is offline
 
Join Date: Jan 2007
Posts: 26
GPoints: 0
iTrader: 0 / 0%
Pieter Is gaining popularity
Rep Power: 6
Thanks, this could come in handy for loads of programmers, I am sure. Good job!
  Reply With Quote

 
Old 06-23-2007, 07:32 PM   #8 (permalink)
Junior Member

brwnie is offline
 
Join Date: Jun 2007
Posts: 1
GPoints: 0
iTrader: 0 / 0%
brwnie Is gaining popularity
Rep Power: 0
wait where or wat do u do with this .....b
  Reply With Quote

 
Old 07-14-2007, 12:54 PM   #9 (permalink)
Banned

Male Zetin is offline
 
Join Date: May 2007
Location: South-West Pacific
Posts: 478
GPoints: 25
iTrader: 0 / 50%
Zetin Is gaining popularity
Rep Power: 0
how do you put php codes into action?
  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 07:07 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.13405395 seconds (100.00% PHP - 0% MySQL) with 19 queries