Valhalla Legends Forums Archive | Battle.net Bot Development | [WAR3] Promote?

AuthorMessageTime
WiLD
I was looking at 0x7A(C->S) on BnetDocs and it lists
[code]
(DWORD) Cookie
(STRING)                  Username
(BYTE) New rank
[/code]
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.

[code]
    InsertDWORD &HB
    InsertNonNTString UserName
    InsertWORD &H3
    sendPacket &H7A
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    sendPacket &H15
[/code]
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.
June 14, 2006, 2:24 PM
Spht
[quote author=WiLD link=topic=15172.msg154354#msg154354 date=1150295053]
I was looking at 0x7A(C->S) on BnetDocs and it lists
[code]
(DWORD) Cookie
(STRING)                 Username
(BYTE) New rank
[/code]
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.

[code]
    InsertDWORD &HB
    InsertNonNTString UserName
    InsertWORD &H3
    sendPacket &H7A
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    InsertDWORD &H0
    sendPacket &H15
[/code]
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.
[/quote]

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.
June 14, 2006, 3:30 PM
Myndfyr
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:

[code]
03 00
[/code]
when you really want
[code]
00 03
[/code]

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?
June 14, 2006, 3:31 PM
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.

^.^
June 14, 2006, 4:26 PM
Myndfyr
[quote author=WiLD link=topic=15172.msg154366#msg154366 date=1150302372]
Im sending adrequest with everything for my own purposes.
[/quote]
That's Otherworldly Bizarre, but whatever makes you happy.
June 14, 2006, 4:45 PM

Search