Hi :D
First of all, I would like to say that i'm really impressed of u guys, dealing with bots sure looks like fun , and I would like to get into it myself.
Now, my knowledge of sockets in C++ is quite basic, and I've never dealt (deal in the past ^^) with sockets using php ...
and yet, i would like to get the source code of a very simple chat bot, that connects to b.net with a user and a pass , enters a channel and write the following msg in the channel: "Hello MISTERRRRRRRRRRRRRRRRRRRRRS" :)
I would like to get that code in c++, and php, ofcourse any help would be greatly apriciated :>
thanks ahead, Yoni from Israel.
http://www.pscode.com
Google for greetbot. That's exactly what you want.
uhm ok, like Binary Bot Simple or Chat Bot Simple?
Sounds like Chat Bot Simple.
I assume you want C++, but I'm not sure what GreetBot is in. I think GreetBot is VB, isn't it?
If you want java, http://www.valhallalegends.com/iago/JavaBot-gui.rar
I don't know of any opensource in C++, though..
heres an idea of what to do
Connect to bnet,
send ascii 003
send ascii 004
send username
send carriage return
send password
send carriage return
that should get you connected.
Also want to have something to handle incoming data, once again absolutly clueless as how to do this in c++.
in vb would be like this
Private Sub Socket_Connect()
Socket.SendData chr(3) & chr(4) & username & vbcrlf & password & vbcrlf
End Sub
Private Sub Socket_DataArrival(ByVal bytesTotal As Long)
Dim StrData as String
Socket.Getdata strData, vbstring, bytestotal
text1.text=text1.text & vbcrlf & strdata
End Sub
Thats untested, but i think it should work in vb, been a long time though.
I'm pretty sure he wants to know how to use a socket in C++, actually. I actually wrote a class some time ago, it's on the general programming forum. You could probably search for "Socket" posted by "iago" and find it.
Quote from: iago on November 25, 2003, 03:18 PM
I assume you want C++, but I'm not sure what GreetBot is in. I think GreetBot is VB, isn't it?
Not originally. The original greetbot from Blizzard was written in C++.
Several months ago, I put a mirror (http://www.valhallalegends.com/skywing/files/chatclients/greetbot.zip) of GreetBot up on my site due to Blizzard removing it from their FTP.
Quote from: Skywing on November 25, 2003, 05:16 PM
Several months ago, I put a mirror (http://www.valhallalegends.com/skywing/files/chatclients/greetbot.zip) of GreetBot up on my site due to Blizzard removing it from their FTP.
Thanks ! that's actually extactly what I wanted, but why doesn't it work ? :(
I've changed the login info :
TheBot.SetLogonInfo("Guest", "Guest", "battle.net");
to
MajotBoing(my user in wc3 tft europe), my password for majorboing, and europe.battle.net.
then i compile it (using vc++6) and nothing happens O.O just a black screen, why is that ? =o
thx :>
You can't log onto warcraft 3 namespace in CHAT, only original namespace (@useast, @uswest, etc.)
excuse me ? =o
I'm not very good with english i guess, i didn't understand u....
can u plz tell me what to write in the parameters of this func :
TheBot.SetLogonInfo("Guest", "Guest", "battle.net");
Thanks :-*
TheBot.SetLogonInfo("username", "password", "useast.battle.net");
You can change useast.battle.net to any server you play on..
useast.battle.net
uswest.battle.net
europe.battle.net
asia.battle.net
Quote from: GPX on November 26, 2003, 12:45 AM
Quote from: Skywing on November 25, 2003, 05:16 PM
Several months ago, I put a mirror (http://www.valhallalegends.com/skywing/files/chatclients/greetbot.zip) of GreetBot up on my site due to Blizzard removing it from their FTP.
Thanks ! that's actually extactly what I wanted, but why doesn't it work ? :(
I've changed the login info :
TheBot.SetLogonInfo("Guest", "Guest", "battle.net");
to
MajotBoing(my user in wc3 tft europe), my password for majorboing, and europe.battle.net.
then i compile it (using vc++6) and nothing happens O.O just a black screen, why is that ? =o
thx :>
The "Guest" account was disabled a long time ago. The only non-passworded account now is "Anonymous" (but beware that unlike Guest, it does
not prompt for a password, so your password field will be the first text message the bot sends!). You will probably be wanting to use it with something like a Starcraft account.
GPX: If you're not going to use Anonymous, create an account using Starcraft or Diablo II, then use that to log on.
Quote from: Stealth on November 26, 2003, 08:42 AM
GPX: If you're not going to use Anonymous, create an account using Starcraft or Diablo II, then use that to log on.
Or Warcraft II, or any other client that isn't Warcraft III/TFT. :)
Although you can learn a great deal using anonymous, anonymous is good for checking stats and posting to webpage.
Quote from: ObsidianWolf on November 26, 2003, 09:33 AM
Although you can learn a great deal using anonymous, anonymous is good for checking stats and posting to webpage.
Yes, but greetbot really isn't designed to be logged on as anonymous, and would likely get confused if you tried.
Also, iirc, the default greetbot never prints anything to its console. You could of course add print statements in the appropriate places if you're curious what it is seeing.
Lollllllll ;D
u'r saying anything but warcraft III tft would work ? :P but that's the only game i got ;)
hmmmmmm......
can some1 open an account for me or gimme his old account for this bot on one of these games ? :D:D:DD:D
pm what you want your name and account to be or contact me on bnet, and ill do it for you.
Thanks all, thanks somethingsomethingWolf, for opening an account for me ;)
Now i still have a question :S
i tried to enter a channel, using
Send("/channel Frozen Throne isr-1\r\n");
and it replies "Restricted channel" and doesn't enter :( it only enters public chat 1 or 2 etc .
why is that ? =o
I have no knowledge on that code, but it sounds like you are trying to connect like a Chat Client instead of Binary. If that is so, then thats why. Chat Clients can only open Public Chat, Open Tech Support and something else.
It's because it's a restricted client, and thus it can only join public channels. Public Chat * will work (like, Public Chat goon or Public Chat Johhny or whatever)
Specifically, a non-administrative chat client can only join Open Tech Support, Blizzard Tech Support, and Public Chat <any-postfix>. Anonymous chat clients cannot join any channels or send whispers.
Quote from: GPX on November 26, 2003, 09:52 AM
Lollllllll ;D
u'r saying anything but warcraft III tft would work ? :P but that's the only game i got ;)
hmmmmmm......
can some1 open an account for me or gimme his old account for this bot on one of these games ? :D:D:DD:D
Ugh. For the future, try to actually use some spelling and grammar. "u'r" is
not proper...
Also, regarding "only got war3", I feel sorry for you. There are so many better games. :)
Get a copy of SC for ten bucks :)
Quote from: St0rm.iD on November 26, 2003, 04:31 PM
Get a copy of SC for ten bucks :)
Or download Starcraft Shareware from blizzards webpage.