• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Connect Spells [Needtarget and Selftarget]

zwir

New Member
Joined
May 5, 2011
Messages
2
Reaction score
1
Hello everyone!
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..
 
I'm not sure if I understand what you want, you want a spell that gives damage to the target and gives haste to the person who cast the spell? You can use doChangeSpeed or doTargetCombatCondition with cid.
 
Back
Top