Ir para conteúdo
  • Cadastre-se

(Resolvido)Remover pedra, alavanca+iten


Ir para solução Resolvido por zipter98,

Posts Recomendados

Eu preciso de um script que para ser possivel remover a stone seja necessário iten em x local do mapa

 

http://prntscr.com/73rlzl

 

como podem ver na print, seriam os 5 itens em cima dos 5 negocios ali, puxar a alavanca e retirar a pedra

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Link para o post
Compartilhar em outros sites

sim

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Link para o post
Compartilhar em outros sites
  • Solução

local config = {
    wall = {
        time = 5,                      --Tempo, em minutos, para a parede reaparecer.
        id = xxx,                      --ID da wall.
        pos = {x = x, y = y, z = z},   --Posição da wall.
    },
    items = {
        {{x = x, y = y, z = z}, itemid},        --{{posição que o item deve estar}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
    },
}
function onUse(cid)
    local wall = getTileItemById(config.wall.pos, config.wall.id).uid
    if wall < 1 then
        return doPlayerSendCancel(cid, "The wall is already openned.")
    end
    for _, item in pairs(config.items) do
        if getTileItemById(item[1], item[2]).uid < 1 then
            return doPlayerSendCancel(cid, "One or more items are missing or aren't in the correct position.")
        end
    end
    doRemoveItem(wall)
    addEvent(function()
        doCreateItem(config.wall.id, 1, config.wall.pos)
    end, config.wall.time * 60 * 1000)
    return true
end

não respondo pms solicitando suporte em programação/scripting

Link para o post
Compartilhar em outros sites

Obrigado, mas tenho uma duvida enquanto a instalação, seria feito tudo em actions?  Caso puder me passar as tags. Obrigado e rep+

local config = {
    wall = {
        time = 5,                      --Tempo, em minutos, para a parede reaparecer.
        id = xxx,                      --ID da wall.
        pos = {x = x, y = y, z = z},   --Posição da wall.
    },
    items = {
        {{x = x, y = y, z = z}, itemid},        --{{posição que o item deve estar}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
    },
}
function onUse(cid)
    local wall = getTileItemById(config.wall.pos, config.wall.id).uid
    if wall < 1 then
        return doPlayerSendCancel(cid, "The wall is already openned.")
    end
    for _, item in pairs(config.items) do
        if getTileItemById(item[1], item[2]).uid < 1 then
            return doPlayerSendCancel(cid, "One or more items are missing or aren't in the correct position.")
        end
    end
    doRemoveItem(wall)
    addEvent(function()
        doCreateItem(config.wall.id, 1, config.wall.pos)
    end, config.wall.time * 60 * 1000)
    return true
end
Link para o post
Compartilhar em outros sites
local config = {
    wall = {
        time = 5,                      --Tempo, em minutos, para a parede reaparecer.
        id = xxx,                      --ID da wall.
        pos = {x = x, y = y, z = z},   --Posição da wall.
    },
    items = {
        {{x = x, y = y, z = z}, itemid},        --{{posição que o item deve estar}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
    },
}
function onUse(cid)
    local wall = getTileItemById(config.wall.pos, config.wall.id).uid
    if wall < 1 then
        return doPlayerSendCancel(cid, "The wall is already openned.")
    end
    for _, item in pairs(config.items) do
        if getTileItemById(item[1], item[2]).uid < 1 then
            return doPlayerSendCancel(cid, "One or more items are missing or aren't in the correct position.")
        end
    end
    doRemoveItem(wall)
    addEvent(function()
        doCreateItem(config.wall.id, 1, config.wall.pos)
    end, config.wall.time * 60 * 1000)
    return true
end

Aqui só fala que a entrada está aberta mas não abre nem remove nada....

Link para o post
Compartilhar em outros sites

Ah, suponho que este código não funcione em versões mais novas. Como ainda não comecei a estudar suas funções, recomendo esperar alguma boa alma adaptar meu script.

não respondo pms solicitando suporte em programação/scripting

Link para o post
Compartilhar em outros sites

vou testar o código zipter98, já edito com o feedback

(y)

http://prntscr.com/74jz67

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

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Link para o post
Compartilhar em outros sites

Alguem poderia me ajudar na instalação do script no sv? Obrigado.


Eu configurei certinho ok, obrigado pelo script. Mas os itens não somem, ficam la. Teria como colocar para eles sumirem ao dar use ?

Link para o post
Compartilhar em outros sites
local config = {
    wall = {
        time = 5,                      --Tempo, em minutos, para a parede reaparecer.
        id = xxx,                      --ID da wall.
        pos = {x = x, y = y, z = z},   --Posição da wall.
    },
    items = {
        {{x = x, y = y, z = z}, itemid},        --{{posição que o item deve estar}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
        {{x = x, y = y, z = z}, itemid},
    },
}
function onUse(cid)
    local wall = getTileItemById(config.wall.pos, config.wall.id).uid
    if wall < 1 then
        return doPlayerSendCancel(cid, "The wall is already openned.")
    end
    for _, item in pairs(config.items) do
        if getTileItemById(item[1], item[2]).uid < 1 then
            return doPlayerSendCancel(cid, "One or more items are missing or aren't in the correct position.")
        end
    end
    doRemoveItem(wall)
    addEvent(function()
        doCreateItem(config.wall.id, 1, config.wall.pos)
    end, config.wall.time * 60 * 1000)
    return true
end

esse script pega na versão 8.54 de poketibia base cyan? e quais tags? onde posso colocar ele? ((Obrigado desde já!))

Link para o post
Compartilhar em outros sites

actions .xml: <action uniqueid="3334" script="script.lua"/>

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo