trollebror
Developer
Is it possible to check if the attack is blocked or not inside a weapon-script? Check the code below for a more illustrative explanation.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)
function onUseWeapon(cid, var)
local ret = doCombat(cid, combat, var)
if([COLOR="#FF0000"]ret == BLOCK[/COLOR]) then
[B]doThis()[/B]
else
[B]doThat()[/B]
end
end