DA

Tile por level

Por damiaotorres, 12 de mai. de 2020 em Scripts

2
1.1k
12 de maio de 2020 às 00:07

Boa noite, Gostaria de um script que o tile ele fosse por level, porém tem level min e level max que pode passar nele tile.

13 de maio de 2020 às 15:40
Melhor resposta

Já conseguir, peguei o script em outro mapa, caso alguém queira.

 

 

EM DATA>MOVEMENTS>MOVEMENTS.XML ADICIONE ESSA LINHA

Spoiler

    <movevent type="StepIn" actionid="6002" event="script" value="tilelevel.lua"/>

 

 

DATA>MOVEMENTS>SCRIPT> CRIE UM ARQUIVO CHAMADO tilelevel.lua

Spoiler
local posi = {x=0, y=0, z=0} -- Posicao pra onde vai o player
local volta = {x=0, y=02, z=0} -- Posicao pra onde o player vai se teleportado caso nao tenha lvl ou seja maior

function onStepIn(cid, item, position, lastPosition, fromPosition)

         if isPlayer(cid) and getPlayerLevel(cid) >=  COLOQUE O LEVEL MINIMO AQUI and getPlayerLevel(cid) <= COLOQUE O LEVEL MAXIMO AQUI then

            doTeleportThing(cid, posi)

         else

             doPlayerSendTextMessage(cid, 19, "MENSAGEM QUE IRA APARECER SE O PLAYER NÃO TIVER O LEVEL NECESSARIO.")

             doTeleportThing(cid, volta)

         end

end