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.
Citarlocal 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