• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

spell problem can couse lag? can be fixed?

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Hello i got some problem with my spells i get some error in consol and i wanna know how i can fix thim!
error in consol:

Code:
[06/12/2009 15:45:15] [Error - Spell Interface] 
[06/12/2009 15:45:16] In a timer event called from: 
[06/12/2009 15:45:16] mods/scripts/sorcerer/lovecore.lua:onCastSpell
[06/12/2009 15:45:17] Description: 
[06/12/2009 15:45:17] (luaDoCombat) Creature not found

[06/12/2009 15:45:18] [Error - Spell Interface] 
[06/12/2009 15:45:19] In a timer event called from: 
[06/12/2009 15:45:19] mods/scripts/sorcerer/lovecore.lua:onCastSpell
[06/12/2009 15:45:20] Description: 
[06/12/2009 15:45:20] (luaDoCombat) Creature not found

[06/12/2009 15:45:21] [Error - Spell Interface] 
[06/12/2009 15:45:22] In a timer event called from: 
[06/12/2009 15:45:22] mods/scripts/sorcerer/lovecore.lua:onCastSpell
[06/12/2009 15:45:23] Description: 
[06/12/2009 15:45:23] (luaDoCombat) Creature not found
 
i used that like 6 posts up and it couse that error and dosent work... and the first script makes that script no exhaust and no mana loss
 
Then rename the vars? ;s
Code:
local area1, formula1, delay1, combat1 = {
	{
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{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 1, 1},
		{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
	},
	{
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
	}
},
{
	{-54.63, -124, -43.2, -240},
	{-65.3, -114, -43.1, -640},
	{-42.44, -104, -53.6, -240},
	{-52.53, -124, -46.2, -540},
	{-62.43, -104, -47.3, -440}
},
	{100, 300, 500, 700, 900}, {}
for i = 1, 5 do
	table.insert(combat1, createCombatObject())
	setCombatParam(combat1[i], COMBAT_PARAM_TYPE, i == 5 and COMBAT_DEATHDAMAGE or COMBAT_PHYSICALDAMAGE)
	setCombatParam(combat1[i], COMBAT_PARAM_EFFECT, 3)
	setCombatFormula(combat1[i], COMBAT_FORMULA_LEVELMAGIC, formula1[i][1], formula1[i][2], formula1[i][3], formula1[i][4])
	setCombatArea(combat1[i], createCombatArea(area1[i]))
end
local function castSpell(cid, var, i)
	if isCreature(cid) == TRUE then
		doCombat(cid, combat1[i], var)
	end
end
function onCastSpell(cid, var)
	for i = 1, 5 do
		addEvent(castSpell, delay1[i], cid, var, i)
	end
end
 
Then rename the vars? ;s
Code:
local area1, formula1, delay1, combat1 = {
	{
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
	},
	{
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
	},
	{
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
		{1, 1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},
{
	{-54.63, -124, -43.2, -240},
	{-65.3, -114, -43.1, -640},
	{-42.44, -104, -53.6, -240},
	{-52.53, -124, -46.2, -540},
	{-62.43, -104, -47.3, -440}
},
	{100, 300, 500, 700, 900}, {}
for i = 1, 5 do
	table.insert(combat1, createCombatObject())
	setCombatParam(combat1[i], COMBAT_PARAM_TYPE, i == 5 and COMBAT_DEATHDAMAGE or COMBAT_PHYSICALDAMAGE)
	setCombatParam(combat1[i], COMBAT_PARAM_EFFECT, 3)
	setCombatFormula(combat1[i], COMBAT_FORMULA_LEVELMAGIC, formula1[i][1], formula1[i][2], formula1[i][3], formula1[i][4])
	setCombatArea(combat1[i], createCombatArea(area1[i]))
end
local function castSpell(cid, var, i)
	if isCreature(cid) == TRUE then
		doCombat(cid, combat1[i], var)
	end
end
function onCastSpell(cid, var)
	for i = 1, 5 do
		addEvent(castSpell, delay1[i], cid, var, i)
	end
end

what do i add for 2 effects? or more effects?
 
Back
Top