Postado Maio 2, 2016 9 anos Fala Galerinha do TK Fiz um Post sobre isso, mas acabei apagando porquê ele ficou morto lá Bom, tô com um probleminha no meu OT... No OT que eu Jogo, quanto clicamos com o Direito do Mouse em um Stack de 100 Crystal Coin, ele se Transforma em 1 Gold Ingot... Corri atrás disso até que consegui ajeitar para acontecer o mesmo no meu OT, porém quando você já tem um ou mais Gold Ingots no Inventário e clica nos 100 Crystal Coin ele não vai pro mesmo Stack de Gold Ingots que você já tinha... Em geral, com todas as Moedas, ele não vai pro mesmo Stack... Segue o Anexo do que acontece no meu OT/OT que eu Jogo. >> NO MEU OT << Antes de Clicar/Depois de Clicar Spoiler >> NO OT QUE EU JOGO << Antes de Clicar/Depois de Clicar Spoiler Perceberam que no OT que eu Jogo o Gold Ingot foi pro mesmo Stack? Pois é, no meu não acontece isso Segue aqui os Scripts que Utilizei pra realizar esse sistema de troca (que não vai pro mesmo Stack ) "DATA\ACTIONS\SCRIPTS\OTHER\changegold.lua" (ESSE SCRIPT FOI EDITADO, O PADRÃO ERA DIFERENTE) --Configurations local ITEM_INGOT = 9971 -- Ingot ID --End of Configs function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then --Gold Coin to Platinum Coin doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1) doSendAnimatedText(fromPosition, "Platinum", TEXTCOLOR_LIGHTBLUE) elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then --Platinum Coin to Crystal Coin doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1) doSendAnimatedText(fromPosition, "Crystal!", TEXTCOLOR_TEAL) elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then --Platinum Coin to Gold Coin doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "Gold", TEXTCOLOR_YELLOW) elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then --Crystal Coin to Platinum Coin doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "Platinum", TEXTCOLOR_LIGHTBLUE) elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then --Crystal Coin to Ingot doChangeTypeItem(item.uid, item.type - item.type) doPlayerAddItem(cid, ITEM_INGOT,1) doSendAnimatedText(fromPosition, "Ingot", TEXTCOLOR_YELLOW) else return FALSE end return TRUE end "DATA\ACTIONS\SCRIPTS\OTHER\changeingot.lua" (ESSE AQUI FOI CRIADO) --Configurations local ITEM_INGOT = 9971 -- Ingot ID --End of Configs function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == ITEM_INGOT then --Ingot to Crystal Coin doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX) doSendAnimatedText(fromPosition, "Crystal", TEXTCOLOR_TEAL) else return FALSE end return TRUE end "DATA\ACTIONS\actions.xml" (ADICIONEI ESSA LINHA) <action itemid="9971" script="other/changeingot.lua"/> ---------------------------------------------------------------------------------------------------------- **DESTAQUE** Para poupar a Resposta gigante de algum membro, vou facilitar deixando aqui o Download dos arquivos para que possam Baixar, Editar e postar para que eu possa testar e vê se resolve meu problema ---------------------------------------------------------------------------------------------------------- > DOWNLOADS < changegold.lua changeingot.lua > SCAN < changegold.lua changeingot.lua A parte que eu tiver de adicionar nas "actions.xml" vocês podem deixar em um "Code" ai junto do Download do arquivo editado. Se faltar alguma Informação, avisem que eu Edito Aguardo... ---------------------------------------------------------------------------------------------------------- Att: DexTiger Skype: -DexTiger_- [Roger Windberg] ~~ Though I try to Resist, I still Want it All ~~ ~~> YouTube <~~ ~~> Facebook <~~ ~~> Twitter <~~ [#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]
Postado Maio 2, 2016 9 anos Bom vamos ao script. Vá em data/actions/scripts e abra o arquivo crystal.lua, apague tudo o que está dentro, logo em seguida cole o script abaixo: Ocultar conteúdo --By MatheusVidaLoka function onUse(cid, item, frompos, item2, topos) if item.itemid == 2160 and item.type == 100 then doRemoveItem(item.uid,item.type) doPlayerAddItem(cid,2157,1) doPlayerSendTextMessage(cid,22,"Voce trocou 100 crystal por 1 Gold Nuggets") elseif item.itemid == 2152 and item.type < 100 then doRemoveItem(item.uid,1) doPlayerAddItem(cid,2152,100) doPlayerSendTextMessage(cid,22,"Voce trocou 1 crystal por 100 platinum coins") end end Traduzindo: Vermelho: É o id da crystal coin, e a quantidade a ser trocada por 1 gold nugget (Novo Gold). Azul: É o id da gold nugget, e a quantidade de gold nugget. Logo em seguida, vá novamente em data/actions/scripts copie qualquer arquivo.lua e cole, em seguida renomeie-o para "goldnuggets" sem aspas, abra-o, apague tudo, e cole o script abaixo. Ocultar conteúdo --By MatheusVidaLoka function onUse(cid, item, frompos, item2, topos) if doRemoveItem(item.uid,1) then doPlayerSendTextMessage(cid,22,"Voce trocou 1 gold nugget por 100 crystal coins") doPlayerAddItem(cid,2160,100) end end Traduzindo: Laranja: É o que vai dizer quando o player trocar 1 gold nugget por 100 crystal coins. Verde: É o id da crystal coin, e a quantidade equivalente a 1 gold nugget. Logo em seguida, abra data/actions/actions.xml e adicione a tag abaixo. Citar <action itemid="2157" script="goldnuggets.lua" /> Traduzindo: Rosa: É o id do gold nuggets. Azul: O nome do arquivo.lua que você salvou. Depois disso abra data/items/items.xml, aperte CTRL + F, e digite 2157, ai você vai achar o item Gold Nugget que vai estar assim: Ocultar conteúdo <item id="2157" article="a" name="gold nugget" plural="gold nuggets"> <attribute key="weight" value="10"/> Substitua tudo por isso: <item id="2157" article="a" name="gold nugget" plural="gold nuggets"> <attribute key="weight" value="10"/> <attribute key="worth" value="1000000" /> Traduzindo: Vermelho: Peso do gold nugget. Azul: Valor do item (como 1 crystal coin = 10k , 1 gold nugget = 1kk) Logo depois vá data/actions/scripts/other e abra o arquivo changegold.lua, susbistitua tudo oque está la dentro por esse script a seguir, e salve: -- By MatheusVidaLoka 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 Traduzindo: Vermelho: É o id do Gold Nugget. Por fim vá em data/actions/actions.xml, pule uma linha qualquer e cole isso, e salve: <action itemid="2157" event="script" value="other/changegold.lua"/> Traduzindo: Azul: É o id do gold nugget. Verde: O nome do arquivo que você salvou. Editado Maio 3, 2016 9 anos por Cellu (veja o histórico de edições)
Postado Maio 2, 2016 9 anos Autor 16 minutos atrás, Cellu disse: Tenta configurar em seu servidor! Bom vamos ao script. Vá em data/actions/scripts e abra o arquivo crystal.lua, apague tudo o que está dentro, logo em seguida cole o script abaixo: Conteúdo Oculto Traduzindo: Vermelho: É o id da crystal coin, e a quantidade a ser trocada por 1 gold nugget (Novo Gold). Azul: É o id da gold nugget, e a quantidade de gold nugget. Logo em seguida, vá novamente em data/actions/scripts copie qualquer arquivo.lua e cole, em seguida renomeie-o para "goldnuggets" sem aspas, abra-o, apague tudo, e cole o script abaixo. Conteúdo Oculto Traduzindo: Laranja: É o que vai dizer quando o player trocar 1 gold nugget por 100 crystal coins. Verde: É o id da crystal coin, e a quantidade equivalente a 1 gold nugget. Logo em seguida, abra data/actions/actions.xml e adicione a tag abaixo. Traduzindo: Rosa: É o id do gold nuggets. Azul: O nome do arquivo.lua que você salvou. Depois disso abra data/items/items.xml, aperte CTRL + F, e digite 2157, ai você vai achar o item Gold Nugget que vai estar assim: Conteúdo Oculto Substitua tudo por isso: <item id="2157" article="a" name="gold nugget" plural="gold nuggets"> <attribute key="weight" value="10"/> <attribute key="worth" value="1000000" /> Traduzindo: Vermelho: Peso do gold nugget. Azul: Valor do item (como 1 crystal coin = 10k , 1 gold nugget = 1kk) Logo depois vá data/actions/scripts/other e abra o arquivo changegold.lua, susbistitua tudo oque está la dentro por esse script a seguir, e salve: -- By MatheusVidaLoka 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 Traduzindo: Vermelho: É o id do Gold Nugget. Por fim vá em data/actions/actions.xml, pule uma linha qualquer e cole isso, e salve: <action itemid="2157" event="script" value="other/changegold.lua"/> Traduzindo: Azul: É o id do gold nugget. Verde: O nome do arquivo que você salvou. Mano, analisei seu Post, informações muito boas e técnicas diferentes das que utilizei, pode dar certo mas tem um probleminha... Os Spoilers com os Códigos que você colocou tá bugado e não dá pra abri Arruma ae please que vou testar ~~ Though I try to Resist, I still Want it All ~~ ~~> YouTube <~~ ~~> Facebook <~~ ~~> Twitter <~~ [#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]~~[#]
Postado Março 30, 2022 3 anos Alguém conseguiu resolver o problema do gold não ir para o mesmo stack? se sim me ajudem pfv
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.