• 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 script.

enriel

Big L
Joined
Dec 14, 2007
Messages
1,254
Reaction score
2
Location
Montenegro
If there is X item used on tile 351, tp creates and tp players to X pos, after 3 mins.. tp removes.

Can someone create it?
 
Lua:
local config = {
	playerpos = {x = XXX, y = YYY, z = Z}, -- where player has to use the item
	topos = {x = xxx, y = yyy, z = z}, -- where portal will tp
	createpos = {x = xxx, y = yyy, z = z}, -- where portal will appear
	time = 3 * 60 * 1000 -- time until tp is removed, in miliseconds
}
	

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreaturePosition(cid) == config.playerpos then
		doCreateTeleport(1387, config.topos, config.createpos)
		addEvent(doRemoveItem, config.time, getThingAtPos(config.createpos)
	end
	return 1
end

From what I understand, the script is supposed to work if used at XYZ pos, and then it'd make a portal at XYZ that leads to XYZ, and be removed after 3 minutes, right?
 
well yeah, I thought about using for example: usin Fire Bug on posion with id, 5000 for example, and tp creates and teleport player then it removes after 3 min
 
Back
Top