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

Lever, Teleport, Item

unsword

New Member
Joined
May 16, 2009
Messages
18
Reaction score
0
umm, Hi.

So, basically, i need a pretty simple script.

After i put an item on a place, and push lever, the item disappears and im getting teleported into different location.

I'm pretty sure i've seen this script somewhere already :S
But i can't find it.

Oh ye, and it should be working on tibia 8.54, TFS 0.3.6.


Thanks in advance.
 
i found something like this. but i dont really know how to set it up and make working.

x.x


Lua:
function onStepIn(cid, item, position, fromPosition)
 
local tileUniqueID = 50008
local tileUniqueIDBack = 50009
local itemToTeleport = 2159
 
local tleportTo = {x = 131, y = 366, z = 13}
local teleportBack = {x = 119, y = 371, z = 13}
 
local itemPosition = {x = 127, y = 370, z = 13, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}
local getItem = getThingFromPos(itemPosition)
 
	if isPlayer(cid) == TRUE then
		if item.uid == tileUniqueID then
			if getItem.itemid == itemToTeleport then
				doRemoveItem(getItem.uid, 1)
				doTeleportThing(cid, tleportTo)
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
			end
		elseif item.uid == tileUniqueIDBack then
			doTeleportThing(cid, teleportBack)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
		end
	end
	return TRUE
end

Code:
<movevent event="StepIn" uniqueid="50008" script="scriptname.lua"/>
<movevent event="StepIn" uniqueid="50009" script="scriptname.lua"/>

anyone could help me out?
 
Back
Top