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

Tutorial for running 7.7 CipSoft Server on Ubuntu

Well, I'm stuck at this part, I try to load characters list but i get this error:
View attachment 74468
When I try to login my Linux receive the login attempt but TFLS and querymanager don't, it looks like it simply shuts the connection, I searched EVERY file and FORUM but nobody said how to fix this and all files are 100% with all IPs locations changed, ports, EVERYTHING is alright. You can see in this print, my Linux received the login attempt from my windows.

View attachment 74469
Maybe some lib is wrong? I don't know what else to do, I need help guys, somebody please...

I am not sure which client you're using but I suspect you're using 7.70 client? If so check the config.lua of your realotsloginserver and see if these values are set to 770

clientVersionMin = 770
clientVersionMax = 770
 
I am not sure which client you're using but I suspect you're using 7.70 client? If so check the config.lua of your realotsloginserver and see if these values are set to 770

clientVersionMin = 770
clientVersionMax = 770
Thank you for replying, yes, it's client 7.70, I downloaded from tibiabr. And as you can see config.lua is all set right.
config_lua.pngconfig_lua.png
 
Last edited:
I have a problam, see images...
bin with ./game working:
1680185329867.png

Query manager working:
1680185377823.png

server online working:
1680185409596.png

my cliente 7.7 not working:
1680185437386.png

I am using ipchanger and in the top of last image has my VM internal IP but I don't connect to the server
My VM has a Ubuntu 20.04 and I try to connect with my main SO Windows 10 PRO

Somebody can help my please?
@pink_panther @Innocentz
 
I have a problam, see images...
bin with ./game working:
View attachment 74481

Query manager working:
View attachment 74482

server online working:
View attachment 74483

my cliente 7.7 not working:
View attachment 74484

I am using ipchanger and in the top of last image has my VM internal IP but I don't connect to the server
My VM has a Ubuntu 20.04 and I try to connect with my main SO Windows 10 PRO

Somebody can help my please?
@pink_panther @Innocentz
I have the same problem like you, I don't know how to help. I really don't know what to do, I did some tests with putty and it opens connection and quit, did some ping Windows - VM and it receives all packages. Not using IP changer, I edited tibia.exe with hex editor.

May some good soul help us please?
 
@karnouth @Innocentz A few things that you should look at:
  • If you're running VirtualBox, make sure to configure your VM to use Bridged Adapter in the Network settings
  • Make sure all IP in all files were updated with the IP of your VM (including the bind-address in the /etc/mysql/mysql.conf.d/mysqld.cnf)
  • Run sudo tcpdump port 7171 in your VM, then try to login in your client. Confirm that you can see traffic coming through
  • When editing the client with a hex editor, make sure you updated all hosts (version 7.70 has 5 hosts) with your VM's IP


please can someone make a tutorial just to create a custom client? I spoke other member, he and I just can't do it! I looked for another tutorial, but I found it only for versions 8.0 and above, I still tried it but it didn't work :/ .. no video needed, just a good tutorial

Download and install the 7.70 client from a website like TibiaBR, then import the client executable (usually "C:\Program Files (x86)\Tibia\Tibia.exe") in a hex editor. You need to replace all 5 hosts below with the IP from your VM:

Code:
test.cipsoft.com
server.tibia.com
server2.tibia.com
tibia1.cipsoft.com
tibia2.cipsoft.com



almost got it working on ubuntu 22.04. cant make the login server because of boost errors (version 1.74.0) guess i need version 1.65.1, or anyone know what changes I need to do?

Yes, to make it compatible with that version of the Boost, you need to change the following files in "realotsloginserver-master/src":
  • connection.cpp
    • Replace all occurrences of Connection::read_timeout with static_cast<long>(Connection::read_timeout)
    • Replace all occurrences of Connection::write_timeout with static_cast<long>(Connection::write_timeout)
  • database.cpp
    • Replace my_bool with bool

or simply execute these commands as sudo inside the "realotsloginserver-master/src" folder:

Code:
sed -i "s/Connection::read_timeout/static_cast<long>(Connection::read_timeout)/g" connection.cpp
sed -i "s/Connection::write_timeout/static_cast<long>(Connection::write_timeout)/g" connection.cpp
sed -i "s/my_bool/bool/g" database.cpp



I'll probably create a new thread with a script to automate the install in a more modern OS (Ubuntu 22.04 LTS) and avoid some common mistakes.

UPDATE: I wrote a script to automate the install, and posted it here: Script and tutorial to automate install of "Leaked" 7.70 server (https://otland.net/threads/script-and-tutorial-to-automate-install-of-leaked-7-70-server.284492/)
 
Last edited:
I identified a problem when i run ./game in terminal, some errros appears:

1680428080024.png

I redid all the steps in this part, but it just doesn't work ;/
Post automatically merged:

now I have a error with chmod -R 777:

1680429916773.png
 
Last edited:
I identified a problem when i run ./game in terminal, some errros appears:

View attachment 74525

I redid all the steps in this part, but it just doesn't work ;/
Post automatically merged:

now I have a error with chmod -R 777:

View attachment 74526

Regarding the query manager issue, make sure you did the following:
  • executed chmod 777 in the "/home/game/bin/game" file
  • you update "realots-query-manager-master/main.cpp" with the IP address of your VM
The chmod command looks right, but when you copy text from this page and paste it on the terminal, sometimes it ends up introducing wrong characters. Just to make sure, type in the command yourself instead of copying/pasting.
 
Regarding the query manager issue, make sure you did the following:
  • executed chmod 777 in the "/home/game/bin/game" file
  • you update "realots-query-manager-master/main.cpp" with the IP address of your VM
The chmod command looks right, but when you copy text from this page and paste it on the terminal, sometimes it ends up introducing wrong characters. Just to make sure, type in the command yourself instead of copying/pasting.
yes, I did all that.. I redid it again, with a new VM but the error continues in this step.. I don't know what else I have to do
Post automatically merged:

Regarding the query manager issue, make sure you did the following:
  • executed chmod 777 in the "/home/game/bin/game" file
  • you update "realots-query-manager-master/main.cpp" with the IP address of your VM
The chmod command looks right, but when you copy text from this page and paste it on the terminal, sometimes it ends up introducing wrong characters. Just to make sure, type in the command yourself instead of copying/pasting.
when i run the game chmod 777 nothing shows up in the terminal it just runs.. should something show up?
Post automatically merged:

where should the "realots-query-manager-master" folder be? I put it in Home but in the tutorial it doesn't specify where it should be
Post automatically merged:

ok, i review somethings, now the error is different..

1680442523529.png
Post automatically merged:

1680442921388.pngS

now that
 
Last edited:
yes, I did all that.. I redid it again, with a new VM but the error continues in this step.. I don't know what else I have to do
Post automatically merged:


when i run the game chmod 777 nothing shows up in the terminal it just runs.. should something show up?
Post automatically merged:

where should the "realots-query-manager-master" folder be? I put it in Home but in the tutorial it doesn't specify where it should be
Post automatically merged:

ok, i review somethings, now the error is different..

View attachment 74532
Post automatically merged:

View attachment 74533S

now that

Yes, if the chmod command didn't output anything, it means it worked.

As good as the tutorial is, I agree that sometimes it's still not clear enough. When it says home, I think it refers to the home directory of your current user (~/) rather than the /home/game. In my own experience, it doesn't matter much, as long as both realots projects are in the same folder and your user has access to them.

I think the issue is that you shouldn't run "./game" with another user (you're switching to root). Try calling it with sudo priviledges but still with your current user, like sudo ./game

If you run into more problems, try my script to automate the entire installation. You just need to install the VM, download the files and run the script.
 
Yes, if the chmod command didn't output anything, it means it worked.

As good as the tutorial is, I agree that sometimes it's still not clear enough. When it says home, I think it refers to the home directory of your current user (~/) rather than the /home/game. In my own experience, it doesn't matter much, as long as both realots projects are in the same folder and your user has access to them.

I think the issue is that you shouldn't run "./game" with another user (you're switching to root). Try calling it with sudo priviledges but still with your current user, like sudo ./game

If you run into more problems, try my script to automate the entire installation. You just need to install the VM, download the files and run the script.
still didn't work =/ I'll try your script, it's a great idea for people like me. I'll come back later to send feedback.
 
still didn't work =/ I'll try your script, it's a great idea for people like me. I'll come back later to send feedback.
You mean you're getting the same error message when trying to launch the game file?

Another reason for this error is that the game server couldn't read the file from "home/game/.tibia" (you might need to run chmod 777 on this). Also, double check this file if it has the correct paths (all paths should start with "/home/game"), IP (should be your VM's IP) and port (all ports should be 17778).

Otherwise, please post the exact error message here, so we can find a solution and share it to the community in case others come across the same issue.
 
I managed to go online and log in but the world does not save, how do I do it?
Post automatically merged:

You mean you're getting the same error message when trying to launch the game file?

Another reason for this error is that the game server couldn't read the file from "home/game/.tibia" (you might need to run chmod 777 on this). Also, double check this file if it has the correct paths (all paths should start with "/home/game"), IP (should be your VM's IP) and port (all ports should be 17778).

Otherwise, please post the exact error message here, so we can find a solution and share it to the community in case others come across the same issue.
I used you script, bro, amazing!!!! but the world don't save, how can I save?
 
I managed to go online and log in but the world does not save, how do I do it?
Post automatically merged:


I used you script, bro, amazing!!!! but the world don't save, how can I save?
Thanks, I appreciate the feedback.

I'll answer that in the other thread, but I think it has to do with the order in which the services are stopped, as I didn't have this issue when I tested my scripts yesterday.
 
Hey @SilverFern , thank you for your reply, loved to see yours answers, I managed to make it work somehow and I think my client wasn't making the connections, I reinstalled my client, re-edited with my VM IPv4s and it simply worked... VERY strange because all files had permissions and were configured right.
Thank you again for the effort, it will surely help more people having trouble setting up this server.
And I have the same problem like @igormatx , I leveled up to level 6 in an acc and character I inserted into my database and when I logged in again 30 minutes after it was lvl 0 lol
 
Last edited:
Does anyone know how to make GMs work? I tried over here and they look like regular citizens and I can't use any GM spells
 
And I have the same problem like @igormatx , I leveled up to level 6 in an acc and character I inserted into my database and when I logged in again 30 minutes after it was lvl 0 lol
Are you still having this issue? If so, please share the exact queries you're executing on your database.

I just did the following test and it worked as expected:
  • I executed this query on http://localhost/phpmyadmin: INSERT INTO `players` VALUES (64556,'Tester One',10064556,100,1148300000,1148300000,1,0,'none',0,0,1,'Rookgaard','','','127.0.0.1')
    • Note: the player_id (64557), name (Tester One) and the account_id (10064557) arguments must be unique
  • I then logged in with account 100, picked player Tester One
  • I left Rookgaard temple, killed a rat (gained 5 exp), lost HP, used the torch, changed the outfit, etc
  • I logged out, then back in, everything was normal.
  • I logged out, stopped all 3 services
  • I restarted all the services again, logged in with the same char, and everything was exactly how I left it.
Another thing I noticed: when populating the database with the original players, they're being inserted with the default values (e.g.: level 1, in Rookgaard, etc). When you log in with a char for the first time, the server might be pulling the char data from the leaked file (/home/game/usr), which is then updating the record in the MySQL database.

I haven't gone too far with my research, but I suspect that if you edit a player on MySQL before you log in with it for the first time, your data will be overwritten by the original user data coming from the leaked files.

Also, this reply from kay might help - if you didn't use my scripts, perhaps you missed some permissions?
 
Last edited:
Hey everyone. I was playing around yesterday trying to reverse engineer as many behaviors as possible, just out of curiosity.

I didn't use your script to set it up, but I believe the problem some members are facing on chars not being saved happen due to the container state not being persisted. The characters level in the players table, for example, will always get overwritten by the running daemon. The ground truth char data lives in disk, inside $INSTALL_HOME/game/usr/.

I figured that user state data is stored in-memory, however when the service stops, it needs to persist it via fputs. It persists each char state inside /game/usr/<0to99folders>/<char_id>.usr. DB entries are absolutely NOT ground truth, quite the opposite. It will always be overwritten by volatile values during runtime. The runtime, in turn, loads up the characters state from disk. Thus if a new char entry is not flushed into a usr entry, it will not be lodaded during the next runtime boot up - thus it does not exist ingame, regardless of what the DB says.

Fun fact - The folders are organized this way, so when loading the chars back into memory when booting the service, you get silly way to have a progress bar, from 0 to 99, since it is scanning through the folders in order. Quite quirky. Character UUIDs are allocated to be distributed evenly in those dirs. This happens using the two least significant decimals.
 
Last edited:
Hey everyone. I was playing around yesterday trying to reverse engineer as many behaviors as possible, just out of curiosity.

I didn't use your script to set it up, but I believe the problem some members are facing on chars not being saved happen due to the container state not being persisted. The characters level in the players table, for example, will always get overwritten by the running daemon. The ground truth char data lives in disk, inside $INSTALL_HOME/game/usr/.

I figured that user state data is stored in-memory, however when the service stops, it needs to persist it via fputs. It persists each char state inside /game/usr/<0to99folders>/<char_id>.usr. DB entries are absolutely NOT ground truth, quite the opposite. It will always be overwritten by volatile values during runtime. The runtime, in turn, loads up the characters state from disk. Thus if a new char entry is not flushed into a usr entry, it will not be lodaded during the next runtime boot up - thus it does not exist ingame, regardless of what the DB says.

Good catch, it matches my findings too. I've never come across this problem myself because I've never inserted a player into the DB with values other than the default ones.

Unlike other OTs, it seems the players table here only serves as an interface between the /game/usr files and RealOTS' login server instead of storing the player attributes that the game uses.
 
Back
Top