Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Bom primeiramente nao sei se estou postando na area correta , se eu não estiver alguem muda por favor ? =X nao sou muito de postar ai não sei muito bem as areas corretas. Obg

 

Bom queria saber como adicionar uma moeda nova no jogo, bom isso eu ja fiz mas tenho um problema, eu pego 1kk clico nele e ele vira um gold nugget , normal até ai....

 

10256220_493033320798097_736307807706932

 

Mas depois que vira gold nugget ele nao volta mais para cristal coins ... e eu queria saber arrumar isso, ja arrumei no Itens.xml o valor do nugget e ja arrumei >> \ data \ ações \ scripts \ other \ changegold, Olha ai em baixo não sei se editei certo 

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------

 

função onUse (cid, item fromPosition, itemEx, toPosition)
se item.itemid == ITEM_GOLD_COIN e item.type == ITEMCOUNT_MAX então
doChangeTypeItem (item.uid, item.type - item.type)
doPlayerAddItem (cid, ITEM_PLATINUM_COIN, 1)
doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_PLATINUMBLUE)
 
elseif item.itemid == ITEM_PLATINUM_COIN e item.type == ITEMCOUNT_MAX então
doChangeTypeItem (item.uid, item.type - item.type)
doPlayerAddItem (cid, ITEM_CRYSTAL_COIN, 1)
doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_TEAL)
 
elseif item.itemid == ITEM_CRYSTAL_COIN e item.type == ITEMCOUNT_MAX então
doChangeTypeItem (item.uid, item.type - item.type)
doPlayerAddItem (cid, 2157, 1)
doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_TEAL)
 
elseif item.itemid == ITEM_PLATINUM_COIN e item.type <ITEMCOUNT_MAX então
doChangeTypeItem (item.uid, item.type - 1)
doPlayerAddItem (cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_YELLOW)
 
elseif item.itemid == ITEM_CRYSTAL_COIN então
doChangeTypeItem (item.uid, item.type - 1)
doPlayerAddItem (cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_PLATINUMBLUE)
 
elseif item.itemid == 2157 e item.type <ITEMCOUNT_MAX então
doChangeTypeItem (item.uid, item.type - 1)
doPlayerAddItem (cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
doSendAnimatedText (fromPosition, "$ $ $", TEXTCOLOR_YELLOW)
outro
retornar FALSE
final
retornar TRUE
final
 
 
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Não sei se esta certo... alguem pode me ajudar a consertar  ?  (a fazer virar cristal coins depois que virar gold nugget) obg desde ja  Skype:matheus3306

Resolvido por Raell5

Ir para solução
Postado
  • Solução

Vá ate sua Data/Actions.xml  e cole isto

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

Depois deste etapa vá ate Data/actions/others crie changegold.lua se existir cole isto dentro

  Citar

local scarabid = 9971
local scarabtext = TEXTCOLOR_DARKORANGE
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)
        doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)
    elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)
        doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
    elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - item.type)
        doPlayerAddItem(cid, scarabid, 1)
        doSendAnimatedText(fromPosition, "$$$$", scarabtext)
    elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$", TEXTCOLOR_YELLOW)
    elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)
    elseif item.itemid == scarabid then
        doChangeTypeItem(item.uid, item.type - 1)
        doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)
        doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)
    else
        return FALSE
    end
    return TRUE
end

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

16s5uc.gif2moe247.gif  swvimf.gif 

 

 

 
  Em 12/12/2014 em 02:17, Vittu disse:

raell, me come

 

 

Postado
  • Autor
  Em 07/05/2014 em 01:46, Raell Deads disse:

Vá ate sua Data/Actions.xml  e cole isto

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

Depois deste etapa vá ate Data/actions/others crie changegold.lua se existir cole isto dentro

Bom nao foi isso exatamente a pergunta , mas vc me ajudou com o  Data/actions.xml  e tive uma noçao  no caso adicionei o  <action itemid="ID DA NOVA MOEDA" event="script" value="other/changegold.lua"/>

e resolveu meu problema ^^  vlw

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.6k

Informação Importante

Confirmação de Termo