Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Server List


horsehead
 Share

Recommended Posts

This is a simple serverlist Tutorial… Lets begin.

ALL Client Side

1\. Create  2 optionbuttons on frmMenu, picLogin.

2\. Put 2 labels next to the otionbuttons and give them as caption the name of the different servers.

3\. open the code of the optionbuttons and add that in them

> Private Sub Option1_Click()
> If Option1 = True Then
> Option2 = False
> If Option1 = True Then
> Options.Port = 7001
> SaveOptions
> End If
> End If
>
> End Sub
>
> Private Sub Option2_Click()
>
> If Option1 = False Then
> Option2 = True
> If Option2 = True Then
> Options.Port = 7002
>
> SaveOptions
> End If
> End If
>
> End Sub

4\. Then open the code of lblLAccept and add

> frmMain.Socket.RemotePort = Options.Port

about

> If isLoginLegal(txtLUser.text, txtLPass.text) Then

5\. now you can create a second server folder (Copy your EO server) and change in the second server folder the port to 7002.

So I hope I dont forgotten something… Enjoy it^^
Link to comment
Share on other sites

@Noctis:

> Yes that feature is more usefull for games with more players… but if anyone want to add it so he or she can it^^

regard at first its for me to learn to programm but i release my stuff for others thats the bonus and i dont want to steal anyones ideas but every big mmo had this feature
Link to comment
Share on other sites

@SnowFox:

> Mines better, Mine has a custom interface, with server status. and be able to click which server to connect to with a character transfer with saves :D. my project of this is on this forum, just digg for it.

I looked into your world selection thread. Its nice but how can i code the server startus check?
Link to comment
Share on other sites

Well, at least it do the trick, so it's good =).

As for the server status checker, take a look at this:
```
Function IsConnected() As Boolean
```You then use the port change and then call the IsConnected and save that value somewhere. With that, you can check if connection is possible. Something like this:
```
lblServerStat(1).Caption = "Offline"
lblServerStat(2).Caption = lblServerStat(1).Caption 'not sure, but there probably exist better ways... I'm bad at this stuff ya know?
Select Case Index
        Case 1
            frmMain.Socket.RemotePort = Options.Port
            frmMain.Socket.Close
            frmMain.Socket.Connect
            I = IsConnected
            lblServerStat(Index).Caption = "Online" if I = True
        Case 2
            frmMain.Socket.RemotePort = Options.Port
            frmMain.Socket.Close
            frmMain.Socket.Connect
            I = IsConnected
            lblServerStat(Index).Caption = "Online" if I = True
    End Select

```I think that it should do the trick

Good luck,
L'ark Mitsinikos
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...