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

Multi Server On 1 Client For Eo/ EE is posted in spoiler at bottom[Update]


andy200129
 Share

Recommended Posts

Data share coding progress 10%
account share progress 0%

Credits for helping me with bits of code as new to Eo
Scypher
ibehated
NOTE:
ITS LIKE REALM/WORLD DATA IS NOT SHARED THAT IS IN DEVELOPMENT

OK on this source i will show you how to make Multi server on 1 client pretty simple
(using buttons as a example you can use picture boxes or anything u desire to make it more professional)
Client Sided
Requires VB6
FrmMenu

Go into Your frmMenu
make 2 buttons
both named differently for different server
double click 1 button (works for both just change to different Port each server)
under that sub put
port to be changed looks like = 0000

>! Dim IP As String, Port As String
    Dim fErr As Integer
>!     Port = Val(0000)
>!     fErr = 0
    If fErr = 0 And Port <= 0 Then
        fErr = 1
        Call MsgBox("Please Fix The Port!", vbCritical)
        Exit Sub
    End If
    If fErr = 0 Then
        Call PutVar("IPCONFIG", "PORT", 0000, (App.Path & "\Data Files\config.ini"))
    End If
    Call DestroyTCP
>!     frmMain.Socket.RemotePort = 0000
once you have done that its all up and running all you need to do
is copy and paste server file delete accounts out of it (Accept Admin Aka yours or staff)
make sure both servers run on different ports and it goes by what you put in the code on each button
and your done

To Host servers of different Computers (Different Ip)
Same as above installation with a code difference

Change to your port  = 0000
Change to your Ip = 00.00.00

>! Dim IP As String, Port As String
    Dim fErr As Integer
>!     IP = 000.000.000
    Port = Val(0000)
>! fErr = 0
    If fErr = 0 And Len(Trim$(IP)) = 0 Then
        fErr = 1
        Call MsgBox("Please Fix The IP!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    fErr = 0
    If fErr = 0 And Port <= 0 Then
        fErr = 1
        Call MsgBox("Please Fix The Port!", vbCritical)
        Exit Sub
    End If
    If fErr = 0 Then
        Call PutVar("IPCONFIG", "IP", 000.000.000, (App.Path & "\DataFiles\config.ini"))
        Call PutVar("IPCONFIG", "PORT", 0000, (App.Path & "\Data Files\config.ini"))
    End If
    Call DestroyTCP
>!     frmMain.Socket.RemotePort = 0000
    frmStable.Socket.RemoteHost = 000.000.000

Old One for EE Stable 2.7

>! Please Comment if you have used this or liked it i want to see how many people use/like it lol and i will bring out more tutorials like this
Tutorial Difficulty 1/5 Newb Friendly
>! Requirements
Visual Basics 6
EE 2.7 Source
>! Tutorial
Step By Step
1)Copy And Paste your Server make sure the Server - Copy is renamed to Server2
2) Copy and paste Client rename Client -copy to Test Client
3) Open Visual Basics 6  open the Client.vbp
4) open frmMainMenu add 2 buttons name them the 2 servers
5) put the code below on the buttons
6) Change the 1st button code port (0000) to the 1st servers port
7) change the 2nd button code port (0000) to the 2nd server port
8)make sure u save and compile the new client.exe into test client folder
9)run both servers Open client and test to check it works
>! Code
Yellow = change to your server ports
Red = Change to your Ip
>! >! Dim IP As String, Port As String
    Dim fErr As Integer
>!     Port = Val(0000)
>!     fErr = 0
    If fErr = 0 And Port <= 0 Then
        fErr = 1
        Call MsgBox("Please Fix The Port!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 Then
        Call WriteINI("IPCONFIG", "PORT", 0000, (App.Path & "\config.ini"))
    End If
    Call TcpDestroy
>!     frmStable.Socket.RemotePort = 0000
>! Different Computer Host
>! >! Dim IP As String, Port As String
    Dim fErr As Integer
>!     IP = 000.000.000
    Port = Val(0000)
>!     fErr = 0
    If fErr = 0 And Len(Trim$(IP)) = 0 Then
        fErr = 1
        Call MsgBox("Please Fix The IP!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 And Port <= 0 Then
        fErr = 1
        Call MsgBox("Please Fix The Port!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 Then
        Call WriteINI("IPCONFIG", "IP", 000.000.000, (App.Path & "\config.ini"))
        Call WriteINI("IPCONFIG", "PORT", 0000, (App.Path & "\config.ini"))
    ' Call MenuState(MENU_STATE_IPCONFIG)
    End If
    Call TcpDestroy
    frmStable.Socket.RemoteHost = 000.000.000
    frmStable.Socket.RemotePort = 0000
Link to comment
Share on other sites

the only down fall witch i am working on is so when u update maps on 1 server it will automaticly go onto other witch will be abit of a fun job then later i will implement more stuff to make it more better and like channels but im new to EO so yea im used to ee but wish me luck :)
Link to comment
Share on other sites

sorry for bump but what im going to try is run both servers from the same account/map/item ect file but it will still be its own unique server with a refresh rate of every 0.1 second and making sure it dosnt cause bugs if i get this running i might release my own EO sorce release as it will be a big process to do by tutorial
Link to comment
Share on other sites

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...