mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 21:13:26 +02:00
Make otclient login into cipsoft servers again
This commit is contained in:
@@ -43,7 +43,7 @@ ChaseOpponent = 1
|
||||
|
||||
GameProtocolChecksum = 1
|
||||
GameAccountNames = 2
|
||||
GameChallangeOnLogin = 3
|
||||
GameChallengeOnLogin = 3
|
||||
GamePenalityOnDeath = 4
|
||||
GameNameOnNpcTrade = 5
|
||||
GameDoubleFreeCapacity = 6
|
||||
@@ -65,8 +65,18 @@ GamePurseSlot = 21
|
||||
GameFormatCreatureName = 22
|
||||
GameSpellList = 23
|
||||
GameClientPing = 24
|
||||
GameLoginPending = 25
|
||||
GameNewSpeedLaw = 26
|
||||
GameExtendedClientPing = 25
|
||||
GameUpdater = 26
|
||||
GameLoginLocale = 27
|
||||
GameDoubleHealth = 28
|
||||
GameDoubleSkills = 29
|
||||
GameChangeMapAwareRange = 30
|
||||
GameMapMovePosition = 31
|
||||
GameAttackSeq = 32
|
||||
GameBlueNpcNameColor = 33
|
||||
GameDiagonalAnimatedText = 34
|
||||
GameLoginPending = 35
|
||||
GameNewSpeedLaw = 36
|
||||
|
||||
TextColors = {
|
||||
red = '#f55e5e', --'#c83200'
|
||||
|
@@ -1,19 +1,21 @@
|
||||
local currentRsa
|
||||
local enableCreatureNameFormat = true
|
||||
|
||||
function g_game.getRsa()
|
||||
return currentRsa
|
||||
end
|
||||
|
||||
function g_game.isCreatureNameFormatEnabled()
|
||||
return enableCreatureNameFormat
|
||||
end
|
||||
|
||||
function g_game.chooseRsa(host)
|
||||
if string.ends(host, '.tibia.com') or string.ends(host, '.cipsoft.com') then
|
||||
g_game.setRsa(CIPSOFT_RSA)
|
||||
|
||||
if g_app.getOs() == 'windows' then
|
||||
g_game.setCustomOs(OsTypes.Windows)
|
||||
else
|
||||
g_game.setCustomOs(OsTypes.Linux)
|
||||
end
|
||||
else
|
||||
g_game.setRsa(OTSERV_RSA)
|
||||
g_game.setCustomOs(-1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -28,24 +30,6 @@ function g_game.isOfficialTibia()
|
||||
return currentRsa == CIPSOFT_RSA
|
||||
end
|
||||
|
||||
function g_game.getOsType()
|
||||
if g_game.isOfficialTibia() then
|
||||
if g_app.getOs() == 'windows' then
|
||||
return OsTypes.Windows
|
||||
else
|
||||
return OsTypes.Linux
|
||||
end
|
||||
else
|
||||
if g_app.getOs() == 'windows' then
|
||||
return OsTypes.OtclientWindows
|
||||
elseif g_app.getOs() == 'mac' then
|
||||
return OsTypes.OtclientMac
|
||||
else
|
||||
return OsTypes.OtclientLinux
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function g_game.getSupportedProtocols()
|
||||
return {
|
||||
810, 853, 854, 860, 861, 862, 870,
|
||||
|
@@ -8,7 +8,7 @@ GameServerOpcodes = {
|
||||
GameServerAddCreature = 23,
|
||||
GameServerPingBack = 29,
|
||||
GameServerPing = 30,
|
||||
GameServerChallange = 31,
|
||||
GameServerChallenge = 31,
|
||||
GameServerDeath = 40,
|
||||
|
||||
-- all in game opcodes must be greater than 50
|
||||
|
@@ -27,7 +27,7 @@ end
|
||||
function ProtocolLogin:sendLoginPacket()
|
||||
local msg = OutputMessage.create()
|
||||
msg:addU8(ClientOpcodes.ClientEnterAccount)
|
||||
msg:addU16(g_game.getOsType())
|
||||
msg:addU16(g_game.getOs())
|
||||
msg:addU16(g_game.getProtocolVersion())
|
||||
|
||||
if g_game.getProtocolVersion() >= 971 then
|
||||
|
Reference in New Issue
Block a user