fresh eyes on this please - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: fresh eyes on this please (/Thread-fresh-eyes-on-this-please) |
fresh eyes on this please - Joe Loop - 01-03-2013 06:00 AM I have been looking at this for to long and can not fathom why my special dmg output still isent reduced by the "respoison" If i add .x tag.poisondamage 100 to a weapon and test on a mob with "0" respoison and one with "50" respoison, both still get "100" extra damage, eventhou the one with "50" respoison should get 50% reduced extra damage.... (effect on weapons) ON=@DAMAGE local.weappoison = <EVAL <tag0.poisondamage>> local.dampoisonres = <eval <src.respoison>/100> local.dampoisontemp = <muldiv <local.weappoison>,<local.dampoisonres>,1>> local.dampoisonFinal = <eval <local.weappoison> - <local.dampoisontemp>> local.extradamage = <eval <local.dampoisonFinal>> src.hits=<src.hits>-<eval <local.dampoisonFinal>> src.say @000e6 <eval <local.dampoisonFinal>> RE: fresh eyes on this please - Mordaunt - 01-03-2013 08:31 AM You are not over riding ARGN1 which is the hardcoded damage the item is taking... Also src.hits = is affecting the person doing the damage to the item, not the item itself which is still default RE: fresh eyes on this please - darksun84 - 01-03-2013 10:01 PM there an other problem in this line local.dampoisonres = <eval <src.respoison>/100> for handling decimal values, you have to use fval or floatval, otherwise you'll always get 0 as result and that's why you get always the maximum damage. Also i bet you have to put fval or floatval in muldiv too RE: fresh eyes on this please - Joe Loop - 01-04-2013 06:12 AM Ahh fval did work quite well for me, thx a lot ... now how do i override argn1 doing ARGN1 = <fval <myverycustomdmghere>+<thenormalargn1>> doesent really do anything RE: fresh eyes on this please - Mordaunt - 01-04-2013 06:20 AM RETURN 1 at the end of your code |