Greets!
I am trying to make a "hit monster" spell with the calculation from the shield skill.
A Bonus is then if it can cause the monster to get "stunned" "stuck" for 1 second.
--
Shield Bash:
Problem:
The idea is to take damage from the ShieldSkill (in any way possible), then (or only) make your target "stunned" for 1 second as they once again get "chocked".
Thanks in Advance.
Kind Regards,
Eldin.
I am trying to make a "hit monster" spell with the calculation from the shield skill.
A Bonus is then if it can cause the monster to get "stunned" "stuck" for 1 second.
--
Shield Bash:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, 1)
function onGetFormulaValues(cid, skill, attack, factor)
local skillTotal, levelTotal = skill * attack, getPlayerLevel(cid) / 2
return -(((skillTotal * 1.0) + 1) + (levelTotal)), -(((skillTotal * 1.0) + 6) + (levelTotal))
end
setCombatCallback(combat, CALLBACK_PARAM_SKILL_SHIELD, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Problem:
The idea is to take damage from the ShieldSkill (in any way possible), then (or only) make your target "stunned" for 1 second as they once again get "chocked".
Thanks in Advance.
Kind Regards,
Eldin.