Ir para conteúdo

Featured Replies

  • Respostas 21
  • Visualizações 18.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • BetterWar ATS
    BetterWar ATS

    --Buy Jeff local coins = { [2148] = { to = 2152, effect = 210 }, [2152] = { from = 2148, to = 2160, effect = 130 }, [2160] = { from = 2152, to = 9971, effec

  • MatheusVidaLoka
    MatheusVidaLoka

    Obrigado, espero ter lhe ajudado.

  • primeiro crie um arquivo com o nome gold nugget.lua na pasta action, ou você escolhe dai cole isso dentro   --By MatheusVidaLoka function onUse(cid, item, frompos, item2, topos) if doRem

Postado

primeiro crie um arquivo com o nome gold nugget.lua na pasta action, ou você escolhe dai cole isso dentro

 

--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

 

 

no arquivo action.xml coloque isso

 

        <action itemid="2157" script="gold nugget.lua" />

 

 

depois procure pelo arquivo changegold.lua

 

e cole isto dentro

 

-- 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

 

AJUDEI ? REP +++

 

 

CREDITOS :  MatheusVidaLoka

Editado por Micheel15 (veja o histórico de edições)

  • 4 months later...
Postado

obrigado, funciona como dinheiro, mas tem um problema, ele nao esta trocando quando tem 100 crystal coins para gold nugget, e nem de gold nugget para crystal coins.

ta dando you cannot use this objective.

na verdade, nao está trocando nenhum, nem de gold para platinum, nem de platinum para crystal, nem de crystal para gold nugget.

  • 5 weeks later...
Postado
Em 12/01/2016 at 17:41, je19921992 disse:

--Buy Jeff
local coins = {
    [2148] = {
        to = 2152, effect = 210
    },
    [2152] = {
        from = 2148, to = 2160, effect = 130
    },
    [2160] = {
        from = 2152, to = 9971, effect = 65
    },
    [2157] = {
        from = 2160, effect = 198
    }
}

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

Pra quem esta com problema neste script basta substituir por este...

fica em action/scripts/other/changegold, algo assim... Mas eh changegold.lua

Vlw cara, salvou ! =D

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo