Paulix
Active Member
- Joined
- Sep 13, 2012
- Messages
- 151
- Solutions
- 8
- Reaction score
- 36
here is an example of a soul fire rune
the problem is, it only hits -10 damage...
you cant make -10 a custom value cause it still loading the script and you dont have access yet to who is "casting" this spell yet...
otherwise you cant just create a condition inside onCastSpell funcion, cause it says that it need to be loaded before function
the question is, is it possible to "add condition to a target" without set it first? cause i would like to poison damage based on player level, or even magic level, is this possible?
PS: im using tfs 0.4
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -10)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
you cant make -10 a custom value cause it still loading the script and you dont have access yet to who is "casting" this spell yet...
otherwise you cant just create a condition inside onCastSpell funcion, cause it says that it need to be loaded before function
the question is, is it possible to "add condition to a target" without set it first? cause i would like to poison damage based on player level, or even magic level, is this possible?
PS: im using tfs 0.4