Hello. Im using the soulfire rune script made by cyc~ these are my errors in my console..
This is the script im using
PHP:
[17:10:16.612] [Error - Spell Interface]
[17:10:16.613] data/spells/scripts/attack/soul fire.lua:onCastSpell
[17:10:16.614] Description:
[17:10:16.614] (luaGetPlayerMagLevel) Player not found
[17:10:16.615] [Error - Spell Interface]
[17:10:16.617] data/spells/scripts/attack/soul fire.lua:onCastSpell
[17:10:16.618] Description:
[17:10:16.620] data/spells/scripts/attack/soul fire.lua:25: attempt to index fie
ld '?' (a nil value)
[17:10:16.621] stack traceback:
[17:10:16.623] data/spells/scripts/attack/soul fire.lua:25: in function <data/s
pells/scripts/attack/soul fire.lua:16>
This is the script im using
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
local t = {}
for a = 1, 400 do
t[a] = {}
for b = 0, 156 do
t[a][b] = createConditionObject(CONDITION_FIRE)
setConditionParam(t[a][b], CONDITION_PARAM_DELAYED, true)
addDamageCondition(t[a][b], math.ceil(a / 3 + b / 3), 9000, -10)
end
end
function onCastSpell(cid, var)
if doCombat(cid, combat, var) then
local target = variantToNumber(var)
if target == 0 then
target = getTopCreature(variantToPosition(var)).uid
end
if target == 0 then
return false
end
return doTargetCombatCondition(cid, target, t[getPlayerLevel(cid)][getPlayerMagLevel(cid)], CONST_ME_NONE)
end
end