Which script for archery?

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 095. Note: Core 095 is no longer officially supported.

Moderator: POL Developer

Post Reply
Terryl
Neophyte Poster
Posts: 32
Joined: Thu Aug 10, 2006 9:59 am

Which script for archery?

Post by Terryl »

Hey!

Which are the scripts and includes used to calculate archery damage? The problem is im trying to take away the tactics bonus from archery but I cannot find the file where this bonus is added. in include/hitscriptinc there is nothing.

I heard this has something to do with the core, it is 095 :p Know any way to take away the tactics bonus?
User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm
Location: Nederland, Texas

Post by tekproxy »

What distro are you using?
Terryl
Neophyte Poster
Posts: 32
Joined: Thu Aug 10, 2006 9:59 am

Post by Terryl »

tekproxy wrote:What distro are you using?
Running polversion 095 :p
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am
Location: Illinois, USA

Post by Tritan »

What script base are you running?
Terryl
Neophyte Poster
Posts: 32
Joined: Thu Aug 10, 2006 9:59 am

Post by Terryl »

No one know how to fix this? :/ Running Pol095 with a remade zh script release... Cmon guys help me out :p
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am
Location: Illinois, USA

Post by Tritan »

I have never looked at those combat scripts but I would think it would be someplace in a hitscript or something. Take a look at your archery package and your combat scripts to see how they are connected.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

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.
Terryl
Neophyte Poster
Posts: 32
Joined: Thu Aug 10, 2006 9:59 am

Post by Terryl »

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: Select all

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.
Post Reply