Aleada
Unknown Member
- Joined
- Mar 14, 2013
- Messages
- 231
- Reaction score
- 7
I'm trying to make a new spell that throws a star at the target, damages, then causes them to bleed overtime...
Here's my nooby attempt:
I get this error though :/
Here's my nooby attempt:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYPHYSICAL)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_THROWINGSTAR)
function onGetFormulaValues(cid, level, skill, attack, factor)
local condition = createConditionObject(CONDITION_BLEEDING)
local skillTotal, levelTotal = skill + attack * 5, level / 5 * 5
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 25, 3000, -45)
setCombatCondition(combat, condition)
return -(skillTotal / 5 + levelTotal), -(skillTotal / 4 + levelTotal)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
I get this error though :/
Code:
[24/7/2013 0:9:53] [Error - Spell Interface]
[24/7/2013 0:9:53] In a callback: data/spells/scripts/Assassin/attack/inflict wound.lua:onGetFormulaValues
[24/7/2013 0:9:53] (Unknown script file)
[24/7/2013 0:9:53] Description:
[24/7/2013 0:9:53] (LuaInterface::luaAddDamageCondition) Condition not found