• Sign up for TFS Icon Competition! The prize includes Otland Premium time and a medal, as well as obviously taking part in TFS history.
  • 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!

How can i block Otclient?

gubbo123

New Member
Joined
Aug 15, 2017
Messages
131
Solutions
1
Reaction score
3
Hello, how can i block players that use otclient on my server? I just want connection by default cip client.

Theres any way? Im using TFS 1.2


Obs: i found this topic, but no work...
 

Ralumbi

apt install nubmod
Content Editor
Premium User
Joined
Jun 8, 2011
Messages
182
Solutions
6
Reaction score
66
Location
Netherlands
GitHub
Ralumbi
If you would want my tip:
Create your own OTClient and make a function which checks with the gameserver if it has the exact same 'code'/'password' and if thats correct you can login. If not session will be terminated.
 

royalmichael

New Member
Joined
Apr 21, 2020
Messages
99
Reaction score
4
If you would want my tip:
Create your own OTClient and make a function which checks with the gameserver if it has the exact same 'code'/'password' and if thats correct you can login. If not session will be terminated.
and is there any way around it?maybe i can replace bot from original otclient to server client?
 

Shadow_

Veteran OT User
Joined
Jun 2, 2018
Messages
811
Solutions
26
Reaction score
268
Location
Cairo, Egypt
maybe use this?
Lua:
--[[
    available clients to whitelist:
    CLIENTOS_LINUX
    CLIENTOS_WINDOWS
    CLIENTOS_FLASH
    CLIENTOS_OTCLIENT_LINUX
    CLIENTOS_OTCLIENT_WINDOWS
    CLIENTOS_OTCLIENT_MAC
]]

-- config
local whitelist = {CLIENTOS_OTCLIENTV8_MAC, CLIENTOS_OTCLIENTV8_WINDOWS, CLIENTOS_OTCLIENTV8_LINUX}
local msg = "This game client is not supported on the server."
-- end config


-- do not touch
local tibiaClient = {CLIENTOS_WINDOWS, CLIENTOS_LINUX}

local function forceLogout(cid)
    local player = Player(cid)
  
    if player then
        local tile = player:getTile()
        if not (tile:hasFlag(TILESTATE_NOLOGOUT) or (player:hasCondition(CONDITION_INFIGHT) and not tile:hasFlag(TILESTATE_PROTECTIONZONE))) then
            player:remove()
        end
    end
end

function onLogin(player)
    player:registerEvent("clientControl")
    return true
end

function onThink(player, interval)
    local clientType = player:getClient().os
    if not isInArray(whitelist, clientType) then
        if isInArray(tibiaClient, clientType) then
            -- tibia client
            local m = ModalWindow()
            m:setTitle("Error")
            m:setMessage(msg)
            m:addButton(1, "ok")
            m:sendToPlayer(player)
        else
            -- ot client
            local m = NetworkMessage()
            m:addByte(0x14)
            m:addString(msg)
            m:sendToPlayer(player)
        end
      
        addEvent(forceLogout, 100, player:getId())     
    end
    return true
end
 

royalpala

Active Member
Joined
Dec 31, 2019
Messages
74
Solutions
1
Reaction score
42
dont you have to edit the cip client on HEX to config the IP directly????
that is so oldscool, I dont know i you can find tutorials about that anymore
 

royalpala

Active Member
Joined
Dec 31, 2019
Messages
74
Solutions
1
Reaction score
42


maybe these tutorials can help our little guy
Post automatically merged:



maybe these tutorials can help our little guy

I just want connection by default cip client.

you can do that. using a hex editor to mod the cip client and code your own IP following the instructions on these tutorials
 

royalmichael

New Member
Joined
Apr 21, 2020
Messages
99
Reaction score
4
maybe use this?
Lua:
--[[
    available clients to whitelist:
    CLIENTOS_LINUX
    CLIENTOS_WINDOWS
    CLIENTOS_FLASH
    CLIENTOS_OTCLIENT_LINUX
    CLIENTOS_OTCLIENT_WINDOWS
    CLIENTOS_OTCLIENT_MAC
]]

-- config
local whitelist = {CLIENTOS_OTCLIENTV8_MAC, CLIENTOS_OTCLIENTV8_WINDOWS, CLIENTOS_OTCLIENTV8_LINUX}
local msg = "This game client is not supported on the server."
-- end config


-- do not touch
local tibiaClient = {CLIENTOS_WINDOWS, CLIENTOS_LINUX}

local function forceLogout(cid)
    local player = Player(cid)
 
    if player then
        local tile = player:getTile()
        if not (tile:hasFlag(TILESTATE_NOLOGOUT) or (player:hasCondition(CONDITION_INFIGHT) and not tile:hasFlag(TILESTATE_PROTECTIONZONE))) then
            player:remove()
        end
    end
end

function onLogin(player)
    player:registerEvent("clientControl")
    return true
end

function onThink(player, interval)
    local clientType = player:getClient().os
    if not isInArray(whitelist, clientType) then
        if isInArray(tibiaClient, clientType) then
            -- tibia client
            local m = ModalWindow()
            m:setTitle("Error")
            m:setMessage(msg)
            m:addButton(1, "ok")
            m:sendToPlayer(player)
        else
            -- ot client
            local m = NetworkMessage()
            m:addByte(0x14)
            m:addString(msg)
            m:sendToPlayer(player)
        end
     
        addEvent(forceLogout, 100, player:getId())    
    end
    return true
end
and is there any way around it?maybe i can replace bot from original otclient to server client? I cant use otclient orginal in server...
 
Top