• 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!

Teleport Event Request

Blackish

New Member
Joined
Jun 3, 2009
Messages
230
Reaction score
0
Location
Earth
i need a script that creates a teleport every 1h that takes you to (xxxx,xxx,x)and the teleport stays for 5min and every minute a broadcast msg will come saying there is 5min left for the teleport etc~ and after the tp is gone another broadcast says the event is closed.
 
Lua:
local config = {
	tpTo = {x = 100, y = 100, z = 7}, -- teleport tp to
	createTp = {x = 100, y = 100, z = 7}, -- create teleport position
	timeToRemoveTp = 1, -- in minutes
	createTpMessage = "Teleport to the war zone has been created in temple."
	tpCloseMessage = "Teleport to the war zone has been removed!"
}
function removeTeleport()
	doRemoveItem(getTileItemById(config.createTp, 1387).uid)
	doBroadcastMessage(config.tpCloseMessage)
	return true
end

function onThink(interval, lastExecution, thinkInterval)
	doBroadcastMessage(config.createTpMessage)
	doCreateTeleport(1387, config.tpTo, config.createTp)
	addEvent(removeTeleport, config.timeToRemoveTp*60*1000)
	return true
end
Not tested:p
 
im kinda noob at this but where should i put this?

Lua:
local config = {
	tpTo = {x = 100, y = 100, z = 7}, -- teleport tp to
	createTp = {x = 100, y = 100, z = 7}, -- create teleport position
	timeToRemoveTp = 1, -- in minutes
	createTpMessage = "Teleport to the war zone has been created in temple."
	tpCloseMessage = "Teleport to the war zone has been removed!"
}
function removeTeleport()
	doRemoveItem(getTileItemById(config.createTp, 1387).uid)
	doBroadcastMessage(config.tpCloseMessage)
	return true
end

function onThink(interval, lastExecution, thinkInterval)
	doBroadcastMessage(config.createTpMessage)
	doCreateTeleport(1387, config.tpTo, config.createTp)
	addEvent(removeTeleport, config.timeToRemoveTp*60*1000)
	return true
end
Not tested:p
 
im kinda using an old server version so i dont have globalevents :p anyway i tried it on global.lua but it didnt work btw can someone help me to make my server a newer version?
 
Back
Top Bottom