• 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!

Open Tibia Login Server - brand new open source login server

kondra

Excellent OT User
Joined
Apr 9, 2018
Messages
192
Solutions
3
Reaction score
692
Location
/dev/null
GitHub
OTCv8
Hey,

Current login server is quite outdated, so I have a plan to create new one.
It will be created in typescript (nodejs), so it will be easy to develop and extend.
It will have MIT license, fully open source.

It will support:
  • Classic tibia login
  • Tibia 12 login with extra information (news, players online, etc)
  • Authorization token
  • Extended otclientv8 login (with news, outfits, ingame character creation and other cool stuff)
  • Cast & Cams
  • Proxies
  • Multiple worlds
  • Status for ots list

Github repo: OTCv8/OpenTibiaLoginServer (https://github.com/OTCv8/OpenTibiaLoginServer)

If you want some other features in this login server - let me know. It should be done within a week, have a plan to finish first working version today (for tibia 10.99).
 
Last edited:
First version is ready, working with my 10.99 test server
Check it out and let me know what you think.
My plan is to finish all in 3 days.
 
Just to understand how this works. The login server signs a token for an account and an OpenTibia server will then confirm the authenticity of said signature and what account it belongs to, and allow the player to be loaded?
 
Hey,

Current login server is quite outdated, so I have a plan to create new one.
It will be created in typescript (nodejs), so it will be easy to develop and extend.
It will have MIT license, fully open source.

It will support:
  • Classic tibia login
  • Tibia 12 login with extra information (news, players online, etc)
  • Authorization token
  • Extended otclientv8 login (with news, outfits, ingame character creation and other cool stuff)
  • Cast & Cams
  • Proxies
  • Multiple worlds
  • Status for ots list

Github repo: OTCv8/OpenTibiaLoginServer (https://github.com/OTCv8/OpenTibiaLoginServer)

If you want some other features in this login server - let me know. It should be done within a week, have a plan to finish first working version today (for tibia 10.99).

Fuc*#(! Insane you think about it. REAL pro. Thanks for sharing the concept using Node.JS
 
@Forby - if you are not using otclient, then it's just replacement for very old ProtocolLogin/ProtocolStatus and login.php for tibia 12. Token is just authorization token from tibia 12.

I added benchmark, here are the results from my cheap vps (4$/month):
Code:
Starting benchmark...
Connected to mysql database
Benchmarking: First packet (invalid packet)
Processed 1000 packets in 146 ms.
Benchmarking: Second packet (invalid password)
Processed 1000 packets in 1562 ms.
Benchmarking: Third packet (correct login)
Processed 1000 packets in 2449 ms.

So it should be able to handle 400 correct logins per second which is not bad.
Feel free you run benchmarks on your own, just add acc1/acc account to your database. Command: npm run benchmark
 
Tbh you should consider doing it as a micro service, and implementing clusterability. It should be easy to start this on different machines for load balancing purpose.
 
There was some delay. I made another commit today.
Protocols 7.40 - 11.00 are now supported. Auth token support is missing, will add it next commit.
I also added limits for connections / invalids authentications.
 
New commit - support for tibia 12 has been added.
I also added support to bind multiple ports (will be nesesery for ots list status when using multiworlds) and updated few files.
Token support hasn't been added yet, will be added in next commit - tomorrow.
 
I made 3 commits since last post. New things:
  • Two-factor authentication (token)
  • Finished status protocol
  • Auto detection of database type
  • Added correct outfits for tibia 12 login
  • Added prototypes for cams and casts
  • Added translations for vocations

Auto detection of database type is an cool and important feature. It automaticly detects what kind of server are you using, so it will use correct sql queries. Here's on example how it detects what type of database you have:
Code:
        this.hasPlayersOnline = ('players_online' in this.tables);
        this.hasWorldIdInPlayersOnline = (this.hasPlayersOnline && this.tables['players_online'].includes('world_id'));
        this.hasOnlineInPlayers = (this.tables['players'].includes('online'));
        this.hasWorldIdInPlayers = (this.tables['players'].includes('world_id'));
        this.hasServerConfig = ("server_config" in this.tables);
        this.hasLiveCasts = ('live_casts' in this.tables);
        this.hasCams = ('cams' in this.tables);

In general, project is almost ready to be used. In this week few servers will start using it.
 
Great work and contribution!

I like the idea of give less work to the game server, multiworlds support and avoid use login.php and a website for it if you dont want to.

I have tested it with TFS 1.3 and OTCv8 10.98 and seems to work nice. Now trying to make it work with OTServBr and official Tibia client 12.51 until OTCv8 supports 12+.
 
Great work and contribution!

I like the idea of give less work to the game server, multiworlds support and avoid use login.php and a website for it if you dont want to.

I have tested it with TFS 1.3 and OTCv8 10.98 and seems to work nice. Now trying to make it work with OTServBr and official Tibia client 12.51 until OTCv8 supports 12+.
Hey mate, any progress about otbr using this feature?
id like to know if would be possible to keep using website to handle everything like creating account, character, selecing the world from there and so?

Thanks in advance
 
Too difficult/laborious to just take proxy support and add it to another client?
 
Back
Top