[05/02/2012 00:12:39] [Error - LuaScriptInterface::loadFile] data/movements/scripts/leavetp.lua:2: unexpected symbol near 'local'
[05/02/2012 00:12:39] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/leavetp.lua)
[05/02/2012 00:12:39] data/movements/scripts/leavetp.lua:2: unexpected symbol near 'local'
doPlayerSendTextMessage(cid, 21, "You have to wait "..c.." minutes to get inside again!.")
doPlayerSendTextMessage(cid, 21, "You have to wait "..b.." minutes to get inside again!.")
doPlayerSendTextMessage(cid, 21, "You have to wait "..t.c.." minutes to get inside again!.")
doPlayerSendTextMessage(cid, 21, "You have to wait "..t.b.." minutes to get inside again!.")
'[05/02/2012 08:22:31] [Error - LuaScriptInterface::loadFile] data/movements/scripts/leavetp.lua:1: unexpected symbol near '['
[05/02/2012 08:22:31] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/leavetp.lua)
[05/02/2012 08:22:31] data/movements/scripts/leavetp.lua:1: unexpected symbol near '[
c -> t.c
b -> t.b
local config = {
storage = 40000, --storage value to set exhaustion!
pos = {x=372, y=817, z=7} -- telepos
}
function onStepIn(cid, item, pos, fromPos)
if isPlayer(cid) then
if exhaustion.get(cid, config.storage) == false then
doPlayerSendTextMessage(cid, 19, "Happy Hunting!") --edit it :P
doTeleportThing(cid, config.pos)
else
doPlayerSendTextMessage(cid, 19, "You have to wait for "..getPlayerStorageValue(cid, config.storage)-os.time().." seconds to enter again.")
doTeleportThing(cid, fromPos)
end
end
end
local config = {
storage = 40000,
prem = 60, --times in seconds!
free = 180, --3 minutes
pos = {x=372, y=811, z=7} --teleport position
}
function onStepIn(cid, item, pos, fromPos)
if isPlayer(cid) then
if isPremium(cid) then
exhaustion.set(cid, config.storage, config.prem)
doPlayerSendTextMessage(cid, 19, "Please wait 1 minute to enter the teleport again.")
else
exhaustion.set(cid, config.storage, config.free)
doPlayerSendTextMessage(cid, 19, "Please wait 3 minute to enter the teleport again.")
end
doTeleportThing(cid, config.pos)
end
end
<movevent type="StepIn" actionid="4405" event="script" value="entertp.lua"/>
<movevent type="StepIn" actionid="4406" event="script" value="leavetp.lua"/>
get = function (cid, storage)
--if(getPlayerFlagValue(cid, PlayerFlag_HasNoExhaustion)) then
--return false
--end
17:12 You have to wait for -94 seconds to enter again.
17:12 You have to wait for -95 seconds to enter again.
17:12 You have to wait for -96 seconds to enter again.