• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Yalahar remove tp.

enriel

Big L
Joined
Dec 14, 2007
Messages
1,254
Reaction score
2
Location
Montenegro
Why isn't this script removing the teleport after 2 mins? Is it possible to make??

local config = {
message = "Azerus ran into teleporter! It will disappear in 2 minutes. Enter It!",
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Azerus"] = { { x = 2881, y = 2179, z = 9 }, { x = 2881, y = 2175, z = 10 }},



}
}


function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then

doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
end
end
return TRUE
end
 
local cfg = {
teleportTo = {x=2881, y=2179, z=9},
teleportCreatePos = {x=2881, y=2175, z=10}
}

teleportTo
is that pos where player gets TPED after TP is created?
what is teleport createpos???
 
Code:
local event = 0
local teleportTo = {x=1141, y=1160, z=9}
local function remTp(pos)
	local v = getTileItemById(pos, 1387).uid
	return v > 0 and doRemoveItem(v)
end
function onDeath(cid, corpse, killer)
	if getCreatureName(cid) == "Azerus" then
		stopEvent(event)
		doCreateTeleport(1387, teleportTo, getCreaturePosition(cid))
		event = addEvent(remTp, 2 * 60 * 1000, getCreaturePosition(cid))
		doCreatureSay(cid, "Azerus ran into teleporter! It will disappear in 2 minutes. Enter It!", TALKTYPE_ORANGE_1)
	end
	return TRUE
end
 
Back
Top Bottom