sick
Member
So i got this simple question, how to add death protection ( lets say 50% ) or all elements protection to this script, when it is casted.
Maybe its something simple like: setConditionParam(condition, CONDITION_PARAM_XXX_YYY, ZZZ) i just dunno what are the words for these conditions. :S
(This script turns you into monster for some time and just adds some skills or so when casted.)
Thanks in advance ^_^ :thumbup:
Maybe its something simple like: setConditionParam(condition, CONDITION_PARAM_XXX_YYY, ZZZ) i just dunno what are the words for these conditions. :S
(This script turns you into monster for some time and just adds some skills or so when casted.)
Code:
local time = 60
local addShielding = 20
local dress = {lookType = 333, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, addShielding)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, time)
setConditionFormula(speed, 0.7, -56, 0.7, -56)
setCombatCondition(combat, speed)
local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, time)
addOutfitCondition(outfit, dress)
setCombatCondition(combat, outfit)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, time)
setCombatCondition(combat, exhaust)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Thanks in advance ^_^ :thumbup: