Ir para conteúdo

Featured Replies

Postado
Em 17/05/2015 em 12:13, Vinicius Xxgamexx disse:

Segue: 


action itemid="IDDASTONE" event="script" value="mega stone.lua" allowfaruse="1"/>

e o script:


local evo = {["Charizard"] = {"Mega Charizard", QUANTIANECESSARIADESTONES},
}
local balls = {
[IDDAPOKEBALL] = {newBall = IDDAPOKEBALL},
}


function onUse(cid, item, fromPosition, itemEx, toPosition)
   if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then
          local monster = getCreatureName(itemEx.uid)
          if evo[monster] then  
                 if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then
                    doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(itemEx.uid).." evoluiu para "..evo[monster][1].."!")
                    local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid)
                    doSendMagicEffect(getThingPos(itemEx.uid), 18)
                    doRemoveCreature(itemEx.uid)
                    doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1)
                    doRemoveItem(item.uid, 1)
                    doSummonMonster(cid,evo[monster][1])
                    local pokeball = getPlayerSlotItem(cid, 8)
                    doItemSetAttribute(pokeball.uid, "poke", evo[monster][1])
                    doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level)
                    doItemSetAttribute(ball, "hp", 1)
                    doItemSetAttribute(ball, "happy", 110)
                    local pk = getCreatureSummons(cid)[1]
                    local getMegaPokeballs = balls[getPlayerSlotItem(cid, 8).itemid]
                    doTransformItem(getPlayerSlotItem(cid, 8).uid, getMegaPokeballs.newBall)
                    adjustStatus(pk, pokeball.uid, true, false, true)
                    return TRUE
                 else
                    return doPlayerSendTextMessage(cid, 27, "Voce precisa de ".. evo[monster][2] .." stones para isso!")
                 end
          end
end
return FALSE
end

 

Se aqui é por icon system como eu faço pra quando evo ele muda o incone tb?

Jamais se desespere em meio as sombrias afeiçoes da sua vida, pois das nuvens mais negras cai água límpida e fecunda

  • Respostas 10
  • Visualizações 1.4k
  • Created
  • Última resposta

Top Posters In This Topic

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

Informação Importante

Confirmação de Termo