2012-07-24 07:30:08 +02:00
|
|
|
function init()
|
2012-07-26 08:10:28 +02:00
|
|
|
if g_game.getClientVersion() ~= 0 then
|
|
|
|
load()
|
2012-07-18 09:49:44 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-07-26 08:10:28 +02:00
|
|
|
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
|
2012-07-18 10:34:17 +02:00
|
|
|
end
|