Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
I'd like a rune script that creates a teleport to certain destination for a certain amount of time.
local config = {
itemId = 1387,
toPos = {x=, y=, z=},
secs = 300
}
function remove(position)
if getThingFromPos(pos).itemid == config.itemId then
doRemoveItem(getThingFromPos(pos).uid)
end
return true
end
function onCastSpell(cid, var)
local pos = variantToPosition(var)
if(pos.x ~= 0 and pos.y ~= 0) then
doCreateTeleport(itemId, toPos, pos)
addEvent(remove, config.secs * 1000, config.pos)
end
return true
end