• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action [Basics] Farmine Teleport Levers (Just like Tibia)

J.Dre

Unity Games
Joined
May 18, 2011
Messages
2,643
Solutions
3
Reaction score
639
Location
United States
There's gotta be someone who will need this, right? ;)

These are the levers that are in Farmine. They take you back and forth, if standing on the tile - just like Tibia.

122z3wk.png


data/actions/scripts/script.lua

LUA:
local t = {
	[5501] = {{x=32991, y=31539, z=1}, {x=32991, y=31539, z=4}, effect = true},
	[5502] = {{x=32991, y=31539, z=4}, {x=32991, y=31539, z=1}, effect = true},
	[5503] = {{x=32993, y=31547, z=4}, {x=33061, y=31527, z=10}, effect = false},
	[5504] = {{x=33061, y=31527, z=10}, {x=32993, y=31547, z=4}, effect = false},
	[5505] = {{x=33055, y=31527, z=10}, {x=33055, y=31527, z=10}, effect = false}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local k = t[item.actionid]
	local thing = getTopCreature(k[1]).uid
	if(k and item.itemid == 1945) then
		if(isPlayer(thing)) then
			doTeleportThing(thing, k[2], false)
			if(k.effect) then
				doSendMagicEffect(k[2], CONST_ME_TELEPORT)
			end
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Need a tracked real map? Check out mine!
 
23:46 The tile seems to be protected against unwanted intruders.

Why am I getting this error? I cant even step onto it..

Wow, nevermind.. I fixed it. Was an error on my end.
 
Last edited:
23:46 The tile seems to be protected against unwanted intruders.

Why am I getting this error? I cant even step onto it..

Wow, nevermind.. I fixed it. Was an error on my end.

I'm glad you resolved the issue yourself. We need more people doing so!
 
Back
Top