[Help]How to change damage 5165

01/12/2010 20:00 ramix#16
but were is calculation archer damage? i need to fix that :S he take like 200M damage -.-
01/12/2010 20:31 intel_ro#17
Quote:
Originally Posted by ramix View Post
but were is calculation archer damage? i need to fix that :S he take like 200M damage -.-
look for dodge based attak :D
01/12/2010 20:45 ramix#18
dodge? why? iam noob in code but i wanna learn :)
01/12/2010 20:47 intel_ro#19
Quote:
Originally Posted by ramix View Post
dodge? why? iam noob in code but i wanna learn :)
I'm noob to but i understand a liltle of coding
01/12/2010 21:12 pro4never#20
Quote:
Originally Posted by xScott View Post
so you cant divide by 160 because it gives a decimal? what if you divided by 200?

but that can give a realy small number i guess iunno XD
Why would decimals cause an issue? You can still end up with a decimal from dividing by 100 as attacks are not a fixed amount.


50001 / 100 will give you a decimal. It will not cause an issue as the source should already be handling it just fine. Most sources will just re-convert any calculated damage to an int to cut off any decimal value before the damage itself is done (if not you will get an error in the calculation stating that the types are different, blablabla)

Decimals are NOT a bad thing in calculations. Infact they make things far more accurate because if you are doing a long string of calculations (defence, bless, torts, reborn def, etcetc) then cutting off decimals will give you a wrong final answer.
01/12/2010 21:24 intel_ro#21
Quote:
Originally Posted by pro4never View Post
Why would decimals cause an issue? You can still end up with a decimal from dividing by 100 as attacks are not a fixed amount.


50001 / 100 will give you a decimal. It will not cause an issue as the source should already be handling it just fine. Most sources will just re-convert any calculated damage to an int to cut off any decimal value before the damage itself is done (if not you will get an error in the calculation stating that the types are different, blablabla)

Decimals are NOT a bad thing in calculations. Infact they make things far more accurate because if you are doing a long string of calculations (defence, bless, torts, reborn def, etcetc) then cutting off decimals will give you a wrong final answer.
;) right .. about same thing on magic attak and fire dmg now is around 1200+ on fire full +12 -7 and a troj with coro around 1880

did anyone tested this yet ?
01/12/2010 21:37 necuja#22
So how do i know what number's to divide by

And is this line the only thing's i have to divide just search these and change it?

Quote:
Damage = (uint)((double)Damage * (100 - C.EqStats.TotalBless) / 100);
Also do i only have to change them in skill.cs or are there more?

Does this line have anything to do with archer's atk and i should just change the 8 to like 28 to make archer's hit less?

Quote:
Damage = (uint)((Damage * (((double)(110 - C.EqStats.Dodge)) / 100)) / 8);

THANKS GUY'S
01/12/2010 22:05 intel_ro#23
Quote:
Originally Posted by necuja View Post
So how do i know what number's to divide by

And is this line the only thing's i have to divide just search these and change it?



Also do i only have to change them in skill.cs or are there more?

Does this line have anything to do with archer's atk and i should just change the 8 to like 28 to make archer's hit less?



THANKS GUY'S
Yes that are only for any kind of skill on mele attak or normal arrow atack u should search in character.cs under "public void TakeAttack(Character Attacker, uint Damage, AttackType AT, bool IsSkill)"
01/12/2010 22:06 ramix#24
i need to put low damage in archer :S

ppl have calculation damage but they not hlp us :(
01/12/2010 22:19 intel_ro#25
Quote:
Originally Posted by ramix View Post
i need to put low damage in archer :S

ppl have calculation damage but they not hlp us :(
did u try to modify that lines .. can u tell me is all is ok , if not we shoul searc then the real dmg seted for arrows in source i'm sure i saw sometin bout arrows dmg :D i found alot of changes made in source .. like cup or bronze prize .. insted of 1K attak it add 100K .. and some wired like on bless u can bles headgear because .. of conctrol code :D .. they given the source but modified for ppl that can undersand to read the code and modify!
On my server ppl cry they don't have rb skils on second rb so i added defaul skils stigma cure thuder bless mdeitation :D

idk if in 5165 reflect is coded as skill if yes i will put'it on second rb skill .. then to find a way to to random acctivate reflect on attak .. but there will be a probelm .. if i put in this code of 5165 and on attak is not checking if attaked char is not second rb reflect will be added on all chars ..
01/12/2010 22:50 necuja#26
Quote:
Originally Posted by intel_ro View Post
Yes that are only for any kind of skill on mele attak or normal arrow atack u should search in character.cs under "public void TakeAttack(Character Attacker, uint Damage, AttackType AT, bool IsSkill)"
Alright i looked under that in Character.cs and i see lines like in the Skill.cs so i just change these lines?

Quote:
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Damage = (uint)((double)Damage * (((double)(110 - EqStats.Dodge) / 100)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Damage = (uint)((double)Damage * (((double)(100 - EqStats.MDef1) / 100)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Too

Quote:
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 160);
Damage = (uint)((double)Damage * (((double)(110 - EqStats.Dodge) / 160)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 160);
Damage = (uint)((double)Damage * (((double)(100 - EqStats.MDef1) / 160)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 160);
And i do it in both Character.cs and Skill.cs?

I also found these

Quote:
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Damage = (uint)((double)Damage * (((double)(100 - EqStats.MDef1) / 100)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Damage = (uint)((double)Damage * (((double)(110 - EqStats.Dodge) / 100)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 100);
Above this line in Character.cs

Quote:
public void TakeAttack(Character Attacker, uint Damage, AttackType AT, bool IsSkill)
Should i change those to this also?

Quote:
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 160);
Damage = (uint)((double)Damage * (((double)(100 - EqStats.MDef1) / 160)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 160);
Damage = (uint)((double)Damage * (((double)(110 - EqStats.Dodge) / 160)));
Damage = (uint)((double)Damage * (100 - EqStats.TotalBless) / 160);
THANKS AGAIN!!!!:handsdown::handsdown::handsdown:
01/12/2010 23:07 ramix#27
takes me 200M :S archer why?

is only hit 200M with bow and arrows :S
01/12/2010 23:22 Arcо#28
Quote:
Originally Posted by Tweety.4Girls View Post
I have atack fixed 100% try my server and see that
Honestly, I highly doubt that.
You couldn't even make your own npc and now you are claiming you fixed attack calculations 100%?
Sorry but I find that very hard to believe.
01/12/2010 23:24 necuja#29
Quote:
Originally Posted by Hepatitis C View Post
Honestly, I highly doubt that.
You couldn't even make your own npc and now you are claiming you fixed attack calculations 100%?
Sorry but I find that very hard to believe.
Yeah i doubt she did too but u should help me with them:p

Thanks:handsdown::handsdown::handsdown:
01/12/2010 23:27 ramix#30
yah me too :S

iam try fix my damage ty to this topic ;) and the ppl in this topic ;)

but is hard fixed... some times trojan have a normal attack and other times have a overpower damage :S like ninjas :S