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

Item and lever = getplayerteleport

Sir MoX

New Member
Joined
Jan 14, 2009
Messages
285
Reaction score
1
Hi, I need for my server a script that when you put a item on a place for example the item 8976 on the coordenates 800 678 7 and use a lever teleports the player to a other place and remove that item...

I give rep++

Code:
I USE TFS 0.2.10
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local id, itemPos, newPos = 8976, {x=800, y=678, z=7}, {x=100, y=100, z=7}
local i = getTileItemById(itemPos, id).uid
	if(i > 0) then
		doRemoveItem(i)
		doTeleportThing(cid, newPos)
		doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
		doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
	end
return true
end
 
Back
Top Bottom