Ir para conteúdo

Featured Replies

Postado

Alguém tem como deixar esse script de critical igual do dodge pf ( Mas funcionado o critical )


Critical:
 

Citar

local lvlcrit = 48913
local multiplier = 2.2


function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS)  then
if (getPlayerStorageValue(attacker, lvlcrit)*1) >= math.random (1,1000) then
dano = math.ceil(value*(multiplier))
doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 215)
doSendAnimatedText(getCreaturePos(attacker), "CRITICAL", 180)
return false
end
end
return true
end



Dodge:

 

Citar

local storagedodge = 98798644 -- storage do dodge
local cor = 210 -- cor do texto
local msg = "DODGE" -- msg
 
local dodge = { 
    {min = 1, max = 10, chance = 1}, 
    {min = 11, max = 20, chance = 2}, 
    {min = 21, max = 30, chance = 3}, 
    {min = 31, max = 40, chance = 4}, 
    {min = 41, max = 50, chance = 5},
    {min = 51, max = 60, chance = 6},
    {min = 61, max = 70, chance = 7}, 
    {min = 71, max = 80, chance = 8},
    {min = 81, max = 90, chance = 9},  
    {min = 91, max = math.huge, chance = 10}
}
 
function onStatsChange(cid, attacker, type, combat, value)
    if not isCreature(cid) then
        return false
    end
    for _, tudo in pairs(dodge) do
        if getPlayerStorageValue(cid, storagedodge) >= tudo.min and getPlayerStorageValue(cid, storagedodge) <= tudo.max then
            local chancex = math.random(1, 100)
            if chancex <= tudo.chance then
                if combat ~= COMBAT_HEALING then
                    doSendAnimatedText(getCreaturePosition(cid), msg, cor)
                    return false
                end
            end
        end
    end
    return true
end

 

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