• Welcome to Valhalla Legends Archive.
 

[WAR3] Promote?

Started by WiLD, June 14, 2006, 09:24 AM

Previous topic - Next topic

WiLD

I was looking at 0x7A(C->S) on BnetDocs and it lists

(DWORD) Cookie
(STRING)                  Username
(BYTE) New rank

and im wondering what the 'new rank' byte is? Anyone able to lend a hand here?


Edit:
I believe i have figured it out? Though when i go to promote someone i disconnect and get ipbanned.


    InsertDWORD &HB
    InsertNonNTString UserName
    InsertWORD &H3
    sendPacket &H7A
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    sendPacket &H15

What am i doing wrong exactly? Could it be the new rank byte im using? Ive been told it was H3 and H1 was demote.
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Spht

Quote from: WiLD on June 14, 2006, 09:24 AM
I was looking at 0x7A(C->S) on BnetDocs and it lists

(DWORD) Cookie
(STRING)                  Username
(BYTE) New rank

and im wondering what the 'new rank' byte is? Anyone able to lend a hand here?


Edit:
I believe i have figured it out? Though when i go to promote someone i disconnect and get ipbanned.


    InsertDWORD &HB
    InsertNonNTString UserName
    InsertWORD &H3
    sendPacket &H7A
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    sendPacket &H15

What am i doing wrong exactly? Could it be the new rank byte im using? Ive been told it was H3 and H1 was demote.

Cookie is echoed back so that you know what message is being responded to, so it's a good idea to not use a static value there as you did (0xb).

Username is null-terminated, and I noticed you used InsertNonNTString, which IIRC, is useless and should not be used ever.

New rank is the rank you want to apply (you know, the reason why you're sending the message).  See Rank codes.

Note, you can not change the rank of initiates, and you must be the "chieftain" to modify anyone's rank above grunt.

MyndFyre

#2
Wtf?  Maybe what you should do is insert a DWORD (a cookie value), a string, and then a single byte for the new rank.

WTF are you doing anyway?  You're not even close to what BnetDocs has!

[edit]
OK, I see what you're doing.  I missed that you're sending two packets.

The problem with the first packet is endianness.  You're trying to save work by .InsertWord(3)-ing, but this would insert:


03 00

when you really want

00 03


You should InsertByte(0), InsertByte(3); InsertWord(&H0300) also works but is less clear.  Or, the appropriate way, InsertNTString(Username), InsertByte(Rank) is preferred.  You know, like it says on BnetDocs.

Why are you sending the ad request at the same time as the rank change message?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

WiLD

Thanks for the Spht, i got it going now. I knew there had to be a list of the 'rank codes' somewhere, thanks again.

@MyndFyre;
Im sending adrequest with everything for my own purposes.
Thanks for your help too.

^.^
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

MyndFyre

Quote from: WiLD on June 14, 2006, 11:26 AM
Im sending adrequest with everything for my own purposes.
That's Otherworldly Bizarre, but whatever makes you happy.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.