Thorn
Spriting since 2013
hiii, i have a weapon that i would like to make the target to get paralize, how do i do that? D: i already have a sword that makes that but i can't find the option anywhere like to copy it and paste it to the new sword >.<
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -150)
setCombatCondition(combat, condition)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)
function onUseWeapon(cid, var)
local chance = math.random(1,10)
if chance == 1 then
doCombat(cid, combat, var)
else
doCombat(cid, combat2, var)
end
return true
end
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)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -150)
setCombatCondition(combat, condition)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
<melee id="7385" level="20" unproperly="1" event="script" value="weapon.lua"/>