Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: PaiD on January 29, 2005, 06:34 PM

Title: Promote/Demote Friends
Post by: PaiD on January 29, 2005, 06:34 PM
Is there anyway to promote/demote friends using packets? Or must I use /f p and /f d.

PS: when I do promote and demote bnet sends me 0x69 and I was wanting to know is it possible to cause an item on a listview to move up 1 or down 1 without readding every1?
Title: Re: Promote/Demote Friends
Post by: UserLoser. on January 29, 2005, 08:20 PM
Quote from: DueL on January 29, 2005, 06:34 PM
Is there anyway to promote/demote friends using packets? Or must I use /f p and /f d.

PS: when I do promote and demote bnet sends me 0x69 and I was wanting to know is it possible to cause an item on a listview to move up 1 or down 1 without readding every1?


Yes, yes, yes.
Title: Re: Promote/Demote Friends
Post by: Joe[x86] on January 29, 2005, 09:01 PM
UserLoser, what the bloody hell are those yes'es refering to?

Yes, you can use packets to do it?
Yes, you can move them up and down?
Yes.. huh?
Title: Re: Promote/Demote Friends
Post by: PaiD on January 29, 2005, 09:05 PM
Userloser mind sharing the information a disire?
Title: Re: Promote/Demote Friends
Post by: UserLoser. on January 29, 2005, 09:15 PM
Quote from: JoeTheOdd on January 29, 2005, 09:01 PM
UserLoser, what the bloody hell are those yes'es refering to?

Yes, you can use packets to do it?
Yes, you can move them up and down?
Yes.. huh?

Quote from: DueL on January 29, 2005, 06:34 PM
Is there anyway to promote/demote friends using packets?
Yes
Quote from: DueL on January 29, 2005, 06:34 PM
Or must I use /f p and /f d.
Yes

Quote from: DueL on January 29, 2005, 06:34 PM
is it possible to cause an item on a listview to move up 1 or down 1 without readding every1?

Yes

What's the problem?
Title: Re: Promote/Demote Friends
Post by: PaiD on January 29, 2005, 09:17 PM
Can you tell me how to move up/down on the listview? And tell me what packet(s) needed for promote/demote?

Edit: Hm Is the packet that your talking about 0xE?
Title: Re: Promote/Demote Friends
Post by: R.a.B.B.i.T on January 29, 2005, 09:36 PM
No, it's not 0x0e.  Try looking at BnetDocs, it's there for a reason :)
Title: Re: Promote/Demote Friends
Post by: PaiD on January 29, 2005, 09:39 PM
Rabbit. I have.

[C>0x65]    SID_FRIENDLIST
[S>0x65] SID_FRIENDLIST
[C>0x66] SID_FRIENDUPDATE
[S>0x66] SID_FRIENDUPDATE
[S>0x67] SID_FRIENDADDED
[S>0x68] SID_FRIENDREMOVED
[S>0x69] SID_FRIENDMOVED

Doesnt help much becuase it shows 0x66-0x69 only Server to Client. I tried to send it anyway and I get ipbans so that is why I came here. Hope some1 knows something I dont about this topic.
Title: Re: Promote/Demote Friends
Post by: R.a.B.B.i.T on January 29, 2005, 09:41 PM
Click on them, they are links!
Title: Re: Promote/Demote Friends
Post by: PaiD on January 29, 2005, 09:48 PM
Hm I must be blind I dont see anywhere on bnetdocs were it tells me the packet format to add/remove friends Client -> Server
Title: Re: Promote/Demote Friends
Post by: Blaze on January 29, 2005, 09:59 PM
Do you think battle.net documents is complete?
Title: Re: Promote/Demote Friends
Post by: PaiD on January 29, 2005, 10:03 PM
I know it isnt complete. That is why I asked the forum members.
Title: Re: Promote/Demote Friends
Post by: Blaze on January 29, 2005, 10:22 PM
Open Warcraft 3, open your packet logger. Do the event you want, see what happens.
Title: Re: Promote/Demote Friends
Post by: UserLoser. on January 30, 2005, 02:14 AM
To promote or demote a friend on your friends' list, see message SID_CHATCOMMAND  (http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=39)
Title: Re: Promote/Demote Friends
Post by: Blaze on January 30, 2005, 11:49 AM
Quote0000  FF 0E 1B 00 2F 66 20 70 20 54 65 63 68 2D 42 6C    ..../f p Tech-Bl
0010  61 7A 65 40 75 73 65 61 73 74 00                   aze@useast.

Thats what the official client sends for promoting my account Tech-Blaze.
Title: Re: Promote/Demote Friends
Post by: shout on January 30, 2005, 01:49 PM
It looks to me as though it is sending SID_CHATCOMMAND with a NTString saying "/f p Tech-Blaze@useast".
Title: Re: Promote/Demote Friends
Post by: Blaze on January 30, 2005, 06:47 PM
Yes, yes it is.
Title: Re: Promote/Demote Friends
Post by: OnlyMeat on February 03, 2005, 08:19 AM
Quote from: DueL on January 29, 2005, 06:34 PM
I was wanting to know is it possible to cause an item on a listview to move up 1 or down 1 without readding every1?

IIRC a listview item object has an index attribute, i imagine if you change this then it will alter the ordinal position it will be displayed at.
Title: Re: Promote/Demote Friends
Post by: Zakath on February 03, 2005, 10:44 AM
Yes, this is the case. In my bot, the internal list that keeps track of extra information on all the users is searchable based on that index, which is synchronized to be the same in both the listview and the linked list.

Bear in mind that people can have the same index. If two listview items have the same index, the one more recently added appears first, if I remember right.
Title: Re: Promote/Demote Friends
Post by: MyndFyre on February 03, 2005, 06:11 PM
Quote from: Zakath on February 03, 2005, 10:44 AM
Bear in mind that people can have the same index. If two listview items have the same index, the one more recently added appears first, if I remember right.

I believe this is incorrect.  If you look at the 0x69 SID_FRIENDMOVED packet, each friend has its own index.  When you promote member 2, member 1 is automatically demoted to index 2.  If indices were not unique, the client would not have a defined way to keep track of the friends list.
Title: Re: Promote/Demote Friends
Post by: Zakath on February 03, 2005, 07:00 PM
We were talking about the indices of listview items. That has nothing to do with the friendlist. :P
Title: Re: Promote/Demote Friends
Post by: UserLoser. on February 03, 2005, 07:32 PM
Quote from: MyndFyre on February 03, 2005, 06:11 PM
If indices were not unique, the client would not have a defined way to keep track of the friends list.

Oh, it does.  As long as it knows how many people are in your friends list, it keeps track of them :).  (See bncs message 0x66)