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

Reyn

On to the next One
Joined
May 15, 2010
Messages
259
Reaction score
1
Location
Germany ;3
I've got a problem of a spell of mine :S
It bugs nearby players and if u got it on and log out then i get an error in console....
this is the spell
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 90)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 115)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
 
 
arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
 
local area = createCombatArea(arr)
setCombatArea(combat, area)
 
local function m(parameters)
doCombat(parameters.cid, parameters.combat, parameters.var)
end
 
function onCastSpell(cid, var)
	local delay = 400
	local seconds = 0
	local parameters = { cid = cid, var = var, combat = combat }
	repeat
		addEvent(m, seconds, parameters)
		seconds = seconds + delay
	until seconds == 300000
return TRUE
end
this in spells.xml
Code:
	<instant name="Dark Aura" words="exeta luna" lvl="500" mana="290" prem="1" aggressive="0" selftarget="1" exhaustion="5000" needlearn="0" event="script" value="support/dark aura.lua">
		<vocation id="1"/>
		<vocation id="8"/>
	</instant>
and this the error
Code:
[03/08/2010 17:43:26] [Error - Spell Interface] 
[03/08/2010 17:43:26] In a timer event called from: 
[03/08/2010 17:43:27] data/spells/scripts/support/dark aura.lua:onCastSpell
[03/08/2010 17:43:27] Description: 
[03/08/2010 17:43:27] (luaDoCombat) Creature not found
please someone help me out >.<
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 70)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 115)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
 
 
local effect = createCombatObject()
setCombatParam(effect, COMBAT_PARAM_EFFECT, 70)
setCombatParam(effect, COMBAT_PARAM_AGGRESSIVE, false)
 
local function m(cid, combat)
	if not isPlayer(cid) then
		return true
	end
	local var = numberToVariant(cid)
	return doCombat(cid, combat, var)
end
 
function onCastSpell(cid, var)
	local delay = 1000
	for t = 0, 300000, delay do
		addEvent(m, t, cid, effect)
	end
	return doCombat(cid, combat, var)
end
 
Oh yea dumb me ^^ should of putted return do combat :S
Code:
You must spread around some Reputation before giving it to Summ again
;/
 
Code:
	for t = 0, 300000, delay do
		addEvent(m, t, cid, effect)
	end

Yr1l5.png
 
Back
Top