Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
19 horas atrás, Nolis disse:

@pergher  testa esse script do changegold pra tfs 1.2

 

actions.xml


<action itemid="2148" script="other/changegold.lua" /> <action itemid="2152" script="other/changegold.lua" /> <action itemid="2160" script="other/changegold.lua" />

 

changegold.lua


local config = {
    [ITEM_GOLD_COIN] = {changeTo = ITEM_PLATINUM_COIN},
    [ITEM_PLATINUM_COIN] = {changeBack = ITEM_GOLD_COIN, changeTo = ITEM_CRYSTAL_COIN},
    [ITEM_CRYSTAL_COIN] = {changeBack = ITEM_PLATINUM_COIN}
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local coin = config[item:getId()]
    if coin.changeTo and item.type == 100 then
        item:remove()
        player:addItem(coin.changeTo, 1)
    elseif coin.changeBack then
        item:remove(1)
        player:addItem(coin.changeBack, 100)
    else
        return false
    end
    return true
end

 

Muito obrigado, Nolis. 

Funcionou aqui, abraço.

  • Respostas 10
  • Visualizações 20.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTS

  • @pergher  testa esse script do changegold pra tfs 1.2   actions.xml <action itemid="2148" script="other/changegold.lua" /> <action itemid="2152" script="other/changegold.lua" /&

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