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

Delete Mount/Dismount & Set Outfit options & Compare versions on login

kermaxpl

Pora na Nonsens Scripter
Joined
Aug 21, 2012
Messages
121
Reaction score
7
Location
Poland
First: Is it possible to delete mount/dismount and set outfit options from right click menu?
If it is, how?
 
Last edited:
bump

Edit:
Second: How can I add function which can check that client version and version saved for example in version.txt on my server is the same?
 
Last edited:
1: modules/game_interface/gameinterface.lua remove:
Lua:
      if g_game.getFeature(GamePlayerMounts) then
        if not localPlayer:isMounted() then
          menu:addOption(tr('Mount'), function() localPlayer:mount() end)
        else
          menu:addOption(tr('Dismount'), function() localPlayer:dismount() end)
        end
      end
You could check if it is your ip and then ignore it.

2: Do not understand that one
 
1: ty it works
2: I update my client very often (translation, sprites, dat edits, some minor updates in modules) and want to players can only use the newest version of client.
 
Last edited:
Add a int to the login packet, which is equal to the version:
function ProtocolLogin:sendLoginPacket()
 
ty, I will try

edit: can u help me because I dont have any idea how to do that? Sorry if it is a noobs question.
 
Last edited:
addversion client:
\modules\gamelib\game.lua
function g_game.getSupportedProtocols()
return {
810, 853, 854, 860, 861, 862, 870,
910, 940, 944, 953, 954, 960, 961,
963, 970, 971, 973
}
end

but... the addition of new and try to log on because the problem is not connected ..


otclient.log
ERROR: invalid encrypted network message
at: [C++]: Protocol::xteaDecrypt
ERROR: failed to decrypt message
at: [C++]: Protocol::internalRecvData
 
No no no protocol must be the same because if i will change that i can have problems in game(wrong consts or something like that), in addition numbers of protocols are limited. I think I should do something in src/client/protocolgame.cpp in function
Code:
ProtocolGame::onConnect()
but i dont know what.

Sorry for my english.
 
Last edited:
proof of concept:

Need to modify ur tibian client .exe by looking for Login/password sending method

Example:

Your account is Maladnay / Maladnaypass - modify client to sending 001Maladnay / Maladnaypass.

Now ur ots is getting account name like 001Maladnay, you need to split it to client_ver = 001; login = Maladnay;

But it will only protect your client .exe not ur .pic or .spr.
 
Add this:
Lua:
  msg:addU32(1) 
  paddingBytes = paddingBytes - 4
Before:
Lua:
  if g_game.getFeature(GameAccountNames) then
1 is your custom client version here.

File: \otclient\modules\gamelib\protocollogin.lua

Now you need to get that byte in the login packet method of your server.
 
Back
Top