Ir para conteúdo

Featured Replies

Postado

Nesse script:

function onUse(cid, item, frompos, item2, topos)
if hasVip(cid) == TRUE then
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,"Fique de frente com a porta.")
return true
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Precisar ser VIP Account para passar por aqui.')
end
return true
end

ele atravessa a porta, queria que a porta abrisse, tem como?

 

encontrei um script de porta que abre, usando outro sistema:

function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey
    if not player:isVip() then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need vip to access this area.')
        return false
    end

    local doorId = item.itemid
    if not item.itemid == doorId then
        return true
    end

    Item(item.uid):transform(item.itemid + 1)
    player:teleportTo(toPosition, true)
    return true
end

TAMBÉM PRECISO DE AJUDA PRA QUANDO ACABAR A VIP O PLAYER IR PARA O TEMPLO, NÃO ESTA FUNCIONANDO:

function onLogin(cid)
local temple = { x =300, y = 300, z = 6}
if hasVip(cid) == true then
if getPlayerStorageValue(cid,55555) ~= 1 then
setPlayerStorageValue(cid,55555,1)
end
else
if getPlayerStorageValue(cid,55555) == 1 then
doTeleportThing(cid, temple)
doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")
db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")
setPlayerPromotionLevel(cid, 1)
setPlayerStorageValue(cid, 55555, 0)
end
end
return true
end

OBS: o sistema que uso é o vip system baseado no do mock TFS 1.0

 

obrigado

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

Postado

Não tem mt logica pra mim... Pq o script só iria teleportar o player se ele passasse pela checagem do vip, ou seja, um player não vip não irá ser afetado por esse script.

Tenta assim o do vip:

function onLogin(cid)
local temple = { x =300, y = 300, z = 6}
if hasVip(cid) == false then
doTeleportThing(cid, temple)
doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")
db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")
setPlayerPromotionLevel(cid, 1)
setPlayerStorageValue(cid, 55555, 0)
end
return true
end

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

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