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

Encrypt init.lua, modules, and data ?

swashed

Member
Joined
Jul 9, 2023
Messages
115
Reaction score
14
I used the tutorial below and I'm confused because he took init.lua, modules, and data folders and sent them to compressed zip file (at 01:30 in video). Then, the original files become encrypted. Obviously this is not the case when zipping files. Also, this is an issue since anyone can just open these files to mess with the client.


How am I supposed to encrypt these files?
 
How to Encrypt using default encryption
- Copy the needed files and folders (meaning the .exe, all 3 dll's en 3-4 folders, data, mods, modules and/or layouts) to a separate folder called "Encrypted Client" (do not ever make the mistake of encrypting your original client folder...)
6d745557f9e50671122503f47192355c.png

My encryption folder for example.

You can click in your Explorer, for me it is on PREALPHA, where you can type like an URL, what you type here is "cmd" on Windows
This will open your Command Prompt but already specifically aimed at this folder, the name of the folder is shown in CMD.

- In the Command Prompt, you just typ "--encrypt otclient_gl.exe" and for DirectX it is "--encrypt otclient_dx.exe"
AGAIN MAKE SURE YOU ARE NOT IN YOUR MAIN CLIENT FOLDER (the one you work and edit on)
- It should take a minute or two, it will eventually give you a pop-up that encryption is completed.

After that you can take the following things and add them to a zip:
  • Data Folder
  • Layouts Folder
  • Mods Folder
  • Modules Folder
  • Init.lua

This zip should be called "data"

Run the game to make sure it is working properly, perhaps make sure your %appdata% of the client is also empty so you can see exactly how the player experience will be, if everything is working properly, it is ready to ship.
------

Do note that the standard encryption that comes with the client has already been decrypted many times, it might be wise to research in other options, there are some people out there producing their own encryption which would be far more efficient, I remember @oen432 has one for sale and from what I've heard works quite well, I believe he updated it quite recently, but it's up to you, if you are going to use standard Tibia sprites and not many custom modules, then I believe the standard encryption would suffice, there is pretty much nothing to be stolen, but if you are working on a custom server, custom sprites, custom modules, you want your work to be protected, and I suggest you think about this rather early then too late.


Next to encryption of your files you can also package all files into a single .exe, there are many options for this if you google a bit.
 
Last edited:
How to Encrypt using default encryption
- Copy the needed files and folders (meaning the .exe, all 3 dll's en 3-4 folders, data, mods, modules and/or layouts) to a separate folder called "Encrypted Client" (do not ever make the mistake of encrypting your original client folder...)
6d745557f9e50671122503f47192355c.png

My encryption folder for example.

You can click in your Explorer, for me it is on PREALPHA, where you can type like an URL, what you type here is "cmd" on Windows
This will open your Command Prompt but already specifically aimed at this folder, the name of the folder is shown in CMD.

- In the Command Prompt, you just typ "--encrypt otclient_gl.exe" and for DirectX it is "--encrypt otclient_dx.exe"
AGAIN MAKE SURE YOU ARE NOT IN YOUR MAIN CLIENT FOLDER (the one you work and edit on)
- It should take a minute or two, it will eventually give you a pop-up that encryption is completed.

After that you can take the following things and add them to a zip:
  • Data Folder
  • Layouts Folder
  • Mods Folder
  • Modules Folder
  • Init.lua

This zip should be called "data"

Run the game to make sure it is working properly, perhaps make sure your %appdata% of the client is also empty so you can see exactly how the player experience will be, if everything is working properly, it is ready to ship.
------

Do note that the standard encryption that comes with the client has already been decrypted many times, it might be wise to research in other options, there are some people out there producing their own encryption which would be far more efficient, I remember @oen432 has one for sale and from what I've heard works quite well, I believe he updated it quite recently, but it's up to you, if you are going to use standard Tibia sprites and not many custom modules, then I believe the standard encryption would suffice, there is pretty much nothing to be stolen, but if you are working on a custom server, custom sprites, custom modules, you want your work to be protected, and I suggest you think about this rather early then too late.


Next to encryption of your files you can also package all files into a single .exe, there are many options for this if you google a bit.
The issue I’m having is when I push an update to my web server and the client downloads the new files, it will download the data.zip into the appdata folder which can be unzipped…and the data/modules/init can be extracted from this zip and read in plain text
 
The issue I’m having is when I push an update to my web server and the client downloads the new files, it will download the data.zip into the appdata folder which can be unzipped…and the data/modules/init can be extracted from this zip and read in plain text

then u did it wrong :D
 
If you use base encryption, you can use no encryption at all. The output will be the same. Decryption will take around 1-2 minutes for any random OT user.
 
If you use base encryption, you can use no encryption at all. The output will be the same. Decryption will take around 1-2 minutes for any random OT user.

Well you can still protect it against people who has no idea how to decrypt :D
 
Back
Top