local config = {
createPos = {x=32368,y=32206,z=7}, -- Position where the teleport will be created
teleportTo = {x=32375,y=32207,z=7}, -- Position where the player will be teleport to
teleporterClose = 30 -- in second
}
local monsters = {
name1 = "Demon", -- creature 1 name
pos1 = {x=32367,y=32206,z=7}, -- creature 1 spawn position
name2 = "Demon", -- creature 2 name
pos2 = {x=32369,y=32206,z=7} -- creature 2 spawn position
}
local function removeTeleporter()
local teleporter = getTileItemById(config.createPos,1387).uid
if teleporter ~= 0 then
doRemoveItem(teleporter)
doItemSetAttribute(item, 'aid', 5000)
end
end
function onStepIn(cid, item, pos)
doCreateTeleport(1387, config.teleportTo, config.createPos)
doCreateMonster(monsters.name1, monsters.pos1)
doCreateMonster(monsters.name2, monsters.pos2)
doItemSetAttribute(item, 'aid', 5001)
addEvent(removeTeleporter, config.teleporterClose*1000)
return true
end