• Log in or sign up for an account here: https://www.sythe.org/login

[VB6] - Need Help - RS Stats Look up

Joined
Mar 29, 2008
Sythe Gold
0
Messages
173
Download Source: http://insaneprograms.com/files/RS2 Stats Source.zip

~The Problem~
It works correctly, but when you skill level is not high enough, it wont show up in runescape stat look up..
On the program it will find all the stats, but if one is to low, then it will skip that skill level and still put it in the current skill level box..

So here it is..

Example - My Stats
Attack - 60
Def - 60
Str - 1 - This is to low of a skill level and will not show up on high scores.
Magic - 88


Now I type my account name in the program and hit ok/go.
It will put for theses for the levels..

Attack - 60
Def - 60
Str - 88 - since my strength level was to low, it did not show up in high scores, and it replace this level with my magic level.
Magic - blank

Thanks!

Please if you fix, post what I need to put in to fix it, or upload the fixed source!

Thanks!
 
Lol i guess not, Im not a vb6 expert but im guessing you could do something that if its too low it should say n/a .. um mind posting your code instead of uploading it?
 
Private Incoming As String

Private Sub Command1_Click()
Incoming = vbNullString
Sock.Connect
Command2_Click
End Sub

Private Sub Command2_Click()
Text2.Text = "N/A"
Text2.Text = "N/A"
Text3.Text = "N/A"
Text4.Text = "N/A"
Text5.Text = "N/A"
Text6.Text = "N/A"
Text7.Text = "N/A"
Text8.Text = "N/A"
Text9.Text = "N/A"
Text10.Text = "N/A"
Text11.Text = "N/A"
Text12.Text = "N/A"
Text13.Text = "N/A"
Text14.Text = "N/A"
Text15.Text = "N/A"
Text16.Text = "N/A"
Text17.Text = "N/A"
Text18.Text = "N/A"
Text19.Text = "N/A"
Text20.Text = "N/A"
Text21.Text = "N/A"
Text22.Text = "N/A"
Text23.Text = "N/A"
Text24.Text = "N/A"
Text25.Text = "N/A"
End Sub

Private Sub Form_Load()
Sock.RemoteHost = "66.151.43.154"
Sock.RemotePort = 80
End Sub

Private Sub Sock_Connect()
Dim Snd As String
Snd = "GET /hiscorepersonal.ws?user1=" & username.Text & " HTTP/1.0" & vbNewLine
Snd = Snd & "Host: hiscore.runescape.com" & vbCrLf
Sock.SendData Snd & vbCrLf
End Sub
Here Part 1
 
If Mid(Tmp1(1), x, 1) = "<" Then
Select Case j:
Case 2:
Text2.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 3:
Text3.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 4:
Text4.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 5
Text5.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 6
Text6.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 7
Text7.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 8
Text8.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 9
Text9.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 10
Text10.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 11
Text11.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 12
Text12.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 13
Text13.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 14
Text14.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 15
Text15.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 16
Text16.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 17
Text17.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 18
Text18.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 19
Text19.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 20
Text20.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 21
Text21.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 22
Text22.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 23
Text23.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 24
Text24.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
Case 25
Text25.Text = IIf(Mid$(Tmp1(1), 1, x - 1) = vbNullString, "N/A", Mid$(Tmp1(1), 1, x - 1))
End Select
End If
Next x
Next j
Sock.Close

End If
End Sub

Private Sub Sock_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
MsgBox "Error:" & Description, vbCritical, "RS2 Stats Error"
End Sub


It gives me a error when I quote part 2.
 
Have something so that if it can't find a value, it makes it " " and goes to the next one? It can't be that hard.

But I agree, why do something so complex like that when you can use something more simple and less spacy.
 
Question.
Can you fix my fucking problem.

Of course i can, i wouldn't have posted otherwise. You just need to edit your Iif() statement slightly. But since you don't seem to be interested in answering my question i have no desire to help you further.
 
WinSock is the only think I know that can connect, and get data from the internet on VB6, whats "something more simple and less spacy."..?

And even if some else is better, I mean I worked hard on this one, and would like to see it working properly.
 
WinSock is the only think I know that can connect, and get data from the internet on VB6, whats "something more simple and less spacy."..?

And even if some else is better, I mean I worked hard on this one, and would like to see it working properly.

In your project press CTRL + T and add the component called "Microsoft Internet Transfer Controls". Then add one of them to your form.

Now to retrieve the data from the highscores you would just add this to your button click.

Code:
dim strdata as string
strdata = inet1.openurl("http://www.runescape.com/restofurlhere")

Then all the information from that page is in the "strdata" variable. Therefore you don't need to do any Mid() & Instr() calls as the data is incoming (this is what is causing your problem).
 
Lol, okay.. hey Insanse when it starts to work, wanna post your code so I can jack it and give you credit? AND to see what the problem was between the codes?
 
Oh god, why do you make this so confusing when it is possible with just a few lines, making it faster and more reliable - whilst still being completely customizable, this literally took me 3minutes to write.

You need these components on Form1:

1) Textbox - (Name it User) // This is where the users name you want to search will be entered.

2) Command Button - (Name it Command1) // This is where the users click when they want to search.

3) Array of Textbox - (Name it TxtValue - Number 0 to 80) // This is where the scores are show, refer to image to see how i set it out.

4) Inet Contro - (Name it Inet1) // Used to connect to the highscores page on the internet and then to split the data recieved.

This is how i set out the form..
highscoremw6.bmp


Continued in next post because it will not allow me to post code snippets in this one...
 
If anyone know how to add the code as it wont allow me to post anything that contains VBCode, for now just type up exactly how you see in the screenshot.

highscore2em4.bmp



Thats all you need on a form to lookup highscores... Again, sorry for double post the bitch wouldnt allow me to show the code so i thought i would try a new post.
 
duelarena.gg
Back
Top