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

Lua Spell for knights

Xleniz

New Member
Joined
Jul 6, 2009
Messages
178
Reaction score
3
Location
Sweden
Hi I'm working on a spell that throws axes around the knight.
It isn't damaging anything, can anyone help?

Code:
local acombat, combat = createCombatObject(), createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_NONE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 25)
setCombatFormula(combat, COMBAT_FORMULA_SKILLS, -100, -50, -100, -50)
local arr =
   {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
setCombatArea(acombat, createCombatArea(arr))
function onTargetTile(cid, pos) doCombat(cid, combat, positionToVariant(pos)) end
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var) return doCombat(cid, acombat, var) end
 
Hi I'm working on a spell that throws axes around the knight.
It isn't damaging anything, can anyone help?

Code:
local acombat, combat = createCombatObject(), createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_NONE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 25)
setCombatFormula(combat, COMBAT_FORMULA_[COLOR="Red"]SKILLS[/COLOR], -100, -50, -100, -50)
local arr =
   {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
setCombatArea(acombat, createCombatArea(arr))
function onTargetTile(cid, pos) doCombat(cid, combat, positionToVariant(pos)) end
setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var) return doCombat(cid, acombat, var) end

setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, -90, 1.3, -50)

I believe your formula are also incorrect.
 
Back
Top