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:
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
0.3.5 code
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:
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: