Valhalla Legends Archive

Programming => Battle.net Bot Development => Battle.net Bot Development References => Topic started by: -=]Unknown[=- on February 04, 2003, 03:09 PM

Title: [VB6 CSB] Requesting User Profiles
Post by: -=]Unknown[=- on February 04, 2003, 03:09 PM
Can Someone please show me an example on how to view someones profile using CleanSlateBot? :)

[edit 4-14-05: updated title]
Title: Re: Profile
Post by: haZe on February 04, 2003, 04:06 PM
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...
Title: Re: Profile
Post by: Arta on February 05, 2003, 01:15 AM
http://www.valhallalegends.com/arta/bnetdocs/content.php?id=26&Sender=C
Title: Re: Profile
Post by: HiVe on February 11, 2003, 01:57 PM
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
Title: Re: Profile
Post by: haZe on February 11, 2003, 02:02 PM
Gives me errors when I use it.
Title: Re: Profile
Post by: Coltz on February 12, 2003, 02:29 AM
When you send the packet you have to request the keys
Title: Re: Profile
Post by: Arta on February 12, 2003, 04:50 AM
What's your code? How are you constructing the packet?
Title: Re: Profile
Post by: Blade_360 on February 12, 2003, 05:15 PM
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"
Title: Re: Profile
Post by: Grok on February 13, 2003, 08:02 AM
QuotestrTime = "[" & Time & "] "

Purpose of getting Time in this function?
Title: Re: Profile
Post by: Noodlez on February 13, 2003, 09:59 AM
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.
Title: Re: Profile
Post by: Blade_360 on February 13, 2003, 04:07 PM
I guess I never thought of that but its not like its hurting anything
Title: Re: Profile
Post by: Zakath on February 13, 2003, 04:19 PM
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.
Title: Re: Profile
Post by: Blade_360 on February 13, 2003, 04:22 PM
ok well I guess I'll delete it