Postado Maio 5, 2014 11 anos Bom primeiramente nao sei se estou postando na area correta , se eu não estiver alguem muda por favor ? =X nao sou muito de postar ai não sei muito bem as areas corretas. Obg Bom queria saber como adicionar uma moeda nova no jogo, bom isso eu ja fiz mas tenho um problema, eu pego 1kk clico nele e ele vira um gold nugget , normal até ai.... Mas depois que vira gold nugget ele nao volta mais para cristal coins ... e eu queria saber arrumar isso, ja arrumei no Itens.xml o valor do nugget e ja arrumei >> \ data \ ações \ scripts \ other \ changegold, Olha ai em baixo não sei se editei certo --------------------------------------------------------------------------------------------------------------------------------------------------------------- função onUse (cid, item fromPosition, itemEx, toPosition) se item.itemid == ITEM_GOLD_COIN e item.type == ITEMCOUNT_MAX então doChangeTypeItem (item.uid, item.type - item.type) doPlayerAddItem (cid, ITEM_PLATINUM_COIN, 1) doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_PLATINUMBLUE) elseif item.itemid == ITEM_PLATINUM_COIN e item.type == ITEMCOUNT_MAX então doChangeTypeItem (item.uid, item.type - item.type) doPlayerAddItem (cid, ITEM_CRYSTAL_COIN, 1) doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_TEAL) elseif item.itemid == ITEM_CRYSTAL_COIN e item.type == ITEMCOUNT_MAX então doChangeTypeItem (item.uid, item.type - item.type) doPlayerAddItem (cid, 2157, 1) doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_TEAL) elseif item.itemid == ITEM_PLATINUM_COIN e item.type <ITEMCOUNT_MAX então doChangeTypeItem (item.uid, item.type - 1) doPlayerAddItem (cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX) doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_YELLOW) elseif item.itemid == ITEM_CRYSTAL_COIN então doChangeTypeItem (item.uid, item.type - 1) doPlayerAddItem (cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX) doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_PLATINUMBLUE) elseif item.itemid == 2157 e item.type <ITEMCOUNT_MAX então doChangeTypeItem (item.uid, item.type - 1) doPlayerAddItem (cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX) doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_YELLOW) outro retornar FALSE final retornar TRUE final --------------------------------------------------------------------------------------------------------------------------------------------------------------- Não sei se esta certo... alguem pode me ajudar a consertar ? (a fazer virar cristal coins depois que virar gold nugget) obg desde ja Skype:matheus3306
Postado Maio 5, 2014 11 anos 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: "OTServ → Scripting → Geral" Para: "OTServ → Suporte OTServ → Suporte de Scripts" Ot Design: https://discord.gg/VgtVRNmCD7
Postado Maio 7, 2014 11 anos Solução Vá ate sua Data/Actions.xml e cole isto <action itemid="2148" event="script" value="other/changegold.lua"/> <action itemid="2152" event="script" value="other/changegold.lua"/> <action itemid="2160" event="script" value="other/changegold.lua"/> Depois deste etapa vá ate Data/actions/others crie changegold.lua se existir cole isto dentro Citar local scarabid = 9971 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 Editado Maio 7, 2014 11 anos por Raell Deads (veja o histórico de edições) Em 12/12/2014 em 02:17, Vittu disse: raell, me come
Postado Maio 7, 2014 11 anos Autor Em 07/05/2014 em 01:46, Raell Deads disse: Vá ate sua Data/Actions.xml e cole isto <action itemid="2148" event="script" value="other/changegold.lua"/> <action itemid="2152" event="script" value="other/changegold.lua"/> <action itemid="2160" event="script" value="other/changegold.lua"/> Depois deste etapa vá ate Data/actions/others crie changegold.lua se existir cole isto dentro Bom nao foi isso exatamente a pergunta , mas vc me ajudou com o Data/actions.xml e tive uma noçao no caso adicionei o <action itemid="ID DA NOVA MOEDA" event="script" value="other/changegold.lua"/> e resolveu meu problema vlw
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.