Ir para conteúdo

Featured Replies

Postado
  • Autor

    <item fromid="1794" toid="1802" article="a" name="red carpet" />
 

Spoiler

local object_itemid = {

-- Mewtwo Carpet
[20706] = {transform_to = 20705, premium = false, useWith=true},
[20705] = {transform_to = 20706, premium = false, useWith=false},

-- Eyes Dark Carpet
[20682] = {transform_to = 20683, premium = false, useWith=true},
[20683] = {transform_to = 20682, premium = false, useWith=false},

-- Eyes Red Carpet
[20680] = {transform_to = 20681, premium = false, useWith=true},
[20681] = {transform_to = 20680, premium = false, useWith=false},

}


function onUse(cid, item, frompos, item2, topos)
    local storage = 789566
    local time = 1
    
    local sendEffect = true -- true or false
    local EffectId = 1
    
    local item_from_table = object_itemid[item.itemid]
    
    if exhaustion.check(cid, storage) then
        return false
    end
    
    if item_from_table then
    
        if item_from_table.premium and not isPremium(cid) then
            return false and doPlayerSendCancel(cid, "Você não e vip.")
        end
        doRemoveItem(item.uid,1)
        if item_from_table.useWith then
            doCreateItem(item_from_table.transform_to,1,topos)
        else
            doCreateItem(item_from_table.transform_to,1,frompos)
        end
        if sendEffect then
            doSendMagicEffect(getThingPos(cid), EffectId)
        end
    end
    
    return true and exhaustion.set(cid,storage,time)
end

27 minutos atrás, Nysman disse:

Creio que é necessario as tangs no item.xml, caso sejá itens sem nome e etc.. Testa isso pra ver

Pode me mostrar esse system? ^^ 

 

 

  • 10 months later...
Postado

Aonde coloca isso ? 

 

local object_itemid = {

-- Mewtwo Carpet
[20706] = {transform_to = 20705, premium = false, useWith=true},
[20705] = {transform_to = 20706, premium = false, useWith=false},

-- Eyes Dark Carpet
[20682] = {transform_to = 20683, premium = false, useWith=true},
[20683] = {transform_to = 20682, premium = false, useWith=false},

-- Eyes Red Carpet
[20680] = {transform_to = 20681, premium = false, useWith=true},
[20681] = {transform_to = 20680, premium = false, useWith=false},

}


function onUse(cid, item, frompos, item2, topos)
    local storage = 789566
    local time = 1
    
    local sendEffect = true -- true or false
    local EffectId = 1
    
    local item_from_table = object_itemid[item.itemid]
    
    if exhaustion.check(cid, storage) then
        return false
    end
    
    if item_from_table then
    
        if item_from_table.premium and not isPremium(cid) then
            return false and doPlayerSendCancel(cid, "Você não e vip.")
        end
        doRemoveItem(item.uid,1)
        if item_from_table.useWith then
            doCreateItem(item_from_table.transform_to,1,topos)
        else
            doCreateItem(item_from_table.transform_to,1,frompos)
        end
        if sendEffect then
            doSendMagicEffect(getThingPos(cid), EffectId)
        end
    end
    
    return true and exhaustion.set(cid,storage,time)
end

  • 4 months later...

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