FA
action

ERRO Tile Level

Por fawkz12, 18 de mar. de 2016 em Scripts

resolvido
script
7
1.7k
fawkz12F
18 de março de 2016 às 23:18

Bom eu coloquei tile level no meu servidor, mas ele não funfa... todos os leveis podem passar nele.....

 

Script do movements.xml

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

Script do movements\scripts

 

function onStepIn(cid, item, position, fromPosition)


level = 600
if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doPlayerSendCancel(cid,"Only level " .. level .. " or more can pass here.")
end
return TRUE
end

Como arrumar?

Editado Março 18 por fawkz12

DanihcvD
18 de março de 2016 às 23:20

Aparece algum erro na distro?

Se sim, pf envie o erro.

fawkz12F
18 de março de 2016 às 23:22

Não aparece nem um erro, simplesmente não funciona :/

DanihcvD
18 de março de 2016 às 23:41
Melhor resposta

Tenta ae:

local level = 600

function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == false then
return true
end
if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid, 27, "Only level "..level.." or more can pass here.")
return true
end
return true
end

E só a titulo de esperança, caso o anterior ñ funcione, tente esse:

local level = 600

function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == false then
return true
end
if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doPlayerSendTextMessage(cid, 27, "Only level "..level.." or more can pass here.")
return true
end
return true
end

Editado Março 18 por Danihcv

Yan LiimaY
18 de março de 2016 às 23:41

No lugar do level = 600 não seria local level = 600?

fawkz12F
18 de março de 2016 às 23:48

Vou testar!


DEU certo <3 REP+

DanihcvD
18 de março de 2016 às 23:49

Tópico movido para dúvidas / pedidos resolvidos.