local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionFormula(condition, 0.8, -72, 0.8, -72)
setCombatCondition(combat, condition)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 220)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Its mine formula, but i dont know if returnvalule avg even works, just created it for fun. ;pPHP:local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength) local attack = weaponAttack local skill = math.max(getPlayerSkill(cid, 1),getPlayerSkill(cid, 2),getPlayerSkill(cid, 3)) local level = getPlayerLevel(cid) local min = -(skill+attack)*0.5-level/5-20 local max = -(skill+attack)*1.5-level/5-20 local avg = (max+min)/2 return min, max, avg end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage") local area = createCombatArea(AREA_SQUARE1X1) setCombatArea(combat, area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
As Cykotitan said in his first post, theese spells works ONLY in tfs 0.3 or if you compile functions to tfs 0.2.
As Cykotitan said in his first post, theese spells works ONLY in tfs 0.3 or if you compile functions to tfs 0.2.
Hehe, so, I need a list of all spell formulas which need to be fixed for patch 1.0.1
For instance;
Exori Gran
Exori
Exori Hur?<<
Exori con
Exori Mas? ;P
Dont think that you are smart, this formulas AREN'T 100% real tibia formula... I've tested it so I know.
@up
Try on normal players, not on GM's.
--[[
@Obs:
In spells damage, minB and maxB are used in the damage formula only for a better usage, but Tibia 8.0- don't use it since they have more accurate formula.
This script works interpreting this values as nil
Since 2007 summer update, this formula is inaccurate - now level is also counted in some way.
LEVEL, MAGIC and MIN, MAX are arrays with more then one values that can be:
If 2 values:
It will count between the given values (second must be higher then the first).
If 4+ (pairs) values:
It will count between two values as pairs, so if we have 1, 5, 10, 20 it will count 1 to 5, after 10 to 20.
In melee formulas, the damage you will do will be between 0 and the calculated number, please note that shielding and armor from the target will reduce player's damage.
Use the constant values refering to attack types as factors.
--]]
Damage = {}
Damage.__index = Damage
-- Global consts
LEVEL = {8, 100}
MAGIC = {0, 60}
MIN, MAX = {1, 2}, {1, 2}
FULL_ATTACK = 10
BALANCED = 7
FULL_DEFENSE = 5
-- Returns the minA, maxA and averange values for spells formulas
function Damage:getSpellFormula(level, magLevel, min, max)
minA = max / ((level / 3) + (magLevel / 2))
maxA = min / ((level / 3) + (magLevel / 2))
avg = math.floor(minA + maxA / 2)
return minA, maxA, avg
end
-- Returns all the possible combinations between the desired level, magic level, min and max damages
function Damage:getSpellCombinations(level, magic, min, max)
for _,x in ipairs(LEVEL) do
for _,y in ipairs(MAGIC) do
for _,z in ipairs(MIN) do
for _,w in ipairs(MAX) do
minA, maxA, avg = self:getSpellFormula(x, y, z, w)
print('Level: ' .. x .. ' | Magic: ' .. y .. ' | Min: ' .. z .. ' | Max: ' .. w .. ' | minA: ' .. minA .. ' | maxA: ' .. maxA .. ' | avg: ' .. avg)
end
end
end
end
end
-- Returns the maximum melee damage giving the factor (full attack, balanced or full defense), player level, player skill and the attack of the weapon
function Damage:getMelee(factor, playerLevel, playerSkill, weaponAttack)
return (weaponAttack / 20 * playerSkill*2 + weaponAttack + playerLevel / 10) / 10 * factor
end
but i have TFS 0.3b2 and i get crash
PHP:--[[ @Obs: In spells damage, minB and maxB are used in the damage formula only for a better usage, but Tibia 8.0- don't use it since they have more accurate formula. This script works interpreting this values as nil Since 2007 summer update, this formula is inaccurate - now level is also counted in some way. LEVEL, MAGIC and MIN, MAX are arrays with more then one values that can be: If 2 values: It will count between the given values (second must be higher then the first). If 4+ (pairs) values: It will count between two values as pairs, so if we have 1, 5, 10, 20 it will count 1 to 5, after 10 to 20. In melee formulas, the damage you will do will be between 0 and the calculated number, please note that shielding and armor from the target will reduce player's damage. Use the constant values refering to attack types as factors. --]] Damage = {} Damage.__index = Damage -- Global consts LEVEL = {8, 100} MAGIC = {0, 60} MIN, MAX = {1, 2}, {1, 2} FULL_ATTACK = 10 BALANCED = 7 FULL_DEFENSE = 5 -- Returns the minA, maxA and averange values for spells formulas function Damage:getSpellFormula(level, magLevel, min, max) minA = max / ((level / 3) + (magLevel / 2)) maxA = min / ((level / 3) + (magLevel / 2)) avg = math.floor(minA + maxA / 2) return minA, maxA, avg end -- Returns all the possible combinations between the desired level, magic level, min and max damages function Damage:getSpellCombinations(level, magic, min, max) for _,x in ipairs(LEVEL) do for _,y in ipairs(MAGIC) do for _,z in ipairs(MIN) do for _,w in ipairs(MAX) do minA, maxA, avg = self:getSpellFormula(x, y, z, w) print('Level: ' .. x .. ' | Magic: ' .. y .. ' | Min: ' .. z .. ' | Max: ' .. w .. ' | minA: ' .. minA .. ' | maxA: ' .. maxA .. ' | avg: ' .. avg) end end end end end -- Returns the maximum melee damage giving the factor (full attack, balanced or full defense), player level, player skill and the attack of the weapon function Damage:getMelee(factor, playerLevel, playerSkill, weaponAttack) return (weaponAttack / 20 * playerSkill*2 + weaponAttack + playerLevel / 10) / 10 * factor end
Use mine Damage class to get more accurate values if needed.
Are these forumla's the old ones where level was more key or are they the stupid nerffed damaged/healing that we have in tibia now adays?