• Welcome to Valhalla Legends Archive.
 

Connecting with BNLS

Started by EviL_MarinE, October 24, 2004, 06:12 AM

Previous topic - Next topic

EviL_MarinE

Hey.

I Decided i want my bot to connect with bnls first of all, now i need some help there.

Its "bnls.valhallalegends" for server yes?
And its port "9367" yes?

Well if they are both correct, then it shud connect:

Private Sub mnuConnect_Click()
Display ChatRoom, True, True, vbYellow, "Connecting To " & frmLogin.BnlsServer
        frmMain.bnlsSocket.Close
    frmMain.bnlsSocket.Connect frmLogin.BnlsServer, 9367
End Sub


"frmMain.bnlsSocket.Connect" Bit makes it connect (duhh)
So here it is:

Private Sub bnlsSocket_Connect()
Display frmMain.ChatRoom, True, True, vbGreen, "Connected to BNLS!"
    With PBuffer
        .InsertNTString "IllusionBot"
        .SendBNLSPacket &HE
    End With
End Sub


But it doesnt start to connect, have i gone somewhere wrong with my bnls?


shadypalm88

Quote from: EviL_MarinE on October 24, 2004, 06:12 AM
Quote
Private Sub mnuConnect_Click()
Display ChatRoom, True, True, vbYellow, "Connecting To " & frmLogin.BnlsServer
        frmMain.bnlsSocket.Close
    frmMain.bnlsSocket.Connect frmLogin.BnlsServer, 9367
End Sub
Can't really see why that's wrong, try stepping through it with the debugger to see if frmLogin.BnlsServer really contains "bnls.valhallalegends.com" when it starts to connect.

And, just a tip, create a public variable in a module somewhere to hold the BNLS server address and other things like the username, password, etc.  I assume frmLogin is your settings form.  If you keep using frmLogin.Blah to access your settings, you force your bot to keep that form in memory, which is just a waste.  Not to mention that using text fields is slower than using variables.

EviL_MarinE

AH, k thanks.

Well i did just use www.valhallalegends.com in the end and it worked

Thanks for the help in other forum btw :)

Skywing

Using www.valhallalegends.com as a default is a bad idea, since your program will break if the web server ever gets moved to a different machine.

EviL_MarinE

#5
Oh, well i did use bnls.valhallalegends.com and it didnt work, hmm

Edit: bnls.valhallalegends.com Does work now, My Apolgies :P

R.a.B.B.i.T

Not really sure if I should be talking about this here, but:
JBLS is a BNLS clone that can hash all games remotely, and uses the same protocol.  The only differences are that JBLS is a hell of a lot less efficient than BNLS, and it must be run by somebody.  You should always (even before JBLS existed) allow for the user to specify the BNLS server, but default it to bnls.valhallalegends.com.

Blaze

Stop talking about JBLS... Its not up half the time anyway....
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

EviL_MarinE

Heh, as i just said in my other post, i aint using BNLS Now, go to my other post (" A Problem, help plz") To see why ;\

The-FooL

Quote from: Blaze on October 25, 2004, 08:24 PM
Stop talking about JBLS... Its not up half the time anyway....
It's not up ever, at least not on a public server.

LivedKrad

You should learn to debug things, Evil Marine.

Sorc.Polgara

Hi

what is the IP for bnls.valhallalegends.com?

I am currently trying to move away from VB and make a bot in C++.  I can't seem to connect to bnls under the "bnls.valhallalegends.com" address.

I've been looking at other simple C++ bots and how they connect and it shows it connecting to BNET with its IP address instead of "useast.battle.net".



EviL_MarinE


Zakath

Quote from: bethra on October 29, 2004, 10:00 PM
Hi

what is the IP for bnls.valhallalegends.com?

I am currently trying to move away from VB and make a bot in C++.  I can't seem to connect to bnls under the "bnls.valhallalegends.com" address.

I've been looking at other simple C++ bots and how they connect and it shows it connecting to BNET with its IP address instead of "useast.battle.net".



A properly constructed connection sequence can deal equally well with either a name or an IP address. ZakBot, for instance, can connect fine with a name like "useast.battle.net."
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.