mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
More multiprotocol support
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
function init()
|
||||
if not g_things.loadDat('/game_tibiafiles/Tibia.dat') then
|
||||
fatal(tr("Unable to load dat file, please place a valid Tibia dat in modules/game_tibiafiles/Tibia.dat"))
|
||||
end
|
||||
if not g_sprites.loadSpr('/game_tibiafiles/Tibia.spr') then
|
||||
fatal(tr("Unable to load spr file, please place a valid Tibia spr in modules/game_tibiafiles/Tibia.spr"))
|
||||
if g_game.getClientVersion() ~= 0 then
|
||||
load()
|
||||
end
|
||||
end
|
||||
|
||||
function terminate()
|
||||
function load()
|
||||
local version = g_game.getClientVersion()
|
||||
local datPath = resolvepath(version .. '/Tibia.dat')
|
||||
local sprPath = resolvepath(version .. '/Tibia.spr')
|
||||
if not g_things.loadDat(datPath) then
|
||||
fatal(tr("Unable to load dat file, please place a valid dat in '%s'", datPath))
|
||||
end
|
||||
if not g_sprites.loadSpr(sprPath) then
|
||||
fatal(tr("Unable to load spr file, please place a valid spr in '%s'", sprPath))
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user