Postado Fevereiro 4, 2017 8 anos Solução Em 31/01/2017 em 14:29, tirso disse: Mostrar conteúdo oculto Mostrar conteúdo oculto --[[Critical System By Night Wolf]] local lvlcrit = 48913 local multiplier = 1.5 local efeito = 4 --- efeito que vai sair do player/criatura que tomar o crítico function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isCreature(attacker) then if (getPlayerStorageValue(attacker, lvlcrit)*3) >= math.random (0,1000) then dano = math.ceil(value*(multiplier)) doTargetCombatHealth(attacker, cid, combat, -dano, -dano, 255) doSendAnimatedText(getCreaturePos(attacker), "CRITICAL!!", 144) doSendMagicEffect(getCreaturePos(attacker), efeito) return false end end return true end tenta esse creaturescripts/nome do seu arquivo, so substitui Mostrar conteúdo oculto local lvlcrit = 48903 local multiplier = 1.5 function onStatsChange(cid, attacker, type, combat, value) if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and isPlayer(attacker) and isCreature(cid) then if (getPlayerStorageValue(attacker, lvlcrit)*2) >= math.random (0,1000) then value = math.ceil(value*(multiplier)) doTargetCombatHealth(attacker, cid, combat, -value, -value, 255) doSendAnimatedText(getCreaturePos(attacker), "Critical!!", 92) return false end end return true end
Postado Fevereiro 4, 2017 8 anos Autor Em 04/02/2017 em 17:43, mateusmoretti disse: tenta esse creaturescripts/nome do seu arquivo, so substitui Mostrar conteúdo oculto Mostrar conteúdo oculto local lvlcrit = 48903 local multiplier = 1.5 function onStatsChange(cid, attacker, type, combat, value) if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and isPlayer(attacker) and isCreature(cid) then if (getPlayerStorageValue(attacker, lvlcrit)*2) >= math.random (0,1000) then value = math.ceil(value*(multiplier)) doTargetCombatHealth(attacker, cid, combat, -value, -value, 255) doSendAnimatedText(getCreaturePos(attacker), "Critical!!", 92) return false end end return true end Deu certo Mateus, obrigado mesmo Abraço!
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.