How do I merge two of these scripts?
The first one gives freezing condition, and the second one makes 50% of the damage hit with ice dmg, and the other 50% with physical damage...
I want it to give freezing condition and 50% ice damage and 50% physical damage, not 100% physical like on all the other ones..
First one:
lua Code:
Second one:
Sorry for no lua tags, I don't know how to use them on otland://
The first one gives freezing condition, and the second one makes 50% of the damage hit with ice dmg, and the other 50% with physical damage...
I want it to give freezing condition and 50% ice damage and 50% physical damage, not 100% physical like on all the other ones..
First one:
lua Code:
Code:
local combat = createCombatObject()
local condition = createConditionObject(CONDITION_FREEZING)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.0, 0, 1.0, 0)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 5, 750, -300)
setCombatCondition(combat, condition)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 0, 0, 0.5, 0)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 0.5, 0)
local function onUseWeapon1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onUseWeapon2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
function onUseWeapon(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 }
addEvent(onUseWeapon1, 0, parameters)
addEvent(onUseWeapon2, 0, parameters)
end