Jump to content
  • 0

TRANSFORMAR SCRIPT [creaturescripts] EM [actions]


880123
 Share

Question

queria esse script em action, para quando der use ele ganhar o bonus q script dá, alguem pode ajduar porfavor !
E se possivel quando de user na pedra, aparecer quantos de % (percentual) de ele tem.
 

Citar

  local config = 
    SKILL_ID = 0, -- id do skill...
    multiplier = 1.5,
    percentual = 0.5,
}
function onLogin(cid)
    registerCreatureEvent(cid, "critical")
    registerCreatureEvent(cid, "comcriti")
    return true
end
function onStatsChange(cid, attacker, type, combat, value)
    if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then
        local chance = (getPlayerSkillLevel(attacker, config.SKILL_ID) * config.percentual) * 10
        if math.random(1, 1400) <= chance then
            dano = math.ceil(value*(config.multiplier))
            doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 255)
            return false
        end
    end
    return true
end
function onCombat(cid, target)
    if isPlayer(cid) and isMonster(target) then
        registerCreatureEvent(target, "critical")    
    end
    return true
end  local config = 
    SKILL_ID = 0, -- id do skill...
    multiplier = 1.5,
    percentual = 0.5,
}
function onLogin(cid)
    registerCreatureEvent(cid, "critical")
    registerCreatureEvent(cid, "comcriti")
    return true
end
function onStatsChange(cid, attacker, type, combat, value)
    if isPlayer(attacker) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then
        local chance = (getPlayerSkillLevel(attacker, config.SKILL_ID) * config.percentual) * 10
        if math.random(1, 1400) <= chance then
            dano = math.ceil(value*(config.multiplier))
            doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 255)
            return false
        end
    end
    return true
end
function onCombat(cid, target)
    if isPlayer(cid) and isMonster(target) then
        registerCreatureEvent(target, "critical")    
    end
    return true
end

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...