Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Dukester on June 26, 2004, 04:02 PM

Title: Help with my first bot.
Post by: Dukester on June 26, 2004, 04:02 PM
Hello. I am just making my first bot. With a LITTLE vb knowledge.
I began useing the CleanSlateBot.ocx. I can connect my bot. As of right now, I have 1 textbot that I can send messages. I am wondering what the code for a RTB would be to view the chat. Also the code for the channel listings. For the channel listings do I use a RTB or just a TB? And i was reading the tutorial at     http://216.239.51.104/search?q=cache:-QRmRgZih8MJ:www.valhallalegends.com/cuphead/ocx_me.txt+cleanslatebot+tutorial&hl=en   And I say that I could take the information from a .txt file. In which how would I construct that. Make a .txt file for the config and just have the options of...let's say...Username
Password
Key
etc..
Please help me out,
Thanks
Jeff
Title: Re:Help with my first bot.
Post by: Warrior on June 27, 2004, 05:41 AM
To View the messages you sent and the messages u recieved you will need a RichTextBox and Groks AddChat function. There is one on the Botdev website or search the forums for AddChat. Then when you have your AddChat function in a module all nice and done go to your CleanSlateBot1_OnTalk sub I think its called and just do


AddChat vbwhite, Message

Most of the AddChat usages should look like that but they may Vary.
To add the sent text to the RichTextBox you would need a text box  and a Send Button. When the Send button is clicked do

AddChat vbwhite, Text1.Text
Text1.Text = ""

Now the ChannelListing uses the OnUser, OnChannel , Onjoin , and Onleave Subs. There are various examples scattered throught the Forums use the search feature but they do require a ListView.

You will need a GetStuff / WriteStuff code to read and write data from a .ini . For example then your config.ini would look like

[Main]
Username=
Password=

ect.
You can get this code by searching the forums since im not home and cant give you the code I use.

Well I hope this has helped you atleast a bit.
Title: Re:Help with my first bot.
Post by: Meh on June 27, 2004, 10:11 AM
You cant just use addchat. You have to creat it in a module. I cant be bothered to type it out, but it must be out there somewhere.
Title: Re:Help with my first bot.
Post by: hismajesty on June 27, 2004, 10:40 AM
http://botdev.valhallalegends.com
Title: Re:Help with my first bot.
Post by: Warrior on June 27, 2004, 12:29 PM
Sorry I assumed he would have enough sense to put it in a module and find its usage.
Title: Re:Help with my first bot.
Post by: Meh on June 27, 2004, 12:31 PM
If he cant display text using Cupheads ocx help/ tutorial he wont understand addchat. There is coding to go with it and addchat is a function not a module. The code for addchat must be put in a module. I think Grok made the function?
Title: Re:Help with my first bot.
Post by: Warrior on June 27, 2004, 12:33 PM
Yea and again I will RESTATE what I JUST SAID. I am sorry for Assuming you knew the obvious.
Title: Re:Help with my first bot.
Post by: Dukester on June 27, 2004, 03:46 PM
I would use his tutorial if the webpage opened... It's not working