• Welcome to Valhalla Legends Archive.
 

[VB6 CSB] Requesting User Profiles

Started by -=]Unknown[=-, February 04, 2003, 03:09 PM

Previous topic - Next topic

-=]Unknown[=-

Can Someone please show me an example on how to view someones profile using CleanSlateBot? :)

[edit 4-14-05: updated title]

haZe

Heh..I could use that too...But, Anyways, 'Unknown', its the same as viewing on a regular bot. Just send the packets.

Hmm nevermind its not on bnetdocs...

Arta


HiVe

#3
Hmm.. I see how to do it with sending packets, but isn't there some way to do it with CleanSlateBot's RequestKey function?  :P

haZe

#4
Gives me errors when I use it.

Coltz

#5
When you send the packet you have to request the keys

Arta

#6
What's your code? How are you constructing the packet?

Blade_360

#7
heres my code sometimes it works and for some reason sometimes it doesn't Private Sub CleanSlateBot1_KeyReturn(KeyName As String, KeyValue As String)
If ProfileRequest = True Then
    If KeyName = "Profile\Age" Then
        frmProfile.lblage.Caption = KeyValue
    ElseIf KeyName = "Profile\Location" Then
        frmProfile.lblloc.Caption = KeyValue
    ElseIf KeyName = "Profile\Description" Then
        frmProfile.txtdescr(1).Text = KeyValue
    ElseIf KeyName = "Profile\Sex" Then
        frmProfile.lblSex.Caption = KeyValue
    End If
        frmProfile.SetFocus
Else
    strTime = "[" & Time & "] "
    If KeyName = "Profile\Age" Then
        frmProfile.lblage.Caption = KeyValue
    ElseIf KeyName = "Profile\Location" Then
        frmProfile.lblloc.Caption = KeyValue
    ElseIf KeyName = "Profile\Description" Then
        frmProfile.txtdescr(1).Text = KeyValue
    ElseIf KeyName = "Profile\Sex" Then
        frmProfile.lblSex.Caption = KeyValue
    End If
End Sub
and of course CleanSlateBot1.RequestKey Profile, Right(cbosend.Text, Len(cbosend.Text) - 9), "Profile\Age", "Profile\Sex", "Profile\Description", "Profile\Location"

Grok

#8
QuotestrTime = "[" & Time & "] "

Purpose of getting Time in this function?

Noodlez

#9
whats the point of checking if profilerequest = true if your going to execute the same code anyway? Well, your setting the time but I don't see it being used.

Blade_360

#10
I guess I never thought of that but its not like its hurting anything

Zakath

#11
How is redundant code "not hurting anything?"
It increases executable size and processing time for the task. In this example the effect might not be noticable, but imagine if you had thousands of lines, including some recursive loops or something...it's just a horrible practice.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Blade_360

#12
ok well I guess I'll delete it