Hello everyone!
I have problem with make two spells in one. Needtarget and Selftarget.
[TFS 0.3.6]
I have two spells.
1.Target:
2: Speed Up (Haste)
I need to make a spell which will have this 2 functions. When player hit oponent player who's hiting him got haste. I try a lot of ways to do it but everything failed(i try after onCast Spell and with pid). Someone can help me? Or tell me how to do this? I heard that MOD will be helpfull but is too difficult for me :d
Thanks for help..
I have problem with make two spells in one. Needtarget and Selftarget.
[TFS 0.3.6]
I have two spells.
1.Target:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 99)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.6, -0, -1.8, -0)
local arr = {
{0, 0, 0, 3, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
2: Speed Up (Haste)
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 163)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 35000)
setConditionFormula(condition, 0.6, -50, 0.6, -50)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
I need to make a spell which will have this 2 functions. When player hit oponent player who's hiting him got haste. I try a lot of ways to do it but everything failed(i try after onCast Spell and with pid). Someone can help me? Or tell me how to do this? I heard that MOD will be helpfull but is too difficult for me :d
Thanks for help..