Ir para conteúdo

Featured Replies

Postado

Olá pessoal do TK, meu assunto é assim vou explicar.

 

Eu tenho o gold coins o platium coins, crystal coins , gold nugguet e queria colocar mais um ID 9971 (gold ingot) , seria possivel ?

 

Usar os 100 gold nugget virar o ID 9971 (gold ingot).

 

Agraço desde já dou REP+

Criador, a procura de mapper e scripter para server de tibia 8.6 DEDICADO

 

| IP: real-world.servegame.com | XP: 650 | Baiak EDITED (PRÓPRIO) | DEDICADO 24horas Online | Aberto 10.12.15 |

logo.png

Resolvido por DukeeH

Ir para solução
  • Respostas 6
  • Visualizações 935
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • lib/000-constant.lua, procure por: ITEM_CRYSTAL_COIN = 2160 Após, adicione: ITEM_GOLD_INGOT = 9971   actions.xml <action itemid="9971" script="other/changegold.lua"/>

Postado
  • Autor

@DukeeH Então ai está

Citar

Actions.xml

Spoiler

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

Citar

Changegold.lua

Spoiler

local scarabid = 2157
local scarabtext = TEXTCOLOR_DARKORANGE
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
        doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)
    elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)
        doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
    elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, scarabid, 1)
        doSendAnimatedText(fromPosition, "$$$$", scarabtext)
    elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$", TEXTCOLOR_YELLOW)
    elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)
    elseif item.itemid == scarabid then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
    else
        return FALSE
    end
    return TRUE
end

 

 

Criador, a procura de mapper e scripter para server de tibia 8.6 DEDICADO

 

| IP: real-world.servegame.com | XP: 650 | Baiak EDITED (PRÓPRIO) | DEDICADO 24horas Online | Aberto 10.12.15 |

logo.png

Postado
  • Solução

lib/000-constant.lua, procure por:

ITEM_CRYSTAL_COIN = 2160

Após, adicione:

ITEM_GOLD_INGOT = 9971

 

actions.xml

<action itemid="9971" script="other/changegold.lua"/>

changegold.lua

local scarabid = 2157
local scarabtext = TEXTCOLOR_DARKORANGE
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
        doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)
    elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)
        doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
    elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, scarabid, 1)
        doSendAnimatedText(fromPosition, "$$$$", scarabtext)
    elseif item.itemid == scarabid and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_GOLD_INGOT, 1)
        doSendAnimatedText(fromPosition, "$$$$$", scarabtext)
    elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$", TEXTCOLOR_YELLOW)
    elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)
    elseif item.itemid == scarabid and item.type < ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
    elseif item.itemid == ITEM_GOLD_INGOT then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, scarabid, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$$$$", TEXTCOLOR_TEAL)
    else
        return FALSE
    end
    return TRUE
end 

Items.xml procurar por: 9971 e adicionar:

<attribute key="worth" value="1000000000" />

 

asdukeeh.jpg

Postado
  • Autor

@DukeeH Funcionou perfeitamente obrigado, só uma pergunta da para comprar as coisas igual a crystal coins e gold nugguet né?

Criador, a procura de mapper e scripter para server de tibia 8.6 DEDICADO

 

| IP: real-world.servegame.com | XP: 650 | Baiak EDITED (PRÓPRIO) | DEDICADO 24horas Online | Aberto 10.12.15 |

logo.png

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