• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

C++ Changing OtClient Ip/Port/Version

Helliot1

Owner of Empire Online
Joined
Jul 26, 2017
Messages
315
Solutions
1
Reaction score
60
Hello everyone,

I need change the Otclient Ip/port/version, to put it automatic. I tried a lot of things.

Client_entergame/entergame.lua
LUA:
function EnterGame.setUniqueServer(host, port, protocol, windowWidth, windowHeight)
  local hostTextEdit = enterGame:getChildById('serverHostTextEdit')
  hostTextEdit:setText(host)
  hostTextEdit:setVisible(false)
  hostTextEdit:setHeight(0)
  local portTextEdit = enterGame:getChildById('serverPortTextEdit')
  portTextEdit:setText(port)
  portTextEdit:setVisible(false)
  portTextEdit:setHeight(0)

changed all this values like "host" "port"
Code:
function EnterGame.setUniqueServer(thelastempire.servegame.com, 7117, 860)
  local hostTextEdit = enterGame:getChildById('thelastempire.servegame.com')
  hostTextEdit:setText(host)
  hostTextEdit:setVisible(false)
  hostTextEdit:setHeight(0)
  local portTextEdit = enterGame:getChildById('7171)
  portTextEdit:setText(port)
  portTextEdit:setVisible(false)
  portTextEdit:setHeight(0)

But nothing works
When I enter the client, don't have any changes

Bump
 
Last edited by a moderator:
Solution

You are doing that very wrong.

First, put it back to original.

Second, create a file called myuniqueserver.otmod inside client_path/modules/ (it should be like client_path/modules/myuniqueserver.otmod) with this content:
Code:
Module
  name: myuniqueserver
  description: My Unique Server Module
  author: River
  website: http://thelastempire.servegame.com
  sandboxed: true
  autoload: true
  autoload-priority: 1000
  @onLoad: |
    EnterGame.setUniqueServer('thelastempire.servegame.com', 7171, 860)

You are doing that very wrong.

First, put it back to original.

Second, create a file called myuniqueserver.otmod inside client_path/modules/ (it should be like client_path/modules/myuniqueserver.otmod) with this content:
Code:
Module
  name: myuniqueserver
  description: My Unique Server Module
  author: River
  website: http://thelastempire.servegame.com
  sandboxed: true
  autoload: true
  autoload-priority: 1000
  @onLoad: |
    EnterGame.setUniqueServer('thelastempire.servegame.com', 7171, 860)
 
Solution
You are doing that very wrong.

First, put it back to original.

Second, create a file called myuniqueserver.otmod inside client_path/modules/ (it should be like client_path/modules/myuniqueserver.otmod) with this content:
Code:
Module
  name: myuniqueserver
  description: My Unique Server Module
  author: River
  website: http://thelastempire.servegame.com
  sandboxed: true
  autoload: true
  autoload-priority: 1000
  @onLoad: |
    EnterGame.setUniqueServer('thelastempire.servegame.com', 7171, 860)

Thanks again!!


I was breaking my head trying to resolve it.
 
Back
Top