so i had this wish about my script was going to work but it didnt,
now i cant figerout the problem so basicly i want you to :
Use an item an when you use it, it creats an teleport that only vip players can accsess.
well heres my script and the error msg
rep for helping ofc =)
now i cant figerout the problem so basicly i want you to :
Use an item an when you use it, it creats an teleport that only vip players can accsess.
well heres my script and the error msg
[17:33:06.620] [Error - Action Interface]
[17:33:06.620] data/actions/scripts/Vip/Vip Teleport.lua
[17:33:06.620] Description:
[17:33:06.620] (luaGetThingPosition) Thing not found
local pid = cid
local config =
{
newPos = {x=1043, y=1043, z=7}, -- New player position
teleportPos = getCreaturePosition(pid), -- Teleport position
timeToRemove = 10 -- Seconds
}
function onUse(cid, item, frompos, item2, topos)
local teleport = getTileItemById(config.teleportPos, 1387)
local playerPos = getCreaturePosition(cid)
if item.itemid == 2361 then
doCreateTeleport(1387, config.newPos, config.teleportPos)
doSendMagicEffect(config.teleportPos, CONST_ME_TELEPORT)
doSendMagicEffect(playerPos, CONST_ME_GIFT_WRAPS)
doCreatureSay(cid, "The plant used its magical power to guide you to mainland!", TALKTYPE_ORANGE_1)
addEvent(doRemoveTeleport, config.timeToRemove * 1000)
elseif item.itemid == 2361 then
doPlayerSendCancel(cid, "The plant is temporarly to weak to guide you home.")
return TRUE
end
end
function doRemoveTeleport()
local teleport = getTileItemById(config.teleportPos, 1387)
if teleport.uid > 0 then
doRemoveItem(teleport.uid)
doSendMagicEffect(config.teleportPos, CONST_ME_POFF)
end
end
rep for helping ofc =)