Ir para conteúdo

Posts Recomendados

  Em 31/03/2014 em 18:00, SmiX disse:
local pokes = {"Shiny Rattata", "Shiny Alakazam"}
function onKill(cid, target, damage, flags)
if isInArray(pokes, getCreatureName(target)) then 
    doPlayerAddItem(cid, 11454, 1)
    doPlayerSendTextMessage(cid, 27, Você acabou de ganhar uma Shiny Stone)
end
end
Troca o teu script por este ai.

 

Cara, ta acontecendo a mesma coisa. O pokemon nao termina de morrer, e ao matar qualquer pokemon vai ganhando shiny stone, e elas nunca acabam!!

Em data/creaturescripts/scripts, procure por um arquivo chamado exp2.0.lua. Caso este não exista, procure pelo exp.lua.

Abra o arquivo, e substitua:

   if valor >= getCreatureHealth(cid) then
        if isInArray(cannotKill, combat) and isPlayer(cid) then
            valor = getCreatureHealth(cid) - 1
        else
            valor = getCreatureHealth(cid)
        end
    end
    valor = math.floor(valor)  
Por:
   if valor >= getCreatureHealth(cid) then
        if isInArray(cannotKill, combat) and isPlayer(cid) then
            valor = getCreatureHealth(cid) - 1
        else
            local str = "shiny"
            local itemid = x   --ID da Shiny Stone.
            if getCreatureName(cid):lower():find(str) and isSummon(attacker) and not isSummon(cid) then
                local owner = getCreatureMaster(attacker)
                if owner then
                    doPlayerAddItem(owner, itemid, 1)
                    doPlayerSendTextMessage(owner, MESSAGE_STATUS_CONSOLE_ORANGE, "You received a Shiny Stone!")
                end
            end
            valor = getCreatureHealth(cid)
        end
    end
    valor = math.floor(valor)    
Editado por zipter98

Perfeito zipter, Funcionou certinho. Mas uma duvida. Tem como colocar Exceções? Pq queria somente os pokemon shinys fortes para isso

Se puder ajudar vlws

Editado por HenrikDiamond

 

if valor >= getCreatureHealth(cid) then
        if isInArray(cannotKill, combat) and isPlayer(cid) then
            valor = getCreatureHealth(cid) - 1
        else
            local names = {"Shiny Charizard", "Shiny Blastoise", "Shiny Venusaur"}   --Coloque aqui o nome dos shinies que deseja que "dropem" a Shiny Stone.
            local itemid = x   --ID da Shiny Stone.
            if isInArray(names, getCreatureName(cid)) and isSummon(attacker) and not isSummon(cid) then
                local owner = getCreatureMaster(attacker)
                if owner then
                    doPlayerAddItem(owner, itemid, 1)
                    doPlayerSendTextMessage(owner, MESSAGE_STATUS_CONSOLE_ORANGE, "You received a Shiny Stone!")
                end
            end
            valor = getCreatureHealth(cid)
        end
    end
    valor = math.floor(valor)    
  • 4 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...