[PEDIDO] Teleport com limite de level.

180319mu
em Scripts

180319mu

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 02/12/09Posts: 31Char no Tibia: Noope

Eu tenho um script de limite de level pra usar o teleport, basicamente ele não deixaria players de level 140+ usarem esse tp, mas não ta funcionando..

 

PS: Não ta dando erro nenhum tb, só nao funciona.

 

 

local posi = {x=1096, y=1062, z=7} -- Posicao pra onde vai o player
function onStepIn(cid, item, position, lastPosition, fromPosition)
if getPlayerLevel(cid) < 141 then
doTeleportThing(cid, posi)
doSendMagicEffect(getThingPos(cid), 10)
else
doPlayerSendTextMessage(cid, 27, "Sorry, you need a level 140 minus.")
doTeleportThing(cid, lastPosition)
end
end

Se alguem puder arrumar ou fazer outro pra mim eu agradeço.

RastaLegion

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 11/11/13Posts: 252Char no Tibia: Não tenho

Tenta assim

 

 

function onStepIn(cid, pos)
local pos = {x=xxxx, y=xxxx, z=x} --position do tp
if isPlayer(cid) then
if getPlayerLevel(cid) >= 140 then
doTeleportThing(cid, pos)
else
doPlayerSendTextMessage(cid,22,"Você não tem o level necessario")
end
return true
end
end

Meu Conteúdo

Mapping

Script

Alvez123

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 23/03/14Posts: 1

Aki esta amigo, so vai teleportar se o player tiver o level exato ou +

 

function onStepIn(cid, item, position, fromPosition)
if getPlayerLevel(cid) >= 4500 then
local teleport = {x=56, y=31, z=7}
doTeleportThing(cid, teleport)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "voce precisa do level 4500")
 
return true
end
end

IvanAppel

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 28/11/11Posts: 801Char no Tibia: Sei la

local posi = {x=1096, y=1062, z=7} -- Posicao pra onde vai o player

function onStepIn(cid, item, position, lastPosition, fromPosition)
if getPlayerLevel(cid) >= 140 then
doTeleportThing(cid, posi)
doSendMagicEffect(getThingPos(cid), 10)
elseif
doPlayerSendTextMessage(cid, 27, "Sorry, you need a level 140.")
doTeleportThing(cid, lastPosition)
end
end


Vê se funciona

zipter98

avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 20/09/12Posts: 2553Gênero: Masculino

 

local pos = {x = 1096, y = 1062, z = 7} 
local lv = 140
function onStepIn(cid, item, position, lastPosition, fromPosition)
    if not isPlayer(cid) then return true end
    if getPlayerLevel(cid) >= lv then
        return doTeleportThing(cid, fromPosition) and doPlayerSendCancel(cid, "You can't pass here.")
    else
        doTeleportThing(cid, pos)
        doPlayerSendTextMessage(cid, 27, "Welcome.")
    end
    return true
end

Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.

180319mu

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 02/12/09Posts: 31Char no Tibia: Noope

Resolvido. ty zipster98