Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 59
This spells have a Casting Time, and a Exhausted for this only spells,
But when I use it, don't work, I can use this spells on Casting Time, but don't works the Exhaust , what I'm doing wrong ?
Error
But when I use it, don't work, I can use this spells on Casting Time, but don't works the Exhaust , what I'm doing wrong ?
Error
LUA:
input:1: attempt to call a nil value (global 'createCombatObject')
LUA:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 21)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, -70, -1, -80, 5, 5, 1, 1)
local area1 = createCombatArea(AREA_INFERNO)
setCombatArea(combat1, area1)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
if exhaustion.check(cid, 23000) == false then
exhaustion.set(cid,23000, 100)
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid,23000).."]")
end
end
local function castingTime(cid)
end
local function castingStop(cid)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1 }
local casttime = 4000
local globaltime=(casttime)
if (globaltime <= 0) then
addEvent(castingStop, (50), cid)
addEvent(onCastSpell1, (51), parameters)
else
addEvent(castingTime, 1, cid)
addEvent(castingStop, (globaltime+50), cid)
addEvent(onCastSpell1, (globaltime+51), parameters)
end
return true
end