Author | Message | Time |
---|---|---|
peofeoknight | If I wanted to modify a basic chat bot to access and update a remote data base (mssql server) where would I begin? Can some one point me in the right direction? I know some java, I am taking ap comp sci, but I do not feel confident enough with that to take on a project like this because it would just confuse the crap out of me. I was thinking vb & winsock. I know asp.net and have experience w/ xml webservices. Any suggestions? Anyone have some working source codes I could use? I do not need anything aestetically pleasing, it doesnt even have to have a channel list or anything like that, all I need is for it to get the names from the data base, get their records, update the data base, and then its done and I would turn it off, I would run it on startup and close it after it is done to make sure I keep up with it or something like that. | December 15, 2003, 1:51 AM |
blinkdude | use CSB to connect or use a bot source..then use MyDql OBC drivers to connect to mysql and insert the info , my web channel uses MySqL for it... http://www.eternalsoldiers.net/esbot/chnnel.php hmm this is a good site http://www.codeguru.com/forum/forumdisplay.php?s=&forumid=12 for info on it ... how i would do it is this... --Con.. to battle net --Connect to MySql Database --D.L list to text file --Open Txt file Either add it to a listview or just read stright from file --Have a Timer call 1 name at a time in 45 - 1.3 minz and /stats name them. --Update name (stats in mysql) --disble Timer. | December 15, 2003, 9:10 AM |
iago | Why would he need a CSB for that? Use a ChatBot. I would recommend finding the source for GreetBot, and changing that so it looks up stats instead. | December 15, 2003, 11:58 AM |
blinkdude | [quote author=blinkdude link=board=17;threadid=4243;start=0#msg35452 date=1071479436] use CSB to connect or use a bot source... [/quote] Duno maybe he Wants this bot to have other features too..Just Suggestions.. | December 15, 2003, 8:57 PM |
RyanIdium | why don't you just have php connect to your bot and get it? less steps. (and some hosts don't have mysql obc drivers) | December 15, 2003, 9:27 PM |
peofeoknight | Like I said, I use mssql server. I also use asp.net, to use mysql with asp.net would be to ask for lag because I would have to emule using the my.ini and I do not want to do that. I need to figure out how to update mssql server remotely, that is the desired affect :-[. I would settle for getting some bot source codes and getting it to connect for now though ;D . The bot needs no features, it doesnt even need to chat or have a channel list, I just need it to get the stats and I would run it daily. The stats need to be somewhat currents, but not live. I do not want to have an application constantly accessing and updating the remote data base. I just do not feel comfortable with it, I think its asking for trouble. I cannot promoise 24/7 uptime on this machine, so my clan's site is not hosted from here, therefore the data base is remote too :-\ | December 15, 2003, 11:09 PM |
iago | I don't know your current level of programming, but try this: 1. Connect to useast.battle.net (or whatever) 2. Send char(3) 3. Send char(4) 4. Send "anonymous" 5. Send stats request ("/stats [name]") 6. Goto 5 while there's more names to look up | December 15, 2003, 11:29 PM |
hismajesty | [quote author=UserLoser. link=board=17;threadid=4243;start=0#msg35728 date=1071592696] when on CHAT, you need to give a product, "/stats joebob" wouldn't work, need to give a product [/quote] Once in a while it asks for a product if you're on a product such as SEXP too. | December 16, 2003, 7:46 PM |
iago | He'll figure that out :P It basically works! | December 17, 2003, 12:10 AM |
peofeoknight | I have nothing so far. I need bot source codes. How can I do anything you ask without some source codes, I was hopeing someone had the framework for a very basic chat bot and I could just modify it. I was asking earlier if there are any available... :-\ I am very experienced in vb (3 yrs) and have some general java knowledge (I am taking an ap class in it now), that should give you some idea of my programming | December 17, 2003, 1:53 AM |
peofeoknight | [quote author=RyanIdium link=board=17;threadid=4243;start=0#msg35549 date=1071523641] why don't you just have php connect to your bot and get it? less steps. (and some hosts don't have mysql obc drivers) [/quote] Because I am using asp.net, is it that hard to grasp? I am an asp.net user, I picked that as my language of choice. I like the syntax, it runs fast, it is object oriented, and it is extreamly powerful. I reguard it as being the best server side technology out there right now. Lets forget about the data base stuff right now, that is putting the cart before the horse, I need to get a bot here, where do I start? Is there a tutorial, where can I get some rudimentary code. I do not need any advanced features, I just want to see how this thing is going to go about connecting to battle net. | December 17, 2003, 1:55 AM |
Null | [quote author=iago link=board=17;threadid=4243;start=0#msg35592 date=1071530951] I don't know your current level of programming, but try this: 1. Connect to useast.battle.net (or whatever) 2. Send char(3) 3. Send char(4) 4. Send "anonymous" 5. Send stats request ("/stats [name]") 6. Goto 5 while there's more names to look up [/quote] For some one with 3 years Vb experience im surprised u need someone elses source code to log on to battle.net with the 'CHAT' protocol | December 17, 2003, 2:14 AM |
iago | [quote author=Null link=board=17;threadid=4243;start=0#msg35858 date=1071627248] [quote author=iago link=board=17;threadid=4243;start=0#msg35592 date=1071530951] I don't know your current level of programming, but try this: 1. Connect to useast.battle.net (or whatever) 2. Send char(3) 3. Send char(4) 4. Send "anonymous" 5. Send stats request ("/stats [name]") 6. Goto 5 while there's more names to look up [/quote] For some one with 3 years Vb experience im surprised u need someone elses source code to log on to battle.net with the 'CHAT' protocol [/quote] Thank you, that's EXACTLY what I was going to say. I just told you EXACTLY how to do it, the complete and total algorithm, and all you have to do is translate that into a tiny VB program. So go do that rather than complaining you need source even though you're an advanced programmer. | December 17, 2003, 2:32 AM |
peofeoknight | I have never built a battle net bot before. I do not know how to connect anything to battle net. I have never made anything like this before. I want to see the basic workings of a chat bot since I have never worked with anything like this before. I have used winsock before but never made and irc or battle net bot. That is what I was aiming for. If you do not have any sample codes I can look at to get a general idea of what I need to do, or have a framework that I can modify to suit my needs I would be greatful. I am not making something to redistribute here, or by any means trying to act like I made it myself. I just want a feature like this to integrate into my site. Have any good links or tutorials? | December 17, 2003, 3:01 AM |
iago | ok, listen carefully. 1. CONNECT TO useast.battle.net or WHICHEVER SERVER YOU WANT. 2. SEND char(&hc), THEN SEND char(&hd). 3. SEND THE STRING "anonymous", then send vbcrlf. 4. There, you are logged in far enough to check stats. For each person in your list, send out "/stats [name] [product]", for example "/stats iago SEXP", and you will recieve their stats. 5. Parse the stats for each person and write them to your sql database. DONE! Read that, and do it. There's not much to writing a statsbot. [edit] If you can't do that yourself, then clearly you aren't willing to put in any effort at all, and are, as such, not welcome here. You'll find plenty of people here who are willing to give you advice, such as this, but not many who will give you source code. | December 17, 2003, 3:09 AM |
peofeoknight | It does not sound that complicated, but my problem is I do not know how the heck to connect it. I need to see what this will look like, thats what I am asking for. I am not saying you are not helping me, its just that I can't make a stat bot without being able to connect to battle net. How do I accomplish this? I am not asking you to write me anything or do anything like that, I know how annoying that can be, just point me in the right direction. I was browsing this disclaimer, would assbot be something to look at, to see how a bot connects? Could I use bnls or, how do other bots do it? I am not neccessarily looking for source code to jack and I do not neccisarily want any here, I just want a link or something where I might learn something. I want to try this for myself then. But right now I have nothing to go on. I know the steps but, the first one I have no idea how to do it, I need something to look at, just something to give me some idea of what is going on under the hood. I have a general idea but I do not know how to get text from the center, I do not know how to connect it, I do not know how to enter text. I just do not get how it integrates with battle net and how the commands are sent. | December 17, 2003, 3:13 AM |
Null | Winsock.connect uswest.battle.net , 6112 | December 17, 2003, 3:19 AM |
peofeoknight | Thanks, Ill play around w/ it and see what happens. | December 17, 2003, 3:26 AM |
iago | You don't need CSB or BNLS for a connection unless you actually want to login with an account, but you don't have to. You need to use a winsock control; look up how on www.pscode.com or something like that. | December 17, 2003, 3:37 AM |
peofeoknight | so i do not need hash files, cd keys, versions, anything like that? All I have to do is open a connection? Ill definatly play around with this some more tomorrow. Is battle net basically irc down in its core, I always seemed to think it was with the using of irc commands etc? | December 17, 2003, 3:41 AM |
iago | To log on as anonymous, you need nothing of the sort. To log on with an account, join channels, chat with people, etc, you DO need those things. I don't know how IRC works, so I can't compare them. | December 17, 2003, 3:46 AM |
peofeoknight | So what is char(3) and char(4)? What is the signifigance of that? Since it is comeing before the logon? Ill play around more with this tomorrow. I was under the impression that I was going to need to figure out how to use the storm.dll etc, so I was thinking this is more difficult then it is. Thanks for your help so far. | December 17, 2003, 4:13 AM |
iago | char(3) = the protocol, 1 is binary, 2 is ftp, 3 is chat. char(4) turns off echoing, so it won't send you back whatever you send it. It's optional, but for your program I would recommend it. | December 17, 2003, 4:29 AM |
hismajesty | [quote author=UserLoser. link=board=17;threadid=4243;start=15#msg35998 date=1071680182] forgot parameters [/quote] [code]Private Sub wsChat_DataArrival(ByVal bytesTotal As Long)[/code] :) | December 17, 2003, 5:33 PM |
iago | Ugh@giving code. It wouldn't have been hard for him to code, and it would have been good for him. | December 17, 2003, 10:47 PM |
peofeoknight | Ok, I am running this bot, Now when I connect inside of txtrecieve I see 4 characters, they are just solid lines, does it sound like it is working? I do not see stats in text recieve, I changed the name and the game client to peofeoknight sexp just to see what happened and the same thing happens. Is this good or bad, I do not get any errors or anything though, there were some syntax errors in the code above that I fixed, but thank you for typeing that up for me, I could have done it but heck I am not complaining just less for me to do. ;). Back to the characters, I want to see stats to believe this to just make sure it is working, does this sound like it is working? How can it be convirted to normal text? I dropped in a label and on change of txtrecieve I am setting the labels caption equal to the text of txtrecieve, only there is no text that displays, and I cannot copy these characters, so whats up with that? | December 17, 2003, 10:48 PM |
Null | You must parse your incoming data basically sorting what u need from what u dont , in this particular situation you could ignore just about everything and focus on your , IIRC USER_INFO? event. someone correct me if im wrong about this event displaying a person's stats | December 17, 2003, 11:05 PM |
Kp | [quote author=iago link=board=17;threadid=4243;start=15#msg36047 date=1071701226] It wouldn't have been hard for him to code[/quote] I disagree. Based on the quality of his posts and his apparent inability to solve anything prior to UserLoser posting that code, I think it would have been very hard for him to do that on his own. :) (I agree with you about it being bad to give him code though.) | December 17, 2003, 11:14 PM |
peofeoknight | [quote author=Kp link=board=17;threadid=4243;start=30#msg36063 date=1071702876] [quote author=iago link=board=17;threadid=4243;start=15#msg36047 date=1071701226] It wouldn't have been hard for him to code[/quote] I disagree. Based on the quality of his posts and his apparent inability to solve anything prior to UserLoser posting that code, I think it would have been very hard for him to do that on his own. :) (I agree with you about it being bad to give him code though.) [/quote] I know vb, the language and I have used winsock before, I just have never worked with anything quite like this before so I was still in the dark as to what I had to do until just before that code was posted, once I knew it was just winsock and send those characters I could have handled it from there. But the code helped, I probably would have screwed a few things up and had to do trial and error for a while till I figured it out. http://www.valhallalegends.com/docs/bnetbotbygrok.htm something like that would have been very helpful right from the start! Thats what I was after aghhhhh, I did not want to hassle you I just wanted to be pointed to the right place. | December 17, 2003, 11:57 PM |
peofeoknight | [code] Private Sub wsChat_DataArrival(ByVal bytesTotal As Long) Dim InData As String wschat.GetData InData, vbString txtrecieve.Text = txtrecieve.Text & vbCrLf ' add the incoming data to the textbox End Sub [/code] Ok that is what I have, I am just getting the crlf, so it seems like I am not getting any data, whats going wrong? It seems like I am getting two empty lines. What groc is using is [code] Private Sub ws_DataArrival(ByVal bytesTotal As Long) Dim strData As String ws.GetData strData, vbString, bytesTotal 'last two parameters are optional ChatBot.AddToBuffer strData 'pass new data to the buffer ChatBot.ProcessData 'parses and handles complete lines, if any End Sub [/code] chatbot is a module, I have to figure out how to get the winsock data to that text box, so now what I need to do is get the winsock data to the text box right? | December 18, 2003, 12:41 AM |
peofeoknight | heh, well I found where the error was. What is indata then? I mean I know its a string but how is the winsock data getting to it? Never mind, was not thinking. AWW KICK ASS! I am getting stats, Now I just need to busy out the old string statments! Also earlier I looked around on msdn and found some data controls for connecting to mssql server from a vb application, so I might have solved that problem. | December 18, 2003, 12:57 AM |
peofeoknight | [quote] Connection from [24.129.72.170] Enter your account name and password. Use 'anonymous' if you only want to issue queries. Username: 2010 NAME Anonymous#10 1018 INFO "peofeoknight's record:" 1018 INFO "Normal games: 212-249-21" 1018 INFO "Ladder games: 15-8-0 (rating 1128)" [/quote] This is so awesome, thank you so much for your help, this is unbelievable. I think I can handle it from here thanks so much! Now I have a an Idea of how bots work and how I can do this! | December 18, 2003, 1:05 AM |
MrRaza | [quote author=UserLoser. link=board=17;threadid=4243;start=30#msg36065 date=1071703012] Or i could have, or someone could have posted the link to Grok's Chat Bot Tutorial or his sample chat bot source. [/quote] I was planing on posting that aswell, you should of just giving him that link in the very beginning. | December 18, 2003, 1:41 AM |
NewB | Jeez, UserLoser thanks for the help my way lol, reading that solved my problem before asking. | December 18, 2003, 8:09 AM |
peofeoknight | lets all give him +1. Time to bust out the ado, that is what I am going to use to get my sql server data and update it. | December 18, 2003, 10:34 PM |