soul4soul
Intermediate OT User
well this doesn't work but this is what i have. my idea was to make a spell where there was a bright flash of light then after it was gone there would be an explosion so here is my script so far. it doesn't work but i though it was a good idea so I'd post it anyway. it doesn't work like i said but this isn't a request to fix it so don't move this thread
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, -50, 1.6, -100)
arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0},
{0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
local function onCastSpell(parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end
local combat1 = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
local condition = createConditionObject(CONDITION_LIGHT)
setConditionParam(condition, CONDITION_PARAM_LIGHT_LEVEL, 1)
setConditionParam(condition, CONDITION_PARAM_LIGHT_COLOR, 215)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1000)
setCombatCondition(combat, condition)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
function onCastSpell(cid, var)
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell, 1000, parameters)
end