BEM IDEA!![]()
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- [pedido]100 Cristal Coin 1 Ruby Coin 100 Ruby Coin 1 Esmerald Coin [plz]
[pedido]100 Cristal Coin 1 Ruby Coin 100 Ruby Coin 1 Esmerald Coin [plz]
Por 914992, 13 de jul. de 2009 em Archived
info
Grupo: Marquês
Registrado: 17/01/08
Posts: 1.5k
Reputação: +15
Char no Tibia: Saint Claire

Usuário Jerim suspenso por mass flood/suspeita de ser polonês.
Abraços
Crie um arquivo.lua chamado coins na pasta scripts dentro de actions
function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, ITEMIDODORUBYCOIN, 1) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_RED) elseif item.itemid == ITEMIDDORUBYCOIN and item.type == ITEMCOUNT_MAX then doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, ITEMIDDOESMERALDCOIN, 1) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_GREEN) elseif item.itemid == ITEMIDDORUBYCOIN and item.type < ITEMCOUNT_MAX then doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTBLUE) elseif item.itemid == ITEMIDDOESMERALDCOIN then doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, ITEMIDDORUBYCOIN, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTBLUE) else return FALSE end return TRUE end
Em seguida introduza a seguinte tag no arquivo actions.xml
<action itemid="2160" script="coins.lua"/> <action itemid="ITEMIDDORUBYCOIN" script="coins.lua"/> <action itemid="ITEMIDDOESMERALDCOIN" script="coins.lua"/>
ITEMIDDORUBYCOIN - Substituia pelo Item ID do Ruby Coin
ITEMIDDOESMERALDCOIN - Substituia pelo Item ID do Esmerald Coin
Qualquer erro ou duvida por favor me corrijam, é o meu primeiro script postado.
info
Grupo: Campones
Registrado: 13/07/09
Posts: 1
Reputação: 0

Crie um arquivo.lua chamado coins na pasta scripts dentro de actionsfunction onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, ITEMIDODORUBYCOIN, 1) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_RED) elseif item.itemid == ITEMIDDORUBYCOIN and item.type == ITEMCOUNT_MAX then doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, ITEMIDDOESMERALDCOIN, 1) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_GREEN) elseif item.itemid == ITEMIDDORUBYCOIN and item.type < ITEMCOUNT_MAX then doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTBLUE) elseif item.itemid == ITEMIDDOESMERALDCOIN then doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, ITEMIDDORUBYCOIN, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_LIGHTBLUE) else return FALSE end return TRUE end
Em seguida introduza a seguinte tag no arquivo actions.xml
<action itemid="2160" script="coins.lua"/> <action itemid="ITEMIDDORUBYCOIN" script="coins.lua"/> <action itemid="ITEMIDDOESMERALDCOIN" script="coins.lua"/>
ITEMIDDORUBYCOIN - Substituia pelo Item ID do Ruby Coin
ITEMIDDOESMERALDCOIN - Substituia pelo Item ID do Esmerald Coin
Qualquer erro ou duvida por favor me corrijam, é o meu primeiro script postado.
cara tem como vc me ajuda criando as moedas pra mim ??? pq nem sei como add itens no map editor !!
plz help me



info
Grupo: Campones
Registrado: 08/05/08
Posts: 0
Reputação: 0
Char no Tibia: lawks skumur paladin
Estou precisando de um tipo de script q fassa q 100 cristal coin vire 1 ruby coin (cristal coin vermelha) e q 100 ruby coin vire 1 (esmerald cooin)