Aradz
New Member
- Joined
- Sep 19, 2013
- Messages
- 51
- Reaction score
- 1
Hello i have problem with my Spell it should work like Utevo Lux but it gives me some errors in console.
And Error :
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_LIGHT)
setConditionParam(condition, CONDITION_PARAM_LIGHT_LEVEL, 9)
setConditionParam(condition, CONDITION_PARAM_LIGHT_COLOR, 215)
setConditionParam(condition, CONDITION_PARAM_TICKS, 33 * 60 * 1000)
setCombatCondition(combat, condition)
function cheeeck(cid)
if getPlayerStorageValue(cid,50000) == 1 and getPlayerLevel(cid) > 200 then
local p = getCreaturePosition(cid)
local Position = {x = p.x+1, y = p.y, z = p.z}
doSendMagicEffect(Position, 181)
elseif getPlayerStorageValue(cid,50000) == 1 then
doSendMagicEffect(getPlayerPosition(cid), 182)
elseif getPlayerStorageValue(cid,50001) == 1 and getPlayerLevel(cid) > 200 then
local p = getCreaturePosition(cid)
local Position = {x = p.x+1, y = p.y, z = p.z}
doSendMagicEffect(Position, 183)
elseif getPlayerStorageValue(cid,50001) == 1 then
doSendMagicEffect(getPlayerPosition(cid), 16)
elseif getPlayerStorageValue(cid,50002) == 1 and getPlayerLevel(cid) > 200 then
local p = getCreaturePosition(cid)
local Position = {x = p.x+1, y = p.y, z = p.z}
doSendMagicEffect(Position, 177)
elseif getPlayerStorageValue(cid,50002) == 1 then
doSendMagicEffect(getPlayerPosition(cid), 17)
elseif getPlayerStorageValue(cid,50003) == 1 and getPlayerLevel(cid) > 200 then
local p = getCreaturePosition(cid)
local Position = {x = p.x+1, y = p.y, z = p.z}
doSendMagicEffect(Position, 180)
elseif getPlayerStorageValue(cid,50003) == 1 then
doSendMagicEffect(getPlayerPosition(cid), 18)
elseif getPlayerStorageValue(cid,50004) == 1 and getPlayerLevel(cid) > 200 then
local p = getCreaturePosition(cid)
local Position = {x = p.x+1, y = p.y, z = p.z}
doSendMagicEffect(Position, 179)
elseif getPlayerStorageValue(cid,50004) == 1 then
doSendMagicEffect(getPlayerPosition(cid), 19)
elseif getPlayerStorageValue(cid,50005) == 1 and getPlayerLevel(cid) > 200 then
local p = getCreaturePosition(cid)
local Position = {x = p.x+1, y = p.y, z = p.z}
doSendMagicEffect(Position, 178)
elseif getPlayerStorageValue(cid,50005) == 1 then
doSendMagicEffect(getPlayerPosition(cid), 20)
end
end
function onCastSpell(cid, var)
addEvent(cheeeck,0,cid)
addEvent(statup)
return doCombat(cid, combat, var)
end
Code:
[Error - Spell Interface]
data/spells/scripts/support/aura.lua:onCastSpell
Description:
(luaAddEvent) Callback parameter should be a function.