• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Lua Spell 8 hits/8 effect would that be possible?

Daniel Braga

New Member
Joined
Mar 17, 2018
Messages
51
Reaction score
1
the spell would work as follows, the caster would launch a ball of energy, and in sequence the target would take 8 hits with 8 different effects, each hit 1 different effect in sequence.

giving the appearance that the caster is sort of controlling the energy ball

each effect with function to change position x.y
 
Solution
the spell would work as follows, the caster would launch a ball of energy, and in sequence the target would take 8 hits with 8 different effects, each hit 1 different effect in sequence.

giving the appearance that the caster is sort of controlling the energy ball

each effect with function to change position x.y
You can get the idea from here if that's what you want
Lua:
local acombat = createCombatObject()


local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 17)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.5, -65, -4.5, -0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE...

abdala ragab

Banned User
Joined
Aug 18, 2018
Messages
306
Solutions
10
Reaction score
271
the spell would work as follows, the caster would launch a ball of energy, and in sequence the target would take 8 hits with 8 different effects, each hit 1 different effect in sequence.

giving the appearance that the caster is sort of controlling the energy ball

each effect with function to change position x.y
You can get the idea from here if that's what you want
Lua:
local acombat = createCombatObject()


local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 17)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.5, -65, -4.5, -0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 35)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -4.5, -65, -4.5, -0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 1)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -4.5, -65, -4.5, -0)


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, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 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},
}

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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 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},
}

arr3 = {
{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, 2, 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},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end



function onCastSpell(cid, var)
local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3,}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell3, 400, parameters)
end



function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 90732) == 1 then
strg = getPlayerStorageValue(cid, 90732)
doCombat(cid, acombat, var)
local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3,}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell3, 400, parameters)
else
doPlayerSendCancel(cid,"You Must Do The Q Before Casting This Spell.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return true
end
 
Solution
Top