liqeen
Active Member
Hello, i'm trying to made a script that will set exhaust on teleport cause it's annoying to dash from one to another
This is what I made so far but doesn't work, no errors in console.
Can somebody help me with that?
TFS 1.3
Lua:
local config = {
cooldown = 3000, -- milliseconds for more precision
storage = 99999 -- sample storage value
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player or player:isInGhostMode() then
return true
end
if player:getStorageValue(config.storage) <= os.mtime() then
player:setStorageValue(config.storage, os.mtime() + config.cooldown)
return true
end
player:sendCancelMessage("You cannot enter yet")
return false
end
Can somebody help me with that?
TFS 1.3
Last edited: