• Welcome to Valhalla Legends Archive.
 

Stupid CSB q

Started by Sidoh, September 20, 2003, 12:38 AM

Previous topic - Next topic

Sidoh

Hey, im having problems getting the "RequestKey" to work with cleanslatebot... here's what im sending:

  CSB.RequestKey Profile, ChannelList.SelectedItem, "sex", "age", "user", "Username", "username"

ive tried them seperatly too, but when the keyreturn is activated, it has no KeyValue... any ideas?

Yoni

Not that familiar with CSB.RequestKey but try "Profile\Sex" instead of "Sex", "Profile\Age" instead of "Age", etc.

iago

Wasn't Age disabled?  I know that wouldn't solve your problem, but I doubt you'll get any information from profile/age.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


blinkdude

im sure you got the same problum i had... location / age / sex isn't working for me but Des. is ... duno y .....  heres the code cup head has for it
Req click.

CleanSlateBot1.RequestKey Profile, Listnamehere.SelectedItem.Text, "Profile\Age", "Profile\Sex", "Profile\Description", "Profile\Location"

*******

Private Sub CleanSlateBot1_KeyReturn(KeyName As String, KeyValue As String)
   Select Case KeyName
       Case "Profile\Age"
           TempAge = KeyValue
       Case "Profile\Sex"
           TempSex = KeyValue
       Case "Profile\Location"
           TempLoc = KeyValue
       Case "Profile\Description"
           TempDesc = KeyValue
           Dim Profile As New frmProfile
           Profile.txtUsername.Text = ListView1.SelectedItem.Text
           Profile.Caption = ListView1.SelectedItem.Text & "'s Profile"
           Profile.txtAge.Text = Replace(TempAge, Chr(10), vbCrLf)
           Profile.txtSex.Text = Replace(TempSex, Chr(10), vbCrLf)
           Profile.txtDescription.Text = Replace(TempDesc, Chr(10), vbCrLf)
           Profile.txtLocation.Text = Replace(TempLoc, Chr(10), vbCrLf)
           If CleanSlateBot1.Username = ListView1.SelectedItem.Text Then Profile.cmdSave.Enabled = True
           Profile.Show
       Case Else
           rtbadd vbRed, KeyName & " : " & KeyValue & vbNewLine, vbRed
   End Select
End Sub

heres an ss or my bot with CSB working for profile but no location ...
http://eternalsoldiers.net/esbot/ss/ss3.gif
<Total-Assault@Azeroth> WTF IS THIS CLAN A BUNCH OF NERDS?
<Yoni[vL]@Azeroth> Yes.
<Grok> Yes.
<[vL]Kp> You sound surprised.
<Total-Assault> at least they admit it
&

Kp

Quote from: iago on September 20, 2003, 06:17 AMWasn't Age disabled?  I know that wouldn't solve your problem, but I doubt you'll get any information from profile/age.
There is some server-side hack that forces it to be empty.  However, until such time as the client you're emulating is patched to stop requesting profile\age, you should request it too for compatibility (even though, as iago says, it will be empty).
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Spht

Quote from: blinkdude on September 20, 2003, 10:22 AM
im sure you got the same problum i had... location / age / sex isn't working for me but Des. is ... duno y .....  heres the code cup head has for it
Req click.

CleanSlateBot1.RequestKey Profile, Listnamehere.SelectedItem.Text, "Profile\Age", "Profile\Sex", "Profile\Description", "Profile\Location"

*******

Private Sub CleanSlateBot1_KeyReturn(KeyName As String, KeyValue As String)
   Select Case KeyName
       Case "Profile\Age"
           TempAge = KeyValue
       Case "Profile\Sex"
           TempSex = KeyValue
       Case "Profile\Location"
           TempLoc = KeyValue
       Case "Profile\Description"
           TempDesc = KeyValue
           Dim Profile As New frmProfile
           Profile.txtUsername.Text = ListView1.SelectedItem.Text
           Profile.Caption = ListView1.SelectedItem.Text & "'s Profile"
           Profile.txtAge.Text = Replace(TempAge, Chr(10), vbCrLf)
           Profile.txtSex.Text = Replace(TempSex, Chr(10), vbCrLf)
           Profile.txtDescription.Text = Replace(TempDesc, Chr(10), vbCrLf)
           Profile.txtLocation.Text = Replace(TempLoc, Chr(10), vbCrLf)
           If CleanSlateBot1.Username = ListView1.SelectedItem.Text Then Profile.cmdSave.Enabled = True
           Profile.Show
       Case Else
           rtbadd vbRed, KeyName & " : " & KeyValue & vbNewLine, vbRed
   End Select
End Sub

heres an ss or my bot with CSB working for profile but no location ...
http://eternalsoldiers.net/esbot/ss/ss3.gif

That will only work if Profile\Description is the last key KeyReturn() sends to you. A simple way to find out what order you get them in, is:


Private Sub CleanSlateBot1_KeyReturn(KeyName As String, KeyValue As String)
   Debug.Print "KeyReturn(" & KeyName & ", " & KeyValue & ")"
End Sub


Now request someone's profile. Whichever key you get last, move your profile dialog display there. For example, if Profile\Age is the last you get, then:


Private Sub CleanSlateBot1_KeyReturn(KeyName As String, KeyValue As String)
   Select Case KeyName
       Case "Profile\Age"
           TempAge = KeyValue
           Dim Profile As New frmProfile
           Profile.txtUsername.Text = ListView1.SelectedItem.Text
           Profile.Caption = ListView1.SelectedItem.Text & "'s Profile"
           Profile.txtAge.Text = Replace(TempAge, Chr(10), vbCrLf)
           Profile.txtSex.Text = Replace(TempSex, Chr(10), vbCrLf)
           Profile.txtDescription.Text = Replace(TempDesc, Chr(10), vbCrLf)
           Profile.txtLocation.Text = Replace(TempLoc, Chr(10), vbCrLf)
           If CleanSlateBot1.Username = ListView1.SelectedItem.Text Then Profile.cmdSave.Enabled = True
           Profile.Show
       Case "Profile\Sex"
           TempSex = KeyValue
       Case "Profile\Location"
           TempLoc = KeyValue
       Case "Profile\Description"
           TempDesc = KeyValue
       Case Else
           rtbadd vbRed, KeyName & " : " & KeyValue & vbNewLine, vbRed
   End Select
End Sub

blinkdude

i tryed it that way for like a day or two then just did it this way it works.... but it will pop up the Profile Form on any keyreturn...

Private Sub CleanSlateBot1_KeyReturn(KeyName As String, KeyValue As String)
frmProfile.txtUsername.Text = ListView1.SelectedItem.Text
frmProfile.Caption = ListView1.SelectedItem.Text & "'s Profile"

If KeyName = "Profile\Age" Then
  TempAge = KeyValue
  frmProfile.txtAge.Text = TempAge
   Else
   End If
   
If KeyName = "Profile\Sex" Then
  TempSex = KeyValue
  frmProfile.txtSex.Text = TempSex
   Else
   End If
   
If KeyName = "Profile\Location" Then
 TempLoc = KeyValue
 frmProfile.txtLocation.Text = TempLoc
  Else
End If

If KeyName = "Profile\Description" Then
  TempDesc = KeyValue
  frmProfile.txtDescription.Text = TempDesc
  Else
End If

   If CleanSlateBot1.Username = ListView1.SelectedItem.Text Then frmProfile.cmdSave.Enabled = True
           frmProfile.Show
End sub
<Total-Assault@Azeroth> WTF IS THIS CLAN A BUNCH OF NERDS?
<Yoni[vL]@Azeroth> Yes.
<Grok> Yes.
<[vL]Kp> You sound surprised.
<Total-Assault> at least they admit it
&

iago

That will only display one thing on the form, since KeyName will only ever be one of those options.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Sidoh

Okay, new question, how do you request record data?

iago

void BinaryBot::SendRecDataRequest(string User)
{
   LastProfileName = User;
   Buffer Request;
   Request << (DWORD) 1; // One user
   Request << (DWORD) 31; // With 31 fields
   Request << RecDataCookie; // The record cookie
   Request << User << (BYTE) 0; // The username

   Request << "profile\\sex" << (BYTE) 0; // The standard profile data
   Request << "profile\\age" << (BYTE) 0;
   Request << "profile\\location" << (BYTE) 0;
   Request << "profile\\description" << (BYTE) 0;
   
   Request << "Record\\SEXP\\0\\wins" << (BYTE) 0; // Brood war regular stuff
   Request << "Record\\SEXP\\0\\losses" << (BYTE) 0;
   Request << "Record\\SEXP\\0\\disconnects" << (BYTE) 0;
   Request << "Record\\SEXP\\0\\last game result" << (BYTE) 0;
   Request << "Record\\SEXP\\1\\wins" << (BYTE) 0; // Brood war ladder stuff
   Request << "Record\\SEXP\\1\\losses" << (BYTE) 0;
   Request << "Record\\SEXP\\1\\disconnects" << (BYTE) 0;
   Request << "Record\\SEXP\\1\\rating" << (BYTE) 0;
   Request << "Record\\SEXP\\1\\last game result" << (BYTE) 0;
   
   Request << "Record\\STAR\\0\\wins" << (BYTE) 0; // Starcraft regular
   Request << "Record\\STAR\\0\\losses" << (BYTE) 0;
   Request << "Record\\STAR\\0\\disconnects" << (BYTE) 0;
   Request << "Record\\STAR\\0\\last game result" << (BYTE) 0;
   Request << "Record\\STAR\\1\\wins" << (BYTE) 0; // Starcraft ladder
   Request << "Record\\STAR\\1\\losses" << (BYTE) 0;
   Request << "Record\\STAR\\1\\disconnects" << (BYTE) 0;
   Request << "Record\\STAR\\1\\rating" << (BYTE) 0;
   Request << "Record\\STAR\\1\\last game result" << (BYTE) 0;
   
   Request << "Record\\W2BN\\0\\wins" << (BYTE) 0; // War2 regular
   Request << "Record\\W2BN\\0\\losses" << (BYTE) 0;
   Request << "Record\\W2BN\\0\\disconnects" << (BYTE) 0;
   Request << "Record\\W2BN\\0\\last game result" << (BYTE) 0;
   Request << "Record\\W2BN\\1\\wins" << (BYTE) 0; // War2 ladder
   Request << "Record\\W2BN\\1\\losses" << (BYTE) 0;
   Request << "Record\\W2BN\\1\\disconnects" << (BYTE) 0;
   Request << "Record\\W2BN\\1\\rating" << (BYTE) 0;
   Request << "Record\\W2BN\\1\\last game result" << (BYTE) 0;

   SendBNetPacket(SID_READUSERDATA, Request);
}
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Sidoh

#10
Odd, that doesn't seem to work.. (i made sure to change everything to vb from c++), the value it returns is blank. Per haps im just being stupid

Spht

Quote from: Sidoh on September 21, 2003, 06:21 PM
Odd, that doesn't seem to work.. (i made sure to change everything to vb from c++), the value it returns is blank. Per haps im just being stupid

Use one slash (\) instead of two. There's two in his sample to avoid it being recognized as a C++ operator.

iago

Yes, I should have mentioned.. and you might not need the (BYTE) 0, depending on how your buffer works :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Sidoh

Okay, its working now, thanks  ;D

Soul Taker

What about Ironman stats =P