Ir para conteúdo

[WEAPON] Wand com Critico


Sttorm

Posts Recomendados

XML

		 <wand id="2524" level="100" event="script" value="sound.lua">		 </wand>

SCRIPT

local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 4)setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.2, 1, -3.3, 1)local critical = createCombatObject()setCombatParam(critical, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatParam(critical, COMBAT_PARAM_DISTANCEEFFECT, 2)setCombatFormula(critical, COMBAT_FORMULA_LEVELMAGIC, -14.2, 1, -6.3, 1)function onUseWeapon(cid, var)local chance = 5 -- porcentagem de chance de dar criticalif isCreature(getCreatureTarget(cid)) and math.random(1,100) <= chance thendoCombat(cid, critical, var)local targetpos = getCreaturePosition(getCreatureTarget(cid))local pos = {x=targetpos.x+1, y=targetpos.y+1, z=targetpos.z}doSendMagicEffect(pos, 86)doSendAnimatedText(getCreaturePosition(cid), "S O U N D!", math.random(1,255))elsedoCombat(cid, combat, var)endreturn trueend

 

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...