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

TFS 0.X Formulas Problem!!

Slafesko

New Member
Joined
Jan 6, 2016
Messages
101
Reaction score
2
I am focusing a big problem with formulas!! i can't handle them. Like i am using this formula for my star
Code:
    return -((skill * 5) + (level)), -((skill * 10) + (level))
And this is what i get when i attack someone!
ab9ylgasx5zh.jpg

and my dist skill is like 150! with level 500 so if we calculate the formula it should attack with 150 x 5 + 500 = 1250 at minimum so what is the problem?! using tfs 0.4 :(:(
tried alot of formulas and it is still same incorrect attacks so is there a way to solve this one?
What i need is to attack from 1 to 50.... for example.
 
Solution
if it's on a player then the player must have resistances such as armor or element absorb
also pvp damage is halved in sources, so whatever value you're getting from straight up calculations is halved then that value gets reduced by armor, defense, and absorb %
does your monster have defenses against the damage type you're dealing?
the final value from a weapon/spell formula is not the range of damage it will do, it's the amount before damage reduction calculations
you likely have defense or armor or element immunity in your monster.xml file which reduces the damage dealt by specific damage sources
 
does your monster have defenses against the damage type you're dealing?
the final value from a weapon/spell formula is not the range of damage it will do, it's the amount before damage reduction calculations
you likely have defense or armor or element immunity in your monster.xml file which reduces the damage dealt by specific damage sources
Well, this attack was on a player also i can't get second formula (skill * 10), as you can see that the attack didn't hit more than first formula. So is it a debug with my source or am i using wrong ways to make formulas? And the problem is that item that i am using is for pallys and they need range attack like from x to x but as you can see that i get same attacks everytime and i was using different formula 5x to 10x!. If am i using a wrong one so tell me which formula should i use to attack with star that depends on skills and level
 
if it's on a player then the player must have resistances such as armor or element absorb
also pvp damage is halved in sources, so whatever value you're getting from straight up calculations is halved then that value gets reduced by armor, defense, and absorb %
 
Solution
if it's on a player then the player must have resistances such as armor or element absorb
also pvp damage is halved in sources, so whatever value you're getting from straight up calculations is halved then that value gets reduced by armor, defense, and absorb %
I am just saying that the attacks works with same rate like 700, 800 then 900 but this isn't the way of paladins attacks.. The formula that i need to do is to attack for example if my distance =100 Attacks from 100 to 500, if i get more distance = 110 then attack with 150 to 750! I mean with my examples that i need my ranges to raise up for my attacks but the way of formulas that i used UP looks the same like if i get more distance it will attack same numbers too with 700,800 So i need it to attack higher in between the formulas that i made
 
I am just saying that the attacks works with same rate like 700, 800 then 900 but this isn't the way of paladins attacks.. The formula that i need to do is to attack for example if my distance =100 Attacks from 100 to 500, if i get more distance = 110 then attack with 150 to 750! I mean with my examples that i need my ranges to raise up for my attacks but the way of formulas that i used UP looks the same like if i get more distance it will attack same numbers too with 700,800 So i need it to attack higher in between the formulas that i made
What?
Tell what you want cleary then we can help. Anyway allways setup min.max at the same ratio for testing damage. Then you will see how work formula
 
Last edited:
What?
Tell what you want cleary then we can help. Anyway allways setup min.max at the same ratio for testing damage. Then you will see how work formula
Sorry for my bad explanation What i wants to say that min-max isn't work good too if i use it, I was using it but i found that it was useless with attack and still gives shit online. May you tell me how should this formula work?
Code:
function onGetFormulaValues(cid, level, skill, attack, factor)
     local min = 1 * skill + attack + 400 + (level/4)
     local max = 6 * skill + attack + 600 + (level/3)
     return -min, -max
end
 
check for an onStatsChange creaturescript, it might be messing with your damage
otherwise i'm out of ideas cause 0.x is buggy enough as is
 
i dont know how you find the problem that's why i'm telling you to look through your scripts for a statschange script because it could be the problem
i'm not a magician, i need to see the script to determine if it's the problem or not
look in creaturescripts.xml and search for "statschange"
 
As like everyone said in the thread above, everything looks fine.

Code:
return -((skill * 5) + (level)), -((skill * 10) + (level))

-- skill = 150
-- level = 500

return -((150 * 5) + (500)), -((150 * 10) + (500))
return -(750 + 500), -(1500 + 500)
return -1250, -2000

-- vs players
return (-1250 / 2), (-2000 / 2)
return -625, -1000
ab9ylgasx5zh.jpg

And all of the damages are within the expected range, since you said these damages were against a player.

If you want it to damage the same against players and monsters, first validate the target is a player, then multiply the damage by 2.
Or change the source, so it no longer halves the damage.
 
Back
Top