Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: PaiD on July 19, 2003, 11:15 AM

Title: Requesting Banner
Post by: PaiD on July 19, 2003, 11:15 AM
:( How do you request for the Banner that is shown on the client?
Title: Re:Requesting Banner
Post by: iago on July 19, 2003, 11:36 AM
If nothing's changed, they are automatically sent to you.
Title: Re:Requesting Banner
Post by: PaiD on July 19, 2003, 12:48 PM
what do you mean by "If nothing's changed". What would be changed?
Title: Re:Requesting Banner
Post by: Soul Taker on July 19, 2003, 02:12 PM
Send 0x15 every 15 seconds or so (that's how long I see BW doing it):

p.InsertNonNTString "68XI"
p.InsertNonNTString StrReverse(frmCfg.strGame)
p.InsertNonNTString frmCfg.verByte
p.InsertBYTE &H20
p.InsertWORD &H0
p.InsertDWORD Connection.LastAd
p.SendPacket sckBnet(Index), &H15

And when the server deems it time to show a new one, it will send a responding 0x15, which you should reply to with 0x21:

CopyMemory LastAd, ByVal Mid$(strData, 5, 4), 4
p.InsertNonNTString "68XI"
p.InsertNonNTString StrReverse(frmCfg.strGame)
p.InsertDWORD LastAd
p.InsertWORD 0
p.SendPacket frmMain.sckBnet(Index), &H21

In that 0x15 from the server is the ad banner filename, link to go to when you click the banner, and probably some FILETIME stuff.
Title: Re:Requesting Banner
Post by: CrAz3D on July 19, 2003, 04:59 PM
Would woul;d ya add it into a form...........hmm.

How to read a .pcx file
Title: Re:Requesting Banner
Post by: Maddox on July 19, 2003, 07:15 PM
[C->S] SID_CHECKAD
Packet id: 0x15 - &H15

Format:
(DWORD) Platform ID
(DWORD) Product ID
(DWORD) Ad token of the last ad sent
(DWORD) Ad token

Additional information:
This packet is used to request an ad be sent, it wont always be sent.
Title: Re:Requesting Banner
Post by: sPlOrYgOn on July 19, 2003, 07:58 PM
Quote from: CrAz3D on July 19, 2003, 04:59 PM
Would woul;d ya add it into a form...........hmm.

How to read a .pcx file
Aren't Bnet Ads in smacker files?
Title: Re:Requesting Banner
Post by: iago on July 19, 2003, 08:05 PM
They are either .pcx or .smk, it changes
Title: Re:Requesting Banner
Post by: Camel on July 20, 2003, 02:01 AM
Quote from: CrAz3D on July 19, 2003, 04:59 PMWould woul;d ya add it into a form...........hmm.

How to read a .pcx file

I understand wanting to download the banner, but why on earth would you want to display it?
Title: Re:Requesting Banner
Post by: DarkMinion on July 20, 2003, 02:58 AM
QuoteI understand wanting to download the banner, but why on earth would you want to display it?

What's the point of downloading it without displaying it?
Title: Re:Requesting Banner
Post by: Skywing on July 20, 2003, 03:04 AM
Quote from: iago on July 19, 2003, 08:05 PM
They are either .pcx or .smk, it changes
War3/W3XP use .png and .mng for still and moveable graphics, respectively.
Title: Re:Requesting Banner
Post by: Camel on July 20, 2003, 03:17 AM
Quote from: DarkMinion on July 20, 2003, 02:58 AM
QuoteI understand wanting to download the banner, but why on earth would you want to display it?

What's the point of downloading it without displaying it?

Makes it harder for the server to detect that it's a bot JIC they ever decide to ban bots, which at this point seems extremely unlikely as one must have a valid key.
Title: Re:Requesting Banner
Post by: dxoigmn on July 20, 2003, 03:45 AM
Quote from: Camel on July 20, 2003, 03:17 AM
Makes it harder for the server to detect that it's a bot JIC they ever decide to ban bots, which at this point seems extremely unlikely as one must have a valid key.

But why bother downloading it?  I'd think the requests for ads would be good enough.
Title: Re:Requesting Banner
Post by: Camel on July 20, 2003, 03:56 AM
Quote from: kamakazie on July 20, 2003, 03:45 AM
Quote from: Camel on July 20, 2003, 03:17 AM
Makes it harder for the server to detect that it's a bot JIC they ever decide to ban bots, which at this point seems extremely unlikely as one must have a valid key.

But why bother downloading it?  I'd think the requests for ads would be good enough.

Because they could, in theory, check to see if clients are downloading the banners. It would be rather effective because, AFAIK, very few bots even bother to send 0x15. I used to send it but decided that it was too much of a pain in the ass as I log packets on-screen. However, this post has inspired me to re-add it in final builds. :)
Title: Re:Requesting Banner
Post by: Skywing on July 20, 2003, 03:02 PM
Quote from: Camel on July 20, 2003, 03:56 AM
Quote from: kamakazie on July 20, 2003, 03:45 AM
Quote from: Camel on July 20, 2003, 03:17 AM
Makes it harder for the server to detect that it's a bot JIC they ever decide to ban bots, which at this point seems extremely unlikely as one must have a valid key.

But why bother downloading it?  I'd think the requests for ads would be good enough.

Because they could, in theory, check to see if clients are downloading the banners. It would be rather effective because, AFAIK, very few bots even bother to send 0x15. I used to send it but decided that it was too much of a pain in the ass as I log packets on-screen. However, this post has inspired me to re-add it in final builds. :)

Actually the clients cache ad banners quite often.  This means that they don't really get downloaded all that much, just drawn from bncache.dat.
Title: Re:Requesting Banner
Post by: CrAz3D on July 20, 2003, 06:35 PM
Is there a way to view an ad with out being in the Game Client?

Like some type of viewer
Title: Re:Requesting Banner
Post by: WinSocks on July 24, 2003, 12:49 PM
you could save the images through a screenshot and have them be displayed on the main form when the ad = the desired image to be displayed.

but as said no point in having images when the add banner text is really what you need in a bot.

If it was possible could it be done like so? or would that be just plain retarded?
Run it off timer that matches the ad changes on the client or just change it when 0x15 is sent back?

i think would be a waist of time to develop such a thing for a bot, unless your bored o.O

Aren't the Ad's randomly piced from a list? or do they loop throught the same specific Ad's?, caus ei see them loop quite alot on the client :\