• 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!

Help with a spell that increases the attackspeed

Chewy

New Member
Joined
Jun 30, 2008
Messages
9
Reaction score
0
Hey could someone please tell me whats wrong witht this spell?
Its supossed to heal and increase the attack speed. It kinda works, actually it heals and atks faster(it doesnt atk faster always so i guess thats the bug.

these are the errors im getting:
Code:
[22/04/2009  10:27:22] Lua Script Error: [Spell Interface] 
[22/04/2009  10:27:22] in a timer event called from: 
[22/04/2009  10:27:22] data/spells/scripts/custom/furycombat.lua:onCastSpell

[22/04/2009  10:27:22] luaDoCombat(). Combat not found

[22/04/2009  10:27:22] Lua Script Error: [Spell Interface] 
[22/04/2009  10:27:22] in a timer event called from: 
[22/04/2009  10:27:22] data/spells/scripts/custom/furycombat.lua:onCastSpell

[22/04/2009  10:27:22] attempt to index a nil value
[22/04/2009  10:27:22] stack traceback:
[22/04/2009  10:27:22] 	[C]: in function 'doCombat'
[22/04/2009  10:27:22] 	data/spells/scripts/custom/furycombat.lua:27: in function <data/spells/scripts/custom/furycombat.lua:26>

[22/04/2009  10:27:22] Lua Script Error: [Spell Interface] 
[22/04/2009  10:27:22] in a timer event called from: 
[22/04/2009  10:27:22] data/spells/scripts/custom/furycombat.lua:onCastSpell

[22/04/2009  10:27:22] attempt to index a nil value
[22/04/2009  10:27:22] stack traceback:
[22/04/2009  10:27:22] 	[C]: in function 'doCombat'
[22/04/2009  10:27:22] 	data/spells/scripts/custom/furycombat.lua:27: in function <data/spells/scripts/custom/furycombat.lua:26>

[22/04/2009  10:27:22] Lua Script Error: [Spell Interface] 
[22/04/2009  10:27:22] in a timer event called from: 
[22/04/2009  10:27:22] data/spells/scripts/custom/furycombat.lua:onCastSpell

[22/04/2009  10:27:22] attempt to index a nil value
[22/04/2009  10:27:22] stack traceback:
[22/04/2009  10:27:22] 	[C]: in function 'doCombat'
[22/04/2009  10:27:22] 	data/spells/scripts/custom/furycombat.lua:27: in function <data/spells/scripts/custom/furycombat.lua:26>

[22/04/2009  10:27:22] Lua Script Error: [Spell Interface] 
[22/04/2009  10:27:22] in a timer event called from: 
[22/04/2009  10:27:22] data/spells/scripts/custom/furycombat.lua:onCastSpell

[22/04/2009  10:27:22] attempt to index a nil value
[22/04/2009  10:27:22] stack traceback:
[22/04/2009  10:27:22] 	[C]: in function 'doCombat'
[22/04/2009  10:27:22] 	data/spells/scripts/custom/furycombat.lua:27: in function <data/spells/scripts/custom/furycombat.lua:26>

And this is the script.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 13)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1.305, 0, 1.48, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL , 0, 0, 1.0, 0)



local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, 10)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 10)
setCombatCondition(combat, condition)


local function onCastSpell1(parameters)
    doCombat(parameters.cid, combat, parameters.var)
end
local function atk(parameters)
	doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell2(cid, var)
    local delay = 100
    local seconds = 0
    local parameters = { cid = cid, var = var, combat2 = combat2}
    repeat
        addEvent(atk, seconds, parameters)
        seconds = seconds + delay
    until seconds == 400      
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 500, parameters)
addEvent(onCastSpell2, 500, parameters)


end

help please :p
 
Back
Top Bottom