Ir para conteúdo

Featured Replies

Postado
  • Solução

Em actions:

local level = 450000

function onUse(cid, fromPos, toPos)
    return getPlayerLevel(cid) >= level and doTeleportThing(cid, toPos) or doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Only players level '..level..' or higher can open this door.') and false
end

Para configurar é assim:

 

em data/actions/actions.xml coloque:

 

<action actionid="9999" event="script" value="portalevel.lua"/>

 

No lugar de 9999 coloque uma actionid, que será o número colocado no RME na porta.

 

Crie um novo arquivo .lua em data/actions/script/portalevel.lua com o seguinte script:

local level = 450000

function onUse(cid, fromPos, toPos)
    return getPlayerLevel(cid) >= level and doTeleportThing(cid, toPos) or doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Only players level '..level..' or higher can open this door.') and false
end

Pronto :)

  • 4 weeks later...
  • Respostas 8
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Se não me engano a partir do level 999 apenas por script isso é possivel.

  • Em actions: local level = 450000 function onUse(cid, fromPos, toPos)     return getPlayerLevel(cid) >= level and doTeleportThing(cid, toPos) or doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, '

  • <action uniqueid="10093" script="vocdoor_druid.lua" /> function onUse(cid, item, frompos, item2, topos) if item.uid == 10093 then if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6

Postado
  Em 14/10/2015 em 13:14, kurebao disse:

como coloca porta com vocação??

<action uniqueid="10093" script="vocdoor_druid.lua" />
function onUse(cid, item, frompos, item2, topos)

if item.uid == 10093 then
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
doPlayerSendTextMessage(cid, 22, "You can pass, you are a Druid.")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Please stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'You can\'t pass, you aren\'t a Druid.')
end
return 1
else
return 0
end
end

Editado por Larissa Azhaurn (veja o histórico de edições)

Postado
  Em 14/10/2015 em 13:14, kurebao disse:

como coloca porta com vocação??


local pos = {x=995, y=1000, z=9} -- posicao aonde o player sera teletransportado
local position = getCreaturePosition(cid)

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.actionID== 1228) then
        if getplayervocation(cid) == 1 or getplayervocation(cid) == 5 then
            doTeleportThing(cid, pos)
            doSendMagicEffect(position, math.random(1, 67)
        else
            doPlayerSendTextMessage(cid, 22, "APENAS VOCATION X PASSA AQUI")
        end
        return TRUE
    end
end

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo