Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Rince on November 22, 2004, 08:27 PM

Title: Get news
Post by: Rince on November 22, 2004, 08:27 PM
ok last thing  ;)

wanna add news eg.. stealthbot
How i do that?  ( im new to vb so be kind )
Title: Re: Get news
Post by: Yegg on November 22, 2004, 08:51 PM
do u mean ur own news or battle.net news?
If its for bnet news bnetdocs has some info.
http://bnetdocs.valhallalegends.com/content.php?Code=16
Title: Re: Get news
Post by: LivedKrad on November 22, 2004, 09:06 PM
You know, if you're new to VB I think it would be wise to start with something smaller and less complex than a bot. Of course, you can open up any source and start learning, but as with Yegg and the packet buffer class he used you probably won't understand what's going on with code that's foreign you. For instance, if I'd like to learn German I wouldn't get the German translated version of A Tale of Two Cities and attempt to understand its verb tenses, conjugations, noun declination etc. So I'd probably start off designing small applications, then when you become proficient at using the basic functions, design more complex applications using more of the VBA library. Learning a language is structured and built upon: it cannot be done with one project alone.
By the way, this was not a crack at you being new to VB, it's just a friendly suggestion that I think would help you more in the quest of learning VB.
Title: Re: Get news
Post by: Warrior on November 22, 2004, 09:13 PM
Dude a Tale of Two cities rocks <3
Title: Re: Get news
Post by: Rince on November 22, 2004, 09:36 PM
using a bot tut ~ with csb
and i was wondering :o
but this is kool shoudl of started vb long time ago
Title: Re: Get news
Post by: LivedKrad on November 22, 2004, 09:44 PM
Ugh, utilizing an extremely simple and ready-made-out-of-the-box ActiveX control to "program" a bot is not want I meant!
Title: Re: Get news
Post by: Meh on November 23, 2004, 02:02 AM
If u mean how stealthbot gets its own news then it uses i neleave inet.ocx. I tried this but couldnt figure out how to do it.
Title: Re: Get news
Post by: Networks on November 23, 2004, 10:49 AM
ew?? INET, I use winsock which seems much better than using ANOTHER active X control. MSDN should help for that.
Title: Re: Get news
Post by: Hdx on November 23, 2004, 10:55 AM
Well I beleave this is how Stealth does it, if you want to do it that way  you would do this:
Dim Bla as string, Bla2() as string, X as integer
Bla = INet.OpenURL("http://www.deadly7.uni.cc/HdxBmx27/EULA.txt")
Bla2 = Split(Bla, VBCrLf)
For x = 0 to UBound(Bla2)
'bla heres some news!
next x

Works perfectly for me, cept ya need to tell it to do something in the loop :P

As for winsock, what would you do to have it connect to a site?
And is it pobbible to maintain that connection for a long period of time, accessing diffrent files on that site?
~-~(HDX)~-~
Title: Re: Get news
Post by: Yegg on November 23, 2004, 01:52 PM
LivedKrad, using csb to start is a good idea. That's what i started out with. It gives you a chance to see what visual basic has to offer.
Title: Re: Get news
Post by: Warrior on November 23, 2004, 02:26 PM
Yea, and just look how you turned out -.-
Title: Re: Get news
Post by: Yegg on November 23, 2004, 02:46 PM
*slaps warrior* shut up noob.
Title: Re: Get news
Post by: LivedKrad on November 23, 2004, 05:13 PM
You learned Visual Basic by using CSB? I guess my post here wasn't warranted then:
http://forum.valhallalegends.com/phpbbs/index.php?topic=9585.15

Anyway, you would make winsock connect to a website using the standard webserver port (mostly 80). Data transfer is the same with webservers just like it is with Battle.net I believe. You send request and header packets to the webserver and the webserver replies with the data requested. You'd just have to do a little more lower-level packet work.
Title: Re: Get news
Post by: Hdx on November 23, 2004, 06:05 PM
OK coll, I'll try it out on my bot, If i can do this it would be so much easier to do alot of my bot's functiona :)
If anyone has any other info they know about winsock an websites, please tell me.
~-~(HDX)~-~
Title: Re: Get news
Post by: LivedKrad on November 23, 2004, 07:03 PM
http://www.winsockvb.com/forums/
Title: Re: Get news
Post by: Hdx on November 23, 2004, 09:56 PM
Cool, got it connected, I do have one question, I have some things that i would like to do with this, How much bandwith does it take to send a keepalive?
AE:
wsSite.SendData Chr(&H38)
I think it isnt any because the site isnt sending anything back, But i need comfermation. Anyone know?
~-~(HDX)~-~
Title: Re: Get news
Post by: R.a.B.B.i.T on November 23, 2004, 10:50 PM
    sckNEWS.Connect "www.some-random-site.com", 80
Not too hard, is it?
Title: Re: Get news
Post by: LivedKrad on November 23, 2004, 11:27 PM
Let him bask in the glory of connecting to a webserver. You were new once, Rabbit!
Title: Re: Get news
Post by: Hdx on November 23, 2004, 11:58 PM
fofo your an ass >.<
rimind me to kick you ass
Umm ya, and i'm not new, I am just not trying to dammen hard. And my site is a sub site  ( http://www.dradly7.uni.cc/HdxBmx27 ) So it took me a second to figure out what egzactly i had to send to the server to access sertin files in my site.;
took me 1 packet log of Inet an 15 seconds :P
~-~(HDX)~-~
Title: Re: Get news
Post by: LivedKrad on November 24, 2004, 01:44 AM
Not new? I'd say 35 posts is new sir!
Title: Re: Get news
Post by: Hdx on November 24, 2004, 10:27 AM
if you mean new to this site as a poster then yes,  but i've been a member saence march and used this site as a refrance for much longer then that,
I'm just not one to post often, But i have been more active in the last month or so,  thats when I got most my posts.
I never asked questions here :P I've asked them of FoFo and Fool directly.
So plz dont go by posts, posts are jsut how much you like to talk.
~-~(HDX)~-~
Title: Re: Get news
Post by: hismajesty on November 24, 2004, 03:48 PM
Pssh, everybody knows only the YaBB Gods' matter. And Mejal. :P
Title: Re: Get news
Post by: R.a.B.B.i.T on November 24, 2004, 10:45 PM
Quote from: HdxBmx27 on November 23, 2004, 09:56 PM
Cool, got it connected, I do have one question, I have some things that i would like to do with this, How much bandwith does it take to send a keepalive?
AE:
wsSite.SendData Chr(&H38)
I think it isnt any because the site isnt sending anything back, But i need comfermation. Anyone know?
~-~(HDX)~-~
It's:
sckSite.SendData "GET page.php HTTP/1.1" & vbCrLf
sckSite.SendData "Connection: keep-alive"

I think, then if the reply contains "Connection: Keep-Alive" then it will remain open, otherwise it will close.
Title: Re: Get news
Post by: Hdx on November 25, 2004, 12:17 AM
Naw tryed that FoFo, Only way i've had the server stay connected is to have a time set to 2000 as an interval and just keep sending "8", See this isnt a problem, cept does it take up bandwith?
If someone has a server that mesures bandwith and wana test this for me, plase do. I dont have access to any
~-~(HDX)~-~
Title: Re: Get news
Post by: LivedKrad on November 25, 2004, 10:28 PM
Quote from: HdxBmx27So plz dont go by posts, posts are jsut how much you like to talk.
Posting for me is usually much more than that. It's how much I like to help people or how much I can offer on the subject.
Title: Re: Get news
Post by: phvckmeh on November 25, 2004, 11:56 PM
http://clancybr.com/forum/viewtopic.php?p=2081#2081

That will retrieve the version information stored in a txt file
Title: Re: Get news
Post by: LivedKrad on November 30, 2004, 09:45 AM
Why do you continually come back? I like the fact that when you do, you post things that are pertaining to the subject and *usually* help, (no matter how much you just advertise :)). However, the stupid things you say like "never coming back to these faggot forums" while you "make us sweat". Why must you do this? :(
Title: Re: Get news
Post by: Dyndrilliac on November 30, 2004, 04:56 PM
Quote from: Networks on November 23, 2004, 10:49 AM
ew?? INET, I use winsock which seems much better than using ANOTHER active X control. MSDN should help for that.

Winsock, unless used at the API level is "using ANOTHER control", just like the Inet control which can also be used at the API level.