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

Teleport statue

kamilcioo

Veteran OT User
Joined
Jul 25, 2008
Messages
979
Solutions
1
Reaction score
291
I need script.
1. When you use statue it teleport you to place xyz
2. Small animation when it teleport you
4. Easy make to do 2+ teleports in one lua.
5. Can do minimum level to teleport.
 
animation? > magic effect
LUA:
local level, table = 20,
{ --uniqueid of statue, position
	[1234] = {x=95,y=117,z=7},
	[1235] = {x=200,y=200,z=6},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) < level then
		return doPlayerSendCancel(cid, 'You must be from level '..level..' onwards in order to teleport.')
	end	
	return doTeleportThing(cid, table[item.uid]), doSendMagicEffect(getThingPos(cid), math.random(28,30))
end
XML:
<action uniqueid="1234" event="script" value="tp.lua"/>
<action uniqueid="1235" event="script" value="tp.lua"/>
 
Last edited:
its an action?
can you make it function onStepIn
=D

LUA:
local level, table = 20,
{ --uniqueid of statue, position
	[1234] = {x = 95, y = 117, z = 7},
	[1235] = {x = 200, y = 200, z = 6},
}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerLevel(cid) < level then
		doPlayerSendCancel(cid, 'You must be from level '..level..' onwards in order to teleport.')
		doTeleportThing(cid, lastPosition)
		return true
	end

	return doTeleportThing(cid, table[item.uid]), doSendMagicEffect(getThingPos(cid), math.random(28,30))
end
 
I don't like correct/add something after someone
but if you use more than one/two uniequeid/actionid in one script use
Code:
<action uniqueid="1234;1235;1314;1414;1343" event="script" value="tp.lua"/>
shorter :)
 
Back
Top