Postado Março 11, 2017 8 anos doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_RED) Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Março 11, 2017 8 anos Em 11/03/2017 em 11:55, jNo disse: Deu erro no "coins" do código. troca seu por esses! vai em actions/others/changegold Mostrar conteúdo oculto 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_LIGHTBLUE }, [2157] = { from = ITEM_CRYSTAL_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
Postado Março 11, 2017 8 anos Autor Em 11/03/2017 em 12:47, mateusmoretti disse: troca seu por esses! vai em actions/others/changegold Mostrar conteúdo oculto Mostrar conteúdo oculto 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_LIGHTBLUE }, [2157] = { from = ITEM_CRYSTAL_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 A alteração é só naquele mesmo, esse ai eu fiz certo, o problema é colocar a mensagem, e fazer com que o ingot volte a ser crystal sem bug. Em 11/03/2017 em 12:21, rogaforyn2 disse: doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_RED) Em 11/03/2017 em 12:21, rogaforyn2 disse: doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_RED) Dessa forma funciona, a mensagem sai como eu quero, porém, quando clico no gold ingot pra voltar a ser crystal, o gold ingot desaparece, e da erro no distro "doSendAnimedtext", eu tentei fazer isso: --By MatheusVidaLoka function onUse(cid, item, frompos, item2, topos) if doRemoveItem(item.uid,1) then doPlayerSendTextMessage(fromPosition, "$$$", TEXTCOLOR_RED) doPlayerAddItem(cid,2160,100) end end Funciona, mas da ai da um erro, "onUSE", segue a print Editado Março 11, 2017 8 anos por jNo (veja o histórico de edições) (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Março 11, 2017 8 anos Solução Tenta com --By MatheusVidaLoka function onUse(cid, item, frompos, item2, topos) if doRemoveItem(item.uid,1) then doPlayerSendTextMessage(cid, "$$$", TEXTCOLOR_RED) doPlayerAddItem(cid,2160,100) end end Eu nem vi o script só tinha mudado a função. Editado Março 11, 2017 8 anos por rogaforyn2 (veja o histórico de edições) Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Março 11, 2017 8 anos Autor Em 11/03/2017 em 13:22, rogaforyn2 disse: Tenta com --By MatheusVidaLoka function onUse(cid, item, frompos, item2, topos) if doRemoveItem(item.uid,1) then doPlayerSendTextMessage(cid, "$$$", TEXTCOLOR_RED) doPlayerAddItem(cid,2160,100) end end Eu nem vi o script só tinha mudado a função. Funcionou, mas da debug kkkkkkk quando volta do ingot pra crystal problema resolvido, duvida sanada, (tinha 2 script rodando, por isso dava bug). obrigado, rep. Em 11/03/2017 em 12:47, mateusmoretti disse: troca seu por esses! vai em actions/others/changegold Mostrar conteúdo oculto Mostrar conteúdo oculto 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_LIGHTBLUE }, [2157] = { from = ITEM_CRYSTAL_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 problema resolvido, duvida sanada, (tinha 2 script rodando, por isso dava bug, so o seu resolvia obg). (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
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.