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

Script and tutorial to automate install of "Leaked" 7.70 server

Alright, so, my router arrived today. As expected, it's refusing to work. It just tries to negotiate for DSL forever. A process that should take a minute and then it should all work. The install manual says to get certain information (VCI+VPI, etc) from my ISP, but when I called them they said they don't have that info and can't help me. So now my router is as problematic as the rest of this project.
I don't think you should need the VCI/VPI because you're probably not connecting to a modem, but to another router/switch instead (your building's). But as I mentioned before, I think your best shot is to ask your landlord and neighbours how they connect their router to the building's switch/router, it should be plug & play. Also, I've never heard of an ISP that refuses to connect a router to their own Internet service, they must at least offer a technician to visit your place and sort it out.

While waiting for the router, I've been getting help from someone on the VirtualBox forum, and their main conclusion was also that a router might be the fix. But we now concluded that it should also work if I can use NAT instead of Bridged, and the only crux is that it seems the OT server must have Bridged to function. So I'm back to ask if you can shed some light on all of that. I know that Bridged is good for the connection itself in a scenario with a functional network supported by a router, or whatever it takes to get normal IPs like I should. But if the VB guy has a solution to make me able to connect using NAT (like he claims he does) is there any way to run the server with a NAT connection instead of Bridged, or is it specifically configured for Bridged so it will always break if I try to use NAT?
For the server, it doesn't really matter whether it's NAT or Bridged, as long as your Windows can send packages to your Ubuntu.

In a previous message, you mentioned that the telnet packages stopped coming through when you changed to NAT. You could try it again and see if it works, just don't forget to restart the VM after changing to NAT, and also to change the IP everywhere because you'll likely get a new one.
 
Hello, first I want to thank you @SilverFern for this amazing tutorial, it was easy to follow and I was able to create my own server without much effort.

However there is a feel bit of information that I would like to ask, since I am struggling on understanding/making them work, and I would be really grateful if someone could help me understand them.

1- I am using the 'realots-schema-inc-players.zip' file from @pink_panther's post. However, I would like to create my own character using a different account number and password. To do this, I have use the SilverFern script.
Code:
#!/bin/bash

if ! service mysql status > /dev/null; then
    echo "MySQL service is not running. Please start it before running this script."
    exit 1
fi

...
My new character was added to my sql table, but I have not figured out what is my password, or accout number...
Sem título.png

2- Regarding GM accounts/characters, I have noticed in previous comments that there are a few GM accounts in the database. They are typically associated with account numbers 1/1 or 999/999. However, neither of these account numbers works for me. When I try to use them in the game, I receive an error message stating that those accounts do not exist. Am I missing something about these accounts?

3- Still about GM's, do they have the same commands pink-panther mentioned on this post? can anyone tell? (https://otland.net/threads/can-anyone-tell.283581/post-2713840)

4- As for modifying character stats, it appears that there is no straightforward method to adjust a character's level or skills. Nevertheless, within the SQL table, there is a field related to "level," and it seems like it can be modified, or at least it was supposed to be modifiable. However, in my case, the table does not seem to "save" the modified character level, but it does save changes if I attempt to modify the character's name. Is there a way to change a character's level?

5- Lastly, regarding playing with friends, is it possible to allow my friends to join my server using software like Hamachi (even though I don't think Hamachi exists anymore hehehe)? If so, do I need to run the software on my virtual machine (VM), or can I run it on my Windows host machine?


SOLVED:

Well after I have created this post I kept messing around with the files and the sql database, and I figured out the answers for most of my previous questions. So I will write the solutions here for future people that may see this post.

1- As I mentioned, using SilverFern's character creation script, I was able to add a new "row" to the SQL/PHPMyAdmin "player" table. However, this only means that the CHARACTER now exists in the database, and it was associated with account number 700 (which I selected when running SilverFern's script), however there is not any account in the database that utilize the account number 700, so that character wasn't linked to any account.
So if you choose to use SilverFern's script, you need to create an ACCOUNT in the SQL/PHPMyAdmin "user" table manually. You can follow these steps to do that:
finish.jpg
If you encounter an error while trying to save, make sure to read the error message. Typically, the issue might be related to the account ID number you choose (it may be too high, too low, or not unique) or the login number (which also needs to be unique).

2-
As you can see in the second step of my previous image, there isn't (or at least I didn't find any) account with GM/GOD status in the database, so I had to create my own. You can do that by following the same steps in the previous image, just remember to set the user level to 150 or 255.

3-4-
I have not tested with GM status, but those commands DO work with a GOD character. If you want to create a new character with edited skills/level, give the account GOD level and use the commands "alevo cogni [amount]" for leveling experience and "alevo cogni [skill number] [amount]" for specific skills.
Example:
If you want to add 3000 experience to your character LEVEL: alevo cogni 3000
If you want to add 3000 experience to your character MAGIC LEVEL: alevo cogni 1 3000
 
Last edited:
3- Still about GM's, do they have the same commands pink-panther mentioned on this post? can anyone tell? (https://otland.net/threads/can-anyone-tell.283581/post-2713840)
They were originally posted by me, I read them from the game binary, so yes, they do exist.* Whether you can or cannot use them depends on the rights assigned to your character upon login. These rights are passed to the game server by the querymanager.

* - ban-related spells are outdated. Cip used them in the earlier versions, but at the time (7.7) there was already a panel for that, built in the client (accessaible via ctrl+y). So using those spells only results in a message about the panel.

3- As for modifying character stats, it appears that there is no straightforward method to adjust a character's level or skills. Nevertheless, within the SQL table, there is a field related to "level," and it seems like it can be modified, or at least it was supposed to be modifiable. However, in my case, the table does not seem to "save" the modified character level, but it does save changes if I attempt to modify the character's name. Is there a way to change a character's level?
Level in the database is only for display on the website (updated upon logout). All the actual characters' related data is saved in text files in usr folder. You can modify it there, but if you change your level, you need to adjust exp, hp, mana, speed, cap etc. separately, which makes it a bit tedious to do manually. Therefore, the easiest way to modify level and skills is the alevo cogni spell.
 
They were originally posted by me, I read them from the game binary, so yes, they do exist.* Whether you can or cannot use them depends on the rights assigned to your character upon login. These rights are passed to the game server by the querymanager.

* - ban-related spells are outdated. Cip used them in the earlier versions, but at the time (7.7) there was already a panel for that, built in the client (accessaible via ctrl+y). So using those spells only results in a message about the panel.


Level in the database is only for display on the website (updated upon logout). All the actual characters' related data is saved in text files in usr folder. You can modify it there, but if you change your level, you need to adjust exp, hp, mana, speed, cap etc. separately, which makes it a bit tedious to do manually. Therefore, the easiest way to modify level and skills is the alevo cogni spell.
Thank you for your reply, I was actually able to create my own account, and another account with GOD/GM rights, so I will update my post, nevertheless thank you for the extra info about the database!
 
I don't think you should need the VCI/VPI because you're probably not connecting to a modem, but to another router/switch instead (your building's). But as I mentioned before, I think your best shot is to ask your landlord and neighbours how they connect their router to the building's switch/router, it should be plug & play. Also, I've never heard of an ISP that refuses to connect a router to their own Internet service, they must at least offer a technician to visit your place and sort it out.


For the server, it doesn't really matter whether it's NAT or Bridged, as long as your Windows can send packages to your Ubuntu.

In a previous message, you mentioned that the telnet packages stopped coming through when you changed to NAT. You could try it again and see if it works, just don't forget to restart the VM after changing to NAT, and also to change the IP everywhere because you'll likely get a new one.

I eventually managed to get internet on the router, but while I could access the internet, both my pc network and the router itself said I was offline, and I still couldn't reach the Ubuntu. I always get the weirdest problems. Now I'm stuck there, and can't find anywhere to get help with it. The VB guys are also unable to help more, as my issues no longer pertain to VirtualBox. I tried NAT and nothing changed. It seems like my Ubuntu has just called it a day and decided it's done with this project. To then see a guy come in here and say it was easy to set up a server hurts my soul lol. It's been over a month and I no longer know where to turn for help. I even bought an mp3 player along with the router, which I really needed as well, and I can't get that to work either. Technology just hates me right now and I kinda wanna go live in a cave...
Anyway, sorry for ranting, I just wanted to ask if there's any chance you know any way to try to get NAT to work. The VB guy said he can easily help me connect to the server from my Windows as long as Ubuntu gets an IP from NAT. He also said that IP should be 10.0.2.15, apparently it's what it tends to give it. Any clues? Help a poor desperate soul one more time :(
 
Hello, first I want to thank you @SilverFern for this amazing tutorial, it was easy to follow and I was able to create my own server without much effort.

However there is a feel bit of information that I would like to ask, since I am struggling on understanding/making them work, and I would be really grateful if someone could help me understand them.

1- I am using the 'realots-schema-inc-players.zip' file from @pink_panther's post. However, I would like to create my own character using a different account number and password. To do this, I have use the SilverFern script.
Code:
#!/bin/bash

if ! service mysql status > /dev/null; then
    echo "MySQL service is not running. Please start it before running this script."
    exit 1
fi

...
My new character was added to my sql table, but I have not figured out what is my password, or accout number...
View attachment 79252

2- Regarding GM accounts/characters, I have noticed in previous comments that there are a few GM accounts in the database. They are typically associated with account numbers 1/1 or 999/999. However, neither of these account numbers works for me. When I try to use them in the game, I receive an error message stating that those accounts do not exist. Am I missing something about these accounts?

3- Still about GM's, do they have the same commands pink-panther mentioned on this post? can anyone tell? (https://otland.net/threads/can-anyone-tell.283581/post-2713840)

4- As for modifying character stats, it appears that there is no straightforward method to adjust a character's level or skills. Nevertheless, within the SQL table, there is a field related to "level," and it seems like it can be modified, or at least it was supposed to be modifiable. However, in my case, the table does not seem to "save" the modified character level, but it does save changes if I attempt to modify the character's name. Is there a way to change a character's level?

5- Lastly, regarding playing with friends, is it possible to allow my friends to join my server using software like Hamachi (even though I don't think Hamachi exists anymore hehehe)? If so, do I need to run the software on my virtual machine (VM), or can I run it on my Windows host machine?


SOLVED:

Well after I have created this post I kept messing around with the files and the sql database, and I figured out the answers for most of my previous questions. So I will write the solutions here for future people that may see this post.

1- As I mentioned, using SilverFern's character creation script, I was able to add a new "row" to the SQL/PHPMyAdmin "player" table. However, this only means that the CHARACTER now exists in the database, and it was associated with account number 700 (which I selected when running SilverFern's script), however there is not any account in the database that utilize the account number 700, so that character wasn't linked to any account.
So if you choose to use SilverFern's script, you need to create an ACCOUNT in the SQL/PHPMyAdmin "user" table manually. You can follow these steps to do that:
View attachment 79275
If you encounter an error while trying to save, make sure to read the error message. Typically, the issue might be related to the account ID number you choose (it may be too high, too low, or not unique) or the login number (which also needs to be unique).

2-
As you can see in the second step of my previous image, there isn't (or at least I didn't find any) account with GM/GOD status in the database, so I had to create my own. You can do that by following the same steps in the previous image, just remember to set the user level to 150 or 255.

3-4-
I have not tested with GM status, but those commands DO work with a GOD character. If you want to create a new character with edited skills/level, give the account GOD level and use the commands "alevo cogni [amount]" for leveling experience and "alevo cogni [skill number] [amount]" for specific skills.
Example:
If you want to add 3000 experience to your character LEVEL: alevo cogni 3000
If you want to add 3000 experience to your character MAGIC LEVEL: alevo cogni 1 3000
Good findings, thanks for sharing.

I haven't had people joining my server with Hamachi or similar, but my guess is that you just need to install it on Windows and point it to the public IP of your Ubuntu server.

Just complementing kay regarding your fourth question, you can search for your char's file inside the "/home/game/usr" folder (see the first command on my post here) then edit all attributes like level, skills and even equips and quests. The skills will be listed from 0 to 24, like this:

Code:
Skill = (0,23,0,1,0,0,0,0,0,0,1,179338,0,179400,100)
Skill = (1,8,0,0,0,0,0,0,0,0,0,68850,1400,78644,1600)
...
Skill = (24,0,2147483647,0,0,0,0,0,0,0,0,0,1000,2147483647,2147483647)

Unfortunately I couldn't find my personal notes on how they work, but this thread should help.

I eventually managed to get internet on the router, but while I could access the internet, both my pc network and the router itself said I was offline, and I still couldn't reach the Ubuntu.
You said "managed to get internet on the router" and "both my pc network and the router itself said I was offline". So it's not clear, do you have access to the Internet in your Windows or not? If so, does your IP on Windows start with "192.168" or "10.0" (which one?) ?

If your Windows have Internet, and you select Bridged Adapter, your Ubuntu will have Internet too. That's just how it works. NAT should not be needed.
 
You said "managed to get internet on the router" and "both my pc network and the router itself said I was offline". So it's not clear, do you have access to the Internet in your Windows or not? If so, does your IP on Windows start with "192.168" or "10.0" (which one?) ?

If your Windows have Internet, and you select Bridged Adapter, your Ubuntu will have Internet too. That's just how it works. NAT should not be needed.

What happened was that a guy on the VB forum told me that I have ethernet and not ADSL, so I should be plugging the router internet (or ethernet, whatever) cable into a lan port, not the regular internet port. When I did that (well, when I put it in the one lan port that works for it) I suddenly managed to access the internet with the router plugged in for the first time (I had also changed some settings in the router control panel thing in the browser, to ones that guy had recommended). The problem was, the internet connection indicator on the router didn't light up, suggesting I have in fact not managed to achieve an internet connection with the router yet. So I checked my network on my pc, and it said I'm offline. Like I couldn't access the network at all, like it was fully down, no internet. It also changed the name of my network from "Network 8" to "Network 9".
Now I plugged in the router to check the IP for you (as I can do that in cmd, so I figure it can be done despite the network looking dead). I also checked it before switching to router. Without the router I get normal IPs, with the router I only get the 192~ one, which yet again suggests I have no internet. But I do, I can access things. But this time there was a change! The router internet indicator was still off, but the network now says I have connection. It's still Network 9 with the router and Network 8 without it, but today Network 9 is up and has information. Just not a public IP, only the 192~ one. There's also one thing missing in the ipconfig response in cmd, which is there when I have my regular internet but gone when I have the router internet. This thing is "IPv6 Address". There's also "Link-local IPv6 Address" and "IPv4 Address", and those are both there with and without the router. Maybe Ipv4 is internal IP and IPv6 external IP?
I also checked Ubuntu again, and there's no change there. The same bad IP and no internet connection, like it has been for a while now seemingly no matter what changes I make. Well, actually, I forgot to check if the internet had resumed working there, but I have no reason to believe it suddenly does this time, since the IP was the same and my pc seems to claim I only have internal connection.
I know that Bridged should give Ubuntu internet, and it did in the past (even with the bad IPs and stuff) but it does no longer, and it seems like this time I must resolve these problems to get it working again. Either by finally making my Windows and Ubuntu connect, possibly by the aid of my router (if it ever works properly), or by making something like NAT aid the connection instead, which is what I was hoping you could help me with.
 
They were originally posted by me, I read them from the game binary, so yes, they do exist.* Whether you can or cannot use them depends on the rights assigned to your character upon login. These rights are passed to the game server by the querymanager.

* - ban-related spells are outdated. Cip used them in the earlier versions, but at the time (7.7) there was already a panel for that, built in the client (accessaible via ctrl+y). So using those spells only results in a message about the panel.


Level in the database is only for display on the website (updated upon logout). All the actual characters' related data is saved in text files in usr folder. You can modify it there, but if you change your level, you need to adjust exp, hp, mana, speed, cap etc. separately, which makes it a bit tedious to do manually. Therefore, the easiest way to modify level and skills is the alevo cogni spell.
Hello, actually I have one more question about that command list for GOD's, there is a way to know/find which parameters can be used for every command? Right now I am mostly interested on this one in particular:
Start Monsterraid - alevo mas res para

I have tried a few parameters already, but none worked so far.
 
Hello, actually I have one more question about that command list for GOD's, there is a way to know/find which parameters can be used for every command? Right now I am mostly interested on this one in particular:
Start Monsterraid - alevo mas res para

I have tried a few parameters already, but none worked so far.
Only by reverse engineering the game server binary or by guessing. In this case, you need to use the file's name (without extension), e.g. "alevo mas res rookgaardrats".
 
If your Windows have Internet, and you select Bridged Adapter, your Ubuntu will have Internet too. That's just how it works. NAT should not be needed.

Alright, I had some progress today. I tried switching between different network options and when I switched back to NAT I suddenly got the IP it provides (10.0.2.15), and on top of that I also finally had the Ubuntu internet start working again in the process. I am less and less convinced that the VB guy can help me connect with NAT though, as it's all talk about my host IP even though Tibia uses the server IP to connect, and I'm hardly understanding any of what he's trying to convey. In the meantime I did however try to connect with NAT the usual way, but when I installed your IP-related server repair script I of course got an error (big surprise, right?). I'm being very good with the pictures today though, including 3 screenshots in this post; one of the error given in the terminal when I ran the script, one of the script itself so you can see if I pasted something wrong or whatever (shouldn't be possible, but who knows), and one of my folder with the OT files so you can see if the script is in the right place. Unless something is off about the placement of the files, like I misunderstood where to put it (it's with the launch files and stuff) then I have no clue why I'm getting an error, because there shouldn't possibly be any errors with the server files themselves as I haven't messed around with them other than making that magic system change.
But, before we try to solve the script error and repair my server, do you happen to know if it's even possible to connect with the NAT IP? The VB guy said this:
"That is a private IP address that is not accessible in the internet. NAT puts the VM behind a Virtualbox "router" (see Virtualbox Networks: In Pictures: NAT), and routers hide the private side from the public side."
It doesn't sound very promising to me, and if it definitely can't be connected to I need to go back to finding a way to get my router fully functional. I wrote about that in my previous reply, and unless you can help with that I wouldn't mind any recommendations for forums where people offer help with network/router issues, in case you happen to know any, which no one I ask seem to do, including the VB guy.
 

Attachments

Alright, I had some progress today. I tried switching between different network options and when I switched back to NAT I suddenly got the IP it provides (10.0.2.15), and on top of that I also finally had the Ubuntu internet start working again in the process. I am less and less convinced that the VB guy can help me connect with NAT though, as it's all talk about my host IP even though Tibia uses the server IP to connect, and I'm hardly understanding any of what he's trying to convey. In the meantime I did however try to connect with NAT the usual way, but when I installed your IP-related server repair script I of course got an error (big surprise, right?). I'm being very good with the pictures today though, including 3 screenshots in this post; one of the error given in the terminal when I ran the script, one of the script itself so you can see if I pasted something wrong or whatever (shouldn't be possible, but who knows), and one of my folder with the OT files so you can see if the script is in the right place. Unless something is off about the placement of the files, like I misunderstood where to put it (it's with the launch files and stuff) then I have no clue why I'm getting an error, because there shouldn't possibly be any errors with the server files themselves as I haven't messed around with them other than making that magic system change.
But, before we try to solve the script error and repair my server, do you happen to know if it's even possible to connect with the NAT IP? The VB guy said this:
"That is a private IP address that is not accessible in the internet. NAT puts the VM behind a Virtualbox "router" (see Virtualbox Networks: In Pictures: NAT), and routers hide the private side from the public side."
It doesn't sound very promising to me, and if it definitely can't be connected to I need to go back to finding a way to get my router fully functional. I wrote about that in my previous reply, and unless you can help with that I wouldn't mind any recommendations for forums where people offer help with network/router issues, in case you happen to know any, which no one I ask seem to do, including the VB guy.
I don't know much about connecting it with NAT, sorry. However, your issue with the script is very easy to solve. You accidentally copied the first 2 lines ([/LIST] ) from the thread message, which are invalid commands. Just delete them and run the script again.
 
I don't know much about connecting it with NAT, sorry. However, your issue with the script is very easy to solve. You accidentally copied the first 2 lines ([/LIST] ) from the thread message, which are invalid commands. Just delete them and run the script again.

It wasn't an accident, they're literally part of the code in your post where you shared it, as you can see in the picture I attached. Unless there's something I'm not getting, maybe it needs to be edited so people that find that script in the future don't end up with the same problem. Glad it was an easy fix for once! Sadly it was of course balanced out by it not working to connect to the NAT IP after I pointed my Tibia towards it now.
I did however get a NAT method explanation from someone on the VB forum. Supposedly I need to direct my Tibia to 127.0.0.1 and do port forwarding on the correct port (so 7171, right?) and then the VB picks it up and I can connect to the server. I will try that tomorrow and hope for a miracle so I don't need to get my router working (I did find a support site for my brand that I can also check out tomorrow though, so there's still some hope with that too).
 

Attachments

It wasn't an accident, they're literally part of the code in your post where you shared it, as you can see in the picture I attached. Unless there's something I'm not getting, maybe it needs to be edited so people that find that script in the future don't end up with the same problem. Glad it was an easy fix for once! Sadly it was of course balanced out by it not working to connect to the NAT IP after I pointed my Tibia towards it now.
I did however get a NAT method explanation from someone on the VB forum. Supposedly I need to direct my Tibia to 127.0.0.1 and do port forwarding on the correct port (so 7171, right?) and then the VB picks it up and I can connect to the server. I will try that tomorrow and hope for a miracle so I don't need to get my router working (I did find a support site for my brand that I can also check out tomorrow though, so there's still some hope with that too).
Good catch. That seems to be a problem with the forum formatting, but unfortunately the post is locked and I can no longer edit it.

I don't think you should insist on the NAT connection. Instead, you should focus on the following (note: whenever I say IP, I mean IPv4 instead of IPv6):
  • Get Internet on your Windows while connected to the router. This is something that only you and your provider (or landlord, or a neighbour, or ChatGPT) can help with.
  • Your Windows should get a local IP that doesn't look like a public IP. Usually it starts with 192.168.
    • Paste here what you get when you run ipconfig | findstr /C:"IPv4" in the cmd.
    • It's not the end of the world if you don't get an IP like that, but it will lower our chances of getting it to work.
  • Then on your VM, make sure you're using Bridged Adapter in the VM's network settings.
  • On your Ubuntu, make sure you're not setting a static IP i.e.: in Ubuntu's network settings, set IPv4 method to Automatic (see last screenshot in this post)
  • Reboot your Ubuntu - this will restart the network service and force it to get an IP with the new settings.
  • Check your Ubuntu's local IP (use one of the commands I shared on this thread, perhaps this one). It should be similar (not equal) to your Windows IP.
    • If your Ubuntu is not getting a similar IP, we need a few tests to determine if this is being caused by your router configuration. In this case, connect your smartphone to your router's WiFi, then check your smartphone's IP address (search on Google/ChatGPT). Does it look similar? Paste it here.
  • If your Ubuntu's local IP looks similar to your Windows' local IP, then you can run the script to change the server IP. If you can login with your char, then you can set a static IP on Ubuntu again.
If, and only if, the steps above don't work, then you might think again about using the NAT settings. However, I'm not familiar with it so you might need to do a bit more of research online. Just remember to always test the tcpdump before running the script to change the server IP. Wish you the best of luck.
 
Does anyone have the decompiled binary, I remember that someone posted it on GitHub once but I've lost the link. I was thinking of using it on CHATGPT data analysis and see if it can give information regarding formulas etc.
 
If, and only if, the steps above don't work, then you might think again about using the NAT settings. However, I'm not familiar with it so you might need to do a bit more of research online. Just remember to always test the tcpdump before running the script to change the server IP. Wish you the best of luck.

I will try your instructions tomorrow if it comes to that, but today I followed the instructions on the NAT thing to get it out of the way first as I figured it won't work, so imagine my surprise when the char list actually popped up. But then I got connection timeout, can't connect to game server. So it finds the server, but it can't connect to it. I'm still seeing if they can find me a solution to it, but while working on it I figured I should also ask if you have any clue what that means.
I found threads on OTland from people with similar issues, and a tutorial thread for issues with portforwarding and connecting, and my problem seems to be the only one not really covered. My best guess is that the method works fine and it comes down to my same old networking issues somehow preventing it for me. Is that your conclusion too, or do you know anything about this that might help? The person guiding me through the NAT method last told me they want to check Tibia's ports and protocols, like look at the game to see what they all are and be able to see if they can spot my problem that way. I don't know if that's something that's possible to do with Tibia, but the other alternative was to use something called Wireshark, which is wayyy out of my league. So that trail likely will be dead if you don't have any info about it that doesn't lead back to my router and all that, and if that's the case, it doesn't matter that the NAT way would work without network issues as the Bridged way will work then too and also allow friends to join (unlike NAT). Then I'll be back on the router and try your way, which I will tomorrow even if this isn't cleared up by the end of the day then, I just didn't have time to try both ways today.

Edit: Just in case it's relevant for something, when I went to shut down the server now (have had it open a lot for the testing) I saw that I got a few messages in the server log that I included in a picture here. They appear to be talking about failing to send or receive bytes, could this mean the server was trying to pick up my login attempts but failed?
I also wanted to ask you a minor server question that concerned me during shutdowns today: In the serverlog terminal tab, when I close it the last message basically says "saving houses..."
I always push ctrl+c again to get the ^ to show up like for the other two tabs, to be sure that it got shut down, but the "..." makes me worried that it's still trying to save them and I'd finish closing it while it's still doing it. If that was the case, I worry I could lose stuff in my houses when I'm eventually able to play. The message before that says something similar about saving character data or something, and it also does the "..." thing and then sends another message saying it was saved. So shouldn't the house data do the same? With the house issues from the double databases, I feel like there's cause for concern. But I'm figuring you would know, as you can see what it says at the end of your server log, and if you've played on it you'd know if your houses save or not if it does say that.
I did let it stay like that on one shutdown earlier to see if something would change, but when I came back after a while to the same message, I finally did my second ctrl+c again, and it didn't work. Like, the tab was dead or something, it no longer showed the blue text in front of my message that shows that I'm in the right path, it just kept sending "^" like I'm typing one long message or something. And when I went to close the tab, it says a process is still running in it and will be killed if I close it. But I had no other option but to close it. So it's like I broke the tab or something, and if that happens during a playing session it could be catastrophic, being forced to shut down the server in a way that might not save progress. Any clue about what happened? I can't provide a picture of it as I closed it down and started it back up so I lost the log, but if you'd need one I could try to recreate it.
 

Attachments

Last edited:
I will try your instructions tomorrow if it comes to that, but today I followed the instructions on the NAT thing to get it out of the way first as I figured it won't work, so imagine my surprise when the char list actually popped up. But then I got connection timeout, can't connect to game server. So it finds the server, but it can't connect to it. I'm still seeing if they can find me a solution to it, but while working on it I figured I should also ask if you have any clue what that means.
If you're pointing the Tibia client to your Ubuntu internal IP, and they're in the same network, it makes sense that the login server will pick up the login attempt and show you the char list. However, other services like the game server and query manager also need to be configured with the correct network settings so they communicate with each other. As I don't know the implications of configuring the VM with NAT, I don't know how to sort it out.

I found threads on OTland from people with similar issues, and a tutorial thread for issues with portforwarding and connecting, and my problem seems to be the only one not really covered. My best guess is that the method works fine and it comes down to my same old networking issues somehow preventing it for me. Is that your conclusion too, or do you know anything about this that might help? The person guiding me through the NAT method last told me they want to check Tibia's ports and protocols, like look at the game to see what they all are and be able to see if they can spot my problem that way. I don't know if that's something that's possible to do with Tibia, but the other alternative was to use something called Wireshark, which is wayyy out of my league. So that trail likely will be dead if you don't have any info about it that doesn't lead back to my router and all that, and if that's the case, it doesn't matter that the NAT way would work without network issues as the Bridged way will work then too and also allow friends to join (unlike NAT). Then I'll be back on the router and try your way, which I will tomorrow even if this isn't cleared up by the end of the day then, I just didn't have time to try both ways today.
I agree that Wireshark will be too advanced. The other person helping you might find useful if you share the link to this thread. The Tibia client uses TCP ports 7171 and 7172, but ideally you don't want to change any network settings in your Windows. Your plan A should be to figure out how to get a "normal" internal IP in both your Windows and Ubuntu VM, so you can use the Bridged adapter settings like everybody else.

Edit: Just in case it's relevant for something, when I went to shut down the server now (have had it open a lot for the testing) I saw that I got a few messages in the server log that I included in a picture here. They appear to be talking about failing to send or receive bytes, could this mean the server was trying to pick up my login attempts but failed?
I also wanted to ask you a minor server question that concerned me during shutdowns today: In the serverlog terminal tab, when I close it the last message basically says "saving houses..."
I always push ctrl+c again to get the ^ to show up like for the other two tabs, to be sure that it got shut down, but the "..." makes me worried that it's still trying to save them and I'd finish closing it while it's still doing it. If that was the case, I worry I could lose stuff in my houses when I'm eventually able to play. The message before that says something similar about saving character data or something, and it also does the "..." thing and then sends another message saying it was saved. So shouldn't the house data do the same? With the house issues from the double databases, I feel like there's cause for concern. But I'm figuring you would know, as you can see what it says at the end of your server log, and if you've played on it you'd know if your houses save or not if it does say that.
I did let it stay like that on one shutdown earlier to see if something would change, but when I came back after a while to the same message, I finally did my second ctrl+c again, and it didn't work. Like, the tab was dead or something, it no longer showed the blue text in front of my message that shows that I'm in the right path, it just kept sending "^" like I'm typing one long message or something. And when I went to close the tab, it says a process is still running in it and will be killed if I close it. But I had no other option but to close it. So it's like I broke the tab or something, and if that happens during a playing session it could be catastrophic, being forced to shut down the server in a way that might not save progress. Any clue about what happened? I can't provide a picture of it as I closed it down and started it back up so I lost the log, but if you'd need one I could try to recreate it.
The correct way to stop the servers is indeed pressing Ctrl+C, then wait for them to finish. It might take a few minutes depending on your resources (memory, processor, storage), but if it takes too long (i.e. more than 5 minutes), then something went wrong and unfortunately you'll need to force it to close (press Ctrl+C again, or press the X button on the terminal, or reboot the system) and risk losing some progress. The server is not free from bugs (CipSoft used to do server resets every once in a while back then), specially an unofficial server, so there's always a risk. The secret here is to learn how to either avoid them or recover if necessary - for instance, you can edit your char's attributes and inventory (instructions here), so at least you can go back to how it was before the crash. There must be a config like that for the houses too somewhere.
 
If you're pointing the Tibia client to your Ubuntu internal IP, and they're in the same network, it makes sense that the login server will pick up the login attempt and show you the char list. However, other services like the game server and query manager also need to be configured with the correct network settings so they communicate with each other. As I don't know the implications of configuring the VM with NAT, I don't know how to sort it out.

The NAT method actually has Tibia point towards my host's internal 127.0.0.1 IP, and then the VM picks up the signals because of the port forwarding. But you're saying the actual Tibia server has network stuff in it that could require changes simply because this method of connecting is different? Doesn't the regular Bridged way send signals all the same?


"The correct way to stop the servers is indeed pressing Ctrl+C, then wait for them to finish. It might take a few minutes depending on your resources (memory, processor, storage), but if it takes too long (i.e. more than 5 minutes), then something went wrong and unfortunately you'll need to force it to close (press Ctrl+C again, or press the X button on the terminal, or reboot the system) and risk losing some progress. The server is not free from bugs (CipSoft used to do server resets every once in a while back then), specially an unofficial server, so there's always a risk. The secret here is to learn how to either avoid them or recover if necessary - for instance, you can edit your char's attributes and inventory (instructions here), so at least you can go back to how it was before the crash. There must be a config like that for the houses too somewhere."

Alright, so I'm guessing it was a random bug thing that happened to me then. I'll pay attention in the future what message it shows when it's closing, and just monitor all of it and try to figure it out.




  • Paste here what you get when you run ipconfig | findstr /C:"IPv4" in the cmd.

This is what I got from that:
IPv4 Address. . . . . . . . . . . : 192.168.56.1
IPv4 Address. . . . . . . . . . . : 192.168.1.2


"Check your Ubuntu's local IP (use one of the commands I shared on this thread, perhaps this one). It should be similar (not equal) to your Windows IP."

I used the "hostname -I" command. My IP in Ubuntu right now is as follows: 192.168.1.3
My mind is blown right now. My router is still only giving my host OS a local IP (the 192.168~ one), no public IP, and the internet indicator on the router is off. But I switched back to Bridged on the VM and all of a sudden I'm getting that 192.168~ IP there. I have no idea why it's suddenly giving me that, it never has before, and I have checked with the router plugged in, when it was in the same state it is now.

I proceeded to run the IP repair script (which appeared to be successful), and reroute the Tibia client. Tried to log in, moment of truth, maybe a month of suffering is finally over and paradise has been reached... But no; no connection.
Realized I forgot to launch the OT server. Went to launch it, got error. The same one I got when I messed with this stuff early on and you had me run a snapshot (or was it reinstall the Ubuntu?) because you hadn't made the IP script yet (not entirely sure it was the problem yet as we didn't discuss that detail at the time). So, anyway, I ran the IP repair script again. I didn't know which IP to put as my old one. In the first attempt, before getting the error, I put the 127.0.0.1 one. This time I tried the bad 200+~ IP I was getting before the router, and I paid close attention and the script said it changed from the 200+~ IP to the 192.168~ one. Tried to launch the server again, got the same error.
I attached a picture of it. This time I actually feel hopeful about further progress, since the eternal main problem (the connection) seems to maybe be okay for the first time, and the current issue is one with the server itself, which is where you have all the expertize and should be able to help me solve it without my pc getting in the way for strange reasons.
Edit: I actually think the first time I got that error was right after switching to NAT and back to Bridged. Perhaps that specific course of action breaks something other than the IP thing?
 

Attachments

Last edited:
The NAT method actually has Tibia point towards my host's internal 127.0.0.1 IP, and then the VM picks up the signals because of the port forwarding. But you're saying the actual Tibia server has network stuff in it that could require changes simply because this method of connecting is different? Doesn't the regular Bridged way send signals all the same?
If you couldn't get past the char list, it means the other services (game server and query manager) weren't being able to process the request because some configuration was wrong. And if it works with the Bridged Adapter but not with NAT, it means NAT is changing something that I don't know.

This is what I got from that:
IPv4 Address. . . . . . . . . . . : 192.168.56.1
IPv4 Address. . . . . . . . . . . : 192.168.1.2


"Check your Ubuntu's local IP (use one of the commands I shared on this thread, perhaps this one). It should be similar (not equal) to your Windows IP."

I used the "hostname -I" command. My IP in Ubuntu right now is as follows: 192.168.1.3
My mind is blown right now. My router is still only giving my host OS a local IP (the 192.168~ one), no public IP, and the internet indicator on the router is off. But I switched back to Bridged on the VM and all of a sudden I'm getting that 192.168~ IP there. I have no idea why it's suddenly giving me that, it never has before, and I have checked with the router plugged in, when it was in the same state it is now.
The local IPs look promising indeed, but not having a public IP usually means you're not connected to the Internet. Although you don't need Internet to play the game (the only requirement is your client and server being in the same network), you probably want to get this sorted in your router at some point anyway - hence why you need to talk to your provider.

I proceeded to run the IP repair script (which appeared to be successful), and reroute the Tibia client. Tried to log in, moment of truth, maybe a month of suffering is finally over and paradise has been reached... But no; no connection.
Realized I forgot to launch the OT server. Went to launch it, got error. The same one I got when I messed with this stuff early on and you had me run a snapshot (or was it reinstall the Ubuntu?) because you hadn't made the IP script yet (not entirely sure it was the problem yet as we didn't discuss that detail at the time).
You need to reboot your Ubuntu when you change your IP, that will force several services to reload their settings based on the new IP you got. Also, always check the IP again after reboot as it can change. That's why at some point you'll have to set a static IP, so your router's DHCP won't assign you a different IP after a while.

So, anyway, I ran the IP repair script again. I didn't know which IP to put as my old one. In the first attempt, before getting the error, I put the 127.0.0.1 one. This time I tried the bad 200+~ IP I was getting before the router, and I paid close attention and the script said it changed from the 200+~ IP to the 192.168~ one. Tried to launch the server again, got the same error.
I attached a picture of it. This time I actually feel hopeful about further progress, since the eternal main problem (the connection) seems to maybe be okay for the first time, and the current issue is one with the server itself, which is where you have all the expertize and should be able to help me solve it without my pc getting in the way for strange reasons.
Edit: I actually think the first time I got that error was right after switching to NAT and back to Bridged. Perhaps that specific course of action breaks something other than the IP thing?
If you don't remember your previous IP, run this command (from the same folder as the other scripts) and it will show the latest IP configured in your Tibia server: grep -oP 'ip = "\K[^"]+' realotsloginserver-master/config.lua
 
The local IPs look promising indeed, but not having a public IP usually means you're not connected to the Internet. Although you don't need Internet to play the game (the only requirement is your client and server being in the same network), you probably want to get this sorted in your router at some point anyway - hence why you need to talk to your provider.

That's what I already tried to talk to my provider about when I called them after the router problems started, and they refused to help. But I clearly do get internet despite not having a public IP, which will make it hard to motivate myself to fix it as long as things do work, especially considering how extremely difficult it is to fix and how I've already tried like crazy. But if it's a problem in some way I will just change to not using the router whenever I'm not playing on the OT. Still can't know for sure if it will work as it is now though, need to get the OT running again before I can find out.

You need to reboot your Ubuntu when you change your IP, that will force several services to reload their settings based on the new IP you got. Also, always check the IP again after reboot as it can change. That's why at some point you'll have to set a static IP, so your router's DHCP won't assign you a different IP after a while.

I changed it before starting Ubuntu. But relaunching it now I still got the same error. And I still have the same IP. I will set a static one as soon as it's working, and then cross my fingers it won't break it again.

If you don't remember your previous IP, run this command (from the same folder as the other scripts) and it will show the latest IP configured in your Tibia server: grep -oP 'ip = "\K[^"]+' realotsloginserver-master/config.lua

Wish I had had that yesterday. Now it just says the current IP as my last one, so it would be futile to run the script a third time and have it change to the same IP it's already on. So what do I do to fix the server? Do you have no idea what this socket error is about, or is it usually about the IP thing? What can I do about that at this point if it is what it relates to? :/
 
While awaiting your response I decided to try something. I took a snapshot before trying the NAT thing, so I restored to that one now. It had static IP and the old bad one, and no IP fixing script yet. I changed it to DHCP, restarted, got the 192.168~ IP back, the exact same one I had already set my Tibia to. I used your old IP finder command to see what IP my OT was set to, then created the repair script and changed from that to the new one (I noticed your instruction for the repair script said I'll have to type in the new IP, but it just got it by itself). I tried connecting to the OT, and it worked. Still have my characters and everything.
I powered off the machine and took another snapshot (you instructed me to do that before setting a static IP) and then booted it back up and changed to static IP. Everything's looking good, the IP seems stable, the OT is working with no connection issues in Tibia... I think it might finally be over, I see no reason I shouldn't be able to play now with no further issues.
 
Back
Top