local pos = {x=EDIT, y=EDIT, z=EDIT} ---- Pos for 150-
local pos2 = {x=EDIT, y=EDIT, z=EDIT} ---- Pos for 151+
function onStepIn(cid, item, pos)
if getPlayerLevel(cid) < 150 then
doTeleportThing(cid,pos)
elseif getPlayerLevel(cid) > 150 then
doTeleportThing(cid,pos2)
end
return true
end
<movevent type="StepIn" uniqueid="5678" event="script" value="tp.lua"/>
local pos = {x=EDIT, y=EDIT, z=EDIT} ---- Pos for 150-
local pos2 = {x=EDIT, y=EDIT, z=EDIT} ---- Pos for 151+
function onStepIn(cid, item, pos)
if getPlayerLevel(cid) == 150 then
doTeleportThing(cid,pos)
elseif getPlayerLevel(cid) == 151 then
doTeleportThing(cid,pos2)
end
return true
end
just work if you're lvl 150+
if you are 150- you cant enter :S
hello =)!
i need a script,
a teleport if you are below 150 you go in a certain possition, and ir you are 151+ you go in other possition!
just work if you're lvl 150+
if you are 150- you cant enter :s
local pos = {x=EDIT, y=EDIT, z=EDIT} ---- Pos for 150-
local pos2 = {x=EDIT, y=EDIT, z=EDIT} ---- Pos for 151+
function onStepIn(cid, item, pos)
if getPlayerLevel(cid) <= 150 then
doTeleportThing(cid,pos)
elseif getPlayerLevel(cid) >= 151 then
doTeleportThing(cid,pos2)
end
return true
end
local t = {
[{1,150}] = {x=100, y=100, z=7},
[{151,math.huge}] = {x=100, y=100, z=7}
}
function onStepIn(cid, item, pos, fromPos)
if isPlayer(cid) then
local lvl = getPlayerLevel(cid)
for k, v in pairs(t) do
if lvl >= k[1] and lvl <= k[2] then
return doTeleportThing(cid, v) and doSendMagicEffect(v, CONST_ME_TELEPORT)
end
end
end
end
LUA:local t = { [{1,150}] = {x=100, y=100, z=7}, [{151,math.huge}] = {x=100, y=100, z=7} } function onStepIn(cid, item, pos, fromPos) if isPlayer(cid) then local lvl = getPlayerLevel(cid) for k, v in pairs(t) do if lvl >= k[1] and lvl <= k[2] then return doTeleportThing(cid, v) and doSendMagicEffect(v, CONST_ME_TELEPORT) end end end end