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

Custom death spell for Sorcerers...

Rexanilator

New Member
Joined
Oct 3, 2009
Messages
297
Reaction score
2
I am trying to create a custom spell for sorocerers that does death damage and does an effect of mort over a large area 5x5 or even 6x6.

The code I was using for tfs 0.3.6 that worked fair was as follows:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 13, 18)

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

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

I had to do an adjustment on my source code because the spells were not adjusting properly with the new formula. I went into combat.cpp and replaced the following code from 0.3.6 with the code from 0.3.5

0.3.6 code
Code:
					min = (int32_t)((player->getLevel() / minl + player->getMagicLevel() * minm) * 1. * mina + minb);
					max = (int32_t)((player->getLevel() / maxl + player->getMagicLevel() * maxm) * 1. * maxa + maxb);

0.3.5 code
Code:
					min = (int32_t)((player->getLevel() + player->getMagicLevel() * 4) * 1. * mina + minb);
					max = (int32_t)((player->getLevel() + player->getMagicLevel() * 4) * 1. * maxa + maxb);

All the other spells are now working great and adjust easily - except for this one spell - called exevo gran mas mort.

It does not matter how it is adjusted it hits like 1017 all the time.

Can someone help me revive this spell...my sorcs are unhappy!

Rep given as always!:thumbup:
 
i think you have to put a - infront of the numbers D:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -3, -3, -13, -18)

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

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Yes...I thought so to...and I tried both of those things - change Attack to Combat - same thing.

Put a - in front of the numbers...same thing.

That's why I need help.
 
its in spells...

It provides the effect and everything...but the damage is always the same no matter what adjustment - what lvl or anything. It's like a hard coded damage that never changes.
 
Back
Top