Mera Mero
Guess Who?
- Joined
- Dec 27, 2014
- Messages
- 417
- Reaction score
- 86
Hello otlanders I Got this script but i got error with it and this errors appear when my teleport going to disappear
error
TFS 0.3.6
bump
Code:
local config = {
{pos = {x = 979, y = 975, z = 7}, itemid = 2001},
{pos = {x = 971, y = 975, z = 7}, itemid = 2002},
{pos = {x = 970, y = 981, z = 7}, itemid = 2003},
{pos = {x = 979, y = 981, z = 7}, itemid = 2004}
}
function deleteTeleport(tpUid)
doRemoveItem(tpUid)
end
function onStepIn(cid, item, position, fromPosition)
local amount = 0
for x = 1, #config do
if getTileItemById(config[x].pos, config[x].itemid).uid > 0 then
amount = amount + 1
else
doPlayerSendCancel(cid, "You need to add items at first to make teleport to hidden place")
end
end
if amount == #config then -- if all items are found then
for x = 1, #config do
doRemoveItem(getTileItemById(config[x].pos, config[x].itemid).uid, 1)
end
teleTimer = 5000 -- 5 seconds
teleUid = doCreateTeleport(1387, {x = 975, y = 978, z = 6}, {x = 975, y = 978, z = 7}) -- identifier for created portal
addEvent(deleteTeleport, teleTimer, teleUid) -- delete portal in 5 seconds, using UID
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You found a hidden area.")
else -- if not all items are found
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "put it in correct place")
end
return true
end
Code:
[27/02/2015 23:22:50] [Error - MoveEvents Interface]
[27/02/2015 23:22:51] In a timer event called from:
[27/02/2015 23:22:51] data/movements/scripts/hiddenplace.lua:onStepIn
[27/02/2015 23:22:51] Description:
[27/02/2015 23:22:51] (luaDoRemoveItem) Item not found
bump
Last edited by a moderator: