Postado Outubro 29, 2014 10 anos Hei.. Boa Noite. Estava procurando um script de change gold, e achei: local coins = { [ITEM_GOLD_COIN] = { to = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_YELLOW }, [ITEM_PLATINUM_COIN] = { from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_LIGHTBLUE }, [ITEM_CRYSTAL_COIN] = { from = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_TEAL } } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerFlagValue(cid, PLAYERFLAG_CANNOTPICKUPITEM)) then return false end local coin = coins[item.itemid] if(not coin) then return false end if(coin.to ~= nil and item.type == ITEMCOUNT_MAX) then doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, coin.to, 1) doSendAnimatedText(fromPosition, "$$$", coins[coin.to].effect) elseif(coin.from ~= nil) then doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "$$$", coins[coin.from].effect) end return true end PORÉM, eu queria transformar CRYSTAL COINS em GOLD NUGGET (2157).. Como faço? Por favor. '----'!
Postado Outubro 29, 2014 10 anos Não testei local coins = { [ITEM_GOLD_COIN] = {to = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_YELLOW}, [ITEM_PLATINUM_COIN] = {from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_LIGHTBLUE}, [ITEM_CRYSTAL_COIN] = {from = ITEM_PLATINUM_COIN, to = 2157, effect = TEXTCOLOR_TEAL}, [2157] = {from = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_YELLOW}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerFlagValue(cid, PLAYERFLAG_CANNOTPICKUPITEM)) then return false end local coin = coins[item.itemid] if(not coin) then return false end if(coin.to ~= nil and item.type == ITEMCOUNT_MAX) then doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, coin.to, 1) doSendAnimatedText(fromPosition, "$$$", coins[coin.to].effect) elseif(coin.from ~= nil) then doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "$$$", coins[coin.from].effect) end return true end @OBS: Não se esqueça de adicionar o ID do Gold Nugget no actions.xml. Tony Araújo
Postado Outubro 30, 2014 10 anos só um lembrete: além de fazer isso você precisa modificar no items.xml pro gold nugget ser entendido como gold pelos npcs, do contrário é meio que inútil. Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
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.