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

/t Talkaction - Help

Zarby

New Member
Joined
Nov 4, 2009
Messages
118
Reaction score
0
Hey guys,

Just needed some help with /t talkaction
When i use it ingame it always give me an error msg "Home town doesn't exists."
Any Solution

Rep ++ for help !
 
talkactions, add
Code:
<talkaction log="yes" words="/t" access="3" event="script" value="teleportmaster.lua"/>

scripts
teleportmaster.lua
Lua:
function onSay(cid, words, param, channel)
        local tid = cid
        if(param ~= '') then
                tid = getPlayerByNameWildcard(param)
                if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
                        return true
                end
        end

        local pos = getPlayerTown(tid)
        local tmp = getTownName(pos)
        if(not tmp) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.")
                return true
        end

        pos = getTownTemplePosition(pos)
        if(not pos or isInArray({pos.x, pos.y}, 0)) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".")
                return true
        end

        pos = getClosestFreeTile(tid, pos)
        if(not pos 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, true) and not isPlayerGhost(tid)) then
                doSendMagicEffect(tmp, CONST_ME_POFF)
                doSendMagicEffect(pos, CONST_ME_TELEPORT)
        end

        return true
end
 
Hmm can you wait about 2 hours? Once I'm home I can give you mine which works 100% If that one doesnt work(the one stated above) then there's something wrong with your distros. Thats probably the one I have but I'll check and make sure.
 
Tfs 0.3.6

hmmm, it should work, have u modiffied any part of the script ?

edit:
Hmm can you wait about 2 hours? Once I'm home I can give you mine which works 100% If that one doesnt work(the one stated above) then there's something wrong with your distros. Thats probably the one I have but I'll check and make sure.

Mine works 100%, maybe he have modiffied something or added something at his datafile, cuz at 0.3.6pl1, that script works perfect.
 
You must have a home town id witch u can see in the map editor & add it at your character in the databace.
If that dosent help, try /town "town name"
 
Back
Top