Tente.
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then return true end
if not isPremium(cid) then
return doTeleportThing(cid, fromPosition) and doPlayerSendCancel(cid, "Only players VIP enter here.")
else
doSendMagicEffect(position, 13)
else
getPlayerStorageValue(cid) == getStorageValue(storage) then
doSendTextMessage(cid, "Welcome to the VIP Area!", 27)
doSendMagicEffect(position, 14)
end
return true
end









info
Grupo: Barão
Registrado: 13/07/15
Posts: 242
Reputação: +56
Char no Tibia: Sekk
Bom gente, sei que existem vários scripts disso, mas como estou tentando entender a linguagem LUA, estou tentando criar o script, com o que eu já observei nos fórums, e que foi gravado na minha memória ^^.
Bom, o script é pra checar se o player tem X storage, se ele tiver, ele pode passar pelo tile com a actionID Y, se não tiver a storage, ele é teleportado para a "fromposition"..
Ai vai o script:
function onStepIn(cid, item, position, fromposition) local storage = 18597 if getPlayerStorageValue(cid) <= 0 then doSendPlayerCancel(cid, "You/'re not a VIP player.") doTeleportThing(cid, fromposition) doSendMagicEffect(position, 13) else getPlayerStorageValue(cid) == getStorageValue(storage) then doSendTextMessage(cid, "Welcome to the VIP Area!", 27) doSendMagicEffect(position, 14) end return true endEDIT:
Quando inicio o server, acontece isso:
Editado Agosto 29 por jvcasarin