• 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 sometimes heals BUG

Justin123456

New Member
Joined
Mar 24, 2011
Messages
177
Reaction score
4
I made a new spell that I think I failed at... Haha whenever I use it, it hits sometimes but other times it heals the target.. Lol here's the script though maybe I did something wrong..

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 0.7, 1.4, 20, 35)

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Dunno if it will work but you can give it a try :P
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -5, -5, -0.7, -1.4, -20, -35)

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Try out this one (: Rep me if it works :D

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 0.7, 1.4, 20, 35)

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Nope : ( It still heals sometimes and hits the target the other times... ; / Btw if it helps, I'm using TFS 0.3.6

I found out it's this part of the script though
Code:
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 0.7, 1.4, 20, 35)
 
I used:
Code:
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 2.25, 40.5, 2.0, 80)

Instead of:
Code:
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 0.7, 1.4, 20, 35)
 
Back
Top