Clan x86

Technical (Development, Security, etc.) => General Programming => Botdev => Topic started by: Furious on October 09, 2005, 11:29:11 AM

Title: New Feature
Post by: Furious on October 09, 2005, 11:29:11 AM
I know whisper forwarding isn't new, but what channel text forwarding. Say I had a bot, named "123", and my account was "456". If 456 joined a game, 123 could relay all channel messages to 456.  Anybody see any use to this, or is it useless?
Title: Re: New Feature
Post by: Hdx on October 09, 2005, 11:53:05 AM
its useless.
If you were in any type of active channel your bot would flood out after the 5/6th message :/
~-~(HDX)~-~
Title: Re: New Feature
Post by: Newby on October 09, 2005, 11:53:20 AM
Raibot had this feature. :|
Title: Re: New Feature
Post by: Furious on October 09, 2005, 11:54:27 AM
Quoteits useless.
If you were in any type of active channel your bot would flood out after the 5/6th message :/
~-~(HDX)~-~

Because we can't delay the sending of messages...
Title: Re: New Feature
Post by: Joe on October 09, 2005, 04:06:50 PM
If you queue it up, you won't flood off, but in an active channel you'll be so far back its not even funny.
Title: Re: New Feature
Post by: Ryan Marcus on October 09, 2005, 06:36:52 PM
Hmmm.. Intersting idea.

Same could apply if you wanted to be in multiple channels at once... A channel per bot.

It might be more practicle to set a hotkey to tell a third party program to show a popup above the game / other channel with an entry spot...

Added to my todo list for my bot.
Title: Re: New Feature
Post by: Blaze on October 09, 2005, 07:10:39 PM
If you had two bots, that got every other message, it might work.  Impracticle though.
Title: Re: New Feature
Post by: Ergot on October 09, 2005, 09:00:12 PM
However, if you needed a mass whisperer, I'm pretty sure you can send more on a bot that is in a game than from within a channel.
Title: Re: New Feature
Post by: Furious on October 09, 2005, 09:19:02 PM
Hrm, Ryan mind sharing some ss's or telling us about?
Title: Re: New Feature
Post by: Armin on October 10, 2005, 05:13:20 PM
Assuming the bot is on the same computer as the client, why not just make the bot mimic the packets so the client just thinks that it's getting the messages through battle.net?

EDIT: Oh yeah, of course make a feature that F8 or something enables and disables it.
Title: Re: New Feature
Post by: Newby on October 10, 2005, 05:18:26 PM
Do you mean injecting the bot's packet buffer into the client's packet buffer?

I think if the client recieved chat messages for a chat channel whilst in game, it would freak out and shit bricks.
Title: Re: New Feature
Post by: Armin on October 10, 2005, 05:23:37 PM
Quote from: Newby on October 10, 2005, 05:18:26 PM
Do you mean injecting the bot's packet buffer into the client's packet buffer?
Basically... (Not really sure exactly what that means, never got into it because I think programming is a waste of time.)
Quote from: Newby on October 10, 2005, 05:18:26 PM
I think if the client recieved chat messages for a chat channel whilst in game, it would freak out and shit bricks.
Of course you're going to send the packets in a way that the client can understand it...
Title: Re: New Feature
Post by: Newby on October 10, 2005, 05:26:57 PM
What happens if you inject a packet right in the middle of a packet relating to game play?

So instead of something like: datadatadatadatadatadatadata

You get: datadatadatadainserteddatatranslatedtopacketformattheclientcanreadtadatadata.

Often, the packets come fragmented, so you'd have to be able to repair any broken packets that you break inserting it. :P
Title: Re: New Feature
Post by: Armin on October 10, 2005, 05:33:44 PM
Oh, I see what you're getting at. Excuse me for my non-technical termology: If you say the messages are comming from Battle.net as whispers, it won't interfere. The question is, what if you get disconnected from Battle.net? Then it won't work when you're disconnected, that simple.
Title: Re: New Feature
Post by: Blaze on October 10, 2005, 05:38:13 PM
How about the bot just print the messages on screen using starcrafts own print function?
Title: Re: New Feature
Post by: Armin on October 10, 2005, 06:05:29 PM
That's wayy to easy though.  :(
Title: Re: New Feature
Post by: Blaze on October 10, 2005, 07:03:33 PM
Easy and efficient... so it must be all wrong?
Title: Re: New Feature
Post by: Joe on October 11, 2005, 07:32:44 PM
Just figure out what port starcraft is connected on (netstat), open a raw socket, and send Battle.net broadcasts from Battle.net (the TCP protocol allows you to specify where it came from) to StarCraft (again, send it to SC's port).
Title: Re: New Feature
Post by: Newby on October 11, 2005, 07:37:43 PM
Quote from: Joe[e2] on October 11, 2005, 07:32:44 PM
Just figure out what port starcraft is connected on (netstat), open a raw socket, and send Battle.net broadcasts from Battle.net (the TCP protocol allows you to specify where it came from) to StarCraft (again, send it to SC's port).

You need to initiate a connection first... and if you send a SYN packet with the spoof source address of Battle.net, it's going to send a RST back to Battle.net..
Title: Re: New Feature
Post by: Blaze on October 11, 2005, 08:41:41 PM
Which is why my method would be best.
Title: Re: New Feature
Post by: Joe on October 11, 2005, 09:40:33 PM
QuoteYou need to initiate a connection first... and if you send a SYN packet with the spoof source address of Battle.net, it's going to send a RST back to Battle.net..

Not if theres nothing to be responded to. IIRC, a client doesn't send back SID_IRecievedYourBroadcastAndImLettingYouKnow. =p
Title: Re: New Feature
Post by: Newby on October 11, 2005, 10:51:27 PM
Quote from: Joe[e2] on October 11, 2005, 09:40:33 PM
QuoteYou need to initiate a connection first... and if you send a SYN packet with the spoof source address of Battle.net, it's going to send a RST back to Battle.net..

Not if theres nothing to be responded to. IIRC, a client doesn't send back SID_IRecievedYourBroadcastAndImLettingYouKnow. =p

TCP != UDP.

You can't send a packet to a computer and assume it'll get there. Because you can't send the packet in the first place without initiating a connection (via SYN).

The server has to acknowledge your syn (through SYN/ACK sent back to you).
Title: Re: New Feature
Post by: MyndFyre on October 11, 2005, 11:26:28 PM
UDP:
a->b I sent a message.

TCP:
a->b SYN
b->a SYN | ACK
a->b ACK
a->b message
b->a message received
Title: Re: New Feature
Post by: Joe on October 12, 2005, 05:25:08 PM
I knew that? Oops. =)
Title: Re: New Feature
Post by: Blaze on October 12, 2005, 05:40:48 PM
Quote from: Blaze on October 11, 2005, 08:41:41 PM
Which is why my method would be best.
Title: Re: New Feature
Post by: Ryan Marcus on October 14, 2005, 11:36:05 AM
Hmm.. Using Starcraft's built in print function is a tad more complicated then it looks, not to mention it would not be cross platform.

I got my idea to work:

Basicly, you hit F8 to toggle on and off.

When on, a  small box appears with a list of channels on the left, and the chat on the right. When you click on a channel on the left (or type one in) the bot joins that channel and begins to add the text to that window.

If you don't have F keys, its command/control + 8.

It works great.. I use it. Should be in the first beta release of my bot: http://luxer.cjb.net