Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Local lvlcrit = 48913
  2. Local multiplier = 3.5
  3. Local effect = 2 --- effect that will leave the player / creature taking the critical
  4.  
  5. Function onStatsChange (cid, attacker, type, combat, value)
  6. If type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isCreature (attacker) then
  7. If (getPlayerStorageValue (attacker, lvlcrit) * 3)> = math.random (0,1000) then
  8. Damage = math.ceil (value * (multiplier))
  9. DoTargetCombatHealth (attacker, cid, combat, -dano, -dano, 255)
  10. DoSendAnimatedText (getCreaturePos (attacker), "CRITICAL !!", 22)
  11. DoSendMagicEffect (getCreaturePos (attacker), effect)
  12. Return false
  13. End
  14. End
  15. Return true
  16. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement