Ir para conteúdo

Featured Replies

Postado

ajuad com esta action

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

 
local config = {
    pos = {x = 33569, y = 32423, z = 12}, -- posição que o player vai cair
}
   if(itemEx.itemid == 22638) and getPlayerStorageValue(cid, 17201) < 90 then
                  doPlayerSendTextMessage(cid, 19, "You need kill  boss for reward items and create your umbral.") -- mensagem
                  doTeleportThing(cid, config.pos) 
                  setPlayerStorageValue(cid, 17201, 2) -- storage
                  doRemoveItem(cid, item.itemid)
 addEvent(doSummonCreature, 45*1, "Terofar", {x = 33568, y = 32422, z = 12})
         end
    return true
end

 
quero q ele remova x item ao usar no item 22638

 

 


alguem ?

Resolvido por psychonaut

Ir para solução
  • Respostas 12
  • Visualizações 1.7k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Muda doRemoveItem(cid, itemX, quantidadeX)   Pra doPlayerRemoveItem(cid, itemX, quantidadeX)   E apaga essa linha: doRemoveItem(cid, item.itemid)

  • No ultimo script ali que tu citou antes do meu   Muda   addEvent(doSummonCreature, 45*1, "Prince Drazzak", {x = 33523, y = 32334, z = 12})   Pra   doSummonCreature("Prince Drazzak", {x = 33523

  • Ah, tem que por depois do end, muda doSummonCreature("Prince Drazzak", {x = 33523, y = 32334, z = 12}) end Pra: end doSummonCreature("Prince Drazzak", {x = 33523, y = 32334, z = 12})

Postado
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local itemX, quantidadeX = 2160, 10
local config = {
    pos = {x = 33569, y = 32423, z = 12}, -- posição que o player vai cair
}
   if(itemEx.itemid == 22638) and getPlayerStorageValue(cid, 17201) < 90 then
                  doPlayerSendTextMessage(cid, 19, "You need kill  boss for reward items and create your umbral.") -- mensagem
                  doTeleportThing(cid, config.pos) 
                  setPlayerStorageValue(cid, 17201, 2) -- storage
                  doRemoveItem(cid, item.itemid)
		  doRemoveItem(cid, itemX, quantidadeX)
         addEvent(doSummonCreature, 45*1, "Terofar", {x = 33568, y = 32422, z = 12})
    end
  return true
end

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Postado
  • Autor
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local itemX, quantidadeX = 2160, 10
local config = {
    pos = {x = 33569, y = 32423, z = 12}, -- posição que o player vai cair
}
   if(itemEx.itemid == 22638) and getPlayerStorageValue(cid, 17201) < 90 then
                  doPlayerSendTextMessage(cid, 19, "You need kill  boss for reward items and create your umbral.") -- mensagem
                  doTeleportThing(cid, config.pos) 
                  setPlayerStorageValue(cid, 17201, 2) -- storage
                  doRemoveItem(cid, item.itemid)
		  doRemoveItem(cid, itemX, quantidadeX)
         addEvent(doSummonCreature, 45*1, "Terofar", {x = 33568, y = 32422, z = 12})
    end
  return true
end

not working bro D:

alguem ?

Postado

Muda

doRemoveItem(cid, itemX, quantidadeX)

 

Pra

doPlayerRemoveItem(cid, itemX, quantidadeX)

 

E apaga essa linha:

doRemoveItem(cid, item.itemid)

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

Life is so meaningless, there is nothing worth a smile
So goodbye, I'll miss you

 

 

sugestões?

 

 

Postado
  • Autor

Muda

doRemoveItem(cid, itemX, quantidadeX)

 

Pra

doPlayerRemoveItem(cid, itemX, quantidadeX)

 

E apaga essa linha:

doRemoveItem(cid, item.itemid)

funcionou mano mas olha só 

 

local paradinha_id = 22641

local itemX, quantidadeX = 22607, 1
local tb_players = {
    [1] = {pos = {x=33607,y=32362,z=11, stackpos=253},topos = {x=33534,y=32333,z=12}},
    [2] = {pos = {x=33608,y=32362,z=11, stackpos=253},topos = {x=33534,y=32333,z=12}},
    [3] = {pos = {x=33609,y=32362,z=11, stackpos=253},topos = {x=33534,y=32333,z=12}},
    [4] = {pos = {x=33610,y=32362,z=11, stackpos=253},topos = {x=33534,y=32333,z=12}},
    [5] = {pos = {x=33611,y=32362,z=11, stackpos=253},topos = {x=33534,y=32333,z=12}},
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local plataforma = 0
    if itemEx.itemid == paradinha_id then
        for k,valor in pairs(tb_players) do
            all = getThingfromPos(valor.pos)
            if all.itemid > 0 and isPlayer(all.uid) then
                plataforma = plataforma+ all.itemid
            end
        end
        if plataforma == #tb_players then
            for k,valor in pairs(tb_players) do
                all = getThingfromPos(valor.pos)
                doTeleportThing(all.uid,valor.topos)
doPlayerRemoveItem(cid, itemX, quantidadeX)
doPlayerSendTextMessage(cid, 19, "You need kill  boss for reward items and create you umbral.")
addEvent(doSummonCreature, 45*1, "Prince Drazzak", {x = 33523, y = 32334, z = 12})
            end
        else
            doPlayerSendCancel(cid,"You need "..#tb_players.." players.")
        end
    end
    return true
end

 
apos usar a key ele summona 5 prince drazzak 

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