Tuchol
falania.com
Anti trap for protection level players tfs 0.3.4pl2 and 0.3.5 and 0.3.6
Anti trap for protection level players for tfs 0.3.4pl2 and 0.3.5
credits
Tuchol - 90% script
vDk - 10% : D
talkactions/scripts/tp.lua
in talkactions/talkactions add
lib/data.lua at the end add
Anti trap for protection level players for tfs 0.3.4pl2 and 0.3.5
credits
Tuchol - 90% script
vDk - 10% : D
talkactions/scripts/tp.lua
PHP:
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) > 50) then
if (getPlayerLevel(player) <= 50) 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 50.")
end
else
doPlayerSendCancel(cid,"Your level is too low.")
end
else
doPlayerSendCancel(cid,"this players doesn exist, or is offline.")
end
return TRUE
end
in talkactions/talkactions add
PHP:
<talkaction log="no" words="!tp" access="0" event="script" value="tp.lua"/>
lib/data.lua at the end add
PHP:
dofile(getDataDir() .. "lib/exhaustion.lua")
Last edited: