Postado Setembro 21, 2015 9 anos 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
Postado Outubro 14, 2015 9 anos 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 Outubro 14, 2015 9 anos por Larissa Azhaurn (veja o histórico de edições)
Postado Outubro 14, 2015 9 anos 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
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.