• Welcome to Valhalla Legends Archive.
 

Profile Request

Started by QwertyMonster, February 20, 2005, 08:39 AM

Previous topic - Next topic

QwertyMonster

Hey, yeah im trying to add profile request to my bot.

At the moment, i first searched this website. and got
http://forum.valhallalegends.com/phpbbs/index.php?topic=5670.0

Now hes sending &H26 for request, and on bnetdocs its 0x35

And on bnetdocs
0x26 -> ReadUserData
0x27 -> WriteUserData

Hes using them, yet 0x35 is profile request? What should i do?  :-\


Edit:

Oh nevermind, when looking around on 0x26 i found this

http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=11

But i would like to know, why hasnt that "Sonic" person used 0x35 to request it?

Warrior

Maybe they changed it or he was stupid?
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

QwertyMonster

Lol ok, i think ive got it working now anyway. Thx All (..only Warrior :P )

Blaze

-.-

0x26 is what x-sha clients use for requesting profiles/ranks.
0x27 is for chaning the description/sex/location variables.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

QwertyMonster

Hey. Im trying to request MY profile but it doesnt seem to be working :O

I have


Public Function GetProfile(Username As String)


Packet.InsertDWORD 1
Packet.InsertDWORD 4
Packet.InsertDWORD &H26
Packet.InsertNTString Username
Packet.InsertNTString "profile\sex"
Packet.InsertNTString "profile\location"
Packet.InsertNTString "profile\description"
Packet.SendPacket frmMain.bnetsocket, &H26

End Function


Ok thats getting it, now i know im not putting it anywhere, but what would i put for it?

Ok i have 2 questions

1.) What do i put to put a txtbox named "txtSex" as the sex
2.) I keep getting ipbanned when trying to get mine, why?

This is my 0x27


Private Sub Option1_Click()
Dim Username As String
   
   With Packet
   .InsertDWORD 1
   .InsertDWORD 4
   .InsertNTString Username
   .InsertNTString "profile\sex"
   .InsertNTString "profile\age"
   .InsertNTString "profile\location"
   .InsertNTString "profile\description"
   .InsertNTString frmProfile.TXTSex.Text 'Sex
  ' .InsertNTString frmProfile.txtAge.Text 'Age
   .InsertNTString frmProfile.txtLocation.Text 'Location
   .InsertNTString frmProfile.txtDesc.Text 'Description
   .SendPacket frmMain.bnetsocket, &H27

Me.Hide
End With
End Sub


Could some1 please help me? Ive got a really banging headache atm lol

Arta

In your 0x26:

You're setting key count to 4 (2nd DWORD) but only supplying 3 key names.

In your 0x27:

You've commented out the data for the second key (age) but you've still got it in your list and keycount is still 4.

QwertyMonster

Wow i edited my profile from my bot, sweet?! ^_^

I also did it with a BLUDDY BANGING HEADACHE  :'(

*cuts his head off*


Anyway, back to topic, i can set it, but how to view it?

CrAz3D

Public Function GetProfile(Username As String)


Packet.InsertDWORD 1
Packet.InsertDWORD 4
Packet.InsertDWORD &H26
Packet.InsertNTString Username
Packet.InsertNTString "profile\sex"
Packet.InsertNTString "profile\age"
Packet.InsertNTString "profile\location"
Packet.InsertNTString "profile\description"
Packet.SendPacket frmMain.bnetsocket, &H26

End Function
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Soul Taker

Just a note, to properly emulate the real client, you should also request an empty profile key after the other ones.

QwertyMonster

Quote from: CrAz3D on February 21, 2005, 10:54 AM
Public Function GetProfile(Username As String)


Packet.InsertDWORD 1
Packet.InsertDWORD 4
Packet.InsertDWORD &H26
Packet.InsertNTString Username
Packet.InsertNTString "profile\sex"
Packet.InsertNTString "profile\age"
Packet.InsertNTString "profile\location"
Packet.InsertNTString "profile\description"
Packet.SendPacket frmMain.bnetsocket, &H26

End Function



Ok thats getting the info, but how would i get it to a txt box, i know it sounds stupid,
Ok, i know how to send txt to a txt box, but what do i put for this case lol, if that made sense...


txtLocation.text = ???

Warrior

You parse the response.

It's an array of strings and I'm pretty sure you wont care about the three DWORD so find where the Array of strings begin and split that by the Null Terminator. (BYTE 0)
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Spilled

#11
When you send that packet the server will respond with the requested keys in an array, as he said split it by the null terminator and your keys will be in the order you requested them.

Anymore questions, ask away im happy to help


Edit:
Ex:
txtSex.text = thesplityouused(0)
txtLocation.text = thesplityouused(1)

Blaze

Quote from: CrAz3D on February 21, 2005, 10:54 AM
Public Function GetProfile(Username As String)
Packet.InsertDWORD 1
.....
Packet.SendPacket frmMain.bnetsocket, &H26
End Function


Why is this a function exactly?
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Warrior

Good point, I tend to make Functions that dont return anything subs.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?