Postado Janeiro 2, 2019 6 anos pessoal, voltei a trabalhar com um nto e tentei adicionar um novo gold, antes o maior era o gold bar e isso me trazia alguns problemas porque para os players comprarem alguns itens no servidor, tinha que encher varias e varias bags, então fui no actions/scripts e achei dois changegold, sendo que um esta na pasta other e outro já na pasta scripts mesmo, tentei mexer em ambos e no actions.xml para colocar o diamond bar com id de 11422 mas não consegui. changegold.lua changegold.lua
Postado Janeiro 2, 2019 6 anos Tenho esse script configurado pro meu sv, tenta configurar ele ai Moedas: 2152 -> platinum coin (no meu sv platinum vale menos) 2148 -> gold coin 2157 -> gold nugget 9971 -> gold ingot 9970 -> small topaz actions.xml <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"/> <action itemid="2157" event="script" value="other/changegold.lua"/> <action itemid="9971" event="script" value="other/changegold.lua"/> <action itemid="9970" event="script" value="other/changegold.lua"/> actions/others local coins = { [2152] = {to = 2148}, [2148] = {to = 2157, from = 2152}, [2157] = {to = 9971, from = 2148}, [9971] = {to = 9970, from = 2157}, [9970] = {from = 9971}, } 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) elseif(coin.from ~= nil) then doChangeTypeItem(item.uid, item.type - 1) doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX) end return true end Ot Design: https://discord.gg/VgtVRNmCD7
Postado Janeiro 2, 2019 6 anos Autor agradeço muito, com esse ai consegui dar uma olhada no que eu havia errado. mas senti falta de uma coisa, com esse script aquele efeito de $$$ sumiu, tem alguma forma de colocar no meio desse script do other? obrigado, de novo.
Postado Janeiro 2, 2019 6 anos Solução não sei se ta certo, mas é algo assim: local coins = { [2152] = {to = 2148, effect = TEXTCOLOR_LIGHTBLUE}, [2148] = {to = 2157, from = 2152, effect = TEXTCOLOR_LIGHTBLUE}, [2157] = {to = 9971, from = 2148, effect = TEXTCOLOR_LIGHTBLUE}, [9971] = {to = 9970, from = 2157, effect = TEXTCOLOR_LIGHTBLUE}, [9970] = {from = 9971}, } 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 Ot Design: https://discord.gg/VgtVRNmCD7
Postado Janeiro 2, 2019 6 anos Autor exatamente como eu queria, Perfeito ! obrigado. agora vou buscar algumas cores diferentes alem desse azul e agradeço desde já
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.