local t = {
a = 2000,
b = 180, --time to wait (facc)
c = 60, --time to wait (pacc)
d = {x=x, y=y, z=z}
}
function onStepIn(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) then
if isPremium(cid) then
if getPlayerStorageValue(cid, t.a) <= 0 then
doTeleportThing(cid, t.d)
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid, 21, "You have to wait "..c.." minutes to get inside again!.")
end
end
if getPlayerStorageValue(cid, t.a) <= 0 then
doTeleportThing(cid, t.d)
else
doTeleportThing(cid, fromPosition)
doPlayerSendTextMessage(cid, 21, "You have to wait "..b.." minutes to get inside again!.")
end
end
end
local t = {
a = 2000, -- free storage
b = 180, --time to wait (facc)
c = 160, --time to wait (pacc)
d = {x=x, y=y, z=z} -- out of the spawn pos
}
function onStepIn(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) then
if isPremium(cid) then
exhaustion.set(cid, t.a, t.c)
doTeleportThing(cid, t.d)
end
exhaustion.set(cid, t.a, t.b)
doTeleportThing(cid, t.d)
end
end
[04/02/2012 09:08:55] [Error - LuaScriptInterface::loadFile] data/movements/scripts/entertp.lua:20: 'end' expected (to close 'function' at line 8) near '='
[04/02/2012 09:08:55] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/entertp.lua)
[04/02/2012 09:08:55] data/movements/scripts/entertp.lua:20: 'end' expected (to close 'function' at line 8) near '='
[04/02/2012 09:08:55] [Error - LuaScriptInterface::loadFile] data/movements/scripts/leavetp.lua:15: 'end' expected (to close 'function' at line 8) near '='
[04/02/2012 09:08:55] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/leavetp.lua)
[04/02/2012 09:08:55] data/movements/scripts/leavetp.lua:15: 'end' expected (to close 'function' at line 8) near '='
<movevent type="StepIn" actionid="3000" event="script" value="entertp.lua" />
<movevent type="StepIn" actionid="3001" event="script" value="leavetp.lua" />
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerStorageValue(cid, 9992) then
doTeleportThing(cid, lastPosition, false)
else
setPlayerStorageValue = 9991
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Once you exit you have to wait 180 seconds before you can enter again.")
end
end
local seconds, premiumseconds = [180], [60]
function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerStorageValue(cid, 9991) and isPremium(cid) then
setPlayerStorageValue = 9992
exhaustion.set(cid, 9992, premiumseconds)
doPlayerSendCancel(cid, "You have left the area, you now have to wait for " ..exhaustion.get(cid, 9992).. " before you can enter again.")
elseif getPlayerStorageValue(cid, 9991) and not isPremium(cid) then
setPlayerStorageValue = 9992
exhaustion.set(cid, 9992, seconds)
doPlayerSendCancel(cid, "You have left the area, you now have to wait for " ..exhaustion.get(cid, 9992).. " before you can enter again.")
end
end
LUA:function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getPlayerStorageValue(cid, 9992) then doTeleportThing(cid, lastPosition, true) else setPlayerStorageValue = 9991 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Once you exit you have to wait 180 seconds before you can enter again.") end
LUA:local seconds = [180] function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getPlayerStorageValue(cid, 9991) then setPlayerStorageValue = 9992 exhaustion.set(cid, 9992, seconds) doPlayerSendCancel(cid, "You have left the area, you now have to wait for " ..exhaustion.get(cid, 9992).. " before you can enter again.") end end
[04/02/2012 23:30:30] [Error - MoveEvents Interface]
[04/02/2012 23:30:30] data/movements/scripts/leavetp.lua:onStepIn
[04/02/2012 23:30:30] Description:
[04/02/2012 23:30:30] data/lib/034-exhaustion.lua:144: attempt to perform arithmetic on local 'mytempo' (a nil value)
[04/02/2012 23:30:30] stack traceback:
[04/02/2012 23:30:30] data/lib/034-exhaustion.lua:144: in function 'set'
[04/02/2012 23:30:30] data/movements/scripts/leavetp.lua:10: in function <data/movements/scripts/leavetp.lua:7>
[04/02/2012 23:28:29] [Error - LuaScriptInterface::loadFile] data/movements/scripts/entertp.lua:7: 'end' expected (to close 'function' at line 1) near '<eof>'
[04/02/2012 23:28:29] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/entertp.lua)
[04/02/2012 23:28:29] data/movements/scripts/entertp.lua:7: 'end' expected (to close 'function' at line 1) near '<eof>'
[04/02/2012 23:28:29] [Error - LuaScriptInterface::loadFile] data/movements/scripts/leavetp.lua:1: unexpected symbol near '['
[04/02/2012 23:28:29] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/leavetp.lua)
[04/02/2012 23:28:29] data/movements/scripts/leavetp.lua:1: unexpected symbol near '['
[05/02/2012 00:00:07] [Error - MoveEvents Interface]
[05/02/2012 00:00:07] data/movements/scripts/entertp.lua:onStepIn
[05/02/2012 00:00:07] Description:
[05/02/2012 00:00:07] data/movements/scripts/entertp.lua:14: attempt to concatenate global 'c' (a nil value)
[05/02/2012 00:00:07] stack traceback:
[05/02/2012 00:00:07] data/movements/scripts/entertp.lua:14: in function <data/movements/scripts/entertp.lua:7>
[05/02/2012 00:03:23] [Error - LuaScriptInterface::loadFile] data/movements/scripts/leavetp.lua:1: unexpected symbol near '['
[05/02/2012 00:03:23] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/leavetp.lua)
[05/02/2012 00:03:23] data/movements/scripts/leavetp.lua:1: unexpected symbol near '['