# OTClient Redemption

## What is this?

* An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize.

## Github:

* [OTClient Redemption](https://github.com/opentibiabr/otclient)

## Image:

* ![](/files/apD4UCkUB2VlTLXnlpo2)

## How to connect on Canary with OTClient Redemption:

<details>

<summary>Http Login</summary>

* Download:
* [Client 15](https://github.com/dudantas/tibia-client/releases/latest)
* Copy the **assets.json.sha256** file and place it in the **assets** folder.
* Copy the **assets** folder and place it in **OTClient Redemption data/things/**. \
  Rename the **assets** folder to **1500**.
* Copy the **sounds** folder and place it in **OTClient Redemption sounds/**. \
  Rename the **sounds** folder to **1500**.
* On **OTClient Redemption** **init.lua**, change:

```lua
Services = {
    --updater = "http://localhost/api/updater.php", --./updater
    status = "http://127.0.0.1/login.php", --./client_entergame | ./client_topmenu
    --websites = "http://localhost/?subtopic=accountmanagement", --./client_entergame "Forgot password and/or email"
    --createAccount = "http://localhost/clientcreateaccount.php", --./client_entergame -- createAccount.lua
    --getCoinsUrl = "http://localhost/?subtopic=shop&step=terms", --./game_market
}

--- Enables or disables the entire server configuration block.
-- Set to `false` to disable all configuration below.
local ENABLE_SERVERS = true

---
-- @module Servers_init
-- Configuration table for all servers used by the system.
--
-- This entire block is conditionally enabled based on ENABLE_SERVERS.
-- When ENABLE_SERVERS == false, everything is ignored/disabled.
--

---
-- Server configuration system for multi-server or multi-world clients.
--
-- This structure allows a single client build to connect to multiple servers
-- without requiring duplicate client folders.
--
-- A server that hosts several worlds, or that provides a separate test environment,
-- can simply define additional entries inside this configuration table.
--
-- Instead of maintaining multiple client installations (one per world/server),
-- the client can switch between servers by selecting the desired configuration entry.
-- This simplifies testing, avoids redundant directories, and centralizes connection settings.
--
-- The ENABLE_SERVERS flag allows the entire configuration block to be enabled or disabled
-- without deleting or commenting out individual entries.
--

Servers_init = {}

if ENABLE_SERVERS then

    ---
    -- List of servers and their configuration parameters.
    -- Each entry defines port, protocol, and authentication options.
    -- @table Servers_init
    --
    Servers_init = {

        -- Local login server
        ---
        -- Configuration for local login server.
        -- @class table
        -- @name local_login
        -- @field port Port used for HTTP connection
        -- @field protocol Protocol identifier used by the application
        -- @field httpLogin Enables HTTP-based login on the server
        -- @field useAuthenticator Enables additional authentication layer
        --
        ["http://127.0.0.1/login.php"] = {
            port = 80,
            protocol = 1500,
            httpLogin = true,
            useAuthenticator = false
        },

        -- External server
        ---
        -- Configuration for external server ip.net.
        -- @class table
        -- @name ip_net
        -- @field port TCP port used for connection
        -- @field protocol Protocol identifier used by the server
        -- @field httpLogin Indicates if the server allows HTTP login
        --
        --["ip.net"] = {
        --   port = 7171,
        --    protocol = 860,
        --    httpLogin = false
        --}
    }
end
```

</details>

<details>

<summary>Https Login</summary>

* Download:
* [Client 15](https://github.com/dudantas/tibia-client/releases/latest)
* Copy the **assets.json.sha256** file and place it in the **assets** folder.
* Copy the **assets** folder and place it in **OTClient Redemption data/things/**. \
  Rename the **assets** folder to **1500**.
* Copy the **sounds** folder and place it in **OTClient Redemption sounds/**. \
  Rename the **sounds** folder to **1500**.
* On **OTClient Redemption** **init.lua**, change:

```lua
Services = {
    --updater = "http://localhost/api/updater.php", --./updater
    status = "https://your-domain-or-ip/login.php", --./client_entergame | ./client_topmenu
    --websites = "http://localhost/?subtopic=accountmanagement", --./client_entergame "Forgot password and/or email"
    --createAccount = "http://localhost/clientcreateaccount.php", --./client_entergame -- createAccount.lua
    --getCoinsUrl = "http://localhost/?subtopic=shop&step=terms", --./game_market
}

--- Enables or disables the entire server configuration block.
-- Set to `false` to disable all configuration below.
local ENABLE_SERVERS = true

---
-- @module Servers_init
-- Configuration table for all servers used by the system.
--
-- This entire block is conditionally enabled based on ENABLE_SERVERS.
-- When ENABLE_SERVERS == false, everything is ignored/disabled.
--

---
-- Server configuration system for multi-server or multi-world clients.
--
-- This structure allows a single client build to connect to multiple servers
-- without requiring duplicate client folders.
--
-- A server that hosts several worlds, or that provides a separate test environment,
-- can simply define additional entries inside this configuration table.
--
-- Instead of maintaining multiple client installations (one per world/server),
-- the client can switch between servers by selecting the desired configuration entry.
-- This simplifies testing, avoids redundant directories, and centralizes connection settings.
--
-- The ENABLE_SERVERS flag allows the entire configuration block to be enabled or disabled
-- without deleting or commenting out individual entries.
--

Servers_init = {}

if ENABLE_SERVERS then

    ---
    -- List of servers and their configuration parameters.
    -- Each entry defines port, protocol, and authentication options.
    -- @table Servers_init
    --
    Servers_init = {

        -- Local login server
        ---
        -- Configuration for local login server.
        -- @class table
        -- @name local_login
        -- @field port Port used for HTTP connection
        -- @field protocol Protocol identifier used by the application
        -- @field httpLogin Enables HTTP-based login on the server
        -- @field useAuthenticator Enables additional authentication layer
        --
        ["https://your-domain-or-ip/login.php"] = {
            port = 443,
            protocol = 1500,
            httpLogin = false,
            useAuthenticator = false
        },

        -- External server
        ---
        -- Configuration for external server ip.net.
        -- @class table
        -- @name ip_net
        -- @field port TCP port used for connection
        -- @field protocol Protocol identifier used by the server
        -- @field httpLogin Indicates if the server allows HTTP login
        --
        --["ip.net"] = {
        --   port = 7171,
        --    protocol = 860,
        --    httpLogin = false
        --}
    }
end
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opentibiabr.com/opentibiabr/otclient-redemption.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
