marcos16
Falkhonn
- Joined
- May 4, 2012
- Messages
- 224
- Reaction score
- 1
Magic when used in the same sqm of giving effect to two.
Example:
If a player is in the same sqm than the other and use this magic effect goes to the two, which modify the effect to be only those who use magic?
Example:
If a player is in the same sqm than the other and use this magic effect goes to the two, which modify the effect to be only those who use magic?
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 0)
setCombatParam(combat1, COMBAT_PARAM_AGGRESSIVE, FALSE)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, FALSE)
local condition2 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 40000)
setConditionParam(condition2, CONDITION_PARAM_STAT_MAXHEALTHPERCENT, 90)
setConditionParam(condition2, CONDITION_PARAM_SKILL_AXE, 20)
setConditionParam(condition2, CONDITION_PARAM_SKILL_CLUB,20)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_STONES)
setConditionParam(condition2, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat2, condition2)
arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2, parameters.var)
end
function onCastSpell(cid, var)
doCreatureSay(cid,"Hoooooold!", TALKTYPE_ORANGE_1)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 }
addEvent(onCastSpell1, 10, parameters)
addEvent(onCastSpell2, 10, parameters)
return TRUE
end