• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Linux Temple Position

Vrotz

Member
Joined
Apr 7, 2011
Messages
1,071
Reaction score
7
Location
Brazil
Hi

I've configured certain my OTServer and i've that error:

When the player die, he can't connect again because the position of temple is wrong. But I've edited the position of temple correctly with RME and the position of the temple and Samples Characters are correct too.

Whats wrong ?!

When i use that command: /t

I've this in the console:
[Error - TalkAction Interface]
data/talkactions/scripts/teleporttown.lua:onSay
Description:
data/talkactions/scripts/teleporttown.lua:38: attempt to concatenate field '?' (a nil value)
stack traceback:
data/talkactions/scripts/teleporttown.lua:38: in function <data/talkactions/scripts/teleporttown.lua:1>

Thanks..
 
I've checked the players and are ok!

Script:
Code:
function onSay(cid, words, param, channel)
    local master = false
    if(words == '/t') then
        master = true
    elseif(param == '') then
        local str = ""
        for i, town in ipairs(getTownList()) do
            str = str .. town.name .. "\n"
        end

        doShowTextDialog(cid, 2160, str)
        return true
    end

    local tid, t = cid, string.explode(param, ",")
    if(t[(master and 1 or 2)]) then
        tid = getPlayerByNameWildcard(t[(master and 1 or 2)])
        if(not tid or (isPlayerGhost(tid) and getPlayerAccess(tid) > getPlayerAccess(cid))) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[(master and 1 or 2)] .. " not found.")
            return true
        end
    end

    local tmp = getPlayerTown(cid)
    if(not master) then
        tmp = t[1]
        if(not tonumber(tmp)) then
            tmp = getTownId(tmp)
            if(not tmp) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.")
                return true
            end
        end
    end

    local pos = getTownTemplePosition(tmp)
    if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.")
        return true
    end

    pos = getClosestFreeTile(tid, pos)
    if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
        return true
    end

    tmp = getCreaturePosition(tid)
    if(doTeleportThing(tid, pos) and not isPlayerGhost(tid)) then
        doSendMagicEffect(tmp, CONST_ME_POFF)
        doSendMagicEffect(pos, CONST_ME_TELEPORT)
    end

    return true
end
 
I've remove and added again the town and not work --'

I checked the coordinates in the database and when the player dies they make all to zero, X:0, Y: 0 and Z: 0 .. (?)

SHIT! Whats happened? :(
 
Make sure that your towns are setup properly with the website as well, maybe the player is getting assigned a town that does not exist.
 
Back
Top