Fabi Marzan
Well-Known Member
- Joined
- Aug 31, 2020
- Messages
- 135
- Solutions
- 6
- Reaction score
- 67
Use: TFS 1.X (1.3)
Very well, I have a problem with a spell that when I execute it I get the following error:
The scripts that I use:
I've been trying and trying and it's on the line:
It is where I get the error, on the contrary, when I eliminate it, it no longer happens to me. Any solution? I would really appreciate it.
Very well, I have a problem with a spell that when I execute it I get the following error:
The scripts that I use:
Lua:
local combatOne = createCombatObject()
setCombatParam(combatOne, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combatOne, COMBAT_FORMULA_LEVELMAGIC, -1.0, -150, -1.0, -160)
local function Test(cid, target)
if isCreature(cid) then
if isCreature(target) then
local pos = getCreaturePosition(target)
addEvent(doSendMagicEffect, 0, {x = pos.x+1, y = pos.y, z = pos.z}, 15)
return true
end
end
return true
end
function onCastSpell(cid, var)
local parameters = {cid = cid, var = var, combatOne = combatOne}
---addEvent(onCastSpellOne, 100, parameters)
local config = {
hit = 1, -- Veces que dara un hit.
time = 100, -- tiempo que saldra la magia.
configtarget = getCreatureTarget(cid), --- No borre (es importante para que salga las magias).
}
for a = 1, config.hit do
addEvent(Test, config.time * a, cid, config.configtarget)
end
return doCombat(cid, combatOne, var)
end
I've been trying and trying and it's on the line:
Code:
addEvent(Test, config.time * a, cid, config.configtarget)