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

Otclient load /thing/8.6/xxx

Devlinn

Member
Joined
Mar 25, 2015
Messages
295
Reaction score
6
hello, how i can remove load/things/version/xx
like /things/foldername/Tibia.dat
like /things/foldername/Tibia.spr

i find this on otclient
things.lua
Code:
unction load()
  local version = g_game.getClientVersion()

  local datPath, sprPath
  if filename then
    datPath = resolvepath('/things/' .. filename)
    sprPath = resolvepath('/things/' .. filename)
  else
    datPath = resolvepath('/things/' .. version .. '/Tibia')
    sprPath = resolvepath('/things/' .. version .. '/Tibia')
  end

  local errorMessage = ''
  if not g_things.loadDat(datPath) then
    errorMessage = errorMessage .. tr("Unable to load dat file, please place a valid dat in '%s'", datPath) .. '\n'
  end
  if not g_sprites.loadSpr(sprPath) then
    errorMessage = errorMessage .. tr("Unable to load spr file, please place a valid spr in '%s'", sprPath)
  end

  loaded = (errorMessage:len() == 0)

  if errorMessage:len() > 0 then
    local messageBox = displayErrorBox(tr('Error'), errorMessage)
    addEvent(function() messageBox:raise() messageBox:focus() end)

    disconnect(g_game, { onClientVersionChange = load })
    g_game.setClientVersion(0)
    g_game.setProtocolVersion(0)
    connect(g_game, { onClientVersionChange = load })
  end
end
 
edit solved
Post the problem and solution.. if everyone did as you just did then this forum would be filled with empty threads and there would be 100x more pages.

Since I was able to recover the issue you deleted, what was the solution?
Code:
hello, how i can remove load/things/version/xx
like /things/foldername/Tibia.dat
like /things/foldername/Tibia.spr

i find this on otclient
things.lua
Code:

function load()
  local version = g_game.getClientVersion()

  local datPath, sprPath
  if filename then
    datPath = resolvepath('/things/' .. filename)
    sprPath = resolvepath('/things/' .. filename)
  else
    datPath = resolvepath('/things/' .. version .. '/Tibia')
    sprPath = resolvepath('/things/' .. version .. '/Tibia')
  end

  local errorMessage = ''
  if not g_things.loadDat(datPath) then
    errorMessage = errorMessage .. tr("Unable to load dat file, please place a valid dat in '%s'", datPath) .. '\n'
  end
  if not g_sprites.loadSpr(sprPath) then
    errorMessage = errorMessage .. tr("Unable to load spr file, please place a valid spr in '%s'", sprPath)
  end

  loaded = (errorMessage:len() == 0)

  if errorMessage:len() > 0 then
    local messageBox = displayErrorBox(tr('Error'), errorMessage)
    addEvent(function() messageBox:raise() messageBox:focus() end)

    disconnect(g_game, { onClientVersionChange = load })
    g_game.setClientVersion(0)
    g_game.setProtocolVersion(0)
    connect(g_game, { onClientVersionChange = load })
  end
end
 
Post the problem and solution.. if everyone did as you just did then this forum would be filled with empty threads and there would be 100x more pages.

Since I was able to recover the issue you deleted, what was the solution?
Code:
hello, how i can remove load/things/version/xx
like /things/foldername/Tibia.dat
like /things/foldername/Tibia.spr

i find this on otclient
things.lua
Code:

function load()
  local version = g_game.getClientVersion()

  local datPath, sprPath
  if filename then
    datPath = resolvepath('/things/' .. filename)
    sprPath = resolvepath('/things/' .. filename)
  else
    datPath = resolvepath('/things/' .. version .. '/Tibia')
    sprPath = resolvepath('/things/' .. version .. '/Tibia')
  end

  local errorMessage = ''
  if not g_things.loadDat(datPath) then
    errorMessage = errorMessage .. tr("Unable to load dat file, please place a valid dat in '%s'", datPath) .. '\n'
  end
  if not g_sprites.loadSpr(sprPath) then
    errorMessage = errorMessage .. tr("Unable to load spr file, please place a valid spr in '%s'", sprPath)
  end

  loaded = (errorMessage:len() == 0)

  if errorMessage:len() > 0 then
    local messageBox = displayErrorBox(tr('Error'), errorMessage)
    addEvent(function() messageBox:raise() messageBox:focus() end)

    disconnect(g_game, { onClientVersionChange = load })
    g_game.setClientVersion(0)
    g_game.setProtocolVersion(0)
    connect(g_game, { onClientVersionChange = load })
  end
end

solution here
Code:
datPath = resolvepath('/things/' .. version .. '/Tibia')
sprPath = resolvepath('/things/' .. version .. '/Tibia')
i remove .. version ..
like
Code:
datPath = resolvepath('/things' .. '/Tibia')
sprPath = resolvepath('/things' .. '/Tibia')
#2 put more folder
need more change
Code:
    datPath = resolvepath('/things/foldername' .. filename)
    sprPath = resolvepath('/things/foldername' .. filename)
Code:
datPath = resolvepath('/things/foldername' .. '/Tibia')
sprPath = resolvepath('/things/foldername' .. '/Tibia')
you can rename /things
 
Last edited:

Similar threads

Back
Top