ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
Hi, I wonder if someone can help me with this. Got this error while using this script (TFS 1.4 nekiro), is supposed to teleport me to an empty training slot. Took the script from a datapack, that's why it is in polish. If someone can help me and adapt it to 1.4 will be appreciated a lot, thanks in advance!
Code:
--- Edit by Collo~ gg: 7284838 (c)----
local pozycje = {
{x=168,y=472,z=8,stackpos=STACKPOS_TOP_CREATURE},
{x=179,y=472,z=8,stackpos=STACKPOS_TOP_CREATURE}
}
local nowa_pozycja = {x=250,y=415,z=6}
local storage = 454574
local exh = 40 -- sec
function onStepIn(cid, item, position, fromPosition)
if exhaustion.check(cid, storage) ~= false then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You must to wait ' .. exhaustion.get(cid, storage) .. ' seconds to enter again.'), doTeleportThing(cid, fromPosition)
end
for i = 1, #pozycje do
local wolne_miejsce = getThingFromPos(pozycje[i])
if not(isCreature(wolne_miejsce.uid)) then
doTeleportThing(cid, pozycje[i])
doSendMagicEffect(pozycje[i], CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Training Room #"..i.."]. If you remain on this tile longer then 4 hours the system will automatically log you out.")
exhaustion.set(cid, storage, exh)
return true
else
if i == #pozycje then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The training monks are at their maximum capacity.")
doTeleportThing(cid, nowa_pozycja)
doSendMagicEffect(nowa_pozycja, CONST_ME_TELEPORT)
exhaustion.set(cid, storage, exh)
return true
end
end
end
exhaustion.set(cid, storage, exh)
return true
end