Ir para conteúdo

Featured Replies

Postado

Eaew galera, Bom Queria perdi a vocês ajuda nesse scripter bom, só quero q tenha apenas 2 item, essa scripter tem 3.

 

 

function onUse(cid, item, fromPosition, item2, toPosition)
    local teleport = {x=2366, y=1389, z=7} -- Coordenadas para onde o player irá ser teleportado.
    local item1 = 12149 -- ID do item1 que o player precisa para ser teleportado.
    local item2 = 12150 -- ID do item2 que o player precisa para ser teleportado.
    local item3 = 12151 -- ID do item3 que o player precisa para ser teleportado.
    local storage = 28192
    local level = 250
    
    if getPlayerLevel(cid) < level then return doPlayerSendCancel(cid, "You need level ".. level .." to open this door.") end    
    if getPlayerStorageValue(cid, storage) < 1 then
        if getPlayerItemCount(cid,item1) >= 1 and getPlayerItemCount(cid,item2) >= 1 and getPlayerItemCount(cid,item3) >= 1 then
            doPlayerRemoveItem(cid, item1, 1)
            doPlayerRemoveItem(cid, item2, 1)
            doPlayerRemoveItem(cid, item3, 1)
            setPlayerStorageValue(cid, storage, 1)
            doTeleportThing(cid, teleport)
        else
            doPlayerSendTextMessage(cid, 23, "Sorry, you need a "..getItemNameById(item3)..", "..getItemNameById(item2).." and "..getItemNameById(item3).." to enter.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        end
    else
        doTeleportThing(cid, teleport)
    end
return true 
end

 

Deixarei +rep ^^:grin:

Resolvido por eliaszinho

Ir para solução
  • Respostas 10
  • Visualizações 729
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • mas deu so Warning ? os iten la da porta funciono ? function onUse(cid, item, fromPosition, item2, toPosition)     local teleport = {x=2366, y=1389, z=7} -- Coordenadas para onde o player irá

Postado

function onUse(cid, item, fromPosition, item2, toPosition)
    local teleport = {x=2366, y=1389, z=7} -- Coordenadas para onde o player irá ser teleportado.
    local item1 = 12149 -- ID do item1 que o player precisa para ser teleportado.
    local item2 = 12150 -- ID do item2 que o player precisa para ser teleportado.
    local storage = 28192
    local level = 250
    
    if getPlayerLevel(cid) < level then return doPlayerSendCancel(cid, "You need level ".. level .." to open this door.") end    
    if getPlayerStorageValue(cid, storage) < 1 then
        if getPlayerItemCount(cid,item1) >= 1 and getPlayerItemCount(cid,item2) >= 1 and getPlayerItemCount(cid,item3) >= 1 then
            doPlayerRemoveItem(cid, item1, 1)
            doPlayerRemoveItem(cid, item2, 1)
            setPlayerStorageValue(cid, storage, 1)
            doTeleportThing(cid, teleport)
        else
            doPlayerSendTextMessage(cid, 23, "Sorry, you need a "..getItemNameById(item2).." and "..getItemNameById(item3).." to enter.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        end
    else
        doTeleportThing(cid, teleport)
    end
return true 
end

 

 

 

testa e ver se dar certo vo tentar te ajuda sei um poquinho disso

Postado
  • Autor

Obrigado vou testa xD

Não Funcionou, Mais tipo não era pra remove do scripter >     local item3 = 12151 -- ID do item3 que o player precisa para ser teleportado. 

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.7k

Informação Importante

Confirmação de Termo