MxSoft
Leave Tibia, Live Life.
Code:
local config = {
exhaustionInSeconds = 420,
storage = 36531
}
function onSay(cid, words, param)
local player = getPlayerByName(param)
if(isPlayer(player) == TRUE) then
if(exhaustion.check(cid, config.storage) == TRUE) then
doPlayerSendCancel(cid, "You can teleport players only 1 time per " .. config.exhaustionInSeconds .. " seconds.")
return TRUE
end
if (getPlayerLevel(cid) > 80) then
if (getPlayerLevel(player) <= 80) then
if(doPlayerAddSoul(cid, -100) == TRUE) then
exhaustion.set(cid, config.storage, config.exhaustionInSeconds)
doTeleportThing(player, getTownTemplePosition(getPlayerTown(player)))
else
doPlayerSendCancel(cid,"You dont have 100 soul points.")
end
else
doPlayerSendCancel(cid,"This player have lvl higher than 80.")
end
else
doPlayerSendCancel(cid,"Your level is too low.")
end
else
doPlayerSendCancel(cid,"This players doesn exist, or is offline.")
end
if getTilePzInfo(toPosition) == true then
return doPlayerSendCancel(cid, "Sorry, not possible.")
end
return TRUE
end
But i dont find how to make it works