• Welcome to Valhalla Legends Archive.
 

I'm asking for the code of a simple chat bot ...

Started by GPX, November 25, 2003, 02:15 PM

Previous topic - Next topic

GPX

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.


Banana fanna fo fanna

Google for greetbot. That's exactly what you want.

ObsidianWolf

uhm ok, like Binary Bot Simple or Chat Bot Simple?


iago

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..
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


ObsidianWolf

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.



iago

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.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Kp

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++.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Skywing

#8
Several months ago, I put a mirror of GreetBot up on my site due to Blizzard removing it from their FTP.

GPX

Quote from: Skywing on November 25, 2003, 05:16 PM
Several months ago, I put a mirror 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 :>

iago

You can't log onto warcraft 3 namespace in CHAT, only original namespace (@useast, @uswest, etc.)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


GPX

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  :-*

Crypticflare

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

Skywing

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 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.

Stealth

GPX: If you're not going to use Anonymous, create an account using Starcraft or Diablo II, then use that to log on.
- Stealth
Author of StealthBot