Yukiko wrote:
To be honest, I have looked through the versions of ZH scripts that I have and I cannot find any reference to archery weapons.
My guess is that the ZH scripts you have probably left archery to tyhe core to handle. Now I could be wrong ofcourse but as I recall, the developers removed most if not all attack functions from the core some time ago. If that is the case then you'll hjave to script your own archery hitscript.
WoD scripts had done something similar with archery and it gave me a pain when I was running that scriptset because I wasn't getting any archery hits at all.
Actually the zh scripts handle archery unless im mistaken, this is taken from the include file "hitscriptinc" in the scriptversion im trying to fix:
Code:
function ModByDist( attacker, defender, weapon, basedamage )
if( weapon.attribute == "Archery" )
basedamage := basedamage *
( 2.0 * GetEffectiveSkill( attacker, SKILLID_ARCHERY ) + GetDexterity(attacker) + 55.0 ) /
( 270.0 + (( 2.0 * GetEffectiveSkill( attacker, SKILLID_ARCHERY ) + GetDexterity(attacker) ) / 5 ) );
var dist := Distance( attacker, defender );
if( (dist <= 1) or (dist > 10) )
basedamage := basedamage * 0.25;
endif
if( IsRanger(attacker) )
basedamage := basedamage * ClasseBonus( attacker, CLASSEID_RANGER ) * 1.5;
endif
else
if( defender.isA(POLCLASS_NPC) )
basedamage := basedamage * ClasseBonus( attacker, CLASSEID_WARRIOR );
else
var level := GetObjProperty( attacker, CLASSEID_WARRIOR );
if( level )
level := level - 2;
if( level >= 1 )
basedamage := basedamage * ClasseBonusByLevel( level );
endif
endif
endif
endif
if( GetObjProperty( attacker, CLASSEID_MAGE ) )
if( !GetObjProperty( attacker, CLASSEID_WARRIOR ) )
basedamage := basedamage / ClasseBonus( attacker, CLASSEID_MAGE );
endif
endif
if( GetObjProperty( defender, CLASSEID_MAGE ) )
if( !GetObjProperty( defender, CLASSEID_WARRIOR ) )
basedamage := basedamage * ClasseBonus( defender, CLASSEID_MAGE );
endif
endif
return basedamage;
endfunction
One fault in this is the * 1.5 up at when classebonus is calculated for rangers, but thats just a small problem. The biggest problem is that somehow after this is calculated the core takes over and adds tactics bonus. And I cannot see why the core would take over. What I need help with is finding the script or include file that monitors what is calculated in the core, if there even is one. Otherversions of releases I worked with does not let the core handle anything, so it can be done, just that I cannot come up with a way.