Ir para conteúdo

Featured Replies

  • Respostas 49
  • Visualizações 3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @Gabrielk  function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemEarth = 13745 ItemDeath = 13746 ItemEne

  • @Gabrielk ai Mano function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746

  • function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 It

Postado

@Gabrielk testa com essas 5 se funciona... se funcionar me fala!

 

function onUse(cid, item, fromPos, itemEx, toPos)

ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden
ItemIce = 13744
ItemPoison = 13745
ItemDeath = 13746
ItemEnergy = 13747
ItemPhysical = 13748
ItemHoly = 13749
  
local types = {
      [ItemFire] = {effect = 1, name = "fire"},  -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito}
      [ItemIce] = {effect = 2, name = "ice"},
      [ItemPoison] = {effect = 3, name = "poison"},
      [ItemDeath] = {effect = 4, name = "death"},
      [ItemEnergy] = {effect = 5, name = "energy"},
      [ItemPhysical] = {effect = 6, name = "energy"},
      [ItemHoly] = {effect = 7, name = "holy"}
}

local wandid1 = 7735 -- ID da Wand 1 
local wandid2 = 7736 -- ID da Wand 2 
local wandid3 = 7737 -- ID da Wand 3
local wandid4 = 7738 -- ID da Wand 4
local wandid5 = 7739 -- ID da Wand 5


    local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid
    local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid 
	
	local wands1 = wand_left ~= wandid1 and wand_right ~= wandid1
	local wands2 = wand_left ~= wandid2 and wand_right ~= wandid2
    local wands3 = wand_left ~= wandid3 and wand_right ~= wandid3
	local wands4 = wand_left ~= wandid4 and wand_right ~= wandid4
	local wands5 = wand_left ~= wandid5 and wand_right ~= wandid5

    if wands1 or wands2 or wands3 or wands4 or wands5 then
        doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.")
        return true
    end
    
    status = getPlayerStorageValue(cid, 4561)
    if status == types[item.itemid].effect then
        doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".")
        return true
    end

     setPlayerStorageValue(cid, 4561, types[item.itemid].effect)
     doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".")
     doRemoveItem(item.uid, 1)
   return true
end

 

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